Ghost-Framework: Perform ADB command to access an Android device via USB
Android Hacking Mobile Forensics

Ghost-Framework: Perform ADB command to access an Android device via USB

CybersecMastery Research Team • January 31, 2021 • 2 min read • 202 views • 0 discussions
Table of Contents
    Educational & Defensive Research Notice: The commands, tools, and technical procedures detailed in this guide are provided strictly for lawful security education, authorized penetration testing, and defense hardening. Never perform testing against any network or asset without prior written authorization. Consult our Ethical Hacking Disclaimer.

    Ghost Framework is an Android post-exploitation framework that exploits the Android Debug Bridge to remotely access an Android device.





    Why Ghost-Framework?

    • Simple and clear UX/UI
      • Ghost Framework has a simple and clear UX/UI. It is easy to understand and it will be easier for you to master the Ghost Framework.
    • Device shell access
      • Ghost Framework can access the remote Android device shell without using OpenSSH or other protocols.
    • Controlling device screen
      • Ghost Framework can access the device screen and control it remotely using a mouse and keyboard.

    Install Ghost-Framework

    To install Ghost Framework you should execute the following commands.
    mrdev@kali:~$ git clone https://github.com/EntySec/ghost.git
    --------------------------------------------------------------------------------------------------------------------------------------- 
    --------------------------------------------------------------------------------------------------------------------------------------- 
    --------------------------------------------------------------------------------------------------------------------------------------- 
    mrdev@kali:~$ ls
    ghost
    mrdev@kali:~$ cd ghost/
    mrdev@kali:~(ghost)# chmod +x install.sh
    mrdev@kali:~(ghost)# ./install.sh
    --------------------------------------------------------------------------------------------------------------------------------------- 
    --------------------------------------------------------------------------------------------------------------------------------------- 
    ---------------------------------------------------------------------------------------------------------------------------------------
    mrdev@kali:~(ghost)# cd
    mrdev@kali:~$ ghost

    Uninstall Ghost-Framework

    To uninstall Ghost Framework you should execute the following commands.
    mrdev@kali:~$ ls
    ghost
    mrdev@kali:~$ cd ghost/
    mrdev@kali:~(ghost)# chmod +x uninstall.sh
    mrdev@kali:~(ghost)# ./uninstall.sh
    --------------------------------------------------------------------------------------------------------------------------------------- 
    --------------------------------------------------------------------------------------------------------------------------------------- 
    ---------------------------------------------------------------------------------------------------------------------------------------
    mrdev@kali:~(ghost)#

    Connect Android

    Let me connect my Samsung J7 elite. So Plug in USB and allow USB debugging.

    Note: Always remember, your target device must be connected with a wifi router, not with a mobile hotspot.

    Now again open the terminal and follow these commands:

    mrdev@kali:~$ ghost
    ghost> help
    ghost> options
    ghost> set RHOST 192.xx.xx.xxx
    ghost> run

    To find your device IP address go to Settings → About phone → Status.

    Extra Credit

    CM
    Verified
    CybersecMastery Research & Editorial Group
    Verified Security Analysts

    Authored and peer-reviewed by certified information security practitioners (CEH, OSCP & CompTIA Security+ aligned). All lab commands, scripts, and exploit walkthroughs are tested in isolated environments before publication.

    Defensive & Offensive Security Peer-Reviewed Guides Editorial Standards & Team

    Community Q&A