All skills
hardw00t avatar

/android-pentest

@f9bb3b2

Comprehensive Android mobile application penetration testing with rooted-device ADB and Frida-based MCP tooling. Covers OWASP MASTG full methodology: recon, static + dynamic analysis, SSL/root bypass, IPC fuzzing, data exfiltration, crypto audit, and reporting. Triggers on requests to pentest Android apps, analyze APKs, bypass mobile security controls, or run MASVS/MASTG assessments.

Use this Skill: https://skilld.dev/gh/hardw00t/ai-security-arsenal/android-pentest

This session only. Nothing lands on disk.

workflowscrypto_analysis.md

≈483 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Workflow: Cryptography Analysis

Maps to MASTG-TEST-0013 / 0014 / 0018. Detect weak algos, hardcoded keys, non-Keystore key handling.

1. Global crypto trace

frida_run_script(pid, "crypto_hooks.js")

Logs every Cipher.getInstance, MessageDigest, Mac, KeyGenerator, SecretKeySpec.

2. Flag weak primitives inline

frida_run_script(pid, """
Java.perform(function() {
    var Cipher = Java.use('javax.crypto.Cipher');
    Cipher.getInstance.overload('java.lang.String').implementation = function(algo) {
        console.log('[CRYPTO] ' + algo);
        if (algo.indexOf('ECB') !== -1) console.log('[!] WEAK: ECB mode');
        if (algo.indexOf('DES') !== -1) console.log('[!] WEAK: DES');
        if (algo.indexOf('RC4') !== -1) console.log('[!] WEAK: RC4');
        if (algo.indexOf('MD5') !== -1) console.log('[!] WEAK: MD5');
        return this.getInstance(algo);
    };
});
""")

3. Hardcoded key discovery

frida_memory_search(pid, "-----BEGIN RSA PRIVATE KEY-----")
frida_memory_search(pid, "-----BEGIN PRIVATE KEY-----")
frida_memory_search(pid, "AES_SECRET_KEY")

Also grep the decompiled sources from pull_apk for key-looking constants.

4. Keystore usage audit

frida_run_script(pid, "keystore_hooks.js")

Confirm: hardware-backed (isInsideSecureHardware()), setUserAuthenticationRequired(true), setInvalidatedByBiometricEnrollment(true).

5. Runtime key dump

frida_hook_method(pid, "javax.crypto.spec.SecretKeySpec", "$init")
frida_hook_method(pid, "javax.crypto.spec.IvParameterSpec", "$init")

Common findings

Pattern Finding
AES/ECB/* Weak mode — no semantic security
Static IV literal IV reuse — GCM catastrophic, CBC leaky
new SecretKeySpec("hardcoded...") Hardcoded key
MD5/SHA1 for passwords Weak hash
Key in SharedPreferences plain Key storage violation

Source: SKILL.md on GitHub

1 warning16d4 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides a comprehensive environment and automated workflows for Android mobile application penetration testing. It interfaces with standard industry tools like ADB and Frida to perform security audits aligned with the OWASP MASTG methodology. While it performs sensitive operations like command execution and remote tool downloads, these are transparently implemented for its stated purpose using trusted sources.

  • Socket16d

    21 alerts: gptSecurity, gptAnomaly

  • Snyk16d

    Risk: LOW · No issues

  • ZeroLeaks5mo

    2 findings · Score: 80/100

Signed by skilld at f9bb3b2. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 6 months ago

README badge

README badge for hardw00t/ai-security-arsenal/android-pentest