2025 Mobile App Pentesting Guide: Tools, Techniques & Real-World Examples
文章介绍了2025年移动应用渗透测试的方法与工具,包括安装ADB、MobSF等环境配置,分析APK文件权限及反编译源代码寻找秘密,并利用Burp Suite进行API测试与模糊测试。同时探讨了绕过SSL钉扎及认证机制,并强调遵循OWASP MASVS标准的重要性。 2025-5-6 07:18:31 Author: infosecwriteups.com(查看原文) 阅读量:18 收藏

Pawan Jaiswal

2025 Mobile App Pentesting Guide: Tools, Techniques & Real-World Examples

Mobile apps are omnipresent — from social media and enterprise to payment wallets. But most are still open to attack. This handbook is your step-by-step tutorial on pentesting mobile apps in 2025 with code snippets, tool instructions, and advice.

Below is a quick Android (Linux/macOS) setup:

# Install ADB (Android Debug Bridge)
sudo apt install android-tools-adb

# Install MobSF (in a virtual environment)
git clone https://github.com/MobSF/Mobile-Security-Framework-MobSF.git
cd Mobile-Security-Framework-MobSF
./setup.sh

To decompile an Android APK:

# Use JADX
jadx openexploit.apk -d outputfolder

# Use APKTool
apktool d openexploit.apk -o decompiled

To capture HTTPS traffic (make sure Burp Suite is installed)

Prefer watching instead of reading? Here’s a quick video guide

Simple reconnaissance on an APK file:

# Show APK permissions
aapt dump permissions openexploit.apk

# Analyze the manifest
unzip -p openexploit.apk AndroidManifest.xml

Check for:

  • android:debuggable=”true”
  • Exported activities, services, and receivers.

Decompile and read the source code for hardcoded secrets:

# Using JADX
jadx-gui openexploit.apk

Look for:

String apiKey = "openexploit_api_key";

Scan res/values/strings.xml, assets/, and .so native libraries for secrets.

Intercept API calls:

Use Burp Suite and manipulate app traffic. Set your proxy and monitor requests. Look for JWTs, session cookies, API parameters.

Bypass SSL Pinning using Frida:

# Android SSL pinning bypass (Frida script)
frida -U -n com.target.openexploit -l frida-ssl-bypass.js

Sample code snippet of frida-ssl-bypass.js:

Java.perform(function () {
var X509TrustManager = Java.use('javax.net.ssl.X509TrustManager');
var SSLContext = Java.use('javax.net.ssl.SSLContext');
var TrustManager = Java.registerClass({
name: 'org.wooyun.TrustManager',
implements: [X509TrustManager],
methods: {
checkClientTrusted: function () {},
checkServerTrusted: function () {},
getAcceptedIssuers: function () { return []; }
}
});
var TrustManagers = [TrustManager.$new()];
var SSLContextInit = SSLContext.init;
SSLContext.init.implementation = function (keyManager, trustManager, secureRandom) {
SSLContextInit.call(this, keyManager, TrustManagers, secureRandom);
};
});

Utilize Burp Suite to fuzz and test API security.

Bypass authentication:

POST /api/user/profile HTTP/1.2
Host: www.openexploit.in
Authorization: Bearer [XXXX-XXXX-XXXX-XXXX]
  • Try expired authentication tokens
  • Remove token and validate if the endpoint still works
  • Try Insure Direct Object Reference(changind IDs)

Use Curl for API testing:

curl -X GET https://api.openexploit.in/user/123 \
-H "Authorization: Bearer authtoken-xxx-xx-xxx-xxx"

See if you are able to:

  • View other user data
  • Change roles
  • Initiate admin endpoints

Pull data from Android emulator/device:

# List app packages
adb shell pm list packages

# Pull openexploit app data (only if rooted)
adb root
adb shell
cd /data/data/com.target.openexploit/s

Check these:

  • shared_prefs/ — does any.xml contain credentials?
  • databases/ — dump SQLite DBs using sqlite3:
sqlite3 openexploit.db
sqlite> .tables
sqlite> SELECT * FROM users;

Inject into runtime using Frida + Objection.

# Install Objection
pip install objection

# Bypass root detection
objection -g com.target.openexploit explore

# Inside the shell
android root disable

Hooking methods using Frida:

Java.perform(function () {
var Login = Java.use("com.app.login.LoginActivity");
Login.checkCredentials.implementation = function (user, pass) {
console.log("User: " + user + ", Pass: " + pass);
return true; // force login success
};
});

Write an organized report in OWASP MASVS standards. Here is a sample report format:

Title: Hardcoded API Key in Source Code
Risk: High
Affected Component: openexploit.apk > MainActivity.java
Proof: String apiKey = “XXXX-XXXX-XXXX-XXXX”;
Impact: Exposed API key can permit unauthorized API calls.
Recommendation: Place API keys in a secure backend. Never store secrets in app code.

You can use tools such as Dradis or Faraday to document findings.

  • Insecure Storage
  • SSL Pinning
  • API Authentication
  • Exported Components
  • Hardcoded Secrets
  • Debuggable Builds
  • Code Injection
  • OWASP MASVS & MSTG
  • Frida
  • Mobile Security Testing Guide GitHub
  • Android Pentesting Cheat Sheet
  • TryHackMe

Mobile app pentesting in 2025 is an most demanding skill for ethical hackers and security engineers. As digital identity moves towards mobile-based, AI-empowered apps, and sophisticated APIs, finding weaknesses is more critical than ever before.

Begin small. Practice testing test apps. And always have legal consent prior to testing live apps.


文章来源: https://infosecwriteups.com/2025-mobile-app-pentesting-guide-tools-techniques-real-world-examples-0465bd33e1db?source=rss----7b722bfd1b8d---4
如有侵权请联系:admin#unsafe.sh