[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AB2MM60EAW4XC1EBQPK3FZ":3,"skill-same:01M7AB2MM60EAW4XC1EBQPK3FZ":84},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":14,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M7AB2MM60EAW4XC1EBQPK3FZ","reverse-engineering-android-malware-with-jadx",null,"Reverse engineers malicious Android APK files using the JADX decompiler to read Java\u002FKotlin source, inspect manifest permissions, receivers, services, and native libraries, and identify data theft, C2 communication, privilege escalation, or overlay-attack behavior. Use when analyzing a suspected Android banking trojan, spyware, SMS stealer, or other flagged APK, or when investigating mobile malware or Android threats generally.","NeelakshSaxena\u002FVayu","NeelakshSaxena","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F87892838?v=4","01M7A3B9YFS6F6N9DD1787DT86","Neelaksh Saxena","01M7A3B9ZKBT09MNMPX2XN69BY",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Freverse-engineering-android-malware-with-jadx\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Freverse-engineering-android-malware-with-jadx\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: reverse-engineering-android-malware-with-jadx\ndescription: 'Reverse engineers malicious Android APK files using the JADX decompiler\n  to read Java\u002FKotlin source, inspect manifest permissions, receivers, services, and\n  native libraries, and identify data theft, C2 communication, privilege escalation,\n  or overlay-attack behavior. Use when analyzing a suspected Android banking trojan,\n  spyware, SMS stealer, or other flagged APK, or when investigating mobile malware\n  or Android threats generally.\n\n  '\ndomain: cybersecurity\nsubdomain: malware-analysis\ntags:\n- malware\n- Android\n- reverse-engineering\n- JADX\n- mobile-malware\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- DE.AE-02\n- RS.AN-03\n- ID.RA-01\n- DE.CM-01\nmitre_attack:\n- T1027\n- T1055\n- T1140\n- T1497\n- T1068\n---\n\n# Reverse Engineering Android Malware with JADX\n\n## When to Use\n\n- A suspicious Android APK has been reported as malicious or flagged by mobile threat detection\n- Analyzing Android banking trojans, spyware, SMS stealers, or adware samples\n- Determining what data an app collects, where it sends it, and what permissions it abuses\n- Extracting C2 server addresses, encryption keys, and configuration data from Android malware\n- Understanding overlay attack mechanisms used by banking trojans\n\n**Do not use** for analyzing obfuscated native (.so) libraries within APKs; use Ghidra or IDA for native ARM binary analysis.\n\n## Prerequisites\n\n- JADX 1.5+ installed (download from https:\u002F\u002Fgithub.com\u002Fskylot\u002Fjadx\u002Freleases)\n- Android SDK with `aapt2` and `adb` tools for APK inspection\n- apktool for full APK disassembly including smali code and resources\n- Python 3.8+ with `androguard` library for automated APK analysis\n- Frida for dynamic instrumentation (optional, for runtime analysis)\n- Isolated Android emulator (Genymotion or Android Studio AVD) without Google services\n\n## Workflow\n\n### Step 1: Extract APK Metadata and Permissions\n\nExamine the APK structure and AndroidManifest.xml:\n\n```bash\n# Get APK basic info\naapt2 dump badging malware.apk\n\n# Extract AndroidManifest.xml\napktool d malware.apk -o apk_extracted\u002F -f\n\n# Analyze permissions with androguard\npython3 \u003C\u003C 'PYEOF'\nfrom androguard.core.apk import APK\n\napk = APK(\"malware.apk\")\n\nprint(f\"Package:    {apk.get_package()}\")\nprint(f\"App Name:   {apk.get_app_name()}\")\nprint(f\"Version:    {apk.get_androidversion_name()}\")\nprint(f\"Min SDK:    {apk.get_min_sdk_version()}\")\nprint(f\"Target SDK: {apk.get_target_sdk_version()}\")\n\n# Dangerous permissions\ndangerous_perms = {\n    \"android.permission.READ_SMS\": \"SMS theft\",\n    \"android.permission.RECEIVE_SMS\": \"SMS interception\",\n    \"android.permission.SEND_SMS\": \"Premium SMS fraud\",\n    \"android.permission.READ_CONTACTS\": \"Contact harvesting\",\n    \"android.permission.READ_CALL_LOG\": \"Call log theft\",\n    \"android.permission.RECORD_AUDIO\": \"Audio surveillance\",\n    \"android.permission.CAMERA\": \"Camera surveillance\",\n    \"android.permission.ACCESS_FINE_LOCATION\": \"Location tracking\",\n    \"android.permission.READ_PHONE_STATE\": \"Device fingerprinting\",\n    \"android.permission.SYSTEM_ALERT_WINDOW\": \"Overlay attacks\",\n    \"android.permission.BIND_ACCESSIBILITY_SERVICE\": \"Full device control\",\n    \"android.permission.REQUEST_INSTALL_PACKAGES\": \"Sideloading apps\",\n    \"android.permission.BIND_DEVICE_ADMIN\": \"Device admin abuse\",\n}\n\nprint(\"\\nDangerous Permissions:\")\nfor perm in apk.get_permissions():\n    if perm in dangerous_perms:\n        print(f\"  [!] {perm}\")\n        print(f\"      Risk: {dangerous_perms[perm]}\")\n    elif \"android.permission\" in perm:\n        print(f\"  [*] {perm}\")\n\n# Components\nprint(\"\\nActivities:\")\nfor act in apk.get_activities():\n    print(f\"  {act}\")\n\nprint(\"\\nServices:\")\nfor svc in apk.get_services():\n    print(f\"  {svc}\")\n\nprint(\"\\nReceivers:\")\nfor rcv in apk.get_receivers():\n    print(f\"  {rcv}\")\nPYEOF\n```\n\n### Step 2: Decompile with JADX\n\nOpen the APK in JADX for Java\u002FKotlin source analysis:\n\n```bash\n# Open in JADX GUI\njadx-gui malware.apk\n\n# Command-line decompilation for scripted analysis\njadx -d jadx_output\u002F malware.apk --show-bad-code\n\n# Decompile with all options\njadx -d jadx_output\u002F malware.apk \\\n  --deobf \\\n  --deobf-min 3 \\\n  --deobf-max 64 \\\n  --show-bad-code \\\n  --threads-count 4\n\n# The output directory structure:\n# jadx_output\u002F\n#   sources\u002F           \u003C- Decompiled Java source code\n#     com\u002Fmalware\u002Fapp\u002F\n#       MainActivity.java\n#       C2Service.java\n#       SMSReceiver.java\n#   resources\u002F         \u003C- Decoded resources (layouts, strings, assets)\n#     AndroidManifest.xml\n#     res\u002F\n#     assets\u002F\n```\n\n### Step 3: Identify Malicious Functionality\n\nSearch for suspicious code patterns in decompiled sources:\n\n```bash\n# Search for network communication\ngrep -rn \"HttpURLConnection\\|OkHttpClient\\|Retrofit\\|Volley\\|URL(\" jadx_output\u002Fsources\u002F\n\n# Search for SMS operations\ngrep -rn \"SmsManager\\|getDefault().sendTextMessage\\|SMS_RECEIVED\" jadx_output\u002Fsources\u002F\n\n# Search for overlay attack code\ngrep -rn \"SYSTEM_ALERT_WINDOW\\|TYPE_APPLICATION_OVERLAY\\|WindowManager.LayoutParams\" jadx_output\u002Fsources\u002F\n\n# Search for accessibility service abuse\ngrep -rn \"AccessibilityService\\|onAccessibilityEvent\\|performAction\" jadx_output\u002Fsources\u002F\n\n# Search for data exfiltration\ngrep -rn \"getDeviceId\\|getSubscriberId\\|getSimSerialNumber\\|getLine1Number\" jadx_output\u002Fsources\u002F\n\n# Search for crypto operations (key storage, encryption)\ngrep -rn \"SecretKeySpec\\|Cipher.getInstance\\|AES\\|DES\\|RSA\" jadx_output\u002Fsources\u002F\n\n# Search for dynamic code loading\ngrep -rn \"DexClassLoader\\|PathClassLoader\\|loadDex\\|loadClass\" jadx_output\u002Fsources\u002F\n\n# Search for obfuscated strings and decryption\ngrep -rn \"Base64.decode\\|decrypt\\|decipher\\|xor\" jadx_output\u002Fsources\u002F\n```\n\n### Step 4: Analyze C2 Communication\n\nTrace the network communication logic:\n\n```python\n# Automated C2 extraction from decompiled code\nimport os\nimport re\n\njadx_dir = \"jadx_output\u002Fsources\"\n\n# Patterns for C2 URLs and IPs\nurl_pattern = re.compile(r'https?:\u002F\u002F[^\\s\"\\'\u003C>]+')\nip_pattern = re.compile(r'\"(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})\"')\nbase64_pattern = re.compile(r'\"([A-Za-z0-9+\u002F]{20,}={0,2})\"')\n\nurls = set()\nips = set()\nb64_strings = set()\n\nfor root, dirs, files in os.walk(jadx_dir):\n    for fname in files:\n        if fname.endswith('.java'):\n            filepath = os.path.join(root, fname)\n            with open(filepath, 'r', errors='ignore') as f:\n                content = f.read()\n\n            for match in url_pattern.finditer(content):\n                urls.add(match.group())\n            for match in ip_pattern.finditer(content):\n                ips.add(match.group(1))\n            for match in base64_pattern.finditer(content):\n                b64_strings.add(match.group(1))\n\nprint(\"URLs found:\")\nfor u in urls:\n    print(f\"  {u}\")\n\nprint(\"\\nIP addresses:\")\nfor ip in ips:\n    print(f\"  {ip}\")\n\n# Decode Base64 strings\nimport base64\nprint(\"\\nDecoded Base64 strings:\")\nfor b64 in b64_strings:\n    try:\n        decoded = base64.b64decode(b64).decode('utf-8', errors='ignore')\n        if any(c.isprintable() for c in decoded) and len(decoded) > 3:\n            print(f\"  {b64[:30]}... -> {decoded[:100]}\")\n    except:\n        pass\n```\n\n### Step 5: Examine Native Libraries\n\nCheck for native code that may contain additional malicious logic:\n\n```bash\n# List native libraries in the APK\nunzip -l malware.apk | grep \"\\.so$\"\n\n# Extract native libraries\nunzip malware.apk \"lib\u002F*\" -d apk_native\u002F\n\n# Check native library properties\nfile apk_native\u002Flib\u002Farmeabi-v7a\u002F*.so\nreadelf -d apk_native\u002Flib\u002Farmeabi-v7a\u002F*.so | grep NEEDED\n\n# Strings from native libraries\nstrings apk_native\u002Flib\u002Farmeabi-v7a\u002Flibpayload.so | grep -iE \"(http|url|key|encrypt|password)\"\n\n# For deep native analysis, import into Ghidra:\n# File -> Import -> Select .so file -> Select ARM architecture\n```\n\n### Step 6: Document Analysis and Extract IOCs\n\nCompile a comprehensive Android malware analysis report:\n\n```\nAnalysis documentation should include:\n- APK metadata (package name, version, signing certificate)\n- Permission analysis with risk assessment\n- Component analysis (activities, services, receivers, providers)\n- Decompiled code walkthrough of malicious functions\n- C2 communication protocol and endpoints\n- Data exfiltration methods and targeted data types\n- Persistence mechanisms (device admin, accessibility service)\n- Evasion techniques (emulator detection, root detection)\n- Extracted IOCs (C2 URLs, domains, IPs, signing certificate hash)\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **APK (Android Package)** | Android application package format containing compiled DEX bytecode, resources, manifest, and native libraries |\n| **DEX Bytecode** | Dalvik Executable format containing compiled Java\u002FKotlin code; JADX converts this back to readable Java source |\n| **Overlay Attack** | Banking trojan technique displaying a fake UI layer over a legitimate banking app to steal credentials using SYSTEM_ALERT_WINDOW permission |\n| **Accessibility Service Abuse** | Malware registering as an accessibility service to capture screen content, perform actions, and prevent uninstallation |\n| **Smali** | Human-readable representation of DEX bytecode; intermediate representation between bytecode and Java used by apktool |\n| **Dynamic Code Loading** | Loading additional DEX code at runtime using DexClassLoader to hide malicious functionality from static analysis |\n| **Device Admin Abuse** | Malware requesting device administrator privileges to prevent uninstallation and perform device wipe threats |\n\n## Tools & Systems\n\n- **JADX**: Open-source DEX to Java decompiler providing GUI and CLI for Android APK analysis with deobfuscation support\n- **apktool**: Tool for reverse engineering Android APK files to smali code and decoded resources\n- **androguard**: Python framework for automated Android APK analysis including permission, component, and code analysis\n- **Frida**: Dynamic instrumentation toolkit for hooking Java methods and native functions at runtime on Android\n- **MobSF (Mobile Security Framework)**: Automated mobile application security testing framework for static and dynamic analysis\n\n## Common Scenarios\n\n### Scenario: Analyzing an Android Banking Trojan\n\n**Context**: A banking trojan APK is distributed via SMS phishing targeting customers of a specific bank. The sample needs analysis to identify targeted banks, C2 infrastructure, and data theft mechanisms.\n\n**Approach**:\n1. Extract APK metadata and identify requested permissions (SMS, accessibility, overlay, device admin)\n2. Decompile with JADX and search for overlay activity classes that mimic banking app UIs\n3. Identify the list of targeted banking apps by searching for package name lists in the code\n4. Trace the SMS interception receiver to understand how 2FA codes are stolen\n5. Follow the C2 communication code to extract server URLs and command protocol\n6. Check for web injection configuration files in assets\u002F directory\n7. Extract all IOCs and document the complete attack chain\n\n**Pitfalls**:\n- Not deobfuscating class and method names before analysis (use JADX --deobf flag)\n- Missing dynamically loaded DEX files downloaded after installation\n- Ignoring native .so libraries that may contain the actual C2 logic or encryption routines\n- Overlooking assets\u002F directory which may contain encrypted configuration or web injects\n\n## Output Format\n\n```\nANDROID MALWARE ANALYSIS REPORT\n==================================\nAPK File:         update_bank.apk\nPackage:          com.android.systemupdate\nSHA-256:          e3b0c44298fc1c149afbf4c8996fb924...\nVersion:          1.2.3\nMin SDK:          21 (Android 5.0)\nSigning Cert:     SHA-256: abc123... (self-signed)\n\nCLASSIFICATION\nFamily:           Anubis Banking Trojan\nType:             Banking Trojan \u002F SMS Stealer \u002F Keylogger\n\nDANGEROUS PERMISSIONS\n[!] RECEIVE_SMS          - Intercepts incoming SMS (2FA theft)\n[!] READ_SMS             - Reads SMS messages\n[!] SEND_SMS             - Sends premium SMS\n[!] SYSTEM_ALERT_WINDOW  - Overlay attacks on banking apps\n[!] BIND_ACCESSIBILITY   - Full device control\n[!] BIND_DEVICE_ADMIN    - Prevents uninstallation\n\nMALICIOUS COMPONENTS\nService:    com.android.systemupdate.C2Service (C2 communication)\nReceiver:   com.android.systemupdate.SmsReceiver (SMS interception)\nActivity:   com.android.systemupdate.OverlayActivity (credential overlay)\n\nTARGETED APPS (23 banking apps)\ncom.bank.example1, com.bank.example2, ...\n\nC2 INFRASTRUCTURE\nPrimary:    hxxps:\u002F\u002Fc2-server[.]com\u002Fapi\u002Fbot\nFallback:   hxxps:\u002F\u002Fbackup-c2[.]net\u002Fapi\u002Fbot\nProtocol:   HTTPS POST with JSON body\nBot ID:     MD5(IMEI + Build.SERIAL)\n\nEXTRACTED IOCs\nDomains:    c2-server[.]com, backup-c2[.]net\nIPs:        185.220.101[.]42\nURLs:       hxxps:\u002F\u002Fc2-server[.]com\u002Fapi\u002Fbot\n            hxxps:\u002F\u002Fc2-server[.]com\u002Fapi\u002Finjects\nCert Hash:  abc123def456...\n```\n","# Reverse Engineering Android Malware with JADX\n\n## When to Use\n\n- A suspicious Android APK has been reported as malicious or flagged by mobile threat detection\n- Analyzing Android banking trojans, spyware, SMS stealers, or adware samples\n- Determining what data an app collects, where it sends it, and what permissions it abuses\n- Extracting C2 server addresses, encryption keys, and configuration data from Android malware\n- Understanding overlay attack mechanisms used by banking trojans\n\n**Do not use** for analyzing obfuscated native (.so) libraries within APKs; use Ghidra or IDA for native ARM binary analysis.\n\n## Prerequisites\n\n- JADX 1.5+ installed (download from https:\u002F\u002Fgithub.com\u002Fskylot\u002Fjadx\u002Freleases)\n- Android SDK with `aapt2` and `adb` tools for APK inspection\n- apktool for full APK disassembly including smali code and resources\n- Python 3.8+ with `androguard` library for automated APK analysis\n- Frida for dynamic instrumentation (optional, for runtime analysis)\n- Isolated Android emulator (Genymotion or Android Studio AVD) without Google services\n\n## Workflow\n\n### Step 1: Extract APK Metadata and Permissions\n\nExamine the APK structure and AndroidManifest.xml:\n\n```bash\n# Get APK basic info\naapt2 dump badging malware.apk\n\n# Extract AndroidManifest.xml\napktool d malware.apk -o apk_extracted\u002F -f\n\n# Analyze permissions with androguard\npython3 \u003C\u003C 'PYEOF'\nfrom androguard.core.apk import APK\n\napk = APK(\"malware.apk\")\n\nprint(f\"Package:    {apk.get_package()}\")\nprint(f\"App Name:   {apk.get_app_name()}\")\nprint(f\"Version:    {apk.get_androidversion_name()}\")\nprint(f\"Min SDK:    {apk.get_min_sdk_version()}\")\nprint(f\"Target SDK: {apk.get_target_sdk_version()}\")\n\n# Dangerous permissions\ndangerous_perms = {\n    \"android.permission.READ_SMS\": \"SMS theft\",\n    \"android.permission.RECEIVE_SMS\": \"SMS interception\",\n    \"android.permission.SEND_SMS\": \"Premium SMS fraud\",\n    \"android.permission.READ_CONTACTS\": \"Contact harvesting\",\n    \"android.permission.READ_CALL_LOG\": \"Call log theft\",\n    \"android.permission.RECORD_AUDIO\": \"Audio surveillance\",\n    \"android.permission.CAMERA\": \"Camera surveillance\",\n    \"android.permission.ACCESS_FINE_LOCATION\": \"Location tracking\",\n    \"android.permission.READ_PHONE_STATE\": \"Device fingerprinting\",\n    \"android.permission.SYSTEM_ALERT_WINDOW\": \"Overlay attacks\",\n    \"android.permission.BIND_ACCESSIBILITY_SERVICE\": \"Full device control\",\n    \"android.permission.REQUEST_INSTALL_PACKAGES\": \"Sideloading apps\",\n    \"android.permission.BIND_DEVICE_ADMIN\": \"Device admin abuse\",\n}\n\nprint(\"\\nDangerous Permissions:\")\nfor perm in apk.get_permissions():\n    if perm in dangerous_perms:\n        print(f\"  [!] {perm}\")\n        print(f\"      Risk: {dangerous_perms[perm]}\")\n    elif \"android.permission\" in perm:\n        print(f\"  [*] {perm}\")\n\n# Components\nprint(\"\\nActivities:\")\nfor act in apk.get_activities():\n    print(f\"  {act}\")\n\nprint(\"\\nServices:\")\nfor svc in apk.get_services():\n    print(f\"  {svc}\")\n\nprint(\"\\nReceivers:\")\nfor rcv in apk.get_receivers():\n    print(f\"  {rcv}\")\nPYEOF\n```\n\n### Step 2: Decompile with JADX\n\nOpen the APK in JADX for Java\u002FKotlin source analysis:\n\n```bash\n# Open in JADX GUI\njadx-gui malware.apk\n\n# Command-line decompilation for scripted analysis\njadx -d jadx_output\u002F malware.apk --show-bad-code\n\n# Decompile with all options\njadx -d jadx_output\u002F malware.apk \\\n  --deobf \\\n  --deobf-min 3 \\\n  --deobf-max 64 \\\n  --show-bad-code \\\n  --threads-count 4\n\n# The output directory structure:\n# jadx_output\u002F\n#   sources\u002F           \u003C- Decompiled Java source code\n#     com\u002Fmalware\u002Fapp\u002F\n#       MainActivity.java\n#       C2Service.java\n#       SMSReceiver.java\n#   resources\u002F         \u003C- Decoded resources (layouts, strings, assets)\n#     AndroidManifest.xml\n#     res\u002F\n#     assets\u002F\n```\n\n### Step 3: Identify Malicious Functionality\n\nSearch for suspicious code patterns in decompiled sources:\n\n```bash\n# Search for network communication\ngrep -rn \"HttpURLConnection\\|OkHttpClient\\|Retrofit\\|Volley\\|URL(\" jadx_output\u002Fsources\u002F\n\n# Search for SMS operations\ngrep -rn \"SmsManager\\|getDefault().sendTextMessage\\|SMS_RECEIVED\" jadx_output\u002Fsources\u002F\n\n# Search for overlay attack code\ngrep -rn \"SYSTEM_ALERT_WINDOW\\|TYPE_APPLICATION_OVERLAY\\|WindowManager.LayoutParams\" jadx_output\u002Fsources\u002F\n\n# Search for accessibility service abuse\ngrep -rn \"AccessibilityService\\|onAccessibilityEvent\\|performAction\" jadx_output\u002Fsources\u002F\n\n# Search for data exfiltration\ngrep -rn \"getDeviceId\\|getSubscriberId\\|getSimSerialNumber\\|getLine1Number\" jadx_output\u002Fsources\u002F\n\n# Search for crypto operations (key storage, encryption)\ngrep -rn \"SecretKeySpec\\|Cipher.getInstance\\|AES\\|DES\\|RSA\" jadx_output\u002Fsources\u002F\n\n# Search for dynamic code loading\ngrep -rn \"DexClassLoader\\|PathClassLoader\\|loadDex\\|loadClass\" jadx_output\u002Fsources\u002F\n\n# Search for obfuscated strings and decryption\ngrep -rn \"Base64.decode\\|decrypt\\|decipher\\|xor\" jadx_output\u002Fsources\u002F\n```\n\n### Step 4: Analyze C2 Communication\n\nTrace the network communication logic:\n\n```python\n# Automated C2 extraction from decompiled code\nimport os\nimport re\n\njadx_dir = \"jadx_output\u002Fsources\"\n\n# Patterns for C2 URLs and IPs\nurl_pattern = re.compile(r'https?:\u002F\u002F[^\\s\"\\'\u003C>]+')\nip_pattern = re.compile(r'\"(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})\"')\nbase64_pattern = re.compile(r'\"([A-Za-z0-9+\u002F]{20,}={0,2})\"')\n\nurls = set()\nips = set()\nb64_strings = set()\n\nfor root, dirs, files in os.walk(jadx_dir):\n    for fname in files:\n        if fname.endswith('.java'):\n            filepath = os.path.join(root, fname)\n            with open(filepath, 'r', errors='ignore') as f:\n                content = f.read()\n\n            for match in url_pattern.finditer(content):\n                urls.add(match.group())\n            for match in ip_pattern.finditer(content):\n                ips.add(match.group(1))\n            for match in base64_pattern.finditer(content):\n                b64_strings.add(match.group(1))\n\nprint(\"URLs found:\")\nfor u in urls:\n    print(f\"  {u}\")\n\nprint(\"\\nIP addresses:\")\nfor ip in ips:\n    print(f\"  {ip}\")\n\n# Decode Base64 strings\nimport base64\nprint(\"\\nDecoded Base64 strings:\")\nfor b64 in b64_strings:\n    try:\n        decoded = base64.b64decode(b64).decode('utf-8', errors='ignore')\n        if any(c.isprintable() for c in decoded) and len(decoded) > 3:\n            print(f\"  {b64[:30]}... -> {decoded[:100]}\")\n    except:\n        pass\n```\n\n### Step 5: Examine Native Libraries\n\nCheck for native code that may contain additional malicious logic:\n\n```bash\n# List native libraries in the APK\nunzip -l malware.apk | grep \"\\.so$\"\n\n# Extract native libraries\nunzip malware.apk \"lib\u002F*\" -d apk_native\u002F\n\n# Check native library properties\nfile apk_native\u002Flib\u002Farmeabi-v7a\u002F*.so\nreadelf -d apk_native\u002Flib\u002Farmeabi-v7a\u002F*.so | grep NEEDED\n\n# Strings from native libraries\nstrings apk_native\u002Flib\u002Farmeabi-v7a\u002Flibpayload.so | grep -iE \"(http|url|key|encrypt|password)\"\n\n# For deep native analysis, import into Ghidra:\n# File -> Import -> Select .so file -> Select ARM architecture\n```\n\n### Step 6: Document Analysis and Extract IOCs\n\nCompile a comprehensive Android malware analysis report:\n\n```\nAnalysis documentation should include:\n- APK metadata (package name, version, signing certificate)\n- Permission analysis with risk assessment\n- Component analysis (activities, services, receivers, providers)\n- Decompiled code walkthrough of malicious functions\n- C2 communication protocol and endpoints\n- Data exfiltration methods and targeted data types\n- Persistence mechanisms (device admin, accessibility service)\n- Evasion techniques (emulator detection, root detection)\n- Extracted IOCs (C2 URLs, domains, IPs, signing certificate hash)\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **APK (Android Package)** | Android application package format containing compiled DEX bytecode, resources, manifest, and native libraries |\n| **DEX Bytecode** | Dalvik Executable format containing compiled Java\u002FKotlin code; JADX converts this back to readable Java source |\n| **Overlay Attack** | Banking trojan technique displaying a fake UI layer over a legitimate banking app to steal credentials using SYSTEM_ALERT_WINDOW permission |\n| **Accessibility Service Abuse** | Malware registering as an accessibility service to capture screen content, perform actions, and prevent uninstallation |\n| **Smali** | Human-readable representation of DEX bytecode; intermediate representation between bytecode and Java used by apktool |\n| **Dynamic Code Loading** | Loading additional DEX code at runtime using DexClassLoader to hide malicious functionality from static analysis |\n| **Device Admin Abuse** | Malware requesting device administrator privileges to prevent uninstallation and perform device wipe threats |\n\n## Tools & Systems\n\n- **JADX**: Open-source DEX to Java decompiler providing GUI and CLI for Android APK analysis with deobfuscation support\n- **apktool**: Tool for reverse engineering Android APK files to smali code and decoded resources\n- **androguard**: Python framework for automated Android APK analysis including permission, component, and code analysis\n- **Frida**: Dynamic instrumentation toolkit for hooking Java methods and native functions at runtime on Android\n- **MobSF (Mobile Security Framework)**: Automated mobile application security testing framework for static and dynamic analysis\n\n## Common Scenarios\n\n### Scenario: Analyzing an Android Banking Trojan\n\n**Context**: A banking trojan APK is distributed via SMS phishing targeting customers of a specific bank. The sample needs analysis to identify targeted banks, C2 infrastructure, and data theft mechanisms.\n\n**Approach**:\n1. Extract APK metadata and identify requested permissions (SMS, accessibility, overlay, device admin)\n2. Decompile with JADX and search for overlay activity classes that mimic banking app UIs\n3. Identify the list of targeted banking apps by searching for package name lists in the code\n4. Trace the SMS interception receiver to understand how 2FA codes are stolen\n5. Follow the C2 communication code to extract server URLs and command protocol\n6. Check for web injection configuration files in assets\u002F directory\n7. Extract all IOCs and document the complete attack chain\n\n**Pitfalls**:\n- Not deobfuscating class and method names before analysis (use JADX --deobf flag)\n- Missing dynamically loaded DEX files downloaded after installation\n- Ignoring native .so libraries that may contain the actual C2 logic or encryption routines\n- Overlooking assets\u002F directory which may contain encrypted configuration or web injects\n\n## Output Format\n\n```\nANDROID MALWARE ANALYSIS REPORT\n==================================\nAPK File:         update_bank.apk\nPackage:          com.android.systemupdate\nSHA-256:          e3b0c44298fc1c149afbf4c8996fb924...\nVersion:          1.2.3\nMin SDK:          21 (Android 5.0)\nSigning Cert:     SHA-256: abc123... (self-signed)\n\nCLASSIFICATION\nFamily:           Anubis Banking Trojan\nType:             Banking Trojan \u002F SMS Stealer \u002F Keylogger\n\nDANGEROUS PERMISSIONS\n[!] RECEIVE_SMS          - Intercepts incoming SMS (2FA theft)\n[!] READ_SMS             - Reads SMS messages\n[!] SEND_SMS             - Sends premium SMS\n[!] SYSTEM_ALERT_WINDOW  - Overlay attacks on banking apps\n[!] BIND_ACCESSIBILITY   - Full device control\n[!] BIND_DEVICE_ADMIN    - Prevents uninstallation\n\nMALICIOUS COMPONENTS\nService:    com.android.systemupdate.C2Service (C2 communication)\nReceiver:   com.android.systemupdate.SmsReceiver (SMS interception)\nActivity:   com.android.systemupdate.OverlayActivity (credential overlay)\n\nTARGETED APPS (23 banking apps)\ncom.bank.example1, com.bank.example2, ...\n\nC2 INFRASTRUCTURE\nPrimary:    hxxps:\u002F\u002Fc2-server[.]com\u002Fapi\u002Fbot\nFallback:   hxxps:\u002F\u002Fbackup-c2[.]net\u002Fapi\u002Fbot\nProtocol:   HTTPS POST with JSON body\nBot ID:     MD5(IMEI + Build.SERIAL)\n\nEXTRACTED IOCs\nDomains:    c2-server[.]com, backup-c2[.]net\nIPs:        185.220.101[.]42\nURLs:       hxxps:\u002F\u002Fc2-server[.]com\u002Fapi\u002Fbot\n            hxxps:\u002F\u002Fc2-server[.]com\u002Fapi\u002Finjects\nCert Hash:  abc123def456...\n```\n",{"name":5,"tags":25,"author":31,"domain":32,"license":15,"version":33,"nist_csf":34,"subdomain":39,"description":40,"mitre_attack":41},[26,27,28,29,30],"malware","Android","reverse-engineering","JADX","mobile-malware","mahipal","cybersecurity","1.0.0",[35,36,37,38],"DE.AE-02","RS.AN-03","ID.RA-01","DE.CM-01","malware-analysis","Reverse engineers malicious Android APK files using the JADX decompiler to read Java\u002FKotlin source, inspect manifest permissions, receivers, services, and native libraries, and identify data theft, C2 communication, privilege escalation, or overlay-attack behavior. Use when analyzing a suspected Android banking trojan, spyware, SMS stealer, or other flagged APK, or when investigating mobile malware or Android threats generally.\n",[42,43,44,45,46],"T1027","T1055","T1140","T1497","T1068","main","7540bbccf0c1ded6156a467b02c95b61ad62413f",".agents\u002Fskills\u002Freverse-engineering-android-malware-with-jadx","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena","Currently exploring the intersection of tech","2026-09-11 03:02:31",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add NeelakshSaxena\u002FVayu --skill reverse-engineering-android-malware-with-jadx",{"tool":60,"command":61},"bunx","bunx skills add NeelakshSaxena\u002FVayu --skill reverse-engineering-android-malware-with-jadx",{"tool":63,"command":64},"pnpm","pnpm dlx skills add NeelakshSaxena\u002FVayu --skill reverse-engineering-android-malware-with-jadx","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Freverse-engineering-android-malware-with-jadx\u002FSKILL.md",true,[68,72,78],{"path":69,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fapi-reference.md","REFERENCE","参考文档",2490,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Freverse-engineering-android-malware-with-jadx\u002Freferences\u002Fapi-reference.md",{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"scripts\u002Fagent.py","SCRIPT","脚本",7815,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Freverse-engineering-android-malware-with-jadx\u002Fscripts\u002Fagent.py",[85,92,99,106,113,120],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":20},"01M7ACCCVNCFKMA9X6D15X6G98","runpodctl","Runpod CLI for managing GPU\u002FCPU workloads from the terminal — pods, serverless endpoints, templates, network volumes, Hub deploys, models, SSH, and file transfer (send\u002Freceive). Use for terminal\u002FCI\u002Fscripting, Hub browse\u002Fdeploy, SSH setup, `doctor`, or when the Runpod MCP tools are not connected. For structured tool calls in an MCP-enabled session, prefer runpod-mcp.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpodctl\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":20},"01M7ACC63SRHEA5KMCHSMZK2TC","runpod","Start here for any Runpod task — running GPU\u002FCPU pods, deploying serverless endpoints, templates, network volumes, building images, or understanding how Runpod works. Routes to the right skill (runpod-mcp, runpodctl, flash, companion-clis, runpod-usage, runpod-templates, runpod-migrate) and indexes two dozen live-verified end-to-end examples (golden paths) — use it when the lane is unclear, and for any multi-step or provisioning task even when it is not.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":20},"01M7ACC0Q1C89N9BZBV91CTQTF","runpod-usage","How Runpod works and how to work it — pods vs serverless, GPU\u002FVRAM selection, storage, building a container, networking, plus the agentic pod development loop (provision → ssh-exec → set up → poll readiness) and on-pod install hygiene (uv\u002Fapt). Use to answer \"how does X work\", \"which GPU\", \"how do I build a container\", or \"how do I stand up a workload on a pod\". Guidance, not a tool — execute with runpodctl, runpod-mcp, or flash.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-usage\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":20},"01M7ACBRPE345GF5GM5B8P8RRC","runpod-templates","Runpod's official prebuilt pod templates (ComfyUI, PyTorch, and others): what each image ships, which ports and paths it uses, how to pick one, how to pin a version, and what is missing on first boot. Use when a task says \"run \u003CX> on a pod\" and an official template already covers it, instead of building an image — and when a user needs help with or wants to fix something about a Runpod template they are already running (won't boot, can't reach the UI, missing models, wrong CUDA line, broken ComfyUI workflow metadata on imported workflows): start here and route onward. Deploy with runpodctl or runpod-mcp; end-to-end walkthroughs live in the runpod router's golden paths.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-templates\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":20},"01M7ACBJATHKVX1TWES2F44GY8","runpod-migrate","Migrate a codebase from the Runpod GraphQL API or REST v1 to REST v2 — inventory which parts use which API version, rewrite the call sites, flag breaking changes, and verify. Use when someone asks to move to v2, asks what v2 would change, or asks which Runpod API their code is on. For managing infrastructure rather than migrating code, use runpod-mcp or runpodctl.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-migrate\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":20},"01M7ACBC7GHVH6T9YEAPCG2AP8","runpod-mcp","Manage Runpod infrastructure — pods, serverless endpoints, jobs, templates, network volumes, container-registry auth, GPU\u002FCPU catalog, and billing — via the Runpod MCP server's structured tool calls. Use when the Runpod MCP tools (create-pod, list-endpoints, …) are connected in this session, or to connect them (hosted OAuth or local npx). Prefer this over runpodctl for plain infra CRUD when MCP is available; use runpodctl for the terminal, file transfer, or SSH setup.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-mcp\u002FSKILL.md",[],[]]