M 104: BlueStacks Android Emulator on Windows (15 pts)

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 BlueStacks 5 Beta, by clicking the button outlined in yellow in the image below.

Click the "LET'S GO" button and log in to a Google account. You'll need to provide a Google login.

When it's done, you'll see the BlueStacks home page, as shown below.


If Bluestacks won't start, or freezes, it's usually a problem with the graphics settings.

Use Task Manager to kill Bluestacks and start it again. While it's starting, at the top right, click the three-bar icon and open Settings.

Try different settings on the Engine and Display tabs.

Turning on USB Debugging

In BlueStacks, at the top right, click the three-bar icon and open Settings.

On the Advanced tab, verify that "Android Debug Bridge" is enabled, as shown below.

Turning Off Windows Firewall

Click Start and type FIREWALL

Launch "Windows Firewall", as shown below.

On the left side, click "Turn Windows Firewall on or off".

Check both "Turn off Windows Firewall (not recommended)" buttons, as shown below.

Click OK.

On your Windows machine, in Control Panel, open the Firewall utility and turn off the Firewall.

Task 2: Port Fowarding

Observing the Listening Port

On your host computer, click Start and type CMD

Right-click "Command Prompt" and click "Run as Administrator".

In the Administrator Command Prompt window, execute this command:

netstat -an | findstr 5555
You should see a LISTENING port on the loopback address, as shown below.

Port Forwarding

We need to forward that port to a public address, so the Kali machine can connect to it.

Execute this command:

netsh interface portproxy add v4tov4 listenport=5556 listenaddress= connectport=5555 connectaddress=
To see that it's working, execute this command:
netstat -an | findstr 5556
You should see a LISTENING port on the arbitrary address "", as shown below.

Connecting with ADB

Finding the Host's Address

On your Kali VMware virtual machine, execute this command:
ip addr

Use VMware

You must use a VMware virtual machine. Kali on VirtualBox will not work, unless it is running on a different host computer.
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 ipconfig and find the interface address that's on the same subnet as the Kali machine.

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

M 104.1: Device Name (15 pts)

On your Kali virtual machine, execute this command:
adb shell cat /system/build.prop | grep ro.product.model
Find the text covered by a green box in the image below. That's the flag.

Updated 2-5-19
Converted to a CTF 2-28-19
Warning againsts VirtualBox added 1-28-2020