[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GZPC33K3M8ZGHDK1GPM626":3,"skill-same:01M6GZPC33K3M8ZGHDK1GPM626":88},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":6,"ownerHtmlUrl":55,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":56,"install":57,"resources":70},"01M6GZPC33K3M8ZGHDK1GPM626","reverse-engineering-android-malware-with-jadx",null,"Reverse engineers malicious Android APK files using JADX decompiler to analyze Java\u002FKotlin source code, identify malicious functionality including data theft, C2 communication, privilege escalation, and overlay attacks. Examines manifest permissions, receivers, services, and native libraries. Activates for requests involving Android malware analysis, APK reverse engineering, mobile malware investigation, or Android threat analysis.","micsapp\u002Fmicstec-skills","micsapp","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F82411001?v=4","01M6GWCFQ6D3PV8EHNY62NN5VW","01M6GWCFVE1PA5HG0DKC7AMFJ3",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Freverse-engineering-android-malware-with-jadx\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"android","reverse","reverse engineering","with","reverse engineering android malware with jadx","malware","jadx","engineering","APK","communication","mobile-malware","reverse-engineering","permissions","analysis","code","analyze","files","libraries","cybersecurity","malicious","2026-11-10 10:12:30",false,"---\nname: reverse-engineering-android-malware-with-jadx\ndescription: >\n  Reverse engineers malicious Android APK files using JADX decompiler to analyze Java\u002FKotlin\n  source code, identify malicious functionality including data theft, C2 communication,\n  privilege escalation, and overlay attacks. Examines manifest permissions, receivers,\n  services, and native libraries. Activates for requests involving Android malware analysis,\n  APK reverse engineering, mobile malware investigation, or Android threat analysis.\ndomain: cybersecurity\nsubdomain: malware-analysis\ntags: [malware, Android, reverse-engineering, JADX, mobile-malware]\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\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":43,"author":46,"domain":36,"license":14,"version":47,"subdomain":48,"description":49},[23,44,29,45,28],"Android","JADX","mahipal","1.0.0","malware-analysis","Reverse engineers malicious Android APK files using JADX decompiler to analyze Java\u002FKotlin source code, identify malicious functionality including data theft, C2 communication, privilege escalation, and overlay attacks. Examines manifest permissions, receivers, services, and native libraries. Activates for requests involving Android malware analysis, APK reverse engineering, mobile malware investigation, or Android threat analysis.\n","master","3f5d983eb4ef375b749adcd6b07ec03bd82ae8a8","_universal\u002Fcybersecurity-skills\u002Fskills\u002Freverse-engineering-android-malware-with-jadx",0,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills","https:\u002F\u002Fgithub.com\u002Fmicsapp","2026-03-20 11:24:18",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add micsapp\u002Fmicstec-skills --skill reverse-engineering-android-malware-with-jadx",{"tool":63,"command":64},"bunx","bunx skills add micsapp\u002Fmicstec-skills --skill reverse-engineering-android-malware-with-jadx",{"tool":66,"command":67},"pnpm","pnpm dlx skills add micsapp\u002Fmicstec-skills --skill reverse-engineering-android-malware-with-jadx","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Freverse-engineering-android-malware-with-jadx\u002FSKILL.md",true,[71,76,82],{"path":72,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Freverse-engineering-android-malware-with-jadx\u002FLICENSE",{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fapi-reference.md","REFERENCE","参考文档",2490,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Freverse-engineering-android-malware-with-jadx\u002Freferences\u002Fapi-reference.md",{"path":83,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":86,"sourceHtmlUrl":87},"scripts\u002Fagent.py","SCRIPT","脚本",7815,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Freverse-engineering-android-malware-with-jadx\u002Fscripts\u002Fagent.py",[89,117,138,158,176,201],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":38},"01M6HBTJ02FXBFG9NYEHHYAP52","azure-apim-architecture","Analyzes and explains Azure API Management architecture decisions for enterprise API marketplace implementations using VNet Internal mode, Front Door, hybrid authentication, and multi-environment strategies. Use when discussing APIM component selection, network topology, cost optimization, or comparing alternatives like workspaces vs instances, VNet Internal vs External mode, or Front Door vs Application Gateway.","MIT","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fazure-apim-architecture\u002FSKILL.md",[],[97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116],"architecture","azure","azure apim architecture","component","authentication","gateway","topology","Optimization","network","api","team","environment","multi-environment","workspaces","instances","selection","strategies","azure api management","mode","for",{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":38},"01M6HBT7J4H082JEEA670B3EQ9","apiops-deployment","Guides deployment of Azure API Management infrastructure using Infrastructure as Code (Bicep\u002FTerraform), CI\u002FCD pipelines (GitHub Actions\u002FAzure DevOps), and APIOps workflows. Use when deploying APIM, creating pipelines, or implementing dev→test→prod promotion strategies.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapiops-deployment\u002FSKILL.md",[],[124,125,126,127,98,128,32,129,130,131,132,133,106,107,113,134,135,114,136,137],"deployment","apiops deployment","workflows","azure devops","infrastructure","infrastructure as code","actions","ci","github actions","github-actions","as","guides","CI\u002FCD","implementing",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":38},"01M6HBT2HEA23THNE9E00GYQBE","apim-policy-authoring","Creates production-ready Azure API Management policy XML for authentication (OAuth 2.0, JWT validation, subscription keys), rate limiting, CORS configuration, error handling, and API transformations. Use when implementing API security, access control, or request\u002Fresponse processing logic.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapim-policy-authoring\u002FSKILL.md",[],[145,146,147,148,98,101,106,107,149,150,151,152,153,154,155,114,156,157,137,116],"policy","authoring","apim policy authoring","security","access","use","ready","api security","Access Control","error","processing","cors configuration","production-ready",{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":38},"01M6HBSY65SB29J9WE9KYD0K6T","api-security-review","Reviews Azure API Management configurations for security vulnerabilities, OWASP API Security Top 10 compliance, VNet Internal mode validation, Private Link verification, and Azure Security Benchmark alignment. Use when performing security audits, pre-deployment validation, or compliance reviews.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapi-security-review\u002FSKILL.md",[],[165,148,166,106,152,167,98,124,168,169,170,171,107,172,114,173,174,175,115,116],"review","security review","api security review","benchmark","verification","owasp","owasp-api","alignment","azure security","reviews","top",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":182,"publishedAt":38},"01M6HBSRW4PDFE6K4F8JYPZQ05","jira-cli","Interact with Jira from the command line to create, list, view, edit, and transition issues, manage sprints and epics, and perform common Jira workflows. Use when the user asks about Jira tasks, tickets, issues, sprints, or needs to manage project work items.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fawesome-copilot-agents\u002Fskills\u002Fjira-cli\u002FSKILL.md",[],[183,184,185,126,186,187,188,189,106,190,191,192,193,194,195,196,197,198,199,200],"cli","jira","jira cli","init","tasks","create","issues","common","work","command","edit","list","view","project","project work","token","line","sprints",{"skillNo":202,"name":203,"nameZh":6,"description":204,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":205,"categories":206,"keywords":207,"publishedAt":38},"01M6HBSNS3JHMW603G47TWE31H","calculator","Performs arbitrary-precision arithmetic calculations including addition, subtraction, multiplication, division, and exponents. Use when the user asks to calculate, compute, or evaluate math expressions, or when precise decimal arithmetic is needed to avoid floating-point errors.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fawesome-copilot-agents\u002Fskills\u002Fcalculator\u002FSKILL.md",[],[203,208,209,210,211,212,213,150,214,215],"npm","js","calculate","node","math","user","compute","errors"]