Skip to content
SkillMixed5,083 tokens in use

ctf-pwn

A quick reference for binary exploitation CTF challenges: stack and heap bugs, ROP, format strings, kernel and sandbox topics, with pwntools templates.

3,753 stars on the repository MIT Licenseljagiello/ctf-skills · ctf-pwn
npx skills add ljagiello/ctf-skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing ctf-pwn costs

123tokens idle
5,083tokens in use
152,331tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Mixed

Script-ledMixedModel-led

Scripts do part of the work and the model's judgement does the rest.

This describes the skill's structure, how much of it is scripts. It does not say how well it works. Scripts: scripts/fmtstr_payload_suite.py, scripts/ret2libc_two_stage.py, scripts/seccomp_orw_generator.py, scripts/shellcraft_asm.py, scripts/srop_execve.py.

Touches

shelldeclared and detectednetworkdeclared and detectedwrites filesdeclared and detected

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Good
  • Frontmatter15/15
  • Structure25/25
  • Examples12/15
  • Output10/15
  • Size11/15
  • Resources4/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent
  • Reaches the network−5

    does this on the machine, as the frontmatter declares

    SKILL.md, line 20
  • Runs shell commands−2

    does this on the machine, as the frontmatter declares

    SKILL.md, line 20
  • Writes files−4

    does this on the machine, as the frontmatter declares

    scripts/seccomp_orw_generator.py, line 47

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity88
  • Maintenance48
  • Community56
  • Maturity32
  • Momentum40

ctf-pwn is the binary exploitation skill of the ctf-skills collection. It gives an agent an index of memory corruption topics for capture-the-flag challenges where a vulnerable native program or service is already identified, together with pwntools template scripts and a set of past challenge writeups.

The main file covers source code red flags, race conditions, protection implications, stack overflows, ROP chain building, format strings, kernel work and sandbox escape. Reference files cover heap techniques, kernel topics, advanced primitives and an attack playbook.

What You Get

  • A prerequisites list with pinned pwntools and ROP tool versions
  • Quick-start commands and a list of source code red flags
  • Five pwntools template scripts with generator-style payloads for ret2libc, SROP, shellcraft, format string and seccomp cases
  • Reference files on heap, format string, ROP, kernel, sandbox escape and advanced primitives
  • A folder of writeups for a set of pwn practice challenges

Common Use Cases

  • Choosing an approach for a challenge binary from its protections and bug type
  • Starting from a template script and adapting offsets and gadgets for a challenge target
  • Reading a heap technique reference while working on a menu-style challenge
  • Looking up kernel exploitation topics for a kernel module challenge

What Makes It Unique

The skill combines a topic index with runnable pwntools templates and a large set of written-up challenges, and it states how each mitigation changes the plan. It also names the stage at which the reverse engineering skill should come first.

Under The Hood

The skill ships five Python template scripts that use pwntools to start a local process or connect to a host and port given as arguments, send payloads and open an interactive session. The instructions tell the agent to install tools with pip, apt, Homebrew and gem, run debuggers and exploit scripts against challenge binaries and remote challenge services, and in some entries run commands on a compromised challenge target to read the flag. Its frontmatter allows shell, file writes, web fetch and web search. The material is written for competition and practice targets.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers