M 202: BlueStacks on Mac (15 pts extra)

What You Need for This Project


To get BlueStacks working, a game-oriented Android emulator.

Task 1: Installing Bluestacks

Downloading and Installing BlueStacks

In a Web browser, go here:


Download and install it, as shown below.

You'll need to provide a Google login.

When it's done, you'll see the BlueStacks home page, as shown below. (You won't have the Bank of America app installed yet.)

Task 2: Port Fowarding

Observing the Listening Port

On your host computer, execute this command:
netstat -an | grep 5555
You should see a LISTENING port on the loopback address, as shown below.

Installing Socat

We need to forward that port to the Kali virtual machine with Socat.

On a Mac OS machine, execute these commands to install Homebrew and Socat:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install socat
On Ubuntu Linux, execute these commands instead:
sudo apt update
sudo apt install socat

Port Forwarding with Socat

Execute this command:
socat tcp-listen:5556,reuseaddr,fork tcp:localhost:5555
The terminal freezes, waiting for traffic, as shown below.

Leave this terminal window open.

Connecting with ADB

Finding the Host's Address

On your Kali virtual machine, execute this command:
ip addr
Find the IP address of the interface that goes to the host, which is usually "eth0", as highlighted in the image below.

On the host computer, execute ifconfig and find the interface address that's on the same subnet as the Kali machine.

On my host, it was, as shown below.

Connecting to the Bluestacks Emulator

On your Kali virtual machine, execute these commands, replacing the IP address with the correct address of your host system:
apt update
apt install android-tools-adb -y
adb connect
adb devices -l
You see a device attached, as shown below.

M 202: Device Name (15 pts extra)

Find the text covered by a green box in the image above. That's the flag.
Converted to a CTF 3-1-19
Points labeled "extra" 1-13-2020