Claude 24f816b6a3
Consolidate 22 sibling repos into layered organism structure
Place useful parts of the surrounding repos into sica-fondt by layer, per the
body model (Ada = membrane; brain/endocrine/capabilities/knowledge non-Ada):

- brain/        LLM reasoning + providers (dapr, hermes, MoMoA)
- capabilities/ REPRAG sidecars: hermes tools/skills, dapr tools, parallel
                dispatch, A51 channels, and the OSINT cluster
- knowledge/    LORAG corpus: 754 cyber-skills, agency personas, secure-coding,
                MITRE ATT&CK data
- reference/    defensive threat-reference (C3, shhbruh doc) + AdaYaml parser

License handling: AGPL sources (worldosint, advanced_evolution, mercury,
Reticulum) and GPL DeTTECT are SPEC-only clean-room/port descriptions — no
copyleft code copied. MIT/Apache/data parts copied as working trees.

Safety: shhbruh escape/persistence material and C3 covert-C2 kept as reference
only, not wired into the running organism. See CONSOLIDATION.md.

https://claude.ai/code/session_01UehUqEXXJJCsHoA4voCU5c
2026-06-10 06:53:01 +00:00

55 lines
2.1 KiB
Markdown

# API Reference: Mobile App Penetration Testing Agent
## Overview
Tests Android mobile applications for OWASP MASTG vulnerabilities: insecure storage, hardcoded secrets, manifest misconfigurations, certificate pinning bypass, and API authorization flaws. For authorized testing only.
## Dependencies
| Package | Version | Purpose |
|---------|---------|---------|
| requests | >=2.28 | API and cert pinning testing |
| apktool | >=2.7 | APK decompilation (subprocess) |
| adb | - | Android device interaction (subprocess) |
## CLI Usage
```bash
python agent.py --apk target.apk --manifest AndroidManifest.xml \
--api-url https://api.target.com --auth-token <jwt> --output report.json
```
## Key Functions
### `decompile_apk(apk_path, output_dir)`
Decompiles APK using apktool for static analysis of smali code and resources.
### `extract_strings_from_apk(apk_path)`
Extracts hardcoded sensitive strings (API keys, passwords, tokens, URLs) from APK binary.
### `check_android_manifest(manifest_path)`
Analyzes AndroidManifest.xml for debuggable, allowBackup, exported components, and cleartext traffic settings.
### `test_certificate_pinning(target_url)`
Tests if API connections succeed through a proxy (indicating missing cert pinning).
### `check_insecure_storage_adb()`
Checks shared_prefs, databases, and external storage for sensitive data via adb shell.
### `test_api_endpoints(base_url, endpoints, auth_token)`
Tests API endpoints for authorization bypass by comparing authenticated vs unauthenticated responses.
### `check_root_detection(package_name)`
Inspects the app package for root detection library indicators (RootBeer, SafetyNet).
## OWASP MASTG Coverage
| Category | Test | Function |
|----------|------|----------|
| MASVS-STORAGE | Insecure Data Storage | `check_insecure_storage_adb` |
| MASVS-STORAGE | Hardcoded Credentials | `extract_strings_from_apk` |
| MASVS-NETWORK | Certificate Pinning | `test_certificate_pinning` |
| MASVS-NETWORK | Cleartext Traffic | `check_android_manifest` |
| MASVS-AUTH | API Authorization | `test_api_endpoints` |
| MASVS-RESILIENCE | Root Detection | `check_root_detection` |