Skills Agentes

Dwarf Expert

Analiza información de depuración DWARF en binarios compilados: inspecciona secciones .debug_*, árboles de DIE, verifica integridad y ayuda a escribir código que parsea DWARF.

Oficial

Reemplaza a: readelf para trabajo específico de DWARF

Solicitaread write edit bash grep glob websearch webfetch
Estrellas
8.5k

en todo el repo

Actividad
49

0–100, la ruta de este skill

Actualizado
hace 2 meses

último commit aquí

Commits
1

últimos 90 días

Contexto
1.5k tok

81 tok en reposo

Paquete
3 archivos

9 KB

Instalar

Funciona con cualquier agente que lea SKILL.md

npx -y skills add trailofbits/skills --skill dwarf-expert --agent claude-code

Se instala solo en este repositorio.

Qué hace

  • Dumps y filtra DIE trees, secciones .debug_* y atributos DW_TAG_/DW_AT_ usando dwarfdump, llvm-dwarfdump o readelf
  • Verifica la integridad del DWARF con llvm-dwarfdump --verify y --statistics
  • Responde preguntas sobre el estándar DWARF consultando dwarfstd.org, LLVM y libdwarf como fuentes
  • Orienta la escritura de código que parsea DWARF con libdwarf, pyelftools, gimli u otras librerías, señalando trampas típicas

Úsalo cuando

  • Inspeccionar secciones .debug_*, árboles de DIE o entradas DW_TAG_/DW_AT_ con dwarfdump/llvm-dwarfdump o readelf
  • Verificar información de depuración con llvm-dwarfdump --verify
  • Responder preguntas sobre el estándar DWARF
  • Escribir código que parsea DWARF (libdwarf, pyelftools, gimli)

No lo uses cuando

  • Depuración en tiempo de ejecución (usa gdb/lldb)
  • Ingeniería inversa más allá de las secciones DWARF (usa Ghidra/IDA)
  • Bugs de generación de DWARF específicos del compilador

Qué lo activa

Di cualquiera de estas frases y el agente debería cargar este skill.

  • “Verifica la integridad del DWARF de este binario con llvm-dwarfdump --verify”
  • “Busca todos los DW_TAG_formal_parameter de tipo float * en este ejecutable”
  • “¿Qué atributos tiene DW_TAG_subprogram en DWARF5?”
  • “Escribe un script en Python con pyelftools para recorrer los DIE de este binario”
  • “Este binario tiene DWARF v2, ¿cómo interpreto DW_AT_MIPS_linkage_name?”

SKILL.md

En inglés

DWARF Expert

Expertise for DWARF debug info: parsing and searching it, verifying its integrity, answering questions about the standard, and writing code that consumes it. Out of scope: runtime debugging (use gdb/lldb), reverse engineering beyond the DWARF sections (use Ghidra/IDA), and compiler-specific DWARF generation bugs.

Authoritative Sources

When precision matters, look standard details up instead of answering from memory:

  1. dwarfstd.org — the official specification. Web-search specific sections, e.g. "DWARF5 DW_TAG_subprogram attributes site:dwarfstd.org".
  2. LLVM — llvm/lib/DebugInfo/DWARF/ is a reliable reference implementation: DWARFDie.cpp (DIE and attribute access), DWARFUnit.cpp (compilation units), DWARFDebugLine.cpp (line tables), DWARFVerifier.cpp (validation).
  3. libdwarf — the reference C implementation at github.com/davea42/libdwarf-code.

Parsing and Searching with dwarfdump

Prefer dwarfdump over readelf for DWARF-specific work. Two implementations exist — libdwarf's dwarfdump and LLVM's llvm-dwarfdump — with different options, and a bare dwarfdump command may be either: check dwarfdump --version first. The options below are LLVM's.

On macOS, linked Mach-O executables do not carry DWARF: it stays in the .o files until dsymutil collects it into a .dSYM bundle. Point dwarfdump at the dSYM (or the object files), not the executable. pyelftools is ELF-only — for Mach-O scripted work, stay with the LLVM tools.

  • --all: dump every DWARF section; --debug-info, --debug-line, etc. dump one
  • --show-children [--recurse-depth=<n>]: include child DIEs when printing selected entries — parameters, locals, and struct members are children of function and type DIEs
  • --show-parents [--parent-recurse-depth=<n>]: include parent DIEs
  • --show-form: print attribute form types, for when encoding details matter
  • --find=<name>: exact-name lookup via the accelerator tables — fast but not exhaustive; fall back to --name when it misses
  • --name=<pattern> [--ignore-case] [--regex]: exhaustive DIE-name search
  • --lookup=<address>: find the DIE covering an address
  • --verbose: print low-level encoding detail

Searching DIEs

Escalate through these strategies as the query grows more complex:

  1. Name or address match: --find, then --name; --lookup for addresses.
  2. Attribute or type queries (e.g. all parameters of type float *): dump and filter. grep -B pulls in the header line carrying each DIE's offset: llvm-dwarfdump file | grep -B 5 "float \*" | grep DW_TAG_formal_parameter, then print each DIE at its offset with --debug-info=<offset> --show-children (--lookup takes a program address, not a DIE offset).
  3. Multi-attribute or structural queries: when grep pipelines turn brittle, write a Python script using pyelftools instead.

Verifying DWARF Integrity

  • llvm-dwarfdump --verify <binary>: structural checks (unit chains, DIE relationships, address ranges). --error-display=<quiet|summary|details|full> controls detail; --verify-json=<path> writes a machine-readable error summary; --quiet for exit-code-only checks.
  • llvm-dwarfdump --statistics <binary>: debug-info quality metrics as JSON — compare across compiler versions or optimization levels to catch regressions.

