Agent Skillsbuzzer-re/Rikugan › Vulnerability Audit

Vulnerability Audit

GitHub

用于二进制漏洞审计的 Skill,通过映射攻击面、追踪输入和识别特定漏洞类(如缓冲区溢出、格式字符串等),生成包含根因、影响及证据的详细安全报告。

rikugan/skills/builtins/vuln-audit/SKILL.md buzzer-re/Rikugan

Trigger Scenarios

需要审计二进制文件的安全性 检测内存安全或注入类漏洞

Install

npx skills add buzzer-re/Rikugan --skill Vulnerability Audit -g -y
More Options

Non-standard path

npx skills add https://github.com/buzzer-re/Rikugan/tree/main/rikugan/skills/builtins/vuln-audit -g -y

Use without installing

npx skills use buzzer-re/Rikugan@Vulnerability Audit

指定 Agent (Claude Code)

npx skills add buzzer-re/Rikugan --skill Vulnerability Audit -a claude-code -g -y

安装 repo 全部 skill

npx skills add buzzer-re/Rikugan --all -g -y

预览 repo 内 skill

npx skills add buzzer-re/Rikugan --list

SKILL.md

Frontmatter
{
    "name": "Vulnerability Audit",
    "tags": [
        "vulnerability",
        "security",
        "audit",
        "exploit"
    ],
    "description": "Security audit — buffer overflows, format strings, integer issues, memory safety"
}

Task: Security Vulnerability Audit. You are auditing a binary for exploitable vulnerabilities.

Approach

Systematic, evidence-based. Every finding needs: location (address), root cause, impact assessment, and proof from the decompiled code.

Phase 1: Attack Surface Mapping

  1. list_imports — identify dangerous APIs:
    • Memory: memcpy, memmove, strcpy, strncpy, sprintf, vsprintf, gets
    • Format strings: printf, fprintf, syslog, snprintf with user-controlled format
    • Heap: malloc, free, realloc (use-after-free, double-free)
    • File I/O: fopen, CreateFile, read, write (path traversal)
    • Network: recv, recvfrom, WSARecv (remote input)
    • Command: system, popen, execve, ShellExecute (command injection)
  2. list_exports — identify entry points accessible to attackers
  3. search_strings — look for format strings, SQL patterns, command templates

Phase 2: Input Tracing

For each dangerous API found:

  1. xrefs_to on the import — find all call sites
  2. decompile_function on each caller
  3. Trace backwards: where does the buffer/size/format argument come from?
  4. Is it user-controlled? (network input, file input, IPC, environment)
  5. Are there bounds checks between input and dangerous API?

Phase 3: Vulnerability Classes

Buffer Overflow (Stack)

  • Fixed-size stack buffer + unbounded copy (strcpy, sprintf, gets)
  • Size parameter larger than destination buffer
  • Off-by-one in loop bounds writing to stack buffer

Buffer Overflow (Heap)

  • malloc(user_size) without upper bound check
  • memcpy into heap buffer with unchecked length
  • Integer overflow in size calculation → small allocation, large copy

Format String

  • printf(user_input) without format specifier
  • syslog, fprintf with attacker-controlled first argument

Integer Overflow/Underflow

  • Arithmetic on user-controlled sizes before allocation
  • Signed/unsigned comparison mismatches in bounds checks
  • Multiplication overflow in array index calculations

Use-After-Free

  • free() followed by continued use of the pointer
  • Dangling pointers in linked structures after partial cleanup
  • Race conditions in multi-threaded free/use paths

Command Injection

  • system() / popen() with string concatenation from user input
  • ShellExecute with user-controlled arguments

Type Confusion

  • Cast between incompatible struct types
  • Virtual function table corruption paths
  • Union member access after wrong variant initialization

Phase 4: Report

For each finding:

[SEVERITY] Vulnerability Type at 0xADDRESS
Function: function_name
Root cause: <description>
Input path: <how attacker-controlled data reaches the vulnerable point>
Impact: <what an attacker can achieve>
Evidence: <relevant decompiled code snippet>

Severity levels: CRITICAL (remote code execution), HIGH (local code execution, info leak), MEDIUM (DoS, limited info leak), LOW (theoretical, requires unlikely conditions).

Version History

  • ee3951d Current 2026-07-25 11:01

Same Skill Collection

rikugan/skills/builtins/binja-scripting/SKILL.md
rikugan/skills/builtins/ctf/SKILL.md
rikugan/skills/builtins/deobfuscation/SKILL.md
rikugan/skills/builtins/driver-analysis/SKILL.md
rikugan/skills/builtins/generic-re/SKILL.md
rikugan/skills/builtins/ida-scripting/SKILL.md
rikugan/skills/builtins/linux-malware/SKILL.md
rikugan/skills/builtins/malware-analysis/SKILL.md
rikugan/skills/builtins/modify/SKILL.md
rikugan/skills/builtins/smart-patch-binja/SKILL.md
rikugan/skills/builtins/smart-patch-ida/SKILL.md

Metadata

Files
0
Version
ee3951d
Hash
047a0c92
Indexed
2026-07-25 11:01

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-22 03:48
浙ICP备14020137号-1 $mapa de visitantes$