analyzing-shellcode

analyzing-shellcode is a skill for Claude Code from trilwu/secskills. It costs 122 tokens per session (3,944 once invoked), scanned A, original, MIT.

A guide for examining raw machine-code payloads that have no normal executable file structure, such as shellcode found in an exploit or document.

In plain words
What is it for?
It helps identify the processor type, decode hidden stages, trace Windows API lookups, emulate the payload, and extract command-and-control details and other indicators.
Why use it?
Raw code lacks the headers and fixed address that analysis tools usually rely on, making it hard to disassemble and understand safely.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the secskills-defense plugin — 22 skills shipped together

Good fit It helps identify the processor type, decode hidden stages, trace Windows API lookups, emulate the payload, and extract command-and-control details and other indicators.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/trilwu/secskills/analyzing-shellcode
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.

Any agent
npx skills add trilwu/secskills --skill analyzing-shellcode
Clone the repo
git clone --depth 1 https://github.com/trilwu/secskills

Made for: Claude Code.

Or install secskills-defense, the plugin that ships this one along with the rest of its 22 skills.

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 analyzing-shellcode

README.md
[![agentmods](https://agentmods.dev/badge/skills/trilwu/secskills/analyzing-shellcode/github.svg)](https://agentmods.dev/skills/trilwu/secskills/analyzing-shellcode)
Your own site
<a href="https://agentmods.dev/skills/trilwu/secskills/analyzing-shellcode"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/analyzing-shellcode/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for analyzing-shellcode

Your own site · 80×15
<a href="https://agentmods.dev/skills/trilwu/secskills/analyzing-shellcode"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/analyzing-shellcode.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,944 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to critical

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • critical YARA Match · line 3
    YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
    Fix: Remove the malware payload or compromised file entirely. Investigate how it entered the skill and audit all other artifacts for additional indicators of compromise.
  • high Prompt Injection · line 261
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
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.1 $0.00122 $0.03944
Opus 5.5 $0.00049 $0.01578
Sonnet 5.5 $0.00024 $0.00789
Haiku 4.5 $0.00012 $0.00394

Measured 3mo ago against content hash e0674d4276a7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

analyzing-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 3mo ago.

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.

secskills-defense/skills/analyzing-shellcode/SKILL.md · 290 lines

How it starts

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

Analyzing Shellcode

Shellcode is code with no container — no PE/ELF header, no imports table, no fixed load address — so it must find everything it needs at runtime. That self-reliance is exactly what gives it away: the PEB walk, the API hashing, the position-independent GetPC trick are structural fingerprints you can read even before you know what the payload does.

When to Use

  • A raw blob of position-independent code with no PE/ELF/Mach-O header
  • A payload carved from an exploit, a macro, a loader, or a JS/HTA dropper
  • A \x-escaped, 0x-prefixed, base64, or XOR-obfuscated byte buffer
  • A suspected Metasploit stager (reverse_tcp/https) or Cobalt Strike beacon stage
  • An egg-hunter or GetPC/decoder stub found while triaging a larger binary
  • Bytes recovered from network capture, RWX memory, or a document stream

When NOT to Use

  • The sample is a normal PE/ELF/Mach-O with headers — use analyzing-binaries for the loader-backed disassembly workflow
  • You need broader sample triage or family ID — use analyzing-malware; come here only for the raw payload stage inside it
  • The blob is a packed executable, not raw shellcode — use unpacking-protected-binaries to unwrap it first
  • You are carving the shellcode out of a memory dump first — use analyzing-memory-images to locate and extract the region, then return here
  • Deep static reversing once decoded — reverse-engineering is not a skill; route sustained disassembly work back to analyzing-binaries

Get the Bytes First

Shellcode arrives wrapped. Normalize it to a flat binary before anything else.

# \x-escaped or 0x C-array pasted from an exploit → raw bytes
python3 -c "import sys,re; d=open('sc.txt').read(); \
  b=bytes(int(x,16) for x in re.findall(r'(?:0x|\\\\x)([0-9a-fA-F]{2})',d)); \
  open('sc.bin','wb').write(b); sys.stderr.write(f'{len(b)} bytes\n')"

# base64 buffer
base64 -d payload.b64 > sc.bin

# single-byte XOR brute (find the key that yields printable / low entropy)
python3 -c "import sys; d=open('sc.bin','rb').read(); \
  [print(k, bytes(c^k for c in d[:16]).hex()) for k in range(256)]"

Read the full file on GitHub · 290 lines

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. 3mo ago First seen · 290 lines · 122 tokens per session scan A e0674d4276a7

Subscribe to this mod's changes

analyzing-shellcode is a skill published in the GitHub repository trilwu/secskills (211 stars, last pushed 2mo ago), licensed MIT. It adds 122 tokens to every session and 3,944 once invoked, about $0.0005 per session on Opus 5.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-08-30.

Related

analyzing-shellcode compared with skills from other repositories

analyzing-shellcode next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
analyzing-shellcodetrilwu/secskillsSkill2112mo agoMITA122Claude Code
claude-md-improveranthropics/claude-plugins-officialSkill49kyesterdayApache-2.0A82Claude Code
agent-platform-model-registrygoogle/skillsSkill25ktodayApache-2.0A60Claude Code, Codex
gke-reliabilitygoogle/skillsSkill25ktodayApache-2.0A85Claude Code, Codex
gke-workload-securitygoogle/skillsSkill25ktodayApache-2.0A171Claude Code, Codex
google-cloud-solution-agentic-analytics-spark-knowledge-cataloggoogle/skillsSkill25ktodayApache-2.0A132Claude Code, Codex
glance-canonical-layoutsandroid/skillsSkill11k7d agoApache-2.0A56Claude Code