Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
U

UniPwn

> 编程语言
Open source

Unitree Robot BLE Service Command Injection Analysis Author: Bin4ry aka Andreas Makris [[email protected]] Co-Author: h0stile aka Ke…

396 stars0 likes1 views
WebsiteGitHub

About

Unitree Robot BLE Service Command Injection Analysis Author: Bin4ry aka Andreas Makris [[email protected]] Co-Author: h0stile aka Ke…

Unitree Robot BLE Service Command Injection Analysis

Author: Bin4ry aka Andreas Makris [[email protected]]
Co-Author: h0stile aka Kevin Finisterre
Contributor: legion1581 aka Konstantin Severov from theroboverse helped to fix the payload for the injection and proved it with a fully working PoC :slightly_smiling_face: thanks dude, this was a critical contribution, very much appreciated!

Date: September 20, 2025

CVEs

CVE-2025-35027
CVE-2025-60017
CVE-2025-60250
CVE-2025-60251

Paper

The research from this repo is incorporated into a paper that presents a systematic security assessment of the Unitree G1. The reaserch impact is however NOT limited to just the G1, rather the entire Unitree product line from starting with the Go2 series. The code on newer Unitree bots appears to be a fork of the Go2 codebase, specifically making the Go1 lineage, and other pre-Go2 Unitree bots not vulnerable. All modern variants are however impacted at this time. Unitree has yet to release an advisory clarifying the exact impact across the product line.

Link to Paper: https://arxiv.org/abs/2509.14139
Title: Cybersecurity AI: Humanoid Robots as Attack Vectors
Authors: Víctor Mayoral-Vilches, Andreas Makris, Kevin Finisterre

