56

Exploiting Android devices running insecure remote ADB service

 5 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”
zmUVVfJ.png!web3eQVFzb.png!web

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

euymQ3n.png!webi2uaqmr.png!web

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

vAr2YbJ.png!webuqUNZfQ.png!web

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

7fEn6bN.png!webbArEFbn.png!web

Accessing them

To list all the connected adb use adb devices

uQFZZjR.png!webRrA3iuR.png!web

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

adb $(./adb.sh) shell
UraeIjJ.png!web3e6fAnV.png!web

Done

./logout


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK