agentleFS
ivRodriguezCAivRodriguezCA/MobHunt/.claude/skills/mobile-recon/SKILL.md

mobile-recon

Skill37 starsChanged 3 months agoMITView on GitHub

Load when mapping a mobile app attack surface before hunting starts, covering which recon tools to run per platform, the iOS and Android surface JSON contracts, Hermes bundle extraction for React Native apps, and ranking areas by signal density.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After extraction and decryption, map the .app bundle:

    line 22
  2. Very specific:

    Run these tools and record results to recon/<target>/:

    line 46
  3. Very specific:

    After apktool + jadx extraction, map:

    line 99
  4. Distinctive:

    Run these regardless of platform:

    line 149
  5. Very specific:

    If analysis.binary_analyzer is configured, run headless analysis:

    line 190
  6. Distinctive:

    After all tools complete, rank areas for hunters by signal density:

    line 212
  7. Distinctive:

    Before starting recon, verify:

    line 232
  8. Very specific:

    All recon outputs go to recon/<target>/ as JSON files.

    line 244

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Mobile Recon: Attack Surface Mapping

This skill defines the methodology for static reconnaissance of mobile applications. It is loaded by /scope, /acquire, and /recon commands and used by the scope agent, acquisition agent, and orchestrator during the RECON phase.


Objective

Map every entry point, configuration surface, and embedded asset in the target app. Recon does NOT hunt for vulnerabilities; it catalogs what exists so hunters can prioritize.


iOS Recon Workflow

1. Structure Mapping

After extraction and decryption, map the .app bundle:

Payload/
  AppName.app/
    AppName           ← main executable (Mach-O)
    Info.plist         ← app configuration
    embedded.mobileprovision
    Frameworks/        ← embedded frameworks/dylibs
    PlugIns/           ← app extensions (widgets, share, etc.)
    Assets.car         ← compiled asset catalog
    *.storyboardc      ← compiled storyboards
    *.momd             ← Core Data models
    *.lproj/           ← localization bundles

Key files to inventory:

  • Main executable and all embedded framework binaries
  • Info.plist (app config, URL schemes, ATS, permissions)
  • embedded.mobileprovision (entitlements, team ID)
  • Any .plist, .json, .xml, .db, .sqlite files in the bundle

2. Entry Point Extraction

Run these tools and record results to recon/<target>/:

ToolWhat It MapsOutput Key
url_scheme_extractor.pyCustom URL schemes, universal links, app extensionsios_entry_points
entitlements_extractor.pyEntitlements, app groups, capabilitiesios_entitlements
info_plist_analyzer.pyATS config, permissions, background modesios_plist_config
framework_scanner.pyEmbedded frameworks, SDK inventoryios_frameworks

3. Binary Surface

ToolWhat It MapsOutput Key
string_extractor.pyURLs, endpoints, keys, interesting stringsios_strings
keychain_usage_analyzer.pyKeychain API patterns, protection levelsios_keychain
swift_metadata_parser.pySwift types, class hierarchy, protocolsios_swift_metadata

4. Aggregate iOS Surface

Combine outputs into recon/<target>/ios_surface.json:

{
  "entry_points": {
    "url_schemes": ["myapp://", "myapp-auth://"],
    "universal_links": ["applinks:example.com"],
    "app_extensions": ["ShareExtension", "WidgetExtension"],
    "background_modes": ["fetch", "remote-notification"]
  },
  "config_surface": {
    "ats_status": "exceptions_present",
    "ats_exceptions": ["api.example.com"],
    "permissions_requested": ["camera", "location-always", "contacts"],
    "dangerous_entitlements": []
  },
  "binary_surface": {
    "frameworks_count": 12,
    "debug_frameworks": [],
    "sdk_inventory": [{"name": "Firebase", "version": "10.x"}],
    "crypto_apis_used": ["CCCrypt", "SecKeyCreateEncryptedData"],
    "keychain_protection_levels": ["kSecAttrAccessibleWhenUnlocked"],
    "endpoints_found": 34,
    "secrets_flagged": 2
  }
}

Android Recon Workflow

1. Structure Mapping

After apktool + jadx extraction, map:

extracted/
  apktool/
    AndroidManifest.xml   ← decoded manifest (readable XML)
    res/                  ← decoded resources
    assets/               ← raw assets
    smali/                ← Dalvik bytecode
    lib/                  ← native libraries (.so)
      arm64-v8a/
      armeabi-v7a/
  jadx/
    sources/              ← decompiled Java source
    resources/            ← resource files

Key files to inventory:

  • AndroidManifest.xml (components, permissions, intent filters, SDK versions)
  • All .so files in lib/ (native libraries to reverse)
  • res/xml/network_security_config.xml (if present)
  • Any .json, .xml, .db, .properties files in assets/

2. Component & Configuration Extraction

ToolWhat It MapsOutput Key
manifest_analyzer.pySecurity flags, SDK versions, permissionsandroid_manifest
component_extractor.pyActivities, services, receivers, providers + export statusandroid_components
intent_filter_analyzer.pyIntent filters, deep links, app linksandroid_intents
network_security_config.pyCleartext policy, pinning, CA trustandroid_network_config

3. Source & Binary Surface

ToolWhat It MapsOutput Key
webview_analyzer.pyWebView configs, JS bridges, file accessandroid_webviews
content_provider_scanner.pyProvider queries, SQL patterns, file pathsandroid_providers
shared_prefs_analyzer.pySharedPrefs usage, modes, sensitive dataandroid_storage
string_extractor.pyURLs, keys, secrets in decompiled sourceandroid_strings
dex_class_analyzer.pyClass inventory by security relevanceandroid_classes

4. Aggregate Android Surface

Combine into recon/<target>/android_surface.json following the same pattern as iOS.


Cross-Platform Recon

Run these regardless of platform:

ToolPurpose
secret_scanner.pyRegex-based secret detection (AWS, Firebase, Stripe, etc.)
cert_pinning_detector.pyCertificate pinning implementation detection
crypto_analyzer.pyCryptographic API usage and weakness detection
api_endpoint_extractor.pyAPI URL and endpoint extraction
sdk_fingerprinter.pyThird-party SDK identification and version extraction
hermes_extractor.pyParse Hermes bytecode bundles (main.jsbundle on iOS, assets/index.android.bundle on Android) and emit one clean string per string-table entry. Required for React Native / Hermes apps; strings(1) and hbctool both fail on HBC v96.

React Native / Hermes Bundles

React Native apps with the Hermes engine ship a compiled bytecode bundle (magic bytes c6 1f bc 03). For these apps, the JavaScript business logic is in the bundle, not the native binary. Detect and extract first, then feed the extracted strings to secret_scanner.py and api_endpoint_extractor.py.

# Detect: check the magic bytes of main.jsbundle or index.android.bundle
python3 -c "import sys; print('hermes' if open(sys.argv[1],'rb').read(4) == b'\\xc6\\x1f\\xbc\\x03' else 'plain_js')" <bundle>

# Extract strings (one per line, one per string-table entry)
python3 tools/analysis/shared/hermes_extractor.py \
  --bundle workspace/<target>/ios/extracted/Payload/<App>.app/main.jsbundle \
  --out workspace/<target>/hermes/ios_strings.txt

python3 tools/analysis/shared/hermes_extractor.py \
  --bundle workspace/<target>/android/extracted/apktool/assets/index.android.bundle \
  --out workspace/<target>/hermes/android_strings.txt

# Scan the extracted strings for secrets and endpoints
python3 tools/analysis/shared/secret_scanner.py --path workspace/<target>/hermes/ios_strings.txt
grep -a '^https\?://' workspace/<target>/hermes/ios_strings.txt | sort -u

hermes_extractor.py supports --json for structured output including the parsed HBC header fields. Hermes apps are identified during acquisition; if the acquisition report lists a js_bundle of format hermes_bytecode, the hunters must consult the extracted strings file rather than (or in addition to) the native binary.


Binary Analysis (Optional, Ghidra/BN)

If analysis.binary_analyzer is configured, run headless analysis:

# iOS: analyze the decrypted main executable
bash tools/binary_analysis/ghidra_analyze.sh \
  --binary <decrypted_exec> --platform ios --output recon/<target>/

# Android: analyze each .so in lib/
bash tools/binary_analysis/ghidra_analyze.sh \
  --binary <native.so> --platform android --output recon/<target>/

Then classify functions:

python3 tools/binary_analysis/function_classifier.py \
  --results recon/<target>/*_ghidra_results.json --output recon/<target>/

Attack Surface Prioritization

After all tools complete, rank areas for hunters by signal density:

SignalPriority Boost
Custom URL schemes with OAuth callback patternsHIGH
Exported components without permission protectionHIGH
Hardcoded API keys (validated by secret scanner)HIGH
WebView with JS bridge + loadUrl from intentHIGH
ATS exceptions for API domainsMEDIUM
Content providers with dynamic queriesMEDIUM
Native libraries with JNI exportsMEDIUM
Missing cert pinning (chain candidate only)LOW
allowBackup=true (chain candidate only)LOW

The orchestrator uses this ranking to decide which hunter instances to spawn and which areas to skip.


Scope Verification Checklist

Before starting recon, verify:

  1. Bundle ID / package name matches scope.json exactly
  2. App version is the current App Store / Play Store release
  3. iOS binary is decrypted (cryptid == 0 via verify_decryption.py)
  4. Android manifest is from the production build (not debug)
  5. Binary analysis is allowed by program scope

Output Contract

All recon outputs go to recon/<target>/ as JSON files. The orchestrator and hunter agents consume these files, so maintain the schema contracts defined above. Every tool outputs structured JSON with a top-level status field (success or error).

Download now (ZIP)

Does 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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.