This document provides a foundational guide to Android penetration testing. It covers essential concepts, including the definition of penetration testing (authorized security assessment) and its five-phase process. The guide details the Android OS architecture, security model (sandbox, permissions, signing, SELinux), and APK file structure. Practical setup instructions are given for installing and configuring MuMu emulator (with root), ADB (Android Debug Bridge), and Reqable (HTTP/HTTPS proxy). It explains HTTP/HTTPS protocols, proxy principles, and the critical step of installing a custom CA certificate to the system trust store for decrypting HTTPS traffic on Android 7+. The guide culminates in a hands-on exercise: installing a test app and analyzing its network requests using the established toolchain.
1. Prerequisite Knowledge
1.1 What Is Penetration Testing
Penetration testing is the process of evaluating the security of a target system by simulating the techniques and methods of real attackers, carried out only after obtaining written authorization from the system owner. Its purpose is to discover security vulnerabilities, assess their severity, and provide remediation recommendations.
The essential difference between penetration testing and hacking lies in authorization. Unauthorized security testing is illegal. All experiments in this course are conducted in a local emulator environment and do not involve any external systems.
The standard penetration testing process consists of five phases:
Information Gathering: Collect relevant information about the target system (domain names, IP addresses, open ports, application versions, etc.)
Vulnerability Scanning: Use automated tools or manual methods to discover potential weaknesses
Exploitation: Verify whether a vulnerability can be practically exploited
Privilege Escalation: Elevate from low-level privileges to higher-level access
Reporting: Organize findings into a structured document that includes vulnerability descriptions, reproduction steps, impact assessments, and remediation recommendations
1.2 Overview of the Android Operating System
Android is a mobile operating system developed by Google, built on the Linux kernel. Its architecture is organized into five layers, from bottom to top:
Layer
Name
Function
1
Linux Kernel
Hardware drivers, process management, memory management, and security/permission controls
2
Hardware Abstraction Layer (HAL)
Provides a unified hardware access interface for upper layers
3
Android Runtime (ART)
Executes DEX bytecode by compiling it into native machine code
4
Application Framework
Provides APIs for Activity management, package management, resource management, and more
5
Applications
System apps (Phone, SMS) plus third-party apps installed by the user
The Android security model relies on the following mechanisms:
Application Sandbox: Each app runs under a separate Linux user ID, with its own process and data directory. By default, App A cannot access App B's files.
Permission System: Apps must declare required permissions in AndroidManifest.xml. Starting with Android 6.0 (API 23), runtime permissions were introduced, allowing users to grant or deny sensitive permissions while the app is running.
Application Signing: All APKs must be digitally signed before they can be installed. Signing verifies the integrity of the app's origin and the developer's identity.
SELinux (Security-Enhanced Linux): A mandatory access control system. In Enforcing mode, even processes running as root will be denied if they violate the defined policies.
1.3 APK File Structure
An APK (Android Package) is the installation package format for Android applications. It is essentially a ZIP archive; after changing the file extension from .apk to .zip, you can open it with any decompression tool.
An APK contains the following core files and directories:
File / Directory
Description
`AndroidManifest.xml`
The application manifest file (binary XML), declaring the package name, version, permissions, the four core component types, and more
`classes.dex`
A Dalvik bytecode file containing the compiled instructions for all Java/Kotlin source code
`classes2.dex` (optional)
A secondary DEX file, generated when the method count exceeds 65,536
`resources.arsc`
The compiled resource index table, storing the mapping between resource IDs and their actual values
`res/`
The resource files directory, containing layout XML files, images, strings, color values, etc.
`META-INF/`
The signature files directory, containing MANIFEST.MF, CERT.SF, and CERT.RSA
`lib/`
The native library directory, organized into subdirectories by CPU architecture (arm64-v8a/armeabi-v7a/x86_64/x86)
`assets/`
The raw assets directory; files are packaged as-is and are not compiled
AndroidManifest.xml is one of the most important files for a security audit. It contains:
package: The app's unique identifier (e.g., com.example.app)
uses-permission: The list of declared permissions
activity/service/receiver/provider: Declarations of the four core component types; the android:exported attribute determines whether a component can be invoked externally
application: Global application configuration, including security-related attributes such as android:debuggable, android:allowBackup, and others
1.4 Tool Inventory
For installation instructions for the following tools, refer to the Appendix – Tool Installation Manual:
Tool
Version
Purpose
MuMu Emulator
12 (Android 12)
Provides the Android runtime environment
Android SDK Platform Tools
35.0+
Provides the ADB command-line tool
Reqable
2.8.0+
HTTP/HTTPS packet capture and debugging
apktool
2.9.3
APK decompilation and recompilation
jadx
1.5.0
Decompiles DEX bytecode back into Java source code
uber-apk-signer
1.3.0
APK signing tool
Frida
16.5.x
Dynamic instrumentation framework
unveilr
latest
WeChat Mini Program unpacking tool
2. Command Line Basics
2.1 What Is the Command Line
A Command Line Interface (CLI) is a way of interacting with an operating system by typing text commands. Unlike a Graphical User Interface (GUI), where you point and click with a mouse, a CLI requires you to enter instructions in a specific format.
Windows provides two command-line environments:
Command Prompt (cmd.exe): The traditional Windows command line, which uses DOS-style commands
PowerShell: A more powerful command-line environment that supports scripting and pipeline operations
We will use cmd.exe as the default command-line environment. To launch it: press Win + R, type cmd, and press Enter.
2.2 File System Navigation
Current Directory and the Prompt:
After opening the command line, you will see something like the following:
C:\Users\用户名>
Here, C:\Users\用户名 represents the current working directory. The > is the prompt, indicating that the system is waiting for user input.
Basic Commands:
BASH
# 列出当前目录的文件和子目录
dir
# dir = directory 的缩写
# 切换目录
cd Desktop
# cd = change directory 的缩写
# 执行后当前目录变为 C:\Users\用户名\Desktop
# 返回上一级目录
cd ..
# .. 表示父目录
# 切换到指定盘符
D:
# 将当前盘符从 C 盘切换到 D 盘
# 同时切换盘符和目录
cd /d D:\tools
# /d 参数允许跨盘符切换
# 创建目录
mkdir test_dir
# mkdir = make directory 的缩写
# 删除空目录
rmdir test_dir
# rmdir = remove directory 的缩写
Types of Paths:
Relative Path: A path relative to the current directory. For example, if the current directory is C:\Users, then cd 用户名 navigates into C:\Users\用户名.
Absolute Path: A complete path starting from the drive letter. For example, C:\platform-tools\adb.exe.
2.3 Additional Command Line Notes
Tab Auto-Completion:
Type the first few characters of a path and press the Tab key; the system will automatically complete the rest. If there are multiple matches, press Tab repeatedly to cycle through them. This feature dramatically improves input speed and reduces typos.
Command History:
Press the ↑ (up arrow) key to recall previously entered commands. Press the ↓ (down arrow) key to move toward more recent history. This prevents you from having to retype the same commands.
Command Line Reminders:
Use spaces to separate commands and parameters
Press Enter to execute a command
When a path contains spaces, wrap it in double quotes, e.g., cd "C:\Program Files"
The Windows command line is case-insensitive
3. MuMu Emulator Installation and Configuration
3.1 The Concept of an Emulator and Why We Use One
An emulator is a program that simulates a target hardware and software environment on the host operating system. An Android emulator allows a Windows computer to run the Android OS and Android apps.
The reasons for choosing an emulator over a physical device for penetration testing are:
Safety: Testing operations may cause irreversible modifications to a system. An emulator can be quickly restored to its initial state using snapshots.
Root Access: Emulators typically offer a one-click root function. Gaining root on a physical device is a complex process that carries the risk of bricking the device.
Screenshots and Recording: Because an emulator runs inside a desktop window, it is easy to take screenshots and record the screen to document the testing process.
Reasons for choosing the MuMu emulator:
Based on Android 12 and compatible with mainstream apps
Click the "Download MuMu Emulator" button and select the Windows version
Wait for the installer download to complete (the file is approximately 500 MB)
Step 2: Run the Installer
Double-click the downloaded mumu_installer_xxx.exe
Click "Yes" in the User Account Control dialog that appears
On the first screen of the installation wizard, click "Custom Install"
Change the installation path (it is recommended to choose a non-system drive, such as D:, and reserve at least 10 GB of space)
Click "Install Now"
Wait for the progress bar to finish (approximately 3–8 minutes, depending on disk performance)
Once installation is complete, a MuMu Emulator shortcut will appear on the desktop
Step 3: First Launch
Double-click the desktop shortcut
The emulator window will display the Android boot screen
Wait for system initialization to complete (approximately 2–3 minutes)
You will then enter the Android home screen, which displays the system interface
3.3 Basic Configuration
Enabling Root Access:
Click the gear icon (Settings) on the toolbar on the right side of the emulator window
In the settings panel, select "Other Settings"
Find the "Root Access" option and click the toggle to turn it on
Close the settings panel
Click the power icon at the top of the emulator window and select "Restart"
Wait for the emulator to finish restarting
Other Essential Settings:
BASH
# 待 ADB 配置完成后执行以下命令(第 5 节之后补充操作):
# 允许安装来自未知来源的应用
adb shell settings put secure install_non_market_apps 1
# 关闭 Google Play 保护机制
adb shell settings put global package_verifier_enable 0
# 将 SELinux 设为 Permissive 模式
adb shell su -c "setenforce 0"
adb shell getenforce
# 预期输出:Permissive
3.4 Basic Emulator Operations
The emulator uses the mouse to simulate finger touch operations:
Mouse Action
Corresponding Touch Action
Left mouse click
Finger tap
Hold and drag with the left mouse button
Finger swipe
Right mouse click → Back
Android Back button
Keyboard ESC
Android Back button
Keyboard F5
Android Home button
Explanation of the toolbar buttons on the right side of the emulator window (from top to bottom):
Screenshot
Screen Recording
Rotate Screen
Volume Control
Settings
Minimize / Maximize / Close
4. ADB Installation and Connection
Learning Objectives
Complete the download and configuration of Android SDK Platform Tools
Connect to the MuMu emulator using ADB
Master 10 basic ADB commands
4.1 Introduction to ADB
ADB (Android Debug Bridge) is a command-line tool included in the Android SDK that enables communication between a PC and an Android device. ADB uses a client-server architecture:
ADB Client: Runs on the PC; the user sends commands through the command line
ADB Server: Runs in the background on the PC and manages the connection between the client and the device. By default, it listens on TCP port 5037
ADB Daemon (adbd): Runs on the Android device and executes instructions sent by the server
In the "Downloads" section, click the download link for the Windows version
Accept the license agreement to begin the download
You will obtain the file: platform-tools-latest-windows.zip(approximately 10 MB)
Step 2: Extract
Locate the downloaded ZIP file
Right-click → "Extract All"
Enter the destination path C:\platform-tools
Click "Extract"
Confirm that the C:\platform-tools directory contains the adb.exe file
Step 3: Configure Environment Variables
An environment variable is a list of paths that the operating system uses to locate executable programs. Once C:\platform-tools is added to this list, you can run the adb command from any directory.
Press Win + R, type sysdm.cpl, and press Enter
In the "System Properties" window, select the "Advanced" tab
Click the "Environment Variables" button
In the "System variables" section, locate the row where the variable name is Path and double-click it
Click "New"
Enter C:\platform-tools
Click "OK" to close all dialog boxes
Step 4: Verification
Open a new command-line window (any already open windows must be closed and reopened)
Enter the following command:
BASH
adb version
Expected output (the version number may differ):
Android Debug Bridge version 1.0.41
Version 35.0.1-11580240
Installed as C:\platform-tools\adb.exe
If you see the message 'adb' 不是内部或外部命令, it means the environment variable configuration did not take effect. Check: whether you have closed the old command-line window, and whether the path in the Path variable is spelled correctly.
4.3 Connecting to the MuMu Emulator
Prerequisite: The MuMu emulator is launched and running.
HTTP (HyperText Transfer Protocol) is an application-layer protocol for communication between a client and a server. It operates on a request-response model:
The client (browser or app) sends a request to the server
The server processes the request and returns a response
Structure of an HTTP Request:
方法 路径 协议版本
请求头字段1: 值1
请求头字段2: 值2
(空行)
请求体(可选)
The request method indicates the type of operation to perform on a resource:
Method
Meaning
Common Use Cases
GET
Retrieve a resource
Viewing a page, querying data
POST
Create a resource
Submitting a form, logging in, uploading data
PUT
Update a resource
Modifying all fields
DELETE
Delete a resource
Removing a record
Request headers carry additional information. Common header fields:
Field
Description
Example
Host
The target server's domain name
`api.example.com`
Content-Type
The format of the data in the request body
`application/json`
User-Agent
An identifier for the client
`Dalvik/2.1.0`
Authorization
Authentication credentials
`Bearer eyJhbG...`
Structure of an HTTP Response:
协议版本 状态码 状态文本
响应头字段1: 值1
(空行)
响应体
The status code indicates the result of the request:
Range
Meaning
Example
200-299
Success
200 OK
300-399
Redirection
301 Moved Permanently
400-499
Client Error
403 Forbidden, 404 Not Found
500-599
Server Error
500 Internal Server Error
5.2 How a Proxy Server Works
A proxy server sits between the client and the server, relaying communication data for both sides.
Under normal circumstances, the client connects directly to the server:
客户端 ────→ 服务器
When a proxy is configured, the client connects to the proxy server, and the proxy forwards the request to the target server:
客户端 ────→ 代理服务器 ────→ 目标服务器
Since all data flows through the proxy, the proxy can capture, inspect, and modify the communication content. Penetration testing leverages this capability to analyze and tamper with network traffic.
# 将 <IP> 替换为步骤 1 获取的地址
adb shell settings put global http_proxy <IP>:9000
# 示例:
adb shell settings put global http_proxy 192.168.1.105:9000
# 验证代理是否生效:
adb shell settings get global http_proxy
# 预期输出:192.168.1.105:9000
# 如需取消代理:
adb shell settings put global http_proxy :0
Note:settings put global http_proxy sets an Android system-level global HTTP proxy. This setting affects network requests sent through the standard HTTP API. Some applications use non-standard networking libraries and may bypass this setting. For such applications, VPN mode must be used.
5.5 Capturing Your First HTTP Request
Confirm that Reqable is running and the proxy port is 9000
Confirm that the emulator proxy has been configured and is active
Open the system browser within the emulator
Enter the following into the browser address bar: http://httpbin.org/get
Press Enter to navigate to the page
Switch to the Reqable window
Expected Result:
A new entry will appear in the request list on the left side of Reqable:
The detail panel on the right is divided into a "Request" tab and a "Response" tab
The "Request" tab shows the request method (GET) and request headers
The "Response" tab shows the status code (200 OK), response headers, and response body (text in JSON format)
httpbin.org is a public service used for testing HTTP requests. Its /get endpoint returns the incoming request information verbatim.
6. HTTPS Packet Capture and Certificate Installation
6.1 HTTPS and TLS Encryption
HTTPS (HTTP Secure) is the combination of the HTTP protocol and TLS (Transport Layer Security). TLS provides three core security guarantees:
Encryption: Communication content is encrypted, so even if a third party intercepts the data, they cannot read the original content.
Authentication: The server's identity is verified using a digital certificate, preventing a man-in-the-middle from impersonating the target server.
Data Integrity: A Message Authentication Code (MAC) is used to detect whether data has been tampered with during transmission.
Key visible differences between HTTP and HTTPS:
URLs for HTTP requests begin with http:// and use port 80 by default
URLs for HTTPS requests begin with https:// and use port 443 by default
In the browser address bar, HTTPS websites typically display a lock icon
6.2 Digital Certificates
A digital certificate is a digital file used to verify the identity of a network entity, issued by a Certificate Authority (CA). X.509 is the standard format for digital certificates.
Operating systems and browsers come preloaded with a set of trusted root certificates. When visiting an HTTPS website, the client verifies that the server's certificate was issued by one of these trusted root certificates or an intermediate certificate in the chain.
Man-in-the-Middle Proxy Certificate Mechanism:
When Reqable acts as a man-in-the-middle proxy, for each HTTPS request, it dynamically generates a forged server certificate signed by the Reqable root certificate. If the client (the emulator) has trusted the Reqable root certificate, it will trust these forged certificates — which enables Reqable to decrypt HTTPS traffic.
Starting with Android 7.0 (API 24), the system distinguishes between "user certificates" and "system certificates":
User certificates: Certificates installed through the Settings interface, stored in /data/misc/user/0/cacerts-added/
System certificates: Pre-installed in the system, stored in /system/etc/security/cacerts/
By default, apps trust only system certificates. Therefore, a Reqable certificate installed the normal way (as a user certificate) cannot decrypt HTTPS traffic from most apps (those with targetSdkVersion ≥ 24). The certificate must be deployed to the system certificate directory.
6.3 Installing the Reqable Certificate to the System Directory
Step 1: Export the Reqable Root Certificate
Reqable main interface → Settings icon (gear) in the top-right corner
SSL Configuration → Export Root Certificate → Select the PEM format
Save the file — for example, name it reqable-ca.pem and place it on the desktop
Step 2: Compute the Android-Style Hash for the Certificate
Add the bin subdirectory from the OpenSSL installation directory to the system Path environment variable (the method is the same as configuring the ADB environment variable)
Step 3: Generate the Android-Formatted Certificate File
Once installation is complete, an icon for the new app will appear on the emulator's home screen. If the app does not appear on the home screen, you can find it in the app drawer (swipe up from the bottom).
Common Errors:
INSTALL_FAILED_ALREADY_EXISTS: The app is already installed. Uninstall the existing version first: adb uninstall <包名>
INSTALL_PARSE_FAILED_NO_CERTIFICATES: The APK is unsigned or its signature is invalid. Use a properly signed APK instead
INSTALL_FAILED_INSUFFICIENT_STORAGE: The emulator has insufficient storage space. Increase the disk capacity in the MuMu settings
7.3 Packet Capture Operations
Confirm that the capture function is enabled in the main Reqable interface (the "Capture" tab on the left should be highlighted)
In the emulator, tap the icon of the test app to launch it
Interact with the various features of the app: tap buttons, switch pages, enter text and submit it
Observe how the request list in Reqable changes
Each time you see a new request, click through and inspect the following:
1. Prerequisite Knowledge
1.1 What Is Penetration Testing
Penetration testing is the process of evaluating the security of a target system by simulating the techniques and methods of real attackers, carried out only after obtaining written authorization from the system owner. Its purpose is to discover security vulnerabilities, assess their severity, and provide remediation recommendations.
The essential difference between penetration testing and hacking lies in authorization. Unauthorized security testing is illegal. All experiments in this course are conducted in a local emulator environment and do not involve any external systems.
The standard penetration testing process consists of five phases:
1.2 Overview of the Android Operating System
Android is a mobile operating system developed by Google, built on the Linux kernel. Its architecture is organized into five layers, from bottom to top:
Layer
Name
Function
1
Linux Kernel
Hardware drivers, process management, memory management, and security/permission controls
2
Hardware Abstraction Layer (HAL)
Provides a unified hardware access interface for upper layers
3
Android Runtime (ART)
Executes DEX bytecode by compiling it into native machine code
4
Application Framework
Provides APIs for Activity management, package management, resource management, and more
5
Applications
System apps (Phone, SMS) plus third-party apps installed by the user
The Android security model relies on the following mechanisms:
1.3 APK File Structure
An APK (Android Package) is the installation package format for Android applications. It is essentially a ZIP archive; after changing the file extension from .apk to .zip, you can open it with any decompression tool.
An APK contains the following core files and directories:
File / Directory
Description
`AndroidManifest.xml`
The application manifest file (binary XML), declaring the package name, version, permissions, the four core component types, and more
`classes.dex`
A Dalvik bytecode file containing the compiled instructions for all Java/Kotlin source code
`classes2.dex` (optional)
A secondary DEX file, generated when the method count exceeds 65,536
`resources.arsc`
The compiled resource index table, storing the mapping between resource IDs and their actual values
`res/`
The resource files directory, containing layout XML files, images, strings, color values, etc.
`META-INF/`
The signature files directory, containing MANIFEST.MF, CERT.SF, and CERT.RSA
`lib/`
The native library directory, organized into subdirectories by CPU architecture (arm64-v8a/armeabi-v7a/x86_64/x86)
`assets/`
The raw assets directory; files are packaged as-is and are not compiled
AndroidManifest.xml is one of the most important files for a security audit. It contains:
1.4 Tool Inventory
For installation instructions for the following tools, refer to the Appendix – Tool Installation Manual:
Tool
Version
Purpose
MuMu Emulator
12 (Android 12)
Provides the Android runtime environment
Android SDK Platform Tools
35.0+
Provides the ADB command-line tool
Reqable
2.8.0+
HTTP/HTTPS packet capture and debugging
apktool
2.9.3
APK decompilation and recompilation
jadx
1.5.0
Decompiles DEX bytecode back into Java source code
uber-apk-signer
1.3.0
APK signing tool
Frida
16.5.x
Dynamic instrumentation framework
unveilr
latest
WeChat Mini Program unpacking tool
2. Command Line Basics
2.1 What Is the Command Line
A Command Line Interface (CLI) is a way of interacting with an operating system by typing text commands. Unlike a Graphical User Interface (GUI), where you point and click with a mouse, a CLI requires you to enter instructions in a specific format.
Windows provides two command-line environments:
We will use cmd.exe as the default command-line environment. To launch it: press Win + R, type cmd, and press Enter.
2.2 File System Navigation
Current Directory and the Prompt:
After opening the command line, you will see something like the following:
Here, C:\Users\用户名 represents the current working directory. The > is the prompt, indicating that the system is waiting for user input.
Basic Commands:
Types of Paths:
2.3 Additional Command Line Notes
Tab Auto-Completion:
Type the first few characters of a path and press the Tab key; the system will automatically complete the rest. If there are multiple matches, press Tab repeatedly to cycle through them. This feature dramatically improves input speed and reduces typos.
Command History:
Press the ↑ (up arrow) key to recall previously entered commands. Press the ↓ (down arrow) key to move toward more recent history. This prevents you from having to retype the same commands.
Command Line Reminders:
3. MuMu Emulator Installation and Configuration
3.1 The Concept of an Emulator and Why We Use One
An emulator is a program that simulates a target hardware and software environment on the host operating system. An Android emulator allows a Windows computer to run the Android OS and Android apps.
The reasons for choosing an emulator over a physical device for penetration testing are:
Reasons for choosing the MuMu emulator:
3.2 Download and Installation
Step 1: Download the Installer
Step 2: Run the Installer
Step 3: First Launch
3.3 Basic Configuration
Enabling Root Access:
Other Essential Settings:
3.4 Basic Emulator Operations
The emulator uses the mouse to simulate finger touch operations:
Mouse Action
Corresponding Touch Action
Left mouse click
Finger tap
Hold and drag with the left mouse button
Finger swipe
Right mouse click → Back
Android Back button
Keyboard ESC
Android Back button
Keyboard F5
Android Home button
Explanation of the toolbar buttons on the right side of the emulator window (from top to bottom):
4. ADB Installation and Connection
Learning Objectives
4.1 Introduction to ADB
ADB (Android Debug Bridge) is a command-line tool included in the Android SDK that enables communication between a PC and an Android device. ADB uses a client-server architecture:
4.2 Installing Platform Tools
Step 1: Download
Step 2: Extract
Step 3: Configure Environment Variables
An environment variable is a list of paths that the operating system uses to locate executable programs. Once C:\platform-tools is added to this list, you can run the adb command from any directory.
Step 4: Verification
Expected output (the version number may differ):
If you see the message 'adb' 不是内部或外部命令, it means the environment variable configuration did not take effect. Check: whether you have closed the old command-line window, and whether the path in the Path variable is spelled correctly.
4.3 Connecting to the MuMu Emulator
Prerequisite: The MuMu emulator is launched and running.
device indicates a normal connection. Other possible statuses:
Troubleshooting:
4.4 Basic ADB Commands
5. Reqable Installation and HTTP Packet Capture
5.1 HTTP Protocol Fundamentals
HTTP (HyperText Transfer Protocol) is an application-layer protocol for communication between a client and a server. It operates on a request-response model:
Structure of an HTTP Request:
The request method indicates the type of operation to perform on a resource:
Method
Meaning
Common Use Cases
GET
Retrieve a resource
Viewing a page, querying data
POST
Create a resource
Submitting a form, logging in, uploading data
PUT
Update a resource
Modifying all fields
DELETE
Delete a resource
Removing a record
Request headers carry additional information. Common header fields:
Field
Description
Example
Host
The target server's domain name
`api.example.com`
Content-Type
The format of the data in the request body
`application/json`
User-Agent
An identifier for the client
`Dalvik/2.1.0`
Authorization
Authentication credentials
`Bearer eyJhbG...`
Structure of an HTTP Response:
The status code indicates the result of the request:
Range
Meaning
Example
200-299
Success
200 OK
300-399
Redirection
301 Moved Permanently
400-499
Client Error
403 Forbidden, 404 Not Found
500-599
Server Error
500 Internal Server Error
5.2 How a Proxy Server Works
A proxy server sits between the client and the server, relaying communication data for both sides.
Under normal circumstances, the client connects directly to the server:
When a proxy is configured, the client connects to the proxy server, and the proxy forwards the request to the target server:
Since all data flows through the proxy, the proxy can capture, inspect, and modify the communication content. Penetration testing leverages this capability to analyze and tamper with network traffic.
5.3 Installing Reqable
Initial Setup:
5.4 Configuring the Emulator Proxy
Step 1: Obtain the Host Computer's IP Address
Step 2: Set the Emulator's Global Proxy
Note:settings put global http_proxy sets an Android system-level global HTTP proxy. This setting affects network requests sent through the standard HTTP API. Some applications use non-standard networking libraries and may bypass this setting. For such applications, VPN mode must be used.
5.5 Capturing Your First HTTP Request
Expected Result:
A new entry will appear in the request list on the left side of Reqable:
httpbin.org is a public service used for testing HTTP requests. Its /get endpoint returns the incoming request information verbatim.
6. HTTPS Packet Capture and Certificate Installation
6.1 HTTPS and TLS Encryption
HTTPS (HTTP Secure) is the combination of the HTTP protocol and TLS (Transport Layer Security). TLS provides three core security guarantees:
Key visible differences between HTTP and HTTPS:
6.2 Digital Certificates
A digital certificate is a digital file used to verify the identity of a network entity, issued by a Certificate Authority (CA). X.509 is the standard format for digital certificates.
Certificate Chain of Trust:
Operating systems and browsers come preloaded with a set of trusted root certificates. When visiting an HTTPS website, the client verifies that the server's certificate was issued by one of these trusted root certificates or an intermediate certificate in the chain.
Man-in-the-Middle Proxy Certificate Mechanism:
When Reqable acts as a man-in-the-middle proxy, for each HTTPS request, it dynamically generates a forged server certificate signed by the Reqable root certificate. If the client (the emulator) has trusted the Reqable root certificate, it will trust these forged certificates — which enables Reqable to decrypt HTTPS traffic.
Starting with Android 7.0 (API 24), the system distinguishes between "user certificates" and "system certificates":
By default, apps trust only system certificates. Therefore, a Reqable certificate installed the normal way (as a user certificate) cannot decrypt HTTPS traffic from most apps (those with targetSdkVersion ≥ 24). The certificate must be deployed to the system certificate directory.
6.3 Installing the Reqable Certificate to the System Directory
Step 1: Export the Reqable Root Certificate
Step 2: Compute the Android-Style Hash for the Certificate
If OpenSSL is not installed:
Step 3: Generate the Android-Formatted Certificate File
After execution, a file named <hash>.0 will be generated in the current directory.
Step 4: Push the Certificate to the Emulator
6.4 Verifying HTTPS Packet Capture
Assessment Criteria:
7. Hands-On Exercise — Installing a Test App and Capturing Its Traffic
7.1 Environment Checklist
Before starting, confirm each of the following conditions one by one:
7.2 Installing the Test App
Once installation is complete, an icon for the new app will appear on the emulator's home screen. If the app does not appear on the home screen, you can find it in the app drawer (swipe up from the bottom).
Common Errors:
7.3 Packet Capture Operations
Analysis Template for Each Request:
Key Points of Interest:
Acceptance Criteria:
8. Summary
8.1 Knowledge Framework
Topic
Core Knowledge Points
Penetration Testing Concepts
Definition, authorization principles, the five-phase process
Android System
Five-layer architecture, security model (Sandbox / Permissions / Signing / SELinux)
APK Structure
ZIP format, core files (Manifest / DEX / Resources / Signatures / Native libraries)
Command Line
Launching cmd, file system navigation (dir/cd/mkdir/rmdir), Tab completion
MuMu Emulator
Installation, root access toggle, mouse-to-touch mapping
ADB
Architecture (Client-Server-Daemon), connection commands, 10 essential commands
HTTP Protocol
Request/Response structure, HTTP methods, status code categories, request headers
Reqable
Installation, proxy principles, emulator proxy configuration
HTTPS & Certificates
TLS encryption, certificate chain of trust, system certificate deployment
8.2 Toolchain Overview
8.3 Environment Health Check
Please confirm each item and record the result (Pass / Fail):