intercept
Skill67 starsChanged 9 months agoMITView on GitHub
Intelligent traffic interception — SSL bypass, HTTP logging, traffic collection
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- analyze-apkSkill
- compare-versionsSkill
- find-apiSkill
- registerSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
No config file → default (user CA NOT trusted on Android 7+)
- Very specific: line 71
Use phantom-frida stealth server.
- Distinctive: line 92
Write a custom Frida script to hook the specific pinning implementation found in recon.
- Very specific: line 128
If using http-logger.js, output goes to console.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/intercept — Intelligent Traffic Interception
You are setting up intelligent traffic interception. Not just "run mitmproxy" — choose the right strategy based on the app's protections.
Input
$ARGUMENTS— package name (must be installed on device)
Phase 1: Reconnaissance
1a. Check network security config
# Decompile resources
java -jar tools/apktool/apktool.jar d -s -f -o /tmp/intercept_recon $APKRead res/xml/network_security_config.xml:
<domain-config cleartextTrafficPermitted="false">→ HTTPS only<pin-set>→ Certificate pinning configured<trust-anchors><certificates src="user"/>→ User CA trusted (easy mode!)- No config file → default (user CA NOT trusted on Android 7+)
1b. Detect pinning implementation
grep -rn 'CertificatePinner\|TrustManager\|X509\|ssl_pinning\|NetworkSecurityConfig' workspace/output/$PKG/Determine pinning type:
- None → Simple proxy is enough
- OkHttp CertificatePinner → ssl-bypass.js handles it
- Custom X509TrustManager → ssl-bypass.js handles it
- Conscrypt/platform → ssl-bypass.js handles it
- Native TLS (BoringSSL in .so) → Need Interceptor hook on
SSL_CTX_set_verify - Flutter → Need special Flutter SSL bypass
- React Native → Patch network_security_config + ssl-bypass.js
Phase 2: Strategy Selection
Based on recon, choose approach:
Strategy A: No Pinning
# Just log with Frida (simplest, no proxy needed)
frida -U -f $PKG -l workspace/frida-scripts/http-logger.jsStrategy B: Standard Pinning (OkHttp/TrustManager/Conscrypt)
# SSL bypass + HTTP logging
frida -U -f $PKG \
-l workspace/frida-scripts/ssl-bypass.js \
-l workspace/frida-scripts/http-logger.jsStrategy C: Heavy Pinning + Root Detection
# Full bypass stack
frida -U -f $PKG \
-l workspace/frida-scripts/root-bypass.js \
-l workspace/frida-scripts/ssl-bypass.js \
-l workspace/frida-scripts/http-logger.jsStrategy C2: App Detects Frida (crash/illegal instruction on attach)
Use phantom-frida stealth server. Read tools/phantom-frida/build-info.json for name and port:
# Parse config
cat tools/phantom-frida/build-info.json
# → {"name": "<NAME>", "port": <PORT>, ...}
# Deploy phantom-frida to device (if not already running)
adb push tools/phantom-frida/<NAME>-server /data/local/tmp/<NAME>-server
adb shell chmod 755 /data/local/tmp/<NAME>-server
adb shell /data/local/tmp/<NAME>-server -D &
adb forward tcp:<PORT> tcp:<PORT>
# Use -H instead of -U (custom port)
frida -H 127.0.0.1:<PORT> -f $PKG \
-l workspace/frida-scripts/ssl-bypass.js \
-l workspace/frida-scripts/http-logger.jsSigns that app detects Frida: crashes immediately on frida -U, "illegal instruction" error,
app shows "security check failed", or app force-closes when Frida attaches.
Strategy D: Native/Custom Pinning
Write a custom Frida script to hook the specific pinning implementation found in recon. May need to hook native functions in specific .so files.
Strategy E: mitmproxy (for full request/response bodies)
# Start mitmproxy with HAR dump
mitmdump -w workspace/traffic/$PKG.har --set stream_large_bodies=10m
# Configure device proxy
adb shell settings put global http_proxy <computer_ip>:8080
# Then bypass pinning
frida -U -f $PKG -l workspace/frida-scripts/ssl-bypass.jsPhase 3: Traffic Collection
3a. Start interception
Launch chosen strategy from Phase 2.
3b. Navigate the app
# Automated navigation
python pytools/ui_explorer.py snapshot # See current state
# Walk key flows:
# - App startup (splash → main screen)
# - Login/registration
# - Main features
# - Settings
# - ProfileSpend adequate time on each screen. Some API calls happen on timers or scroll events.
3c. Save traffic
If using http-logger.js, output goes to console. Capture it:
frida -U -f $PKG -l workspace/frida-scripts/ssl-bypass.js -l workspace/frida-scripts/http-logger.js 2>&1 | tee workspace/traffic/$PKG-raw.log
# Extract HTTP-LOG lines
grep '^\[HTTP-LOG\]' workspace/traffic/$PKG-raw.log | sed 's/^\[HTTP-LOG\] //' > workspace/traffic/$PKG-traffic.jsonPhase 4: Results
4a. Generate Postman collection
python pytools/traffic_to_collection.py frida workspace/traffic/$PKG-traffic.json \
--name "$PKG API" \
--output workspace/collections/$PKG.json4b. Generate OpenAPI spec (if mitmproxy was used)
# If traffic was captured via mitmproxy (not Frida http-logger)
mitmproxy2swagger -i workspace/traffic/$PKG.flow -o workspace/collections/$PKG-api.yaml \
-p https://api.example.com --examples4c. Summary
Report to user:
- Number of unique endpoints discovered
- Base URLs found
- Auth mechanism detected
- Notable findings (interesting headers, tokens, unexpected calls)
- Path to traffic file and Postman collection
Phase 5: Cleanup
# Remove proxy if set
adb shell settings put global http_proxy :0Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

