M 104: BlueStacks Android Emulator on Windows (15 pts) M 104:Windows上的BlueStacks Android模拟器(15分)

What You Need for This Project你需要什么这个项目

Purpose目的

To get BlueStacks working, a game-oriented Android emulator.为了让BlueStack工作,面向游戏的Android模拟器。

Task 1: Installing Bluestacks任务1:安装Bluestacks

Downloading and Installing BlueStacks下载和安装BlueStacks

In a Web browser, go here:在Web浏览器中,转到此处:

http://www.bluestacks.com/ http://www.bluestacks.com/

Download and install it, as shown below.下载并安装它,如下所示。

Click the " LET'S GO " button and log in to a Google account.点击“ 让我们开始 ”按钮,然后登录Google帐户。 You'll need to provide a Google login.您需要提供Google登录信息。

When it's done, you'll see the BlueStacks home page, as shown below.完成后,您将看到BlueStacks主页,如下所示。

Troubleshooting故障排除

If Bluestacks won't start, or freezes, it's usually a problem with the graphics settings.如果Bluestacks无法启动或冻结,通常是图形设置的问题。

Use Task Manager to kill Bluestacks and start it again.使用任务管理器终止Bluestack并再次启动它。 While it's starting, at the top right, click the gear icon.在它开始时,在右上角,单击齿轮图标。

In Settings, click the Engine tab.在“设置”中单击“ 引擎”选项卡。 Try different settings, such as OpenGL , as shown below.尝试不同的设置,例如OpenGL ,如下所示。 It may also help to use a lower resolution on the Display tab.在“ 显示”选项卡上使用较低分辨率也可能有所帮助。

To do that, some adjustments are needed in VMware Settings.为此,VMware Settings中需要进行一些调整。

Turning on USB Debugging打开USB调试

In BlueStacks, at the top right, click the Gear , Settings , Preferences , and check " Enable Android Debug Bridge (ADB) ", as shown below.在BlueStacks的右上角,单击GearSettingsPreferences ,然后选中“ Enable Android Debug Bridge(ADB) ”,如下所示。

Turning Off Windows Firewall关闭Windows防火墙

Click Start and type FIREWALL单击“ 开始”,然后键入防火墙

Launch " Windows Firewall ", as shown below.启动“ Windows防火墙 ”,如下所示。

On the left side, click " Turn Windows Firewall on or off ".在左侧,单击“ 打开或关闭Windows防火墙 ”。

Check both " Turn off Windows Firewall (not recommended) " buttons, as shown below.选中“ 关闭Windows防火墙(不推荐) ”按钮,如下所示。

Click OK .单击确定

On your Windows machine, in Control Panel, open the Firewall utility and turn off the Firewall.在Windows计算机上的“控制面板”中,打开“防火墙”实用程序并关闭防火墙。


Task 2: Port Fowarding任务2:港口Fowarding

Observing the Listening Port观察听力端口

On your host computer, click Start and type CMD在主机上,单击“ 开始” ,然后键入CMD

Right-click " Command Prompt " and click " Run as Administrator ".右键单击“ 命令提示符 ”,然后单击“ 以管理员身份运行 ”。

In the Administrator Command Prompt window, execute this command:在“管理员命令提示符”窗口中,执行以下命令:

netstat -an | netstat -an | findstr "5555" findstr“5555”
You should see a LISTENING port on the loopback address, as shown below.您应该在环回地址上看到一个LISTENING端口,如下所示。

Port Forwarding转发端口

We need to forward that port to the Kali virtual machine with Socat.我们需要使用Socat将该端口转发到Kali虚拟机。 Execute this command:执行以下命令:
netsh interface portproxy add v4tov4 listenport=5556 listenaddress=0.0.0.0 connectport=5555 connectaddress=127.0.0.1 netsh interface portproxy add v4tov4 listenport = 5556 listenaddress = 0.0.0.0 connectport = 5555 connectaddress = 127.0.0.1
To see that it's working, execute this command:要查看它是否正常工作,请执行以下命令:
netstat -an | netstat -an | findstr "5556" findstr“5556”
You should see a LISTENING port on the arbitrary address "0.0.0.0", as shown below.您应该在任意地址“0.0.0.0”上看到一个LISTENING端口,如下所示。


Connecting with ADB与ADB连接

Finding the Host's Address找到主持人的地址

On your Kali virtual machine, execute this command:在Kali虚拟机上,执行以下命令:
ip addr ip addr
Find the IP address of the interface that goes to the host, which is usually "eth0", as highlighted in the image below.找到进入主机的接口的IP地址,通常为“eth0”,如下图所示。

On the host computer, execute ipconfig and find the interface address that's on the same subnet as the Kali machine.在主机上,执行ipconfig并找到与Kali机器位于同一子网的接口地址。

Connecting to the Bluestacks Emulator连接到Bluestacks仿真器

On your Kali virtual machine, execute these commands, replacing the IP address with the correct address of your host system:在Kali虚拟机上,执行以下命令,将IP地址替换为主机系统的正确地址:
apt update apt更新
apt install android-tools-adb -y apt安装android-tools-adb -y
adb connect 172.16.123.1:5556 adb connect 172.16.123.1:5556
adb devices -l adb devices -l
You see a device attached, as shown below.您会看到连接的设备,如下所示。


M 104: Device Name (15 pts) M 104:设备名称(15分)

Find the text covered by a green box in the image above.找到上图中绿框所覆盖的文字。 That's the flag.那是旗帜。
Updated 2-5-19更新2-5-19
Converted to a CTF 2-28-19转换为CTF 2-28-19