ADB, Docker, And GHIDRA

I recently read an article about how a young hacker recompiled a APK from Android in order to change his vending machine balance.

The deep dive into the application’s source code, along with his use of handy programs like as ADB really caught my attention. So I decided to use my current interests to see if I can could create a similar process.

What I came up with was a three pronged approach and a super deep dive into Bluetooth on Linux, ADB, and Docker.

But long story short,

I made a Docker image that can run a GUI instance of Ubuntu within a web-server. And the GUI has the GHIDRA program along with the .apk for Hearthstone, ready for you to reverse engineer.

Instead of boring you with the tedious details of manually pairing your computer to your phone’s Bluetooth, Ill share some informational commands below. You can glance at them, and get an idea of what’s going on.

Just know that the commands listed below did the following.

  1. Gave me a command line into my non-rooted Android.
  2. Allowed me to download the Hearthstone.apk file to my local machine.

Once I downloaded apk file, I got to work on creating the Docker image. The Docker image is a forked commit, off a Image that handles all the GUI/VNC/Portmapping stuff and it can be found here .

To run the custom-container on your web-server run the following command.

docker run -d -p 6080:80 ghidra-hearthstone-apk

This command would run the GHIDRA container and map all traffic to port 6080 into the container.

So for example, if I went to http://menz-o-matic.com:6080 I would land upon a GUI desktop environment with GHIDRA and the Android APK all ready to go.

You can look at the docker image here, and download it if you’d like!

Here are some container directions that can aid in getting you started.

1. docker run -d -p 6080:80 ghidra-hearthstone-apk
2. visit localhost:6080
3. Open command prompt
4. type gh <tab> and then click enter.

You Might Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *