How To Hack Android ADB - Over WAN


Hi Hacker's Welcome back my new blog post, in this post we will learn, How To Use ADB in WAN , and How to Control ADB Over WAN. so without wasting your time let's start.

What is ADB

ADB stands for Android Debug Bridge. It is a versatile command-line tool that comes with the Android SDK (Software Development Kit) and is used by developers and Android enthusiasts to communicate with Android devices and perform various tasks, particularly for debugging and development purposes. ADB allows you to interact with an Android device over a USB connection (or even over a network connection) and perform actions such as:

Features Of ADB

Installing and uninstalling apps: You can use ADB to install, uninstall, and manage Android apps on a connected device.

Accessing the device shell: ADB provides a shell interface to interact with the device's operating system directly. You can execute commands and access system files.

Transferring files: ADB allows you to push files from your computer to the device or pull files from the device to your computer.

Debugging applications: Developers use ADB to debug Android apps by connecting their development environment to a device or emulator, allowing them to set breakpoints, inspect variables, and more.

Screen recording and capturing screenshots: ADB enables you to record the device's screen or capture screenshots for various purposes, including app testing and documentation.

Managing device properties: You can change device properties and settings using ADB commands.

To use ADB, you'll need to install the Android SDK on your computer and enable USB debugging on the Android device you want to connect to. Once set up, you can use ADB commands to interact with the device from your computer's command prompt or terminal.

Step.1: Enable Developer Option Your Android

to enable the developer option, you have to access Build Number of your phone. Here you have to Tap 4 to 5 times, so that the developer option of your phone will be activated.

Step.2: Allow USB Debugging in Your Phone.

after the developer option is Turned on, you have to come inside the Developer Option and you have to enable USB debugging. 

Step.3: Hack ADB Over WAN

we are going to use SSH to use ADB over WAN, with the help of SSH Tunneling, we can forward ADB port. so for this you will need a Cloud VPS.

What is SSH Tunneling or SSH Port Forwarding

SSH tunneling, also known as SSH port forwarding, is a method of securely transmitting data between two devices or networks over an untrusted network. It uses the Secure Shell (SSH) protocol to create an encrypted connection between a local machine (usually your computer) and a remote server, allowing you to securely access services or resources on the remote server as if they were on your local machine. SSH tunneling can be used for various purposes, including:

Secure Remote Access: You can use SSH tunneling to securely access a remote server or computer over an untrusted network, such as the internet. This is often used for remote administration or accessing resources on a remote network.

Port Forwarding: SSH tunneling allows you to forward network ports from your local machine to the remote server or vice versa. This is useful for accessing services that are running on a remote server that is not directly accessible over the internet.

Bypassing Firewalls and Filters: In some cases, SSH tunneling can be used to bypass network firewalls or content filters. By tunneling your traffic through an SSH connection, you can access websites or services that might be blocked on the network you are connected to.

There are several types of SSH tunneling, including:

Local Port Forwarding: This forwards traffic from a local port on your machine to a remote server. For example, you can forward local port 8080 to a web server on a remote machine. This is useful when you want to access a service on the remote server that is not directly accessible from your local network.

Remote Port Forwarding: This forwards traffic from a remote port on the server to a local machine. For example, you can forward remote port 22 (SSH) to your local machine. This is useful when you want to make a service on your local machine accessible from the remote server.

Dynamic Port Forwarding (SSH SOCKS Proxy): This creates a dynamic tunnel that allows you to route your web traffic through the remote server. It acts as a SOCKS proxy, which can be configured in your web browser or other applications to anonymize your internet browsing or access resources on the remote network.

SSH tunneling is a powerful and secure way to protect your data when communicating over untrusted networks, and it is widely used by administrators, developers, and security-conscious individuals to ensure the confidentiality and integrity of their communications.

Enable SSH Port Forwarding in Your VPS

to do SSH port forwarding, you have to first configure it inside the sshd_config file. for this you can open this file with nano.

nano /etc/ssh/sshd_config

After open sshd_config file, keep in mind that you have to enable this things. if there is any # inside it, you have to remove it.

After Modifying the files, you have to save it and after that you can close it and restart the SSH service.

service ssh restart

Step.4 Open ADB Port in Android

now you have to open the ADB port of your Phone. for this, Attach your phone with USB cable. you can use this below command that ADB port 5555 of your phone will open.

Step.5: Forward ADB Port 5555

now to port-forward you have to use this below command inside Termux in your Phone. Basically it will be in this command. will your 5555 port attached to the your VPS server where SSH Tunneling is started. and Now Your ADB Port is accessible over WAN.

ssh -R 5555: root@YourvpsIP

Step.6: Connect ADB over WAN

now you can connect your ADB, with your VPS IP and port 5555, and you will be able to see that you are successfully connected your phone to ADB Over WAN.

adb connect yourvpsip:5555

and after connected to ADB port , you can also see the live screen of the Android Phone.


The conclusion of this post, How you can use ADB Out-out-Network, and How can you forward your ADB port with the help of SSH Tunneling, so I hope you Like this post and learn something new in Cyber Security, and Thanks for Reading Our Blog, Bye :)

Post a Comment