reverse-engineering-shellcode

reverse-engineering-shellcode is a skill for Claude Code, Codex from meltedinhex/analyst-ai-pack. It costs 68 tokens per session (869 once invoked), scanned A, original, Apache-2.0.

A guide to analysing shellcode, a raw machine-code byte stream that runs without an executable file header, including its API lookup, behaviour, and staged payloads.

In plain words
What is it for?
Use it to disassemble raw code, recognise Windows process-environment and hashed-API lookups, emulate it safely, and recover payloads or command-and-control details.
Why use it?
Shellcode cannot be analysed like a normal Windows or Linux file because it lacks the usual format metadata. The guide helps determine its architecture and starting point before emulation.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/meltedinhex/analyst-ai-pack/reverse-engineering-shellcode
Any agent
npx skills add meltedinhex/analyst-ai-pack --skill reverse-engineering-shellcode
Clone the repo
git clone --depth 1 https://github.com/meltedinhex/analyst-ai-pack

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for reverse-engineering-shellcode

README.md
[![agentmods](https://agentmods.dev/badge/skills/meltedinhex/analyst-ai-pack/reverse-engineering-shellcode.svg)](https://agentmods.dev/skills/meltedinhex/analyst-ai-pack/reverse-engineering-shellcode)
Your own site
<a href="https://agentmods.dev/skills/meltedinhex/analyst-ai-pack/reverse-engineering-shellcode"><img src="https://agentmods.dev/badge/skills/meltedinhex/analyst-ai-pack/reverse-engineering-shellcode.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 869 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00068 $0.00869
Opus 5 $0.00034 $0.00434
Sonnet 5 $0.00014 $0.00174
Haiku 4.5 $0.00007 $0.00087

Measured yesterday against content hash 1f6803fc4f71, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

reverse-engineering-shellcode scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/analyst.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/reverse-engineering-shellcode/SKILL.md · 109 lines

How it starts

The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Reverse Engineering Shellcode

When to Use

  • You extracted a raw code blob (from a document, exploit, injected memory region, or beacon) with no PE/ELF headers.
  • You need to determine the architecture, recover the API-resolution method, and understand what the shellcode does.
  • You want to emulate the shellcode safely to recover staged payloads or C2.

Do not use a file-format parser on shellcode — there is no header. Treat it as a flat byte stream at a known base and disassemble/emulate.

Prerequisites

  • Capstone (pip install capstone) for disassembly; Unicorn (pip install unicorn) for emulation.
  • Knowledge of the likely architecture/bitness (x86 vs x64) and calling context.

Workflow

Step 1: Determine architecture and entry

Try disassembling as x86 and x64; the one that yields coherent instructions (and a sane prologue) is correct. Shellcode usually starts executing at offset 0.

python scripts/analyst.py disasm shellcode.bin --arch x64

Step 2: Recognize API resolution

Windows shellcode typically walks the PEB to find kernel32, then resolves exports by hash:

mov rax, gs:[60h]        ; PEB (x64)   / mov eax, fs:[30h] (x86)
... traverse Ldr -> InMemoryOrderModuleList
... hash export names, compare to embedded constants

Recovered hash constants feed the API-hash resolver (see the obfuscation skill).

Step 3: Identify the technique

Look for egg hunters (searching memory for a tag), socket setup (reverse/bind shell), or a download-and-exec stager (WinINet/WinHTTP resolution then a URL).

Step 4: Emulate to recover behavior

Emulate with Unicorn, hooking memory and (optionally) faking API calls, to observe the control flow and extract strings/URLs the static view hides:

python scripts/analyst.py emulate shellcode.bin --arch x64 --base 0x140000000

Step 5: Extract IOCs and payload

Recover C2 URLs/hosts, embedded second stages, and the resolved API set for the report.

Validation

Read the full file on GitHub · 109 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 109 lines · 68 tokens per session scan A 1f6803fc4f71

Subscribe to this mod's changes

reverse-engineering-shellcode is a skill published in the GitHub repository meltedinhex/analyst-ai-pack (22 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 68 tokens to every session and 869 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

analyzing-golang-malware-with-ghidra

Reverse engineer Go-compiled malware in Ghidra by parsing Go buildinfo and pclntab structures, recovering stripped/obfuscated function names (e.g. via GoResolver), and extracting embedded module/dependency strings and types from Go binaries. Use when analyzing a Go-language malware sample, deobfuscating a…

mukul975/Anthropic-Cybersecurity-Skills · 95 tokens

analyzing-malicious-pdf-with-peepdf

Perform static analysis of malicious PDF documents using peepdf, pdfid, and pdf-parser to extract embedded JavaScript, shellcode, and suspicious objects. Use when triaging a suspicious PDF attachment from a phishing email, analyzing a PDF-based exploit document, or building detection signatures for weaponized PDF…

mukul975/Anthropic-Cybersecurity-Skills · 73 tokens

analyzing-golang-malware-with-ghidra

Reverse engineer Go-compiled malware using Ghidra with specialized scripts for function recovery, string extraction, and type reconstruction in stripped Go binaries.

plurigrid/asi · 40 tokens

analyzing-golang-malware-with-ghidra

使用 Ghidra 及专用脚本对 Go 编译的恶意软件进行逆向工程,包括函数恢复、字符串提取和去符号表 Go 二进制文件的类型重建。.

killvxk/cybersecurity-skills-zh · 56 tokens

analyzing-malicious-pdf-with-peepdf

使用 peepdf、pdfid 和 pdf-parser 对恶意 PDF 文档进行静态分析, 提取嵌入的 JavaScript、shellcode 和可疑对象。.

killvxk/cybersecurity-skills-zh · 50 tokens

analyzing-golang-malware-with-ghidra

Reverse engineer Go-compiled malware using Ghidra with specialized scripts for function recovery, string extraction, and type reconstruction in stripped Go binaries.

26zl/cybersec-toolkit · 40 tokens