Skip to content

Security: taezeem14/WirelessADB

Security

SECURITY.md

πŸ”’ WirelessADB Security Whitepaper & Best Practices

Wireless ADB debugging provides freedom from cables, but requires disciplined network security. This document details how WirelessADB minimizes risk and what safeguards you should follow.


πŸ›‘οΈ The Threat Model of Wireless Debugging

Vanilla adb tcpip 5555 opens an unencrypted TCP port 5555 on all network interfaces of the Android device. If you connect to a public or semi-trusted network (e.g. co-working spaces, cafes, university Wi-Fi):

  1. Automated Port Scans: Attackers continuously scan local subnets for open port 5555.
  2. Unauthorized Shell Access: If the host RSA key is compromised or the phone has old debugging authorizations, malicious actors can execute adb shell, extract files, or install malicious APKs.
  3. Ghost Exposure: Developers frequently forget to disconnect after finishing work, leaving the port open indefinitely.

⚑ How WirelessADB Mitigates Risk

  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚                 DEFENSE-IN-DEPTH MATRIX                     β”‚
  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
  β”‚ Threat                β”‚ WirelessADB Defense                 β”‚
  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
  β”‚ Port 5555 Mass-Scans  β”‚ Ephemeral High-Port (30000–50000)   β”‚
  β”‚ Subnet Hijack / Rogue β”‚ Subnet CIDR & Host Mask Validator   β”‚
  β”‚ Ghost Listening Socketsβ”‚ Clean Disconnect + USB Mode Reset   β”‚
  β”‚ Zero-Wire MITM        β”‚ Android 11+ TLS-Encrypted Pairing   β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. Random High-Port Allocation (30000–50000):
    • Eliminates standard port 5555 target signature.
    • Requires scanning 20,000 ports per host, drastically slowing down mass reconnaissance.
  2. Subnet & Interface Guard:
    • Compares the device's assigned IPv4 address with the developer workstation's active network adapter.
    • Emits alerts if traffic traverses across unexpected gateways or subnets.
  3. Clean Session Teardown:
    • wireless-adb disconnect explicitly invokes adb -s <serial> usb, instructing the Android device kernel to shut down the TCP/IP daemon and revert to physical USB only.

πŸ’‘ Developer Best Practices

  • βœ… Use Trusted Networks: Only debug wirelessly on private WPA3 / enterprise internal Wi-Fi.
  • βœ… Disconnect After Sessions: Always run wireless-adb disconnect when concluding your work.
  • βœ… Audit Authorization Prompts: Never accept an ADB RSA popup on your phone if you didn't initiate it.
  • βœ… Use Doctor Diagnostics: Regularly run wireless-adb doctor to ensure clean environment hygiene.

There aren't any published security advisories