Logotipo de Shellcode Analyzer

Shellcode Analyzer

Comunidad
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.

Descripción general

Editordariushoule
Repositoriox64dbg-skills
Nombre de la habilidadshellcode-analyzer
Estrellas
210
Forks
18
Archivos incluidos
1
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • 1 archivos incluidos

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por dariushoule en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Shellcode Analyzer en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/dariushoule/x64dbg-skills/tree/main/skills/shellcode-analyzer
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

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
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Shellcode Analyzer en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Shellcode Analyzer automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Shellcode Analyzer no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

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.

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Se ofrecen como archivos de lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA 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.

¿Por qué usar Shellcode Analyzer en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Shellcode Analyzer está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Shellcode Analyzer en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/dariushoule/x64dbg-skills/tree/main/skills/shellcode-analyzer. TypingMind lee su archivo SKILL.md, empaqueta sus archivos y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Shellcode Analyzer?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Shellcode Analyzer?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Shellcode Analyzer con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Shellcode Analyzer?

Sí. dariushoule la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