Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

ctf-malware — Claude Code skill: what it does, how to install

A skill for analysing malware samples and network traffic in CTF challenges. It covers obfuscated scripts, PE and .NET files, PCAP captures, and C2 protocols.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ljagiello/ctf-skills --skill ctf-malware -a claude-code
Open on GitHub

What ctf-malware does

ctf-malware gives an agent procedures for static and dynamic inspection of suspicious files: string and indicator discovery, PE and .NET analysis, JavaScript and PowerShell decoding, YARA scanning, and configuration extraction. It also covers shellcode, process injection, sandbox-evasion checks, and memory forensics with Volatility 3.

The skill includes reference material on obfuscation, C2 and cryptographic protocols, PE/.NET samples, and MCP integrations. It addresses RC4 WebSocket traffic, DNS tunnelling, AES-CBC, ChaCha20, and PCAP inspection, using tools such as file, strings, tshark, strace, and ltrace.

It requires a filesystem-based agent with Bash, Python 3, and internet access to install tools. Run malware only in an isolated disposable VM; that is a firm requirement when dynamic analysis is involved.

What it helps with

  • decode an obfuscated JavaScript or PowerShell script
  • extract C2 indicators from a PCAP or binary
  • inspect a PE or .NET malware sample
  • detect process-injection traces in memory
  • identify encryption and recover a malware configuration

Example prompts for the agent

  • Analyse `suspicious_file` for strings, obfuscation, and network indicators.
  • Inspect `file.pcap` for C2 traffic and encrypted payloads.
  • Examine `malware.exe` as a PE sample and try to extract its configuration.

How to install ctf-malware

1Skills CLI (Vercel)

npx skills add ljagiello/ctf-skills --skill ctf-malware -a claude-code

2Manually: put the files in place

~/.claude/skills/ctf-malware/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ctf-malware/

From the same set11

The whole set →
ctf-reverse ljagiello A reverse engineering reference for CTF challenges: guides coding agents through binary inspection, anti-debug bypass, and virtual machine analysis. Claude Code CX Codex Cursor +1 10,100installs ctf-web ljagiello Routes and guides agents through web CTF challenges, covering everything from SQL injection and SSTI to auth bypasses and SSRF. Claude Code CX Codex Cursor +1 9,700installs ctf-pwn ljagiello Binary exploitation guide for CTF challenges. Helps turn memory corruption bugs into code execution and shell access. Claude Code CX Codex Cursor +1 9,400installs ctf-crypto ljagiello A skill for solving crypto CTF challenges, covering RSA, AES, hashes, signatures, PRNG, ZKP, and mathematical attacks. Claude Code CX Codex Cursor +1 9,200installs ctf-osint ljagiello A field guide to public-source research for CTF challenges, from username and DNS checks to image searches and geolocation. Useful when clues point beyond the challenge files. Claude Code CX Codex Cursor +1 9,100installs ctf-forensics ljagiello Digital forensics and signal analysis techniques for CTF challenges: disk images, memory dumps, PCAP files, steganography, Windows artifacts, and side-channel attacks. Claude Code CX Codex Cursor +1 9,000installs solve-challenge ljagiello Runs first-pass CTF triage, identifies the likely challenge category, and routes work to a specialized ctf-* skill. Use it when you have files, a remote service, or only a short prompt. Claude Code CX Codex Cursor +1 8,900installs ctf-misc ljagiello Provides reference techniques and payloads for miscellaneous CTF challenges like sandbox escapes, exotic encodings, and signal analysis. Claude Code CX Codex Cursor +1 8,800installs

Similar

websocket-engineer https://github.com/Jeffallan This skill guides WebSocket and Socket.IO work with bidirectional messages, rooms, presence tracking, and Redis-based scaling. Claude Code CX Codex Cursor +1 6,800installs code-reviewer https://github.com/Jeffallan Analyzes code diffs and files to spot bugs, security vulnerabilities (SQL injection, XSS), code smells, N+1 queries, and returns a prioritized review report. Use for pull request reviews and code audits. Claude Code CX Codex Cursor +1 6,500installs codeql official github Walks you through CodeQL code scanning: Actions workflows, CLI commands, SARIF output, and fixing failed analyses. GitHub Copilot 2,000installs omni-auth cheaper-inference Manage API keys and sessions in OmniRoute. Authenticates requests via Bearer tokens, handles dashboard login with password or OIDC, and controls session access. Claude Code CX Codex Cursor +1 1,100installs git-guardrails-claude-code Matt Pocock This skill adds a Claude Code hook that stops risky Git commands before they run. Use it when an agent must not push or discard working-tree changes. Claude Code 499,069installs ponytail-review DietrichGebert ponytail-review reviews a change beyond the diff, checking connected code, bugs, risks, load, tests, speed, and unnecessary code. Use it for PRs and commits. Claude Code CX Codex Cursor +1 56,300installs ponytail-audit DietrichGebert It audits a repository and ranks bugs, risks, and redundant code in a one-shot report. Use it when you need a review without code changes. Claude Code CX Codex Cursor +1 44,800installs security-audit cloudflare Reviews codebases and APIs for vulnerabilities using safe sandboxing. Fits pre-release security reviews, pen-test triage, and architecture checks. Claude Code CX Codex Cursor +1 52,200installs

Questions about ctf-malware

How do I install ctf-malware in Claude Code?

Run npx skills add ljagiello/ctf-skills --skill ctf-malware -a claude-code. The installation instructions repeat that same command; the skill file is placed at ~/.claude/skills/ctf-malware/SKILL.md.

What does ctf-malware do?

It is a CTF skill for malware and network-traffic analysis. It covers obfuscation, PE and .NET files, C2 traffic, cryptographic protocols, YARA, shellcode, and memory forensics.

What does ctf-malware require?

The agent needs filesystem access, Bash, Python 3, and internet access for tool installation. Use an isolated disposable VM when executing malware samples.

Source text

SKILL.md · MIT
---
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 checks), or extracting malware configurations and indicators of compromise.
license: MIT
compatibility: Requires filesystem-based agent (Claude Code or similar) with bash, Python 3, and internet access for tool installation.
allowed-tools: Bash Read Write Edit Glob Grep Task WebFetch WebSearch
metadata:
  user-invocable: "false"
---

# 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):**
```bash
pip install yara-python pefile capstone oletools unicorn pycryptodome \
  volatility3 dissect.cobaltstrike
```

**Linux (apt):**
```bash
apt install strace ltrace tshark binwalk binutils
```

**macOS (Homebrew):**
```bash
brew install wireshark binwalk binutils ghidra
```

**Manual install:**
- dnSpy — [GitHub](https://github.com/dnSpy/dnSpy), .NET decompiler (Windows)

**MCP servers (optional):** IDA Pro MCP / Ghidra MCP (unpacking, config extraction), WinDbg MCP ([svnscha/mcp-windbg](https://github.com/svnscha/mcp-windbg)) for dynamic analysis, JADX MCP for Android — see [tools-mcp.md](tools-mcp.md). Run malware only in an isolated, disposable VM.

## Additional Resources

- [scripts-and-obfuscation.md](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-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-and-dotnet.md) - PE analysis (peframe, pe-sieve, pestudio), .NET analysis (dnSpy, AsmResolver), LimeRAT extraction, sandbox evasion, malware config extraction, PyInstaller+PyArmor
- [tools-mcp.md](tools-mcp.md) - MCP server integration for malware: IDA/Ghidra MCP for unpacking and config/decryptor extraction, WinDbg MCP for dynamic debugging (RWX region hunting, in-memory C2 strings, live `VirtualAlloc`/`CreateRemoteThread` breakpoints, `.writemem` payload dumping to skip the packer), JADX MCP for Android malware — pseudocode-first, isolated-VM safety note

---

## 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

```bash
# 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](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](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](scripts-and-obfuscation.md).

## PCAP & Network Analysis

```bash
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](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-and-protocols.md).

## C2 Traffic Patterns

- Beaconing, DGA, DNS tunneling, HTTP(S) with custom headers, encoded payloads. See [c2-and-protocols.md](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](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](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](c2-and-protocols.md).

## PE Analysis

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

See [pe-and-dotnet.md](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](pe-and-dotnet.md).

## Malware Configuration Extraction

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

## Sandbox Evasion Checks

- VM detection, debugger detection, timing checks, environment checks, analysis tool detection. See [pe-and-dotnet.md](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](scripts-and-obfuscation.md#anti-analysis-techniques).

## 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](scripts-and-obfuscation.md#trojanized-plugin-analysis-with-custom-alphabet-c2-decoding-inshack-2018).

## PyInstaller + PyArmor Unpacking

- `pyinstxtractor.py` to extract, PyArmor-Unpacker for protected code. See [pe-and-dotnet.md](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](c2-and-protocols.md).

## Debian Package Analysis

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

See [scripts-and-obfuscation.md](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](scripts-and-obfuscation.md#yara-rules-for-malware-detection).

## 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](scripts-and-obfuscation.md#shellcode-analysis).

## Memory Forensics for Malware

`vol windows.malfind` detects injected code (PAGE_EXECUTE_READWRITE without mapped file). `windows.pstree` reveals suspicious parent-child relationships. YARA scan memory with `windows.vadyarascan.VadYaraScan`. See [scripts-and-obfuscation.md](scripts-and-obfuscation.md#memory-forensics-for-malware).

## Network Indicators Quick Reference

```bash
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
```

© ljagiello · MIT · ljagiello/ctf-skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor