analyzing-packed-malware-with-upx-unpacker

Featured

Identifies and unpacks UPX-packed and other packed malware samples to expose the original executable code for static analysis. Covers both standard UPX unpacking and handling modified UPX headers that prevent automated decompression. Activates for requests involving malware unpacking, UPX decompression, packer removal, or preparing packed samples for analysis.

AI & Automation 36,355 stars 4443 forks Updated 2 months ago Apache-2.0

Install

View on GitHub

Quality Score: 94/100

Stars 20%
100
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Analyzing Packed Malware with UPX Unpacker ## When to Use - Static analysis reveals high entropy sections and minimal imports indicating the binary is packed - PEiD, Detect It Easy, or PEStudio identifies UPX or another known packer - The import table contains only LoadLibrary and GetProcAddress (runtime import resolution typical of packed binaries) - You need to recover the original binary for proper disassembly and decompilation in Ghidra or IDA - Automated UPX decompression fails because the malware author modified UPX magic bytes or headers **Do not use** when dealing with custom packers, VM-based protectors (Themida, VMProtect), or samples where dynamic unpacking via debugging is more appropriate. ## Prerequisites - UPX (Ultimate Packer for eXecutables) installed (`apt install upx-ucl` or download from https://upx.github.io/) - Detect It Easy (DIE) for packer identification - Python 3.8+ with `pefile` library for manual header repair - x64dbg or x32dbg for manual unpacking when automated tools fail - PE-bear or CFF Explorer for PE header inspection and repair - Isolated analysis VM without network connectivity ## Workflow ### Step 1: Identify the Packer Determine if the sample is packed and identify the packer: ```bash # Check with Detect It Easy diec suspect.exe # Check with UPX (test without unpacking) upx -t suspect.exe # Python-based entropy and packer detection python3 << 'PYEOF' import pefile import math pe = pefile.PE("suspect.exe") print("Section A...

Details

Author
mukul975
Repository
mukul975/Anthropic-Cybersecurity-Skills
Created
8 months ago
Last Updated
2 months ago
Language
Python
License
Apache-2.0

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category