Android Debug Bridge (ADB) - PORT 5555

Basic Info

  • Default legacy port: 5555/tcp (classic adb tcpip mode). Modern Android (11+) uses TLS pairing and mDNS — ports are dynamic.

  • If you can reach adbd you can often get a shell (adb shell), install APKs, steal app data, and pivot.

  • High risk: any reachable adbd (TCP) should be treated as compromise-level. Block it and monitor mDNS records.

What is ADB?

ADB (Android Debug Bridge) is a command-line tool to communicate with Android devices and emulators. Typical actions include installing packages, debugging, and getting an interactive Unix shell on the device.

Modern wireless debugging (Android 11+) adds TLS pairing and mDNS discovery — which changes the offensive surface: ports are discovered via mDNS and pairing is required for secure connections.

Nmap fingerprint (legacy):


Enumeration

Quick Recon & Connect

If you find ADB exposed and reachable, act fast — many devices are ephemeral or reboot into safe modes.

  • If ro.adb.secure=1 (ADB auth), you need to be pre-authorized or use Android 11+ pairing flow.

  • Many vendor engineering images, devkits, emulators, TVs, STBs run adbd without auth or as root.


Quick Post‑Exploitation Checklist

  1. Validate privileges & context

  1. Enumerate apps & locate data

Artifacts of interest (root required):

  • /data/system/users/0/accounts.db (AccountManager)

  • /data/misc/wifi/ (saved networks / keys on older versions)

  • App SQLite DBs and shared_prefs under /data/data/

Note: Chrome and some apps encrypt or use OS-level protections — treat with care and follow legal/ethical rules.


Code Execution & Payload Delivery

  • Install and auto‑grant runtime permissions:

  • Directly start components:


Port Forwarding & Pivoting

Even without root, ADB is a great pivoting tool:

File exfil over sockets (no sdcard writes):


Wireless Debugging (Android 11+)

Android 11+ uses TLS-protected wireless debugging with device-side pairing and mDNS discovery:

mDNS service names:

  • _adb-tls-pairing._tcp (pairing)

  • _adb-tls-connect._tcp (paired connect)

  • _adb._tcp (legacy/plain)

Notes:

  • Ports are dynamic — don’t assume 5555.

  • If mDNS is filtered, legacy adb tcpip 5555 (USB-assisted) may still enable legacy mode until reboot.

  • Attackers with UI access or an MDM misconfig can enable wireless debugging and view pairing codes — establishing long-lived access.


Hardening & Detection (Defender Playbook)

Assume any reachable adbd is a high‑severity risk.

Immediate hardening steps:

Network & monitoring:

  • Block inbound TCP/5555 and ADB-related dynamic ports on untrusted segments.

  • Block or monitor mDNS records: _adb._tcp, _adb-tls-connect._tcp, _adb-tls-pairing._tcp.

  • Inventory devices for insecure builds: check getprop ro.debuggable, ro.build.type, ro.adb.secure.

  • Revoke USB debugging authorizations in Developer options for managed devices.


circle-check

Last updated

Was this helpful?