
CVE-2026-0073-Android-ADBD-bypass-POC汉化版
EVP_PKEY_cmp() Type Confusion → Unauthorized ADB ShellA critical authentication bypass vulnerability exists in Android's ADB daemon (adbd) that allows any attacker on the local network to obtain full shell access on a target device without user authorization.
The flaw resides in the adbd_tls_verify_cert() function in daemon/auth.cpp, where EVP_PKEY_cmp() is used as a boolean. When the stored key is an RSA key and the provided TLS client certificate carries a non-RSA key (EC P-256 or Ed25519), EVP_PKEY_cmp() returns -1 (type mismatch), which evaluates as true in C/C++, thus setting authorized = true.
// Vulnerable code pattern in daemon/auth.cpp
if (EVP_PKEY_cmp(peer_key, stored_key)) { // ← BUG: -1 is truthy!
authorized = true;
}
pip install cryptography
# Interactive shell
python adb_tls_auth_bypass.py <TARGET_IP> <PORT>
# Single command execution
python adb_tls_auth_bypass.py 192.168.1.42 37521 --cmd "id"
# Verbose mode (full protocol trace)
python adb_tls_auth_bypass.py 192.168.1.42 37521 -v --cmd "id"
python adb_tls_auth_bypass.py 192.168.1.42 5555 --key-type ec
python adb_tls_auth_bypass.py 192.168.1.42 5555 --key-type ed25519
By default, the script automatically tries EC P-256 → Ed25519 → EC/TLS 1.2 until successful.
Attacker Target (adbd)
│ │
│──── TCP Connect ──────────────────►│
│──── CNXN (plaintext) ────────────►│
│◄─── STLS (TLS upgrade request) ──│
│──── STLS Reply ──────────────────►│
│ │
│════ TLS 1.3 Handshake ════════════│
│ (submitted EC P-256 client cert) │
│ EVP_PKEY_cmp(EC, RSA) → -1 │
│ -1 is truthy → authorized=true │
│════════════════════════════════════│
│ │
│◄─── CNXN (device info) ──────────│
│──── Open "shell:" ───────────────►│
│◄─── OKAY ────────────────────────│
│◄──► WRTE/OKAY (shell I/O) ──────►│
│ │
【Full shell access】
| Requirement |
|---|
⚠️ Important: The RSA key must be in the /data/misc/adb/adb_keys file, which is populated through USB debugging pairing (accepting the "Allow USB debugging?" dialog). Wireless debugging pairing (adb pair) stores the key in a different location (adb_known_hosts.pb), so it does not satisfy this requirement.
adb shell getprop ro.build.version.security_patch
Confirmed working on the following test environment:
Kernel: 6.1.23-android14-4-00257-g7e35917775b8-ab9964412
Platform: Android 14 (Android Studio Emulator)
This fork includes several improvements:
select() for cross-platform support-v flagCVE-2026-0073-Android-ADBD-bypass-POC/
├── adb_tls_auth_bypass.py # Main exploit script
└── README.md # This file
This tool is intended for authorized security testing and educational purposes only. Unauthorized access to computer systems is illegal. Always obtain proper authorization before testing. The author is not responsible for any misuse of this software.
EVP_PKEY_cmp DocumentationIf this helps your research, please star ⭐ the repo!
EVP_PKEY_cmp() Return Value | Meaning | Truthy in C? | Result |
|---|
1 | Keys match | ✅ | Authorized (correct) |
0 | Keys differ | ❌ | Denied (correct) |
-1 | Type mismatch | ✅ | Authorized (BUG) |
| Details |
|---|
| Developer Options | Enabled on the target device |
| Wireless Debugging | Enabled (or ADB over TCP port 5555) |
| Stored RSA Key | Device must have been paired at least once via USB (/data/misc/adb/adb_keys) |
| Network Access | Attacker must have access to the adbd TCP port |