Logo vun Shellcode Analyzer

Shellcode Analyzer

Communautéit
dariushoule
shellcode-analyzer

Load, unpack, and analyze shellcode in x64dbg. Use this skill when the user wants to analyze shellcode, load a shellcode blob into a debugger, unpack encoded/encrypted shellcode, or perform static/dynamic analysis of shellcode payloads.

Iwwersiicht

Editeurdariushoule
Repositoryx64dbg-skills
Skill-Nummshellcode-analyzer
Stären
210
Forks
18
Matgeliwwert Fichieren
1
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum dariushoule op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Shellcode Analyzer an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/dariushoule/x64dbg-skills/tree/main/skills/shellcode-analyzer
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dariushoule/x64dbg-skills.git /tmp/x64dbg-skills
mkdir -p .claude/skills
cp -r /tmp/x64dbg-skills/skills/shellcode-analyzer .claude/skills/shellcode-analyzer
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Shellcode Analyzer an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Shellcode Analyzer automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Shellcode Analyzer net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

shellcode-analyzer

Load a raw shellcode blob into x64dbg using a sacrificial process, then optionally unpack, statically analyze, and dynamically analyze it.

Instructions

1. Gather input

Ask the user (via AskUserQuestion) for:

  • Shellcode path — absolute path to the raw shellcode file on disk
  • x64dbg path — absolute path to the x64dbg/x32dbg binary (if not in memory)
  • Bitness — 64-bit or 32-bit (default: 64, but one is not recommended over the other; it depends on the shellcode being analyzed)

Determine the CIP register name: rip for 64-bit, eip for 32-bit. Determine the debugger variant: x64dbg.exe for 64-bit, x32dbg.exe for 32-bit.

2. Read the shellcode

Read the raw shellcode file as hex via Bash:

python -c "import sys; data=open(sys.argv[1],'rb').read(); print(data.hex())" "<shellcode_path>"

Capture the hex string and note the byte length (len(hex_string) // 2).

3. Launch the debugger

Use mcp__x64dbg__start_session with:

  • executable_path: path to timeout.exe (typically C:\Windows\System32\timeout.exe)
  • x64dbg_path: path to the appropriate x64dbg/x32dbg binary

Always start a new session, do not look for existing sessions. This ensures a clean environment and avoids conflicts with any active debugging sessions.

Note the session PID and x64dbg path from the result. Wait for the debugger to settle — call mcp__x64dbg__get_debugger_status and confirm the debuggee is paused. If running, call mcp__x64dbg__pause.

4. Allocate memory

Allocate a region at least one full page (0x1000 bytes) larger than the shellcode size. Attempt to use static allocation at 0x0000020000000000 for x64 or 0x20000000 for x32, but if that fails, allow the OS to choose the base. This makes it easier for the analyst to refer to addresses in the shellcode without needing to work with relative offsets.

Call mcp__x64dbg__allocate_memory with this size. Record the returned base address.

5. NOP sled (optional)

Some shellcodes require a NOP sled to function properly. The user should answer yes if they don't know. Ask the user via AskUserQuestion: "Would you like a 32-byte NOP sled before the shellcode?"

If yes:

  • Write 32 NOP bytes at the base address: call mcp__x64dbg__write_memory with hex_data = "90" repeated 32 times ("9090909090909090909090909090909090909090909090909090909090909090")
  • Set shellcode_offset = base address + 0x20 (32 bytes)
  • Set entry_point = base address (start of NOP sled)

If no:

  • Set shellcode_offset = base address
  • Set entry_point = base address

6. Write shellcode to memory

Call mcp__x64dbg__write_memory with:

  • address: the shellcode_offset
  • hex_data: the hex string from step 2

7. Set CIP

Call mcp__x64dbg__set_register with:

  • register: rip or eip (per bitness)
  • value: the entry_point address

8. Unpacking assistance

Some shellcodes are obscured by a packer/crypter. Ask the user via AskUserQuestion: "Shellcode loaded. Do you need help unpacking it?"

If yes:

  1. Disassemble from entry_point using mcp__x64dbg__disassemble
  2. Analyze the disassembly for decryption/decompression patterns:
    • XOR loops, rolling keys, byte-by-byte transforms
    • Decompression routines (e.g., RtlDecompressBuffer calls)
    • Self-modifying code that writes to its own region
    • Multi-stage stubs that decode a payload then jump to it (It is possible no unpacking is required; if so, inform the user and skip to static analysis)
  3. Summarize findings to the user
  4. To execute the unpacking stub:
    • Identify where the decoder loop ends and the decoded payload begins (look for a jump or call after the loop)
    • Set a breakpoint at that transition point via mcp__x64dbg__set_breakpoint
    • Call mcp__x64dbg__go to run until the breakpoint hits
    • Confirm the debugger paused at the expected location
    • Disassemble the now-decoded shellcode for subsequent analysis steps

9. Static analysis

Ask the user via AskUserQuestion: "Would you like help statically analyzing the shellcode?"

If yes:

  1. Disassemble the shellcode from entry_point (or decoded payload start if unpacked) using mcp__x64dbg__disassemble
  2. Invoke /yara-sigs via Skill("yara-sigs") to scan for crypto, packers, and anti-debug signatures
    • When doing yara analysis, ONLY consider the shellcode region (not the entire memory space) to avoid noise
  3. Analyze the combined results for:
    • Import resolution — PEB walking, LDR traversal, API hashing (e.g., ROR13, CRC32, DJB2)
    • Anti-debug — IsDebuggerPresent checks, NtQueryInformationProcess, timing checks, PEB.BeingDebugged
    • Networking — socket setup, connect/send/recv patterns, HTTP/DNS indicators
    • Stagers — VirtualAlloc + download + execute patterns
    • Evasion — syscall stubs, heaven's gate, indirect calls
    • Novel behavior — anything unusual or sophisticated
  4. Add comments at key addresses via mcp__x64dbg__set_comment (import resolution, API calls, anti-debug, networking, control flow transitions)
  5. Add labels at major blocks via mcp__x64dbg__set_label (e.g., api_resolver, decode_loop, payload_entry)
  6. Summarize findings to the user

10. Dynamic analysis

Ask the user via AskUserQuestion: "Would you like help dynamically analyzing the shellcode?"

If yes:

Use the static analysis as a roadmap. Step/run through key sections of the shellcode to:

  • Resolve runtime values — step through import resolution to discover which APIs are resolved (read resolved pointers from registers/stack after hash-lookup routines)
  • Confirm control flow — verify branch decisions, loop counts, and conditional paths
  • Inspect payloads — read decoded strings, URLs, C2 addresses, or embedded configs from memory via mcp__x64dbg__read_memory
  • Trace execution — use mcp__x64dbg__trace_over or mcp__x64dbg__trace_into for targeted sections, or use /tracealyzer via Skill("tracealyzer") for deeper analysis

Use breakpoints strategically — set them at critical points (API calls, post-decode, network setup), run to them, inspect state, then continue. Avoid running the shellcode to completion; stop before any destructive or network-active payloads execute.

Summarize dynamic findings to the user, noting any insights that differ from or extend the static analysis.

Refine static comments/labels based on dynamic insights.

11. Report Generation

Ask via AskUserQuestion: "Would you like a markdown report of the static analysis?" — if yes, read the template at ${CLAUDE_PLUGIN_ROOT}/skills/shellcode-analyzer/report_template.md and fill in every section based on analysis findings. Write the completed report to ./reports/shellcode_analysis_<timestamp>.md via Write. Omit table rows or sections that have no findings, but preserve the overall structure.

12. Refresh GUI

Always call mcp__x64dbg__refresh_gui as the final step.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Shellcode Analyzer?

Load, unpack, and analyze shellcode in x64dbg. Use this skill when the user wants to analyze shellcode, load a shellcode blob into a debugger, unpack encoded/encrypted shellcode, or perform static/dynamic analysis of shellcode payloads.

Firwat Shellcode Analyzer op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Shellcode Analyzer besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Shellcode Analyzer an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/dariushoule/x64dbg-skills/tree/main/skills/shellcode-analyzer an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Shellcode Analyzer benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Shellcode Analyzer benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Shellcode Analyzer domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Shellcode Analyzer gratis?

Jo. De Skill gëtt vum dariushoule ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