[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73FH336HXRHKP6BAECMZXE4":3,"skill-same:01M73FH336HXRHKP6BAECMZXE4":89},{"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":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":54,"ownerHtmlUrl":55,"ownerBlogUrl":56,"ownerDescription":57,"updatedAt":58,"install":59,"resources":72},"01M73FH336HXRHKP6BAECMZXE4","reverse-engineering-malware-with-ghidra",null,"Reverse engineers malware binaries using NSA's Ghidra disassembler and decompiler to understand internal logic, cryptographic routines, C2 protocols, and evasion techniques at the assembly and pseudo-C level. Activates for requests involving malware reverse engineering, disassembly analysis, decompilation, binary analysis, or understanding malware internals.","Horonomos-laps\u002FYana-AI","Horonomos-laps","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F355299122?v=4","01M76B3QPXE88ET2SQPDPVATZT"," Horonomos-laps","01M72ZQRJPCYPSSWT4D00VJR2A",13,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Freverse-engineering-malware-with-ghidra\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Freverse-engineering-malware-with-ghidra\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: reverse-engineering-malware-with-ghidra\ndescription: 'Reverse engineers malware binaries using NSA''s Ghidra disassembler\n  and decompiler to understand internal logic, cryptographic routines, C2 protocols,\n  and evasion techniques at the assembly and pseudo-C level. Activates for requests\n  involving malware reverse engineering, disassembly analysis, decompilation, binary\n  analysis, or understanding malware internals.\n\n  '\ndomain: cybersecurity\nsubdomain: malware-analysis\ntags:\n- malware\n- reverse-engineering\n- Ghidra\n- disassembly\n- decompilation\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- T1070\nsource: https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\nsource_commit: 04450304b12645cb2b974ab96d28c0664758a88d\n---\n\n# Reverse Engineering Malware with Ghidra\n\n## When to Use\n\n- Static and dynamic analysis have identified suspicious functionality that requires deeper code-level understanding\n- You need to reverse engineer C2 communication protocols, encryption algorithms, or custom obfuscation\n- Understanding the exact exploit mechanism or vulnerability targeted by a malware sample\n- Extracting hardcoded configuration data (C2 addresses, encryption keys, campaign IDs) embedded in compiled code\n- Developing precise YARA rules or detection signatures based on unique code patterns\n\n**Do not use** for initial triage of unknown samples; perform static analysis with PEStudio and behavioral analysis with Cuckoo first.\n\n## Prerequisites\n\n- Ghidra 11.x installed (download from https:\u002F\u002Fghidra-sre.org\u002F) with JDK 17+\n- Analysis VM isolated from production network (Windows or Linux host)\n- Familiarity with x86\u002Fx64 assembly language and Windows API conventions\n- PDB symbol files for Windows system DLLs to improve decompilation accuracy\n- Ghidra scripts repository (ghidra_scripts) for automated analysis tasks\n- Secondary reference: IDA Free or Binary Ninja for cross-validation of analysis results\n\n## Workflow\n\n### Step 1: Create Project and Import Binary\n\nSet up a Ghidra project and import the malware sample:\n\n```\n1. Launch Ghidra: ghidraRun (Linux) or ghidraRun.bat (Windows)\n2. File -> New Project -> Non-Shared Project -> Select directory\n3. File -> Import File -> Select malware binary\n4. Ghidra auto-detects format (PE, ELF, Mach-O) and architecture\n5. Accept default import options (or specify base address if known)\n6. Double-click imported file to open in CodeBrowser\n7. When prompted, run Auto Analysis with default analyzers enabled\n```\n\n**Headless analysis for automation:**\n```bash\n# Run Ghidra headless analysis with decompiler\n\u002Fopt\u002Fghidra\u002Fsupport\u002FanalyzeHeadless \u002Ftmp\u002Fghidra_project MalwareProject \\\n  -import suspect.exe \\\n  -postScript ExportDecompilation.py \\\n  -scriptPath \u002Fopt\u002Fghidra\u002Fscripts\u002F \\\n  -deleteProject\n```\n\n### Step 2: Identify Key Functions and Entry Points\n\nNavigate the binary to locate critical code sections:\n\n```\nNavigation Strategy:\n━━━━━━━━━━━━━━━━━━━\n1. Start at entry point (OEP) - follow execution from _start\u002FWinMain\n2. Check Symbol Tree for imported functions (Window -> Symbol Tree)\n3. Search for cross-references to suspicious APIs:\n   - VirtualAlloc\u002FVirtualAllocEx (memory allocation for injection)\n   - CreateRemoteThread (remote thread injection)\n   - CryptEncrypt\u002FCryptDecrypt (encryption operations)\n   - InternetOpen\u002FHttpSendRequest (C2 communication)\n   - RegSetValueEx (persistence via registry)\n4. Use Search -> For Strings to find embedded URLs, IPs, and paths\n5. Check the Functions window sorted by size (large functions often contain core logic)\n```\n\n**Ghidra keyboard shortcuts for efficient navigation:**\n```\nG         - Go to address\nCtrl+E    - Search for strings\nX         - Show cross-references to current location\nCtrl+Shift+F - Search memory for byte patterns\nL         - Rename label\u002Ffunction\n;         - Add comment\nT         - Retype variable\nCtrl+L    - Retype return value\n```\n\n### Step 3: Analyze Decompiled Code\n\nUse Ghidra's decompiler to understand function logic:\n\n```c\n\u002F\u002F Example: Ghidra decompiler output for a decryption routine\n\u002F\u002F Analyst renames variables and adds types for clarity\n\nvoid decrypt_config(BYTE *encrypted_data, int data_len, BYTE *key, int key_len) {\n    \u002F\u002F XOR decryption with rolling key\n    for (int i = 0; i \u003C data_len; i++) {\n        encrypted_data[i] = encrypted_data[i] ^ key[i % key_len];\n    }\n    return;\n}\n\n\u002F\u002F Analyst actions in Ghidra:\n\u002F\u002F 1. Right-click parameters -> Retype to correct types (BYTE*, int)\n\u002F\u002F 2. Right-click variables -> Rename to meaningful names\n\u002F\u002F 3. Add comments explaining the algorithm\n\u002F\u002F 4. Set function signature to propagate types to callers\n```\n\n### Step 4: Trace C2 Communication Logic\n\nFollow the network communication code path:\n\n```\nAnalysis Steps for C2 Protocol Reverse Engineering:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n1. Find InternetOpenA\u002FWinHttpOpen call -> trace to wrapper function\n2. Follow data flow from encrypted config -> URL construction\n3. Identify HTTP method (GET\u002FPOST), headers, and body format\n4. Locate response parsing logic (JSON parsing, custom binary protocol)\n5. Map the C2 command dispatcher (switch\u002Fcase or jump table)\n6. Document the command set (download, execute, exfiltrate, update, uninstall)\n```\n\n**Ghidra Script for extracting C2 configuration:**\n```python\n# Ghidra Python script: extract_c2_config.py\n# Run via Script Manager in Ghidra\n\nfrom ghidra.program.model.data import StringDataType\nfrom ghidra.program.model.symbol import SourceType\n\n# Search for XOR decryption patterns\nlisting = currentProgram.getListing()\nmemory = currentProgram.getMemory()\n\n# Find references to InternetOpenA\nsymbol_table = currentProgram.getSymbolTable()\nfor symbol in symbol_table.getExternalSymbols():\n    if \"InternetOpen\" in symbol.getName():\n        refs = getReferencesTo(symbol.getAddress())\n        for ref in refs:\n            print(\"C2 init at: {}\".format(ref.getFromAddress()))\n```\n\n### Step 5: Analyze Encryption and Obfuscation\n\nIdentify and document cryptographic routines:\n\n```\nCommon Malware Encryption Patterns:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nXOR Cipher:     Loop with XOR operation, often single-byte or rolling key\nRC4:            Two loops (KSA + PRGA), 256-byte S-box initialization\nAES:            Look for S-box constants (0x63, 0x7C, 0x77...) or calls to CryptEncrypt\nBase64:         Lookup table with A-Za-z0-9+\u002F= characters\nCustom:         Combination of arithmetic operations (ADD, SUB, ROL, ROR with XOR)\n\nIdentification Tips:\n- Search for constants: AES S-box, CRC32 table, MD5 init values\n- Look for loop structures operating on byte arrays\n- Check for Windows Crypto API usage (CryptAcquireContext -> CryptCreateHash -> CryptEncrypt)\n- FindCrypt Ghidra plugin automatically identifies crypto constants\n```\n\n### Step 6: Document Findings and Create Detection Signatures\n\nProduce actionable intelligence from reverse engineering:\n\n```bash\n# Generate YARA rule from unique code patterns found in Ghidra\ncat \u003C\u003C 'EOF' > malware_family_x.yar\nrule MalwareFamilyX_Decryptor {\n    meta:\n        description = \"Detects MalwareX decryption routine\"\n        author = \"analyst\"\n        date = \"2025-09-15\"\n    strings:\n        \u002F\u002F XOR decryption loop with hardcoded key\n        $decrypt = { 8A 04 0E 32 04 0F 88 04 0E 41 3B CA 7C F3 }\n        \u002F\u002F C2 URL pattern after decryption\n        $c2_pattern = \"\u002Fgate.php?id=\" ascii\n    condition:\n        uint16(0) == 0x5A4D and $decrypt and $c2_pattern\n}\nEOF\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Disassembly** | Converting machine code bytes into human-readable assembly language instructions; Ghidra's Listing view shows disassembled code |\n| **Decompilation** | Lifting assembly code to pseudo-C representation for easier analysis; Ghidra's Decompile window provides this view |\n| **Cross-Reference (XREF)** | Reference showing where a function or data address is called from or used; essential for tracing code execution flow |\n| **Control Flow Graph (CFG)** | Visual representation of all possible execution paths through a function; reveals branching logic and loops |\n| **Original Entry Point (OEP)** | The actual start address of the malware code after unpacking; packers redirect execution through an unpacking stub first |\n| **Function Signature** | The return type, name, and parameter types of a function; applying correct signatures improves decompiler output quality |\n| **Ghidra Script** | Python or Java automation script executed within Ghidra to perform batch analysis, pattern searching, or data extraction |\n\n## Tools & Systems\n\n- **Ghidra**: NSA's open-source software reverse engineering suite with disassembler, decompiler, and scripting support for multiple architectures\n- **IDA Pro\u002FFree**: Industry-standard interactive disassembler; IDA Free provides x86\u002Fx64 cloud-based decompilation\n- **Binary Ninja**: Commercial reverse engineering platform with modern UI and extensive API for plugin development\n- **x64dbg**: Open-source x64\u002Fx32 debugger for Windows used alongside Ghidra for dynamic debugging of malware\n- **FindCrypt (Ghidra Plugin)**: Plugin that identifies cryptographic constants and algorithms in binary code\n\n## Common Scenarios\n\n### Scenario: Reversing Custom C2 Protocol\n\n**Context**: Behavioral analysis shows encrypted traffic to an external IP on a non-standard port. Network signatures cannot detect variants because the protocol is proprietary. Deep reverse engineering is needed to understand the protocol structure.\n\n**Approach**:\n1. Import the unpacked sample into Ghidra and run full auto-analysis\n2. Locate socket\u002FWinHTTP API calls and trace backwards to the calling function\n3. Identify the encryption routine called before data is sent (follow data flow from send\u002FHttpSendRequest)\n4. Reverse the encryption (XOR key extraction, RC4 key derivation, AES key location)\n5. Map the command structure by analyzing the response parsing function (switch\u002Fcase on command IDs)\n6. Document the protocol format (header structure, command bytes, encryption method)\n7. Create a protocol decoder script for network monitoring tools\n\n**Pitfalls**:\n- Not running the full auto-analysis before starting manual analysis (missing function boundaries and type propagation)\n- Ignoring indirect calls through function pointers or vtables (use cross-references to data holding function addresses)\n- Spending time on library code that Ghidra's Function ID (FID) or FLIRT signatures should have identified\n- Not saving Ghidra project progress frequently (analysis state can be lost on crashes)\n\n## Output Format\n\n```\nREVERSE ENGINEERING ANALYSIS REPORT\n=====================================\nSample:           unpacked_payload.exe\nSHA-256:          abc123def456...\nArchitecture:     x86 (32-bit PE)\nGhidra Project:   MalwareX_Analysis\n\nFUNCTION MAP\n0x00401000  main()              - Entry point, initializes config\n0x00401200  decrypt_config()    - XOR decryption with 16-byte key\n0x00401400  init_c2()           - WinHTTP initialization, URL construction\n0x00401800  c2_beacon()         - HTTP POST beacon with system info\n0x00401C00  cmd_dispatcher()    - Switch on 12 command codes\n0x00402000  inject_process()    - Process hollowing into svchost.exe\n0x00402400  persist_registry()  - HKCU Run key persistence\n0x00402800  exfil_data()        - File collection and encrypted upload\n\nC2 PROTOCOL\nMethod:           HTTPS POST to \u002Fgate.php\nEncryption:       RC4 with derived key (MD5 of bot_id + campaign_key)\nBot ID Format:    MD5(hostname + username + volume_serial)\nBeacon Interval:  60 seconds with 10% jitter\nCommand Set:\n  0x01 - Download and execute file\n  0x02 - Execute shell command\n  0x03 - Upload file to C2\n  0x04 - Update configuration\n  0x05 - Uninstall and remove traces\n\nENCRYPTION DETAILS\nAlgorithm:        RC4\nKey Derivation:   MD5(bot_id + \"campaign_2025_q3\")\nHardcoded Seed:   \"campaign_2025_q3\" at offset 0x00405A00\n\nEXTRACTED IOCs\nC2 URLs:          hxxps:\u002F\u002Fupdate.malicious[.]com\u002Fgate.php\n                  hxxps:\u002F\u002Fbackup.evil[.]net\u002Fgate.php (failover)\nCampaign ID:      campaign_2025_q3\nRC4 Key Material: [see encryption details above]\n```\n","# Reverse Engineering Malware with Ghidra\n\n## When to Use\n\n- Static and dynamic analysis have identified suspicious functionality that requires deeper code-level understanding\n- You need to reverse engineer C2 communication protocols, encryption algorithms, or custom obfuscation\n- Understanding the exact exploit mechanism or vulnerability targeted by a malware sample\n- Extracting hardcoded configuration data (C2 addresses, encryption keys, campaign IDs) embedded in compiled code\n- Developing precise YARA rules or detection signatures based on unique code patterns\n\n**Do not use** for initial triage of unknown samples; perform static analysis with PEStudio and behavioral analysis with Cuckoo first.\n\n## Prerequisites\n\n- Ghidra 11.x installed (download from https:\u002F\u002Fghidra-sre.org\u002F) with JDK 17+\n- Analysis VM isolated from production network (Windows or Linux host)\n- Familiarity with x86\u002Fx64 assembly language and Windows API conventions\n- PDB symbol files for Windows system DLLs to improve decompilation accuracy\n- Ghidra scripts repository (ghidra_scripts) for automated analysis tasks\n- Secondary reference: IDA Free or Binary Ninja for cross-validation of analysis results\n\n## Workflow\n\n### Step 1: Create Project and Import Binary\n\nSet up a Ghidra project and import the malware sample:\n\n```\n1. Launch Ghidra: ghidraRun (Linux) or ghidraRun.bat (Windows)\n2. File -> New Project -> Non-Shared Project -> Select directory\n3. File -> Import File -> Select malware binary\n4. Ghidra auto-detects format (PE, ELF, Mach-O) and architecture\n5. Accept default import options (or specify base address if known)\n6. Double-click imported file to open in CodeBrowser\n7. When prompted, run Auto Analysis with default analyzers enabled\n```\n\n**Headless analysis for automation:**\n```bash\n# Run Ghidra headless analysis with decompiler\n\u002Fopt\u002Fghidra\u002Fsupport\u002FanalyzeHeadless \u002Ftmp\u002Fghidra_project MalwareProject \\\n  -import suspect.exe \\\n  -postScript ExportDecompilation.py \\\n  -scriptPath \u002Fopt\u002Fghidra\u002Fscripts\u002F \\\n  -deleteProject\n```\n\n### Step 2: Identify Key Functions and Entry Points\n\nNavigate the binary to locate critical code sections:\n\n```\nNavigation Strategy:\n━━━━━━━━━━━━━━━━━━━\n1. Start at entry point (OEP) - follow execution from _start\u002FWinMain\n2. Check Symbol Tree for imported functions (Window -> Symbol Tree)\n3. Search for cross-references to suspicious APIs:\n   - VirtualAlloc\u002FVirtualAllocEx (memory allocation for injection)\n   - CreateRemoteThread (remote thread injection)\n   - CryptEncrypt\u002FCryptDecrypt (encryption operations)\n   - InternetOpen\u002FHttpSendRequest (C2 communication)\n   - RegSetValueEx (persistence via registry)\n4. Use Search -> For Strings to find embedded URLs, IPs, and paths\n5. Check the Functions window sorted by size (large functions often contain core logic)\n```\n\n**Ghidra keyboard shortcuts for efficient navigation:**\n```\nG         - Go to address\nCtrl+E    - Search for strings\nX         - Show cross-references to current location\nCtrl+Shift+F - Search memory for byte patterns\nL         - Rename label\u002Ffunction\n;         - Add comment\nT         - Retype variable\nCtrl+L    - Retype return value\n```\n\n### Step 3: Analyze Decompiled Code\n\nUse Ghidra's decompiler to understand function logic:\n\n```c\n\u002F\u002F Example: Ghidra decompiler output for a decryption routine\n\u002F\u002F Analyst renames variables and adds types for clarity\n\nvoid decrypt_config(BYTE *encrypted_data, int data_len, BYTE *key, int key_len) {\n    \u002F\u002F XOR decryption with rolling key\n    for (int i = 0; i \u003C data_len; i++) {\n        encrypted_data[i] = encrypted_data[i] ^ key[i % key_len];\n    }\n    return;\n}\n\n\u002F\u002F Analyst actions in Ghidra:\n\u002F\u002F 1. Right-click parameters -> Retype to correct types (BYTE*, int)\n\u002F\u002F 2. Right-click variables -> Rename to meaningful names\n\u002F\u002F 3. Add comments explaining the algorithm\n\u002F\u002F 4. Set function signature to propagate types to callers\n```\n\n### Step 4: Trace C2 Communication Logic\n\nFollow the network communication code path:\n\n```\nAnalysis Steps for C2 Protocol Reverse Engineering:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n1. Find InternetOpenA\u002FWinHttpOpen call -> trace to wrapper function\n2. Follow data flow from encrypted config -> URL construction\n3. Identify HTTP method (GET\u002FPOST), headers, and body format\n4. Locate response parsing logic (JSON parsing, custom binary protocol)\n5. Map the C2 command dispatcher (switch\u002Fcase or jump table)\n6. Document the command set (download, execute, exfiltrate, update, uninstall)\n```\n\n**Ghidra Script for extracting C2 configuration:**\n```python\n# Ghidra Python script: extract_c2_config.py\n# Run via Script Manager in Ghidra\n\nfrom ghidra.program.model.data import StringDataType\nfrom ghidra.program.model.symbol import SourceType\n\n# Search for XOR decryption patterns\nlisting = currentProgram.getListing()\nmemory = currentProgram.getMemory()\n\n# Find references to InternetOpenA\nsymbol_table = currentProgram.getSymbolTable()\nfor symbol in symbol_table.getExternalSymbols():\n    if \"InternetOpen\" in symbol.getName():\n        refs = getReferencesTo(symbol.getAddress())\n        for ref in refs:\n            print(\"C2 init at: {}\".format(ref.getFromAddress()))\n```\n\n### Step 5: Analyze Encryption and Obfuscation\n\nIdentify and document cryptographic routines:\n\n```\nCommon Malware Encryption Patterns:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nXOR Cipher:     Loop with XOR operation, often single-byte or rolling key\nRC4:            Two loops (KSA + PRGA), 256-byte S-box initialization\nAES:            Look for S-box constants (0x63, 0x7C, 0x77...) or calls to CryptEncrypt\nBase64:         Lookup table with A-Za-z0-9+\u002F= characters\nCustom:         Combination of arithmetic operations (ADD, SUB, ROL, ROR with XOR)\n\nIdentification Tips:\n- Search for constants: AES S-box, CRC32 table, MD5 init values\n- Look for loop structures operating on byte arrays\n- Check for Windows Crypto API usage (CryptAcquireContext -> CryptCreateHash -> CryptEncrypt)\n- FindCrypt Ghidra plugin automatically identifies crypto constants\n```\n\n### Step 6: Document Findings and Create Detection Signatures\n\nProduce actionable intelligence from reverse engineering:\n\n```bash\n# Generate YARA rule from unique code patterns found in Ghidra\ncat \u003C\u003C 'EOF' > malware_family_x.yar\nrule MalwareFamilyX_Decryptor {\n    meta:\n        description = \"Detects MalwareX decryption routine\"\n        author = \"analyst\"\n        date = \"2025-09-15\"\n    strings:\n        \u002F\u002F XOR decryption loop with hardcoded key\n        $decrypt = { 8A 04 0E 32 04 0F 88 04 0E 41 3B CA 7C F3 }\n        \u002F\u002F C2 URL pattern after decryption\n        $c2_pattern = \"\u002Fgate.php?id=\" ascii\n    condition:\n        uint16(0) == 0x5A4D and $decrypt and $c2_pattern\n}\nEOF\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Disassembly** | Converting machine code bytes into human-readable assembly language instructions; Ghidra's Listing view shows disassembled code |\n| **Decompilation** | Lifting assembly code to pseudo-C representation for easier analysis; Ghidra's Decompile window provides this view |\n| **Cross-Reference (XREF)** | Reference showing where a function or data address is called from or used; essential for tracing code execution flow |\n| **Control Flow Graph (CFG)** | Visual representation of all possible execution paths through a function; reveals branching logic and loops |\n| **Original Entry Point (OEP)** | The actual start address of the malware code after unpacking; packers redirect execution through an unpacking stub first |\n| **Function Signature** | The return type, name, and parameter types of a function; applying correct signatures improves decompiler output quality |\n| **Ghidra Script** | Python or Java automation script executed within Ghidra to perform batch analysis, pattern searching, or data extraction |\n\n## Tools & Systems\n\n- **Ghidra**: NSA's open-source software reverse engineering suite with disassembler, decompiler, and scripting support for multiple architectures\n- **IDA Pro\u002FFree**: Industry-standard interactive disassembler; IDA Free provides x86\u002Fx64 cloud-based decompilation\n- **Binary Ninja**: Commercial reverse engineering platform with modern UI and extensive API for plugin development\n- **x64dbg**: Open-source x64\u002Fx32 debugger for Windows used alongside Ghidra for dynamic debugging of malware\n- **FindCrypt (Ghidra Plugin)**: Plugin that identifies cryptographic constants and algorithms in binary code\n\n## Common Scenarios\n\n### Scenario: Reversing Custom C2 Protocol\n\n**Context**: Behavioral analysis shows encrypted traffic to an external IP on a non-standard port. Network signatures cannot detect variants because the protocol is proprietary. Deep reverse engineering is needed to understand the protocol structure.\n\n**Approach**:\n1. Import the unpacked sample into Ghidra and run full auto-analysis\n2. Locate socket\u002FWinHTTP API calls and trace backwards to the calling function\n3. Identify the encryption routine called before data is sent (follow data flow from send\u002FHttpSendRequest)\n4. Reverse the encryption (XOR key extraction, RC4 key derivation, AES key location)\n5. Map the command structure by analyzing the response parsing function (switch\u002Fcase on command IDs)\n6. Document the protocol format (header structure, command bytes, encryption method)\n7. Create a protocol decoder script for network monitoring tools\n\n**Pitfalls**:\n- Not running the full auto-analysis before starting manual analysis (missing function boundaries and type propagation)\n- Ignoring indirect calls through function pointers or vtables (use cross-references to data holding function addresses)\n- Spending time on library code that Ghidra's Function ID (FID) or FLIRT signatures should have identified\n- Not saving Ghidra project progress frequently (analysis state can be lost on crashes)\n\n## Output Format\n\n```\nREVERSE ENGINEERING ANALYSIS REPORT\n=====================================\nSample:           unpacked_payload.exe\nSHA-256:          abc123def456...\nArchitecture:     x86 (32-bit PE)\nGhidra Project:   MalwareX_Analysis\n\nFUNCTION MAP\n0x00401000  main()              - Entry point, initializes config\n0x00401200  decrypt_config()    - XOR decryption with 16-byte key\n0x00401400  init_c2()           - WinHTTP initialization, URL construction\n0x00401800  c2_beacon()         - HTTP POST beacon with system info\n0x00401C00  cmd_dispatcher()    - Switch on 12 command codes\n0x00402000  inject_process()    - Process hollowing into svchost.exe\n0x00402400  persist_registry()  - HKCU Run key persistence\n0x00402800  exfil_data()        - File collection and encrypted upload\n\nC2 PROTOCOL\nMethod:           HTTPS POST to \u002Fgate.php\nEncryption:       RC4 with derived key (MD5 of bot_id + campaign_key)\nBot ID Format:    MD5(hostname + username + volume_serial)\nBeacon Interval:  60 seconds with 10% jitter\nCommand Set:\n  0x01 - Download and execute file\n  0x02 - Execute shell command\n  0x03 - Upload file to C2\n  0x04 - Update configuration\n  0x05 - Uninstall and remove traces\n\nENCRYPTION DETAILS\nAlgorithm:        RC4\nKey Derivation:   MD5(bot_id + \"campaign_2025_q3\")\nHardcoded Seed:   \"campaign_2025_q3\" at offset 0x00405A00\n\nEXTRACTED IOCs\nC2 URLs:          hxxps:\u002F\u002Fupdate.malicious[.]com\u002Fgate.php\n                  hxxps:\u002F\u002Fbackup.evil[.]net\u002Fgate.php (failover)\nCampaign ID:      campaign_2025_q3\nRC4 Key Material: [see encryption details above]\n```\n",{"name":5,"tags":25,"author":31,"domain":32,"source":33,"license":15,"version":34,"nist_csf":35,"subdomain":40,"description":41,"mitre_attack":42,"source_commit":48},[26,27,28,29,30],"malware","reverse-engineering","Ghidra","disassembly","decompilation","mahipal","cybersecurity","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","1.0.0",[36,37,38,39],"DE.AE-02","RS.AN-03","ID.RA-01","DE.CM-01","malware-analysis","Reverse engineers malware binaries using NSA's Ghidra disassembler and decompiler to understand internal logic, cryptographic routines, C2 protocols, and evasion techniques at the assembly and pseudo-C level. Activates for requests involving malware reverse engineering, disassembly analysis, decompilation, binary analysis, or understanding malware internals.\n",[43,44,45,46,47],"T1027","T1055","T1140","T1497","T1070","04450304b12645cb2b974ab96d28c0664758a88d","main","481dcd7dd2e288b9d627a2bd017db70e64e6c6fa","core\u002Fskills\u002Freverse-engineering-malware-with-ghidra",1,"https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI","https:\u002F\u002Fyana.vutam.link\u002F","https:\u002F\u002Fgithub.com\u002FHoronomos-laps","https:\u002F\u002Fyana.vutam.link","An open-source governed runtime & execution environment for multi-agent AI systems.","2026-11-11 23:56:26",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add Horonomos-laps\u002FYana-AI --skill reverse-engineering-malware-with-ghidra",{"tool":65,"command":66},"bunx","bunx skills add Horonomos-laps\u002FYana-AI --skill reverse-engineering-malware-with-ghidra",{"tool":68,"command":69},"pnpm","pnpm dlx skills add Horonomos-laps\u002FYana-AI --skill reverse-engineering-malware-with-ghidra","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Freverse-engineering-malware-with-ghidra\u002FSKILL.md",true,[73,77,83],{"path":74,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fapi-reference.md","REFERENCE","参考文档",2658,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Freverse-engineering-malware-with-ghidra\u002Freferences\u002Fapi-reference.md",{"path":84,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":87,"sourceHtmlUrl":88},"scripts\u002Fagent.py","SCRIPT","脚本",8433,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Freverse-engineering-malware-with-ghidra\u002Fscripts\u002Fagent.py",[90,98,105,113,121,129],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":20},"01M735GKET5YVYKAY62W2P5YXB","openai--sentry--sentry","Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.","MIT","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fopenai--sentry--sentry\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":20},"01M73DCAP83T17HY7SMGK7MGFE","ito-basket-compare","Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fito-basket-compare\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":20},"01M734CYEMZFDR3KH6SW0JP8TD","implementing-network-traffic-baselining","Build network traffic baselines from NetFlow\u002FIPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly\u002Fdaily traffic pattern profiling","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\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":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":20},"01M73ASZ6NJRJM44Z2P84NGQ3Q","detecting-evasion-techniques-in-endpoint-logs","Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":125,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":20},"01M734AFNXD06Z78QRK0VKGT7Q","implementing-microsegmentation-with-guardicore","Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":20},"01M736TK27QMCXK0DVCH25SJN5","ramdisk-tmpfs-patterns","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Framdisk-tmpfs-patterns\u002FSKILL.md",[],[]]