M 202: BlueStacks on Mac (15 pts) M 202:Mac上的BlueStacks(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.下载并安装它,如下所示。

You'll need to provide a Google login.您需要提供Google登录信息。

When it's done, you'll see the BlueStacks home page, as shown below.完成后,您将看到BlueStacks主页,如下所示。 (You won't have the Bank of America app installed yet.) (您还没有安装美国银行应用程序。)


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

Observing the Listening Port观察听力端口

On your host computer, execute this command:在主机上,执行以下命令:
netstat -an | netstat -an | grep 5555 grep 5555
You should see a LISTENING port on the loopback address, as shown below.您应该在环回地址上看到一个LISTENING端口,如下所示。

Installing Socat安装Socat

We need to forward that port to the Kali virtual machine with Socat.我们需要使用Socat将该端口转发到Kali虚拟机。

On a Mac OS machine, execute these commands to install Homebrew and Socat:在Mac OS计算机上,执行以下命令以安装Homebrew和Socat:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" / usr / bin / ruby​​ -e“$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
brew install socat brew install socat
On Ubuntu Linux, execute these commands instead:在Ubuntu Linux上,执行以下命令:
sudo apt update sudo apt update
sudo apt install socat sudo apt install socat

Port Forwarding with Socat与Socat的港口转发

Execute this command:执行以下命令:
socat tcp-listen:5556,reuseaddr,fork tcp:localhost:5555 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与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 ifconfig and find the interface address that's on the same subnet as the Kali machine.在主机上,执行ifconfig并找到与Kali计算机位于同一子网的接口地址。

On my host, it was 172.16.123.1, as shown below.在我的主机上,它是172.16.123.1,如下所示。

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 202: Device Name (15 pts) M 202:设备名称(15分)

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