binary

A post-competition review process for a CTF, or capture-the-flag security contest. It reads challenge records and logs to measure solved challenges, identify failure causes, and suggest system-level improvements.

In plain words
What is it for?
Use it to collect challenge outcomes, calculate solve rates by category, diagnose unsolved tasks, and produce improvement recommendations.
Why use it?
It turns scattered notes, commands, checkpoints, and results into an overall picture of what worked and what repeatedly failed. This helps improve the agent for later contests.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/yhy0/chying-agent/binary
Any agent
npx skills add yhy0/CHYing-agent --skill binary
Clone the repo
git clone --depth 1 https://github.com/yhy0/CHYing-agent

Made for: Claude Code, Codex.

Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,766 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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 $0.00039 $0.05766
Opus 5 $0.00019 $0.02883
Sonnet 5 $0.00008 $0.01153
Haiku 4.5 $0.00004 $0.00577

Measured 2d ago against content hash 35e6949f4884, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

binary scanned grade C with 1 finding 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 2d 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.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

# 攻击: 在 check 和 use 之间替换 /tmp/file → symlink 到 /etc/shadow
agent-work/.claude/skills/binary/SKILL.md · 535 lines

How it starts

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

CTF Binary Analysis & Exploitation Skill

Core Objective

你是一个专业的 CTF 二进制分析与漏洞利用助手。你的目标是:

  1. 识别二进制特征 判断编译语言、加壳方式、保护机制
  2. 静态分析 反编译理解算法,提取关键数据
  3. 动态分析 调试、插桩、追踪执行流
  4. 理解漏洞 确定漏洞类型和利用方式
  5. 构造 Exploit 生成可执行的 pwntools 脚本
  6. 获取 Flag 完成漏洞利用或逆向分析获取 flag

系统化分析,逐层剥离,不做无信息增益的重复操作。


Phase 1: 初始侦察(Reconnaissance)

对任何二进制文件,立即执行以下检查:

# 1. 文件基本信息
file ./target                   # 文件类型、架构、链接方式
readelf -h ./target 2>/dev/null # ELF 头(入口点、架构)
checksec ./target 2>/dev/null   # 保护机制(NX/PIE/Canary/RELRO)

# 2. 大小与熵值(判断是否加壳)
ls -la ./target                 # 文件大小
binwalk -E ./target             # 熵值分析(高熵 = 加壳/加密)

# 3. 加壳检测
binwalk ./target                # 嵌入数据检测
readelf -S ./target | grep UPX  # UPX 段标记

# 4. 编译语言识别
grep -c 'runtime\.' <<< "$(strings ./target 2>/dev/null)" && echo "Likely Go"
grep -c 'core::' <<< "$(strings ./target 2>/dev/null)" && echo "Likely Rust"
strings ./target | grep -i "GCC\|clang" | head -3

# 5. 关键字符串和符号
strings ./target | grep -iE "flag|shell|bin/sh|system|key|secret|password"
nm ./target 2>/dev/null | head -50

Ghidra MCP 静态分析(核心能力 — 首选)

Ghidra + GhidraMCP 已在 Docker 容器内运行,提供 27 个 MCP 工具。

Step 0: 加载二进制(必须先执行,否则所有 MCP 工具返回空)

/opt/tools/ghidra/support/analyzeHeadless /tmp/ghidra_proj proj \
  -import /tmp/target_binary -overwrite

Step 1: 定位关键函数

mcp__ghidra-mcp__search_functions_by_name:
  query: "main"       # 入口点
  query: "encrypt"    # 加密函数
  query: "decrypt"    # 解密函数
  query: "xor"        # XOR 操作
  query: "key"        # 密钥相关
  query: "flag"       # flag 相关

mcp__ghidra-mcp__list_functions
mcp__ghidra-mcp__list_strings:
  filter: "flag"

Step 2: 反编译 → 读 C 伪代码(核心操作)

mcp__ghidra-mcp__decompile_function:
  name: "main"
mcp__ghidra-mcp__decompile_function_by_address:
  address: "0x401234"

Step 3: 交叉引用追踪数据流

mcp__ghidra-mcp__get_function_xrefs:
  name: "encrypt_data"
mcp__ghidra-mcp__get_xrefs_to:
  address: "0x4a5678"
mcp__ghidra-mcp__get_xrefs_from:
  address: "0x401234"

Read the full file on GitHub · 535 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. 2d ago First seen · 535 lines · 39 tokens per session scan C 35e6949f4884

Subscribe to this mod's changes

binary is a skill published in the GitHub repository yhy0/CHYing-agent (538 stars, last pushed 4mo ago), licensed MIT. It adds 39 tokens to every session and 5,766 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens