agentleFS
dcbzdcbz/exploit_skillz/find-bugs/SKILL.md

find-bugs

Skill3 starsChanged 8 months agoMITView on GitHub

Use when performing security audits, vulnerability research, or searching for 0-day vulnerabilities in C/C++ codebases. Guides systematic analysis of attack surfaces, data flow, memory corruption, concurrency bugs, and exploitability assessment.

19 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use upstash-qstash, c-pro and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • xfstudioSkill

    upstash-qstash

    Upstash QStash expert for serverless message queues, scheduled jobs, and reliable HTTP-based task delivery without managing infrastructure. Use when: qstash, upstash queue, serverless cron, scheduled http, message queue serverless.

    Also in 5 projects that use this

  • xfstudioSkill

    c-pro

    Write efficient C code with proper memory management, pointer

    Also in 4 projects that use this

  • +10 more from xfstudio

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not jump directly to conclusions

    line 13
  2. Distinctive:

    Follow the structured 9-step methodology below

    line 14
  3. Distinctive:

    Look for entry points such as:

    line 25
  4. Distinctive:

    Look for issues such as:

    line 146
  5. Distinctive:

    Consider how attacker input could influence heap allocations and object placement.

    line 169
  6. Distinctive:

    Look for situations where attacker-controlled input determines:

    line 171
  7. Distinctive:

    Look for logic-level vulnerabilities that may have security implications.

    line 197

“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Security Vulnerability Research Methodology

Systematic approach for analyzing C/C++ codebases to discover remotely exploitable vulnerabilities.

Objective: Identify vulnerabilities that could lead to memory corruption, information disclosure, denial of service, or remote code execution.

Philosophy:

  • Do not jump directly to conclusions
  • Follow the structured 9-step methodology below
  • Explain reasoning at each stage
  • Focus on code paths reachable from untrusted input
  • Trace how attacker-controlled data propagates through the system

STEP 0 -- Map trust boundaries and attack surface

First identify all potential sources of untrusted input in the codebase.

Look for entry points such as:

  • network sockets
  • RPC handlers
  • HTTP handlers
  • IPC mechanisms
  • protocol parsers
  • file format parsers
  • message serialization/deserialization
  • CLI arguments or environment variables
  • shared memory interfaces
  • plugin interfaces

For each entry point:

  1. Identify where attacker-controlled data first enters the system.
  2. Determine whether the input is directly attacker-controlled or indirectly influenced.
  3. Identify any validation or sanitization performed at the boundary.

Produce a list of externally reachable code paths that process untrusted input.


STEP 1 -- Trace attacker-controlled data flow

For each entry point, trace how attacker-controlled data propagates through the system.

Focus on:

  • parameters passed across functions
  • structures populated with user data
  • buffers allocated based on attacker input
  • parsing routines
  • protocol handlers
  • memory allocation sizes derived from user input

Track how the data influences:

  • memory allocations
  • pointer arithmetic
  • loop bounds
  • array indexing
  • object lifetimes
  • synchronization decisions

Pay attention to implicit trust assumptions where data is validated once but later reused without verification.


STEP 2 -- Identify memory corruption opportunities

Analyze code paths for vulnerabilities that could cause memory safety violations.

Prioritize the following classes.

Stack memory corruption:

  • stack buffer overflows
  • unsafe use of fixed-size buffers
  • incorrect bounds checking before memcpy/memmove/strcpy-style operations

Heap memory corruption:

  • heap buffer overflows
  • out-of-bounds writes
  • out-of-bounds reads
  • use-after-free
  • double free
  • corrupted object lifetimes

Integer-related issues:

  • integer overflow or underflow
  • signed/unsigned mismatches
  • multiplication overflows when calculating allocation sizes
  • truncation when casting sizes

Type safety issues:

  • type confusion
  • unsafe casts between incompatible structures
  • reinterpretation of attacker-controlled data as structured objects

For each suspected vulnerability:

  1. Explain how the bug occurs.
  2. Identify the exact code locations involved.
  3. Describe the attacker-controlled inputs that influence the vulnerable operation.

STEP 3 -- Analyze concurrency and race conditions

Inspect the code for race conditions involving attacker-controlled data.

Focus on:

  • time-of-check to time-of-use (TOCTOU)
  • races affecting object lifetimes
  • reference counting races
  • synchronization errors affecting permissions or state
  • data races between threads accessing shared objects

Pay particular attention to cases where:

  • validation occurs in one thread
  • the validated object is used in another thread
  • attacker-controlled state may change between check and use

For each race condition:

  1. Explain the race window.
  2. Identify the shared data involved.
  3. Describe how an attacker could influence the timing.

STEP 4 -- Inspect input parsing logic

Carefully analyze parsing logic for inconsistencies.

Look for issues such as:

  • unsafe deserialization
  • parser state confusion
  • mismatched length fields
  • trusting attacker-provided sizes
  • signed vs unsigned mismatches
  • incomplete validation of nested structures
  • implicit assumptions about message structure

Focus on cases where parsed lengths are later used to:

  • allocate memory
  • copy buffers
  • index arrays
  • advance pointers through buffers

Explain how malformed input could violate these assumptions.


STEP 5 -- Analyze heap layout manipulation opportunities

Consider how attacker input could influence heap allocations and object placement.

Look for situations where attacker-controlled input determines:

  • allocation size
  • allocation frequency
  • allocation ordering
  • object lifetime

Identify opportunities where attackers may:

  • shape heap layout
  • force specific objects to be adjacent
  • trigger reuse of freed memory
  • cause partial overwrites of nearby objects

Evaluate whether corrupted heap objects could affect:

  • control flow
  • pointer dereferences
  • callback structures
  • vtables
  • reference counters

STEP 6 -- Identify logic flaws with security impact

Look for logic-level vulnerabilities that may have security implications.

Examples include:

  • authentication bypass
  • authorization bypass
  • incorrect permission checks
  • trust boundary violations
  • assumptions about caller identity
  • improper bounds validation
  • accepting attacker-controlled identifiers without verification

Explain how these flaws could be triggered remotely.


STEP 7 -- Evaluate exploitability

For each potential vulnerability:

  1. Identify the source of attacker-controlled input.
  2. Trace the propagation path through the code.
  3. Explain why the issue may be remotely reachable.
  4. Point to the exact code locations involved.
  5. Explain the conditions required to trigger the bug.

Assess whether the vulnerability could realistically lead to:

  • remote code execution
  • memory corruption
  • information disclosure
  • denial of service

Prioritize issues that have clear exploitation potential.


STEP 8 -- Suggest fuzzing strategies

For promising targets, suggest ways the vulnerability could be triggered through testing.

Examples include:

  • protocol fuzzing
  • structure-aware fuzzing
  • mutation of length fields
  • nested structure fuzzing
  • stateful protocol fuzzing
  • concurrency fuzzing

Explain which parts of the input format should be mutated and why.


STEP 9 -- Iterative investigation

Work iteratively.

For each suspected vulnerability:

  1. explain the hypothesis
  2. analyze the relevant code paths
  3. consider alternate interpretations
  4. attempt to disprove false positives

Focus on findings that could realistically lead to remotely exploitable vulnerabilities.

Maintain structured reasoning throughout the analysis.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.