Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
ljagiello avatar

Ctf Malware

  • 5.9k installs
  • 2.9k repo stars
  • Updated July 31, 2026
  • ljagiello/ctf-skills

Techniques and tools to statically and dynamically analyze malware samples, decrypt C2 traffic, detect anti-analysis evasion, and extract indicators of compromise in CTF contexts.

About

CTF Malware provides reference techniques and tools for analyzing malicious code in capture-the-flag contexts. It covers obfuscated JavaScript/PowerShell deobfuscation, PE and .NET binary analysis, C2 traffic reconstruction from PCAP files, custom cryptography protocol reverse engineering (RC4, AES, ChaCha20), memory forensics with Volatility, anti-analysis evasion detection (VM checks, debugger detection, API hashing), and YARA-based malware detection. Developers use this skill when reversing suspicious executables, decoding encrypted network communications, extracting malware configurations, analyzing shellcode, and identifying indicators of compromise across obfuscated payloads and trojanized packages. --- name: ctf-malware description: Provides malware analysis and network traffic techniques for CTF challenges. Use when analyzing obfuscated scripts, malicious packages, custom crypto protocols, C2 traffic, PE/.NET binaries, RC4/AES encrypted communications, YARA rules, shellcode analysis, memory forensics for malware (Volatility malfind, process injection detection), anti-analysis techniques (VM/sandbox detection, timing evasion, API hashing, process injection, environment chec.

  • Deobfuscate JavaScript (eval/atob/unescape) and PowerShell (-enc base64) with quick replace/decode patterns
  • Static PE/NET triage with peframe, dnSpy, and AsmResolver for config extraction and sandbox evasion checks
  • PCAP analysis: extract C2 indicators, decode custom crypto (RC4 WebSocket, AES-CBC, ChaCha20 keystream)
  • Memory forensics with Volatility 3 malfind and YARA scanning to detect injected code and process hollowing
  • Anti-analysis technique detection: VM detection, timing evasion, API hashing (ROR13/DJB2), process injection patterns

Ctf Malware by the numbers

  • 5,920 all-time installs (skills.sh)
  • +162 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #111 of 2,203 Security skills by installs in the Skillselion catalog
  • Security screen: CRITICAL risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

ctf-malware capabilities & compatibility

Capabilities
script deobfuscation · pe binary analysis · dotnet decompilation · c2 traffic decryption · shellcode disassembly · memory forensics · yara rule generation · evasion technique detection
Use cases
debugging · security audit
Platforms
Linux · macOS · Windows · WSL
Runs
Runs locally
Pricing
Free
From the docs

What ctf-malware says it does

Provides malware analysis and network traffic techniques for CTF challenges. Use when analyzing obfuscated scripts, malicious packages, custom crypto protocols, C2 traffic, PE/.NET binaries
ctf-malware description
npx skills add https://github.com/ljagiello/ctf-skills --skill ctf-malware

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs5.9k
repo stars2.9k
Security audit1 / 3 scanners passed
Last updatedJuly 31, 2026
Repositoryljagiello/ctf-skills

What it does

Analyze malware samples, obfuscated scripts, C2 traffic, and PE/NET binaries in CTF challenges using static and dynamic techniques.

Who is it for?

CTF competitors, malware reverse engineers, incident responders, and security researchers analyzing suspicious executables, network traffic, and obfuscated scripts in sandboxed environments.

Skip if: Generic reverse engineering (switch to ctf-reverse), disk carving and artifact recovery (switch to ctf-forensics), public infrastructure attribution (switch to ctf-osint).

When should I use this skill?

Analyzing obfuscated scripts, malicious packages, custom crypto protocols, C2 traffic, PE/.NET binaries, encrypted communications, shellcode, memory forensics, anti-analysis techniques, or extracting malware configuratio

What you get

Security practitioners can isolate malware behavior, decrypt C2 communications, detect evasion techniques, and extract actionable indicators (IPs, domains, encryption keys, malware configs) from suspicious binaries and n

  • IOCs
  • YARA rules
  • decrypted C2 configurations

By the numbers

  • Covers RC4, AES-CBC, ChaCha20, and custom crypto protocols for C2 decryption
  • Includes Volatility 3 malfind, process injection detection, and YARA memory scanning
  • Supports PE analysis (peframe, pe-sieve), .NET decompilation (dnSpy, AsmResolver), and PyInstaller unpacking

Files

SKILL.mdMarkdownGitHub ↗

CTF Malware & Network Analysis

Quick reference for malware analysis CTF challenges. Each technique has a one-liner here; see supporting files for full details with code.

Prerequisites

Python packages (all platforms):

pip install yara-python pefile capstone oletools unicorn pycryptodome \
  volatility3 dissect.cobaltstrike

Linux (apt):

apt install strace ltrace tshark binwalk binutils

macOS (Homebrew):

brew install wireshark binwalk binutils ghidra

Manual install:

  • dnSpy — GitHub, .NET decompiler (Windows)

Additional Resources

  • scripts-and-obfuscation.md - JavaScript deobfuscation, PowerShell analysis, eval/base64 decoding, junk code detection, hex payloads, Debian package analysis, dynamic analysis techniques (strace/ltrace, network monitoring, memory string extraction, automated sandbox execution), YARA rules for malware detection, shellcode analysis (Unicorn Engine, Capstone), memory forensics for malware (Volatility 3 malfind, process injection detection), anti-analysis techniques (VM detection, timing evasion, API hashing, process injection), trojanized plugin analysis with custom alphabet C2 decoding
  • c2-and-protocols.md - C2 traffic patterns, custom crypto protocols, RC4 WebSocket, DNS-based C2, network indicators, PCAP analysis, AES-CBC, encryption ID, Telegram bot recovery, Poison Ivy RAT Camellia decryption
  • pe-and-dotnet.md - PE analysis (peframe, pe-sieve, pestudio), .NET analysis (dnSpy, AsmResolver), LimeRAT extraction, sandbox evasion, malware config extraction, PyInstaller+PyArmor

---

When to Pivot

  • If the sample is really just a normal crackme, packed challenge binary, or custom VM with no malware behavior, switch to /ctf-reverse.
  • If the main job is network reconstruction, disk carving, or host artifact recovery, switch to /ctf-forensics.
  • If the challenge turns into public attribution or infrastructure tracing, switch to /ctf-osint.

Quick Start Commands

# Static analysis
file suspicious_file
strings -n 8 suspicious_file | head -50
xxd suspicious_file | head -20

# PE analysis
python3 -c "import pefile; pe=pefile.PE('mal.exe'); print(pe.dump_info())" | head
peframe mal.exe

# Dynamic analysis (sandboxed!)
strace -f -s 200 ./suspicious 2>&1 | head -100
ltrace ./suspicious 2>&1 | head -50

# Network indicators
strings suspicious_file | grep -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
strings suspicious_file | grep -iE 'http|ftp|ws://'

# YARA scan
yara -r rules.yar suspicious_file

Obfuscated Scripts

  • Replace eval/bash with echo to print underlying code; extract base64/hex blobs and analyze with file. See scripts-and-obfuscation.md.

JavaScript & PowerShell Deobfuscation

  • JS: Replace eval with console.log, decode unescape(), atob(), String.fromCharCode().
  • PowerShell: Decode -enc base64, replace IEX with output. See scripts-and-obfuscation.md.

Junk Code Detection

  • NOP sleds, push/pop pairs, dead writes, unconditional jumps to next instruction. Filter to extract real call targets. See scripts-and-obfuscation.md.

PCAP & Network Analysis

tshark -r file.pcap -Y "tcp.stream eq X" -T fields -e tcp.payload

Look for C2 on unusual ports. Extract IPs/domains with strings | grep. See c2-and-protocols.md.

Custom Crypto Protocols

  • Stream ciphers share keystream state for both directions; concatenate ALL payloads chronologically.
  • ChaCha20 keystream extraction: send nullbytes (0 XOR anything = anything). See c2-and-protocols.md.

C2 Traffic Patterns

  • Beaconing, DGA, DNS tunneling, HTTP(S) with custom headers, encoded payloads. See c2-and-protocols.md.

RC4-Encrypted WebSocket C2

  • Remap port with tcprewrite, add RSA key for TLS decryption, find RC4 key in binary. See c2-and-protocols.md.

Identifying Encryption Algorithms

  • AES: 0x637c777b S-box; ChaCha20: expand 32-byte k; TEA/XTEA: 0x9E3779B9; RC4: sequential S-box init. See c2-and-protocols.md.

AES-CBC in Malware

  • Key = MD5/SHA256 of hardcoded string; IV = first 16 bytes of ciphertext. See c2-and-protocols.md.

PE Analysis

peframe malware.exe      # Quick triage
pe-sieve                 # Runtime analysis
pestudio                 # Static analysis (Windows)

See pe-and-dotnet.md.

.NET Malware Analysis

  • Use dnSpy/ILSpy for decompilation; AsmResolver for programmatic analysis. LimeRAT C2: AES-256-ECB with MD5-derived key. See pe-and-dotnet.md.

Malware Configuration Extraction

  • Check .data section, PE/.NET resources, registry keys, encrypted config files. See pe-and-dotnet.md.

Sandbox Evasion Checks

  • VM detection, debugger detection, timing checks, environment checks, analysis tool detection. See pe-and-dotnet.md.

Anti-Analysis Techniques

VM detection (CPUID, MAC prefix, registry, disk size), timing evasion (sleep/RDTSC sandbox detection), API hashing (ROR13/DJB2/CRC32 + hashdb lookup), process injection (hollowing, APC, CreateRemoteThread), environment checks. See scripts-and-obfuscation.md.

Trojanized Plugin Analysis

Diff malicious plugin against official release to find injected code in try/except blocks. Custom alphabet rotation (C[(C.index(ch) - offset) % len(C)]) decodes C2 domain, XOR decodes endpoint path. See scripts-and-obfuscation.md.

PyInstaller + PyArmor Unpacking

  • pyinstxtractor.py to extract, PyArmor-Unpacker for protected code. See pe-and-dotnet.md.

Telegram Bot Evidence Recovery

  • Use bot token from malware source to call getUpdates and getFile APIs. See c2-and-protocols.md.

Debian Package Analysis

ar -x package.deb && tar -xf control.tar.xz  # Check postinst scripts

See scripts-and-obfuscation.md.

YARA Rules for Malware Detection

Write YARA rules to match byte patterns, strings, and regex against files or memory dumps. Detect XOR loops ({31 ?? 80 ?? ?? 4? 75}), base64 blobs, encoded PowerShell. Use yarac to compile for faster scanning. See scripts-and-obfuscation.md.

Shellcode Analysis

Disassemble with objdump -b binary -m i386:x86-64, emulate with Unicorn Engine (hook syscalls safely), or use Capstone for programmatic disassembly. Look for XOR decoder stubs. See scripts-and-obfuscation.md.

Memory Forensics for Malware

vol3 windows.malfind detects injected code (PAGE_EXECUTE_READWRITE without mapped file). windows.pstree reveals suspicious parent-child relationships. YARA scan memory with yarascan.YaraScan. See scripts-and-obfuscation.md.

Network Indicators Quick Reference

strings malware | grep -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
tshark -r capture.pcap -Y "dns.qry.name" -T fields -e dns.qry.name | sort -u

Related skills

FAQ

How do I decode obfuscated JavaScript and PowerShell in malware?

JS: replace eval with console.log, decode atob()/unescape()/String.fromCharCode(). PowerShell: decode -enc base64 flag, replace IEX with Write-Output. See scripts-and-obfuscation.md.

How do I identify encryption algorithms in C2 traffic?

AES: look for S-box 0x637c777b; ChaCha20: expand 32-byte k; TEA/XTEA: 0x9E3779B9; RC4: sequential S-box init. Concatenate payloads chronologically for stream ciphers. See c2-and-protocols.md.

How do I detect injected code and process hollowing?

Use Volatility 3 malfind to detect PAGE_EXECUTE_READWRITE regions without mapped files, pstree for suspicious parent-child relationships, and YARA scan memory. See scripts-and-obfuscation.md.

Is Ctf Malware safe to install?

skills.sh reports 1 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Securityauditappsec

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.