bibtex
@misc{mayoralvilches2025cybersecurityaihumanoidrobots,
      title={Cybersecurity AI: Humanoid Robots as Attack Vectors}, 
      author={Víctor Mayoral-Vilches and Andreas Makris and Kevin Finisterre},
      year={2025},
      eprint={2509.14139},
      archivePrefix={arXiv},
      primaryClass={cs.CR},
      url={https://arxiv.org/abs/2509.14139}, 
}

Table of Contents

  • Unitree Robot BLE Service Command Injection Analysis
    • Overview
    • BLE Service Discovery
    • Reverse Engineering the Protocol
    • Instruction 1: The "Secure" Handshake
    • Instruction 2: Get Serial Number
    • Instruction 3: Initialize WiFi Mode
    • Instruction 4: Set SSID
    • Instruction 5: Set Password
    • Instruction 6: Set Country Code (The Trigger!)
    • The WiFi Setting Thread
    • The Vulnerable Function: Command Injection
    • Attack Flow Summary
    • The Wormable Threat
    • Proof of Concept
    • Real-World Deployment & Impact
      • Current Deployments
      • Impact Assessment
      • Law Enforcement & Military Impact
      • Corporate Environments
      • Consumer Impact
      • Wormable Propagation
    • Technical Details
      • BLE Service Architecture
      • Cryptographic Parameters
      • Packet Structure
    • Lessons Learned
    • Disclosure Timeline
      • First, and last attempt to report another security issue in your flagship G1, and Go2, and other bots
    • Disclaimer
    • A Pattern of Security Issues
    • Conclusion
    • Legal Notice
    • Contributing
    • Licensing, and access to these files

Overview

During our security research on Unitree robotic platforms, we discovered a critical vulnerability in the Bluetooth Low Energy (BLE) Wi-Fi configuration interface. This vulnerability affects multiple Unitree robot models including Go2, G1, H1 and B2 series robots up to the latest firmware from today [20. September 2025].

** This represents the first publicly disclosed exploit targeting humanoid robots!**

The vulnerability combines multiple security issues: hardcoded cryptographic keys, trivial authentication bypass, and unsanitized command injection. What makes this particularly concerning is that it's completely wormable - infected robots can automatically compromise other robots in BLE range. This vulnerability allows the attacker to completely takeover the device.

We published the cryptographic keys in July Link to Tweet but Unitree did not care.

Let's dive into the technical details of how we discovered and exploited this vulnerability.

BLE Service Discovery

The first step was to identify the BLE services exposed by the robots. All affected Unitree models expose a custom BLE service for Wi-Fi configuration:

Service UUID: 0000ffe0-0000-1000-8000-00805f9b34fb
Write Characteristic: 0000ffe2-0000-1000-8000-00805f9b34fb  
Notify Characteristic: 0000ffe1-0000-1000-8000-00805f9b34fb

Reverse Engineering the Protocol

Through reverse engineering, we discovered that the robot implements a receive manager that processes encrypted BLE packets. Here's what we found:

The receive manager first decrypts incoming packets using hardcoded AES parameters:

python
AES_KEY = "df98b715d5c6ed2b25817b6f2554124a"
AES_IV  = "2841ae97419c2973296a0d4bdfe19a4f"
Mode: AES-CFB128

After decryption, the packets are processed based on instruction codes in a switch-case structure. Let's examine each instruction:

Instruction 1: The "Secure" Handshake

The handshake "authentication" is laughably simple:

Basically, the robot checks if the decrypted packet includes the string "unitree" as the handshake secret, then sets the valid_incoming_user flag to 1. That's the entire "authentication" mechanism!

Instruction 2: Get Serial Number

This instruction checks if the user is "authenticated" (i.e., the flag is set), then reads the serial number file and returns it. This confirms we have access to the system.

Instruction 3: Initialize WiFi Mode

This instruction initializes WiFi settings. Users can choose between AP mode (subcommand = 1) or STA mode (subcommand = 2):

Instruction 4: Set SSID

This instruction stores the WiFi SSID. Here's our first injection point:

Instruction 5: Set Password

Similar to the SSID command, this stores the WiFi password. Another injection point:

Instruction 6: Set Country Code (The Trigger!)

This instruction sets the WiFi country code and, critically, triggers the WifiSettingThreadFunction:

When instruction 6 is executed, it starts the WiFi configuration thread, which leads us to the vulnerable functions.

The WiFi Setting Thread

The WiFi configuration thread calls either restart_wifi_ap or restart_wifi_sta depending on the mode:

The Vulnerable Function: Command Injection

Both restart_wifi_ap (hostapd_restart.sh) and restart_wifi_sta (wpa_supplicant_restart.sh) functions follow the same vulnerable pattern.
Here's the smoking gun (using restart_wifi_ap function as an example):

The function constructs this command:

bash
sudo sh /unitree/module/network_manager/upper_bluetooth/hostapd_restart.sh "wifi_ssid wifi_pass"

This command is then passed directly to system() without any input validation or sanitization!

If we control either wifi_ssid or wifi_pass, we can inject our own commands. A simple payload like:

bash
";$(reboot -f);#

Would be enough to reboot the robot. But we can do so much more...

Attack Flow Summary

Here's the complete attack sequence we need to execute:

  1. Send the AES encrypted payload "unitree" as data for instruction 1
  2. Send get_sn command and decrypt the response to verify access
  3. Send init_wifi with subcommand 1 (AP) or 2 (STA)
  4. Set wifi_ssid to our injection payload like ";$(reboot -f);#
  5. Set wifi_pass to some arbitrary value
  6. Set wifi country code to trigger the vulnerable thread

If everything works, the robot should execute our injected command with root privileges.

The Wormable Threat

What makes this vulnerability particularly dangerous is its wormable nature. With this method, we can:

  • Run arbitrary commands with root privileges
  • Transfer and execute malware via payload injection
  • Force robots to connect to attacker-controlled WiFi networks
  • Create self-spreading robot malware that infects nearby robots

An infected robot can simply scan for other Unitree robots in BLE range and automatically compromise them, creating a robot botnet that spreads without user intervention.

Proof of Concept

We developed a complete proof-of-concept exploit framework that demonstrates this vulnerability. The exploit includes:

  • Python-based BLE scanner and exploit framework
  • Android APK (previously shared on Sep 5, 2025 in Slack channel to testers via PWD protected zip)
  • Multiple predefined payloads (SSH enablement, system reboot, custom commands)
  • Support for all affected robot models (Go2, G1, H1, B2, ...)

Key components of our working exploit:

python
AES_KEY = bytes.fromhex("df98b715d5c6ed2b25817b6f2554124a")
AES_IV = bytes.fromhex("2841ae97419c2973296a0d4bdfe19a4f")
HANDSHAKE_CONTENT = "unitree"

def build_pwn(cmd):
    return f'";$({cmd});#'

Please notice, a full reboot of the robot might take 10-15 seconds after the command was send ;)

Real-World Deployment & Impact

Current Deployments

Unitree robots are already being deployed in critical real-world scenarios, making this vulnerability particularly concerning:

Law Enforcement: Nottinghamshire Police are currently trialing Unitree robots for armed response scenarios, including:

  • Armed sieges and hostage negotiations
  • Building searches and dangerous area reconnaissance
  • Thermal imaging and 3D mapping operations
  • Silent operations where drones would be too noisy

Military Operations: Unitree robots are being utilized by China's PLA for military applications, raising significant security implications for defense operations.

Impact Assessment

The implications of this vulnerability are quite serious:

Law Enforcement & Military Impact

  • Operational Security: Compromised police/military robots could be turned against operators
  • Intelligence Gathering: Attackers could access sensitive operational footage and communications
  • Mission Compromise: Critical operations could be sabotaged or intelligence leaked
  • Force Multiplication: Enemy actors could turn security robots into surveillance assets

Corporate Environments

  • Espionage: Robots could record conversations, steal documents, or map facilities
  • Sabotage: Manufacturing robots could be programmed to introduce defects
  • Network Pivot: Compromised robots become a foothold into corporate networks

Consumer Impact

  • Privacy Invasion: Home robots could spy on families
  • Physical Safety: Malicious control could cause robots to behave dangerously
  • Ransomware: Robots could be held hostage until payment is made

Wormable Propagation

  • Self-spreading malware could infect entire robot fleets
  • No user interaction required for propagation
  • **Critical infrastruc

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言