Verify after producing DWARF (compilers, binary rewriters), when a debugger misbehaves on a binary, and when developing DWARF tooling against known-good files.

When a current-generation compiler emitted an old DWARF version, the build explicitly passed -gdwarf-N — modern gcc and clang default to v4/v5, so check the build system rather than assuming a toolchain default. GCC embeds its flags in DW_AT_producer, so the pin is often readable right there; clang's producer string carries no flags. Old versions remain common in the wild and read the same way apart from surface forms: in v2 output, member offsets appear as location expressions (DW_OP_plus_uconst) and linkage names as DW_AT_MIPS_linkage_name.

readelf

For general ELF structure, or when dwarfdump is unavailable:

  • --debug-dump=<section>: dump a DWARF section (info, line, ...)
  • --dwarf-depth=<n> / --dwarf-start=<n>: limit DIE depth / start offset

Writing Code That Parses DWARF

Prefer an existing library over parsing by hand:

Library Language Notes
libdwarf C/C++ github.com/davea42/libdwarf-code — low-level; used to implement dwarfdump
pyelftools Python github.com/eliben/pyelftools — also parses ELF in general
gimli Rust github.com/gimli-rs/gimli — pair with object to load container files
debug/dwarf Go standard library
LibObjectFile .NET github.com/xoofx/LibObjectFile — also handles ELF/PE object files

Default to Python with pyelftools for one-off scripts unless the task dictates otherwise.

DWARF-specific pitfalls to handle — and to check for when reviewing DWARF code:

  • Attributes are optional: a DIE may omit DW_AT_name, DW_AT_type, ranges, etc.
  • Attribute indirection: a DIE's attributes may live on the DIE referenced by its DW_AT_abstract_origin (inlined instances) or DW_AT_specification (out-of-line definitions) — resolve the chain before concluding data is absent.
  • Type chains: qualifiers and modifiers (DW_TAG_const_type, DW_TAG_pointer_type, ...) wrap the underlying type; walk DW_AT_type links to reach the base type.

Reproducido de trailofbits/skills bajo licencia CC-BY-SA-4.0. Leer esta página en markdown.

Archivos

3 archivos en el paquete. Solo se lee SKILL.md al activarse — las referencias se cargan si el skill decide que las necesita.

Antes de instalar

Requiere dwarfdump, llvm-dwarfdump o readelf instalados, y pyelftools/libdwarf/gimli según el lenguaje elegido para scripting.

Detalles

Licencia
CC-BY-SA-4.0
Recursos incluidos
Incluye scripts o referencias
Código fuente
Ver SKILL.md

Etiquetas

Más de trailofbits/skills

Este repo incluye 86 skills. Si instalas uno, normalmente ya tienes los demás. Ver el pack skills entero y su comando de instalación

Selecciona slices de código acotados y basados en grafos con Trailmark, y delega tareas de análisis o propuesta de parches a un subagente más pequeño sin exponer todo el repositorio.

Costo de contexto al activarse
2.1k tok
Tamaño del paquete
8 archivos
Última actualización
el mes pasado
Oficialherramientas desarrollo

Guía la redacción de reglas de detección YARA-X de alta calidad para identificar malware: nomenclatura, selección de strings, rendimiento, migración y reducción de falsos positivos.

Costo de contexto al activarse
6.2k tok
Tamaño del paquete
22 archivos
Última actualización
el mes pasado
Oficialseguridad

Detecta la falta de zeroización de datos sensibles y la eliminada por optimizaciones del compilador, con análisis de ensamblador y verificación de flujo de control. Para auditar C/C++/Rust con secretos.

Costo de contexto al activarse
6.7k tok
Tamaño del paquete
50 archivos
Última actualización
hace 28 días
Oficialseguridad

Mejora la cobertura y precisión del análisis de taint reparando modelos nativos de source, sink, sanitizador, propagación y tipos con grafos de Trailmark, y luego ejecuta el analizador existente.

Costo de contexto al activarse
2.4k tok
Tamaño del paquete
49 archivos
Última actualización
hace 18 días
Oficialseguridad

Genera cadenas de vector CVSS v4.0 a partir de descripciones de vulnerabilidades en texto plano, evaluando sistemáticamente las métricas base. Úsalo al puntuar una vulnerabilidad o estimar su severidad.

Costo de contexto al activarse
3.8k tok
Tamaño del paquete
4 archivos
Última actualización
hace 24 días
Oficialseguridad

Ejecuta un escaneo de seguridad con Semgrep: detecta lenguajes, selecciona rulesets, pide aprobación explícita del plan y corre todo con scripts/run-scans.sh, fusionando la salida en SARIF.

Costo de contexto al activarse
3.9k tok
Tamaño del paquete
9 archivos
Última actualización
el mes pasado
Oficialseguridad

Skills relacionados

Crea skills nuevos, modifica y mejora los existentes, y mide su rendimiento. Úsalo para crear un skill desde cero, editarlo, correr evals, o afinar su descripción para que dispare mejor.

Costo de contexto al activarse
8.3k tok
Tamaño del paquete
18 archivos
Última actualización
hace 7 meses
Oficialherramientas desarrollo

Plantilla vacía del repositorio de skills de Anthropic: frontmatter de relleno y un encabezado. Es un punto de partida para copiar, no un skill que se pueda ejecutar.

Costo de contexto al activarse
35 tok
Tamaño del paquete
1 archivo
Última actualización
hace 12 meses
Oficialherramientas desarrollo

Conjunto de herramientas para crear artefactos HTML elaborados y multi-componente para claude.ai con React, Tailwind CSS y shadcn/ui. No es para artefactos simples de un solo archivo.

Costo de contexto al activarse
772 tok
Tamaño del paquete
5 archivos
Última actualización
hace 7 meses
Oficialherramientas desarrollo