pwn-libc

pwn-libc is a command for Claude Code from allsmog/pwn-claude-plugin. It costs 12 tokens per session (980 once invoked), scanned A, original, MIT.

A command that identifies a Linux libc version from leaked addresses of known functions. Libc is a core system library whose exact version matters when analyzing binary exploits.

In plain words
What is it for?
It is for entering leaked addresses such as puts or printf, finding matching libc versions, and showing related offsets and exploit-useful information.
Why use it?
It narrows down which library matches the leaked address endings, avoiding manual comparison during exploit research.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the pwn-htb plugin — 7 skills, 16 commands, 3 agents, 2 hooks shipped together

Good fit It is for entering leaked addresses such as puts or printf, finding matching libc versions, and showing related offsets and exploit-useful information.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/allsmog/pwn-claude-plugin/pwn-libc
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.

Clone the repo
git clone --depth 1 https://github.com/allsmog/pwn-claude-plugin

Made for: Claude Code.

Or install pwn-htb, the plugin that ships this one along with the rest of its 7 skills, 16 commands, 3 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pwn-libc

README.md
[![agentmods](https://agentmods.dev/badge/commands/allsmog/pwn-claude-plugin/pwn-libc/github.svg)](https://agentmods.dev/commands/allsmog/pwn-claude-plugin/pwn-libc)
Your own site
<a href="https://agentmods.dev/commands/allsmog/pwn-claude-plugin/pwn-libc"><img src="https://agentmods.dev/badge/commands/allsmog/pwn-claude-plugin/pwn-libc/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pwn-libc

Your own site · 80×15
<a href="https://agentmods.dev/commands/allsmog/pwn-claude-plugin/pwn-libc"><img src="https://agentmods.dev/badge/commands/allsmog/pwn-claude-plugin/pwn-libc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 980 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00012 $0.00980
Opus 5 $0.00006 $0.00490
Sonnet 5 $0.00002 $0.00196
Haiku 4.5 $0.00001 $0.00098

Measured 8d ago against content hash f8acae97ee42, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

pwn-libc scanned grade A 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 8d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s "https://libc.rip/api/find" \
pwn-htb/commands/pwn-libc.md · 136 lines

How it starts

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

PWN Libc - Libc Identification

Identify the remote libc version from leaked function addresses.

Usage

/pwn-libc puts=0x7f1234567890 printf=0x7f1234512340

Execution Steps

Step 1: Parse Leaked Addresses

Extract function name and address pairs from arguments. Calculate the last 12 bits (3 hex digits) for each.

Example:

  • puts=0x7f1234567210 → offset ends in 210
  • printf=0x7f1234512340 → offset ends in 340

Step 2: Query Libc Database

Option 1: Online (libc.blukat.me)

Query https://libc.blukat.me/ with the offsets.

Option 2: libc.rip API

curl -s "https://libc.rip/api/find" \
  -H "Content-Type: application/json" \
  -d '{"symbols": {"puts": "210", "printf": "340"}}'

Option 3: Local libc-database

cd ~/libc-database
./find puts 210 printf 340

Step 3: Display Results

Show matching libc versions with:

  • Libc identifier/name
  • Download URL if available
  • Key offsets (system, /bin/sh, one_gadget)

Step 4: Generate Exploit Snippet

Provide code to use the identified libc:

from pwn import *

# Identified libc: libc6_2.31-0ubuntu9_amd64
libc = ELF('./libc6_2.31-0ubuntu9_amd64.so')

# Leaked address
puts_leak = 0x7f1234567210

# Calculate base
libc.address = puts_leak - libc.symbols['puts']
log.success(f"libc base: {hex(libc.address)}")

# Key addresses
system = libc.symbols['system']
bin_sh = next(libc.search(b'/bin/sh'))

Output Format

## Libc Identification

### Input
- puts: 0x7f1234567210 (offset: 0x210)
- printf: 0x7f1234512340 (offset: 0x340)

### Matches Found
| Libc | Confidence |
|------|------------|
| libc6_2.31-0ubuntu9.7_amd64 | 2/2 symbols |
| libc6_2.31-0ubuntu9.9_amd64 | 2/2 symbols |

### Recommended: libc6_2.31-0ubuntu9.7_amd64

#### Key Offsets
- system: 0x4fa60
- execve: 0xe62f0
- /bin/sh: 0x1b45bd
- __free_hook: 0x1eeb28
- __malloc_hook: 0x1ecb70

#### One Gadgets

0xe3b2e execve("/bin/sh", r15, r12) constraints: [r15] == NULL || r15 == NULL, [r12] == NULL || r12 == NULL

Read the full file on GitHub · 136 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. 8d ago First seen · 136 lines · 12 tokens per session scan A f8acae97ee42

Subscribe to this mod's changes

pwn-libc is a command published in the GitHub repository allsmog/pwn-claude-plugin (2 stars, last pushed 6mo ago), licensed MIT. It adds 12 tokens to every session and 980 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.