Control Android Devices Remotely — Ghost Framework

Posted by
Ghost Framework is an Android post-exploitation framework that uses an
Android Debug Bridge to remotely access and control Android device.
Ghost Framework gives us the power and convenience of remote Android device administration.
242-2422439_dead-deceased-ghost-soul-halloween-horror-fear-scary-iconWe can use this framework to control old Android devices which have turn on the debug bridge in the “Developer options”.

Now, this becomes very harmful because an attacker gets the full admin control on the vulnerable Android device.

In our this detailed tutorial we will practically learn how we can use the Ghost Framework to take control of Android device from our Kali Linux system.

So we start from cloning the Ghost Framework from GitHub by using the following command:

git clone

The screenshot of the command is the following:


Then it will be cloned on our root folder of Kali Linux. Then we go the ghost directory by using cd command:

cd ghost

Now we need to install it using the installer script. Before that we give permission to the installer script by applying the following command:

sudo chmod +x

Here if it prompted for sudo password of our machine then we need to provide it.


Now we can run the installer script using the following command:

sudo ./

Then wit will start installing the dependencies and  as the following screenshot:


This process will take some time depending on our internet speed.

After installing Ghost Framework we can run it from anywhere in our terminal by only the ghost command:


And the ghost will appear with its main menu as the following screenshot:


Now we can see the options. Here we got lots of options, first we need to connect a device, so we use option 3.


In the above screenshot, we can see that we need to type the IP address of the vulnerable Android device.

Now how we get an IP address of an Old vulnerable Android device. Shodan is here. Shodan is a great search engine for searching the devices connected to the internet. We already have a tutorial on Shodan.

In Shodan we have to search “Android Debug Bridge“, as we have shown in the following screenshot:


Here we can see over 19k search results. Every device is vulnerable for ghost and those devices are connected to the internet.

From here we can pick any IP address and paste it on ghost and then press enter.


Here we can see we are connected with the IP address in 5555 port. Now we can run anything from Ghost Framework.

What we can do with Ghost Framework:

  1. Show connected devices
  2. Disconnect all devices
  3. Connect a new device
  4. Access device shell
  5. Install an apk on a device
  6. Screen record a device
  7. Get device screenshot
  8. Restart Ghost Server
  9. Pull files from devices
  10. Shutdown the device
  11. Uninstall an app
  12. Show device log
  13. Dump system Info
  14. List of all device app
  15. Run a device app
  16. Port Forwarding
  17. Grab wpa_supplicant(WiFi password)
  18. Show Mac/Inct
  19. Extract apk from app
  20. Get Battery Status
  21. Get Network Status
  22. Turn WiFi on/off
  23. Remove device password
  24. Emulate button presses
  25. Get Current Activity
  26. Update Ghost Framework
  27. Exit Ghost Framework

Ghost Framework has a simple and clear UX/UI. It is easy to understand and it will be easier for us to master the Ghost Framework.

Ghost Framework can be used to remove the remote Android device password if it was forgotten. It is also can be used to access the remote Android device shell without using OpenSSH or other protocols.

[UPDATE] Many users got error like this “Failed to start Ghost Server”. In that case, ADB (Android Debug Bus) and fastboot need to be installed manually. Try following commands if this kind of error comes:
sudo apt-get update
sudo apt-get install android-tools-adb
sudo apt-get install android-tools-fastboot
Usage of the Ghost Framework for attacking targets without prior mutual consent is illegal.
It is the end user's responsibility to obey all applicable local, state, federal, and international laws.
Developers assume no liability and are not responsible for any misuse or damage caused by this program.

If you like our tutorial or got an issue regarding this post please comment down. If you liked our tutorials then visit our website regularly and for the quick updates follow us on Twitter and Instagram.

Posted by Shubham ;)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.