Systematic methodology for finding novel, undisclosed vulnerabilities in source code, compiled
binaries, and live systems. This skill guides the research process from intelligence gathering
through proof-of-concept development to responsible disclosure.
This is the discovery skill - it finds vulnerabilities nobody has catalogued yet. For
exploiting known weaknesses on live systems, use lockpick. For scanning code against known
vulnerability patterns, use security-audit.
Target versions: May 2026 snapshot. Read references/target-versions.md before
pinning static analysis, reversing, fuzzing, or debugger tooling.
When to use
Hunting for undisclosed vulnerabilities in a codebase, binary, or running service
Variant analysis after a CVE is published (finding similar bugs in related code)
Patch diffing - analyzing what a security update fixed to find nearby issues
Developing proof-of-concept exploits for discovered vulnerabilities
Attack surface mapping before a focused security engagement
Gathering threat intelligence on a target's technology stack
Preparing responsible disclosure reports
Bug bounty target assessment and prioritization
Auditing your own projects for novel vulnerability classes
Hunting for cloud-native vulnerabilities (IAM, IMDS, cross-tenant isolation, serverless)
When NOT to use
Scanning for known vulnerability patterns or OWASP top 10 (use security-audit)
Post-exploitation privilege escalation or lateral movement (use lockpick)
General code correctness review or bug finding (use code-review)
Hardening containers, Kubernetes, or infrastructure (use kubernetes, docker, terraform)
Network firewall configuration or tuning (use firewall-appliance)
Without authorization from the target owner (own repos, bug bounty scope, or written permission)
AI Self-Check
Before reporting any vulnerability or generating exploit code, verify:
Authorization confirmed: own repo, active bug bounty program, or written permission
Scope respected: target is within authorized boundary (specific repos, domains, IPs)
Novel finding: verified this isn't already a known CVE or public advisory (cross-check Phase 0 intelligence gathering - NVD, oss-security, GitHub advisories, searchsploit)
Reproducible: PoC demonstrates the issue reliably, not a theoretical concern
Impact assessed: clear description of what an attacker gains (not just "crash")
Root cause identified: the underlying flaw, not just the symptom
No collateral damage: PoC doesn't destroy data, DoS production, or affect other users
Disclosure plan: findings destined for responsible disclosure, not public dump
Evidence preserved: all analysis steps documented for reproducibility
Complexity honest: if exploitation requires unlikely conditions (specific config, race window, chained bugs), state that clearly - don't inflate impact
Current source checked: dated versions, CLI flags, API names, and support windows are verified against primary docs before repeating them
Hidden state identified: local config, credentials, caches, contexts, branches, cluster targets, or previous runs are made explicit before acting
Verification is real: final checks exercise the actual runtime, parser, service, or integration point instead of only linting prose or happy paths
Authorization and disclosure scope checked: targets, reproduction, and reporting stay within authorized research boundaries
PoC safety reviewed: proof code demonstrates impact without avoidable persistence, exfiltration, or wormable behavior
Performance
Minimize repro cases before deep fuzzing so crashes triage quickly.
Deduplicate crashes by stack, root cause, and patch reachability before reporting counts.
Use coverage and corpus metrics to guide fuzzing time instead of running blind indefinitely.
Best Practices
Capture exact versions, build flags, inputs, logs, and debugger state for every candidate finding.
Separate exploitability analysis from speculation; mark uncertainty clearly.
Follow the target project's disclosure policy and avoid publishing operational exploit detail prematurely.
Workflow
Phase 0: Intelligence Gathering
Before touching code or binaries, understand what you're looking at and what the community
already knows. This phase determines where to focus.
Advisory and feed monitoring:
# Recent CVEs for a specific product/vendor
# NVD API (no key needed for basic queries)
curl -s "https://services.nvd.nist.gov/rest/json/cves/2.0?keywordSearch=TARGET_NAME&resultsPerPage=20" | python3 -m json.tool | head -100
# GitHub Security Advisories for a repo
# Adapt ecosystem param: NPM, PIP, GO, MAVEN, NUGET, RUBYGEMS, RUST, etc.
gh api graphql -f query='{ securityVulnerabilities(first:20, ecosystem:NPM, package:"TARGET") { nodes { advisory { summary severity publishedAt } vulnerableVersionRange } } }'
# Exploit-DB search
searchsploit TARGET_NAME 2>/dev/null || echo "searchsploit not installed (apt install exploitdb)"
Community sources to check (use web search):
oss-security mailing list - where researchers post before/alongside CVEs
Full Disclosure - uncoordinated disclosures, PoCs
r/netsec, r/ReverseEngineering, Hacker News - community discussion, writeups, early signal
Project-specific bug trackers - Chromium, Firefox, Linux kernel, etc.
Vendor security bulletins - Microsoft Patch Tuesday, Apple security updates, etc.
Twitter/X - #0day, #bugbounty, researcher accounts, vendor security teams
Unfixed issues in bug trackers marked as security-sensitive
Proceed to Phase 1 when: you have a clear picture of recent CVEs, active research, and
community attention on the target or its ecosystem. If nothing comes up, that's still useful -
it means fewer known attack patterns to build on, so original research matters more.
Phase 1: Target Profiling
Understand the target before looking for bugs. The goal is to build a mental model of the
attack surface.
For source code repos:
# Language and framework breakdown
tokei . 2>/dev/null || (find . -name '*.py' -o -name '*.js' -o -name '*.ts' -o -name '*.c' \
-o -name '*.cpp' -o -name '*.go' -o -name '*.rs' -o -name '*.java' | head -50)
# Dependencies (attack surface via supply chain)
cat package.json requirements.txt go.mod Cargo.toml pom.xml 2>/dev/null | head -80
# Entry points - where external input enters the system
grep -rn 'app\.\(get\|post\|put\|delete\|patch\|use\)\|@app\.route\|@RequestMapping\|func.*http\.Handler\|#\[.*route\]' --include='*.py' --include='*.js' --include='*.ts' --include='*.go' --include='*.rs' --include='*.java' . 2>/dev/null | head -30
# Parser/deserializer locations (high-value targets)
grep -rn 'parse\|deserialize\|unmarshal\|decode\|from_bytes\|read_struct\|unpack' --include='*.py' --include='*.c' --include='*.cpp' --include='*.go' --include='*.rs' . 2>/dev/null | head -30
# Security-sensitive operations
grep -rn 'exec\|system\|popen\|eval\|spawn\|crypto\|encrypt\|decrypt\|hash\|sign\|verify\|auth\|token\|session\|cookie\|jwt' --include='*.py' --include='*.js' --include='*.ts' --include='*.go' --include='*.rs' . 2>/dev/null | head -40
# Git history - recent security-related changes
git log --oneline --all --grep='CVE\|vuln\|security\|fix\|patch\|overflow\|inject\|bypass\|sanitize' | head -20
Language-specific high-value targets (where memory corruption hides in "safe" languages):
Rust: unsafe blocks and FFI boundaries - memory corruption enters here
Go: import "C" (CGo) - C code behind Go interface, plus marshaling bugs
# PE headers and architecture (Visual Studio tools or dumpbin)
dumpbin /headers TARGET.exe | Select-String "machine|subsystem|entry point"
# Security mitigations - use PE-bear, winchecksec, or dumpbin
winchecksec.exe TARGET.exe # shows ASLR, DEP, CFG, ACG, CET, SEH, SafeSEH, GS
# Or manually via dumpbin:
dumpbin /headers TARGET.exe | Select-String "DLL characteristics"
# Look for: DYNAMIC_BASE (ASLR), NX_COMPAT (DEP), GUARD_CF (CFG), HIGH_ENTROPY_VA
# Imports - what DLLs and functions does it call?
dumpbin /imports TARGET.exe | Select-String "kernel32|ntdll|ws2_32|advapi32|shell32"
# Exports (for DLLs)
dumpbin /exports TARGET.dll
Read references/binary-analysis.md (Windows PE Analysis section) for Ghidra PE
import, x64dbg/WinDbg workflows, and Windows mitigation analysis.
For live systems:
# Open ports and services
nmap -sV -sC -p- TARGET_IP 2>/dev/null || ss -tulpn
# Service versions (version-specific vulns)
nmap -sV --version-intensity 5 -p PORTS TARGET_IP 2>/dev/null
# Web application fingerprinting
curl -sI https://TARGET/ | head -20
whatweb TARGET 2>/dev/null
# SSL/TLS analysis
testssl.sh TARGET:443 2>/dev/null || openssl s_client -connect TARGET:443 </dev/null 2>/dev/null | openssl x509 -noout -text | head -30
For cloud-hosted targets, also profile: IAM roles/policies attached to the workload,
metadata service version (IMDSv1 vs v2), managed services in use (RDS, Atlas, MSK, etc.),
cross-account trust relationships, and whether backends are directly reachable or gated
behind an API gateway. See references/vulnerability-classes.md section 9 for full patterns.
Build the attack surface map:
Component
Entry Points
Input Format
Trust Boundary
Priority
[service]
[endpoints]
[JSON/binary/etc]
[auth/unauth]
[H/M/L]
Priority is based on: unauthenticated > authenticated, parser/deserializer > business logic,
network-facing > local-only, complex input formats > simple ones.
Proceed to Phase 2 when: the attack surface map has at least one high-priority entry point.
If everything is low-priority, reconsider whether this target is worth deep analysis.
Phase 2: Vulnerability Class Selection
Based on the target profile, select which vulnerability classes to hunt. Don't search for
everything - pick 2-3 classes most likely to yield results given the target's language,
architecture, and attack surface.
Read references/vulnerability-classes.md for the full catalog organized by:
Web-specific (web apps) - novel XSS (mXSS, DOM clobbering), SSTI, prototype pollution chains, SSRF, path traversal, cache poisoning. For XSS sinks: treat sanitizer config as a taint sink - DOMPurify ALLOWED_TAGS/RETURN_DOM misconfig, custom sanitize() hooks, and React innerHTML injection patterns are common bypasses; a misconfigured sanitizer is itself a sink
Binary-specific (compiled) - format string bugs, heap metadata corruption, ROP/JOP gadget availability, signal handler races
When classes tie: prioritize by exploitability ceiling. Memory corruption and deserialization
yield RCE most reliably. Injection is next. Logic flaws require deeper understanding but produce
the most creative findings - pick these when the target has a complex state machine or multi-step
auth flow.
Proceed to Phase 3 when: you've selected 2-3 vulnerability classes and can articulate why
they fit this target's architecture and attack surface.
Phase 3: Deep Analysis
This is the core of the research. Pick one attack surface from Phase 1 and one vulnerability
class from Phase 2. Go deep, not wide.
If the first pick yields nothing: don't switch both variables at once. Change the
vulnerability class first (same attack surface, different class). If that fails too, change
the attack surface. Switching both simultaneously means you learned nothing from the first
attempt.
Source code - manual taint analysis:
Read references/taint-analysis.md for the full methodology. Summary:
Identify sources - where external/untrusted data enters (HTTP params, file reads, env vars, IPC, database results from user-controlled queries)
Identify sinks - where data causes impact (exec, SQL, file writes, memory operations, crypto operations, response bodies)
Trace every path from source to sink. For each path:
What sanitization/validation exists?
Can the sanitization be bypassed? (encoding tricks, type juggling, truncation)
Are there paths that skip sanitization entirely? (error handlers, fallback paths, admin routes)
Does the data pass through a transformation that changes its security properties? (base64, URL encoding, serialization)
Source code - variant analysis:
When a CVE is published for a component you're reviewing:
Read the advisory and patch diff
Identify the root cause pattern (not just the specific instance)
Search the codebase for the same pattern:
# CodeQL (if available) - write a query for the pattern
codeql query run --database=TARGET_DB path/to/variant-query.ql
# Semgrep - write a custom rule
semgrep --config path/to/variant-rule.yaml .
# Joern (code property graph) - query for dataflow pattern
joern --script path/to/variant-query.sc
# Manual grep for structural similarity
grep -rn 'PATTERN' --include='*.EXT' . | head -30
For each match, determine if the same exploit conditions exist
Binary analysis:
Read references/binary-analysis.md for the full methodology covering:
Static analysis - Ghidra/Rizin decompilation, function identification, cross-references
Patch diffing - BinDiff/Diaphora to compare pre-patch and post-patch binaries, identify fixed functions, understand the vulnerability class
Fuzzing - AFL++ harness writing, corpus selection, crash triage
System analysis:
Map every externally reachable service
Identify service versions and check for recent patches (recently patched = variant analysis target)
Examine custom/non-standard services more closely (less audited = more likely to have bugs)
Check for misconfigurations that expand attack surface (debug endpoints, unnecessary services, permissive CORS)
Hand off to lockpick if you find an exploitable vulnerability and want to demonstrate impact on the live system
Cloud-native analysis:
Read references/vulnerability-classes.md section 9 for the full catalog. Key methodology:
Enumerate IAM - map roles, policies, and trust relationships. Look for sts:AssumeRole
without ExternalId, wildcard permissions, and dangerous combos (iam:PassRole + service creation)
Test IMDS reachability - from every SSRF-capable endpoint, attempt metadata access.
Check IMDSv1 vs v2 enforcement. Even partial SSRF (no response body) can leak via DNS
Probe managed service isolation - can tenant A's credentials reach tenant B's resources?
Test across RDS instances, Kafka topics, K8s namespaces, S3 buckets
Audit serverless event sources - Lambda/Cloud Function triggers (S3, SNS, API Gateway,
Kafka) pass event payloads as untrusted input. Trace from event to sink like any other taint analysis
Check for direct backend access - bypass API gateways by hitting the backend service
URL directly. Many "protected" APIs are only protected by the gateway, not the service itself
Proceed to Phase 4 when: you have a specific, reproducible trigger condition for a
vulnerability. "This buffer can overflow" is not enough - you need the exact input or sequence
that causes it.
Phase 4: Proof of Concept
A vulnerability without a PoC is a theory. Build one.
PoC requirements:
Triggers the vulnerability reliably (not "sometimes crashes")
Demonstrates security impact (code execution, data leak, auth bypass - not just a crash dump)
Minimal - smallest possible input/sequence that triggers the bug
Self-contained - another researcher can reproduce it without your environment
Non-destructive - doesn't delete data, DoS production, or cause lasting damage
Before investing in a full exploit, check mitigations (checksec / winchecksec). Full
RELRO + PIE + canary + NX + CFI makes RCE impractical for most targets. A controlled crash
or info leak PoC is still valuable for disclosure.
PoC development patterns by vulnerability class:
Read references/exploit-patterns.md for detailed PoC templates covering:
Memory corruption - crafted input to trigger overflow, heap spray for reliability, ROP chain for code execution
Injection - payload that demonstrates data exfiltration or command execution
Logic flaw - step-by-step request sequence that bypasses intended controls
Deserialization - crafted serialized object with gadget chain
Crypto - script that recovers key material or forges signatures
SSRF/path traversal - request that reads internal resources or sensitive files
Cloud/IAM - demonstrate credential theft via IMDS, cross-tenant access, or privilege escalation via IAM policy chain
Testing the PoC:
Run against a local/lab copy of the target, never production
Verify it works on the latest unpatched version
Verify it fails on the patched version (if a patch exists)
Document exact versions, configurations, and prerequisites
Proceed to Phase 5 when: the PoC reliably demonstrates the vulnerability on the target
version in a lab environment.
Phase 5: Impact Assessment & Reporting
Assess impact using CVSS 4.0 base metrics:
Metric
Question
Attack Vector
Network, adjacent, local, or physical?
Attack Complexity
Any special conditions needed?
Privileges Required
None, low, or high?
User Interaction
None, passive, or active?
Confidentiality
None, low, or high impact?
Integrity
None, low, or high impact?
Availability
None, low, or high impact?
CVSS 4.0 also adds Subsequent System metrics (impact beyond the vulnerable component) and
Supplemental metrics (Automatable, Recovery, Provider Urgency). Include these when the
vulnerability affects systems beyond the immediate target.
# [TITLE]: [Brief description]
## Summary
[1-2 sentences: what the vulnerability is and why it matters]
## Affected Versions
- [product] [version range]
- Confirmed on: [exact version tested]
## Root Cause
[Technical explanation of the underlying flaw]
## Attack Scenario
[Step-by-step description of how an attacker exploits this]
## Proof of Concept
[Minimal reproduction steps or script]
## Impact
- CVSS 4.0 Base Score: [score] ([vector string])
- [What an attacker gains: RCE, data leak, auth bypass, DoS, etc.]
## Suggested Fix
[Recommended remediation approach]
## Timeline
- [date] - Vulnerability discovered
- [date] - Vendor notified via [channel]
- [date] - Vendor acknowledged
- [date] - Patch released (pending)
- [date] - Public disclosure (coordinated)
## Credit
[Researcher name/handle]
Responsible disclosure timeline:
Notify the vendor/maintainer immediately after confirming the vulnerability
Standard disclosure window: 90 days (Google Project Zero standard)
For actively exploited vulns: 7 days (expedited)
If vendor is unresponsive after 90 days: disclose with full details
Always check if the project has a SECURITY.md or security policy first
Tooling Quick Reference
Read references/tooling-quick-reference.md for the tool catalog, install paths,
and when to reach for each tool during source, binary, or live-system analysis.
Reference Files
references/vulnerability-classes.md - full vulnerability class catalog with detection patterns, common root causes, language-specific variants, and novel web vectors (mXSS, DOM clobbering, SSTI by engine, prototype pollution gadget chains)
references/taint-analysis.md - manual data flow analysis methodology for source code, with worked examples per language
references/exploit-patterns.md - proof-of-concept development templates by vulnerability class, with safety guidelines
references/tooling-quick-reference.md - tool catalog with install paths and best-fit usage notes
references/target-versions.md - May 2026 version snapshot for static analysis, reversing, fuzzing, and debugger tools
Output Contract
See skills/_shared/output-contract.md for the full contract.
Skill name: ZERO-DAY
Deliverable bucket:audits
Mode: conditional. When invoked to analyze, review, audit, or improve existing repo content, emit the full contract -- boxed inline header, body summary inline plus per-finding detail in the deliverable file, boxed conclusion, conclusion table -- and write the deliverable to docs/local/audits/zero-day/<YYYY-MM-DD>-<slug>.md. When invoked to answer a question, teach a concept, build a new artifact, or generate content, respond freely without the contract.
Severity scale:P0 | P1 | P2 | P3 | info (see shared contract; only used in audit/review mode).
Related Skills
security-audit - scans for known vulnerability patterns (OWASP, CVEs, misconfigs) using automated tools. Zero-day finds novel vulnerabilities through deep manual analysis. Use security-audit for breadth; use zero-day for depth. If security-audit finds something interesting, zero-day can investigate whether it's the tip of a larger iceberg.
lockpick - exploits vulnerabilities on live systems for privilege escalation and lateral movement. Zero-day discovers the vulnerabilities. Use zero-day to find the bug, lockpick to demonstrate exploitation on a live target. Zero-day's system mode hands off to lockpick once a vulnerability is confirmed.
code-review - finds correctness bugs (logic errors, race conditions). Zero-day finds security-relevant logic flaws. Overlap: a race condition is both a bug and potentially a vulnerability. Zero-day owns it when exploitability is the question.
networking - configures and troubleshoots network services. Zero-day may analyze these services for vulnerabilities but doesn't configure them.
Rules
Authorization is non-negotiable. Every target requires explicit authorization: own repos, active bug bounty programs with published scope, or written permission from the system owner. "It's open source" does not mean "I can attack their infrastructure."
Responsible disclosure by default. Findings go to the vendor/maintainer first. Follow the project's SECURITY.md if one exists. Standard 90-day disclosure window. Never drop 0-day publicly without giving the vendor a chance to patch.
PoC must be non-destructive. Proof of concepts demonstrate the vulnerability without causing lasting damage. No data destruction, no persistent backdoors, no denial of service against production systems.
Depth over breadth. Pick a specific attack surface and vulnerability class. Go deep. A thorough analysis of one parser beats a shallow scan of the whole codebase. Automated scanning is security-audit's job.
Verify before reporting. Every claimed vulnerability must have a working PoC or a clear, reproducible trigger condition. Theoretical vulnerabilities get noted internally, not reported externally.
Document the research process. Record what you analyzed, what you tried, and what you ruled out. Future researchers (including yourself) need this context for variant analysis.
Lab before production. All dynamic testing, fuzzing, and PoC execution happens on local copies or dedicated lab environments. Never fuzz or exploit production systems.
Hand off correctly. Once a vulnerability is confirmed and you want to demonstrate exploitation on a live authorized system, hand off to lockpick. Once you want to scan broadly for known patterns, hand off to security-audit.
1---
2name: zero-day
3description: >
4 · Hunt novel vulnerabilities: reversing, patch diffing, fuzzing, attack surface, PoCs. Triggers: 'zero-day', '0-day', 'vulnerability research', 'variant analysis', 'fuzz', 'exploit dev', 'CVE'. Not for SAST (use security-audit).
5license: MIT
6compatibility: "Optional: codeql, semgrep, joern, ghidra, radare2/rizin, afl++, gdb, pwntools, strace, ltrace, checksec"
7metadata:
8 source: https://skillmd.com/skills/aibot88/zero-day
9 upstream: iuliandita/skills
10 date_added: "2026-04-03"
11 effort: high
12 argument_hint: "<target>"
13---
1415# Zero-Day: Vulnerability Research & Discovery
1617Systematic methodology for finding novel, undisclosed vulnerabilities in source code, compiled
18binaries, and live systems. This skill guides the research process from intelligence gathering
19through proof-of-concept development to responsible disclosure.
2021This is the *discovery* skill - it finds vulnerabilities nobody has catalogued yet. For
22exploiting known weaknesses on live systems, use **lockpick**. For scanning code against known
23vulnerability patterns, use **security-audit**.
2425**Target versions**: May 2026 snapshot. Read `references/target-versions.md` before
26pinning static analysis, reversing, fuzzing, or debugger tooling.
2728## When to use
2930- Hunting for undisclosed vulnerabilities in a codebase, binary, or running service
31- Variant analysis after a CVE is published (finding similar bugs in related code)
32- Patch diffing - analyzing what a security update fixed to find nearby issues
33- Developing proof-of-concept exploits for discovered vulnerabilities
34- Attack surface mapping before a focused security engagement
35- Gathering threat intelligence on a target's technology stack
36- Preparing responsible disclosure reports
37- Bug bounty target assessment and prioritization
38- Auditing your own projects for novel vulnerability classes
39- Hunting for cloud-native vulnerabilities (IAM, IMDS, cross-tenant isolation, serverless)
4041## When NOT to use
4243- Scanning for known vulnerability patterns or OWASP top 10 (use **security-audit**)
44- Post-exploitation privilege escalation or lateral movement (use **lockpick**)
45- General code correctness review or bug finding (use **code-review**)
46- Hardening containers, Kubernetes, or infrastructure (use **kubernetes**, **docker**, **terraform**)
47- Network firewall configuration or tuning (use **firewall-appliance**)
48- Without authorization from the target owner (own repos, bug bounty scope, or written permission)
4950## AI Self-Check
5152Before reporting any vulnerability or generating exploit code, verify:
5354- [ ] **Authorization confirmed**: own repo, active bug bounty program, or written permission
55- [ ] **Scope respected**: target is within authorized boundary (specific repos, domains, IPs)
56- [ ] **Novel finding**: verified this isn't already a known CVE or public advisory (cross-check Phase 0 intelligence gathering - NVD, oss-security, GitHub advisories, searchsploit)
57- [ ] **Reproducible**: PoC demonstrates the issue reliably, not a theoretical concern
58- [ ] **Impact assessed**: clear description of what an attacker gains (not just "crash")
59- [ ] **Root cause identified**: the underlying flaw, not just the symptom
60- [ ] **No collateral damage**: PoC doesn't destroy data, DoS production, or affect other users
61- [ ] **Disclosure plan**: findings destined for responsible disclosure, not public dump
62- [ ] **Evidence preserved**: all analysis steps documented for reproducibility
63- [ ] **Complexity honest**: if exploitation requires unlikely conditions (specific config, race window, chained bugs), state that clearly - don't inflate impact
64- [ ] **Current source checked**: dated versions, CLI flags, API names, and support windows are verified against primary docs before repeating them
65- [ ] **Hidden state identified**: local config, credentials, caches, contexts, branches, cluster targets, or previous runs are made explicit before acting
66- [ ] **Verification is real**: final checks exercise the actual runtime, parser, service, or integration point instead of only linting prose or happy paths
67- [ ] **Authorization and disclosure scope checked**: targets, reproduction, and reporting stay within authorized research boundaries
68- [ ] **PoC safety reviewed**: proof code demonstrates impact without avoidable persistence, exfiltration, or wormable behavior
6970## Performance
7172- Minimize repro cases before deep fuzzing so crashes triage quickly.
73- Deduplicate crashes by stack, root cause, and patch reachability before reporting counts.
74- Use coverage and corpus metrics to guide fuzzing time instead of running blind indefinitely.
7576## Best Practices
7778- Capture exact versions, build flags, inputs, logs, and debugger state for every candidate finding.
79- Separate exploitability analysis from speculation; mark uncertainty clearly.
80- Follow the target project's disclosure policy and avoid publishing operational exploit detail prematurely.
8182## Workflow
8384### Phase 0: Intelligence Gathering
8586Before touching code or binaries, understand what you're looking at and what the community
87already knows. This phase determines where to focus.
8889**Advisory and feed monitoring:**
9091```bash
92# Recent CVEs for a specific product/vendor
93# NVD API (no key needed for basic queries)
94curl -s "https://services.nvd.nist.gov/rest/json/cves/2.0?keywordSearch=TARGET_NAME&resultsPerPage=20" | python3 -m json.tool | head -100
9596# GitHub Security Advisories for a repo
97# Adapt ecosystem param: NPM, PIP, GO, MAVEN, NUGET, RUBYGEMS, RUST, etc.
98gh api graphql -f query='{ securityVulnerabilities(first:20, ecosystem:NPM, package:"TARGET") { nodes { advisory { summary severity publishedAt } vulnerableVersionRange } } }'
99100# Exploit-DB search
101searchsploit TARGET_NAME 2>/dev/null || echo "searchsploit not installed (apt install exploitdb)"
102```
103104**Community sources to check** (use web search):
105- **oss-security mailing list** - where researchers post before/alongside CVEs
106- **Full Disclosure** - uncoordinated disclosures, PoCs
107- **r/netsec**, **r/ReverseEngineering**, **Hacker News** - community discussion, writeups, early signal
108- **Project-specific bug trackers** - Chromium, Firefox, Linux kernel, etc.
109- **Vendor security bulletins** - Microsoft Patch Tuesday, Apple security updates, etc.
110- **Twitter/X** - #0day, #bugbounty, researcher accounts, vendor security teams
111112**What to extract:**
113- Recently patched vulnerability classes (variant analysis targets)
114- Components receiving security attention (hot areas)
115- Researcher writeups describing methodology (technique inspiration)
116- Unfixed issues in bug trackers marked as security-sensitive
117118**Proceed to Phase 1 when:** you have a clear picture of recent CVEs, active research, and
119community attention on the target or its ecosystem. If nothing comes up, that's still useful -
120it means fewer known attack patterns to build on, so original research matters more.
121122### Phase 1: Target Profiling
123124Understand the target before looking for bugs. The goal is to build a mental model of the
125attack surface.
126127**For source code repos:**
128129```bash
130# Language and framework breakdown
131tokei . 2>/dev/null || (find . -name '*.py' -o -name '*.js' -o -name '*.ts' -o -name '*.c' \
132 -o -name '*.cpp' -o -name '*.go' -o -name '*.rs' -o -name '*.java' | head -50)
133134# Dependencies (attack surface via supply chain)
135cat package.json requirements.txt go.mod Cargo.toml pom.xml 2>/dev/null | head -80
136137# Entry points - where external input enters the system
138grep -rn 'app\.\(get\|post\|put\|delete\|patch\|use\)\|@app\.route\|@RequestMapping\|func.*http\.Handler\|#\[.*route\]' --include='*.py' --include='*.js' --include='*.ts' --include='*.go' --include='*.rs' --include='*.java' . 2>/dev/null | head -30
139140# Parser/deserializer locations (high-value targets)
141grep -rn 'parse\|deserialize\|unmarshal\|decode\|from_bytes\|read_struct\|unpack' --include='*.py' --include='*.c' --include='*.cpp' --include='*.go' --include='*.rs' . 2>/dev/null | head -30
142143# Security-sensitive operations
144grep -rn 'exec\|system\|popen\|eval\|spawn\|crypto\|encrypt\|decrypt\|hash\|sign\|verify\|auth\|token\|session\|cookie\|jwt' --include='*.py' --include='*.js' --include='*.ts' --include='*.go' --include='*.rs' . 2>/dev/null | head -40
145146# Git history - recent security-related changes
147git log --oneline --all --grep='CVE\|vuln\|security\|fix\|patch\|overflow\|inject\|bypass\|sanitize' | head -20
148```
149150**Language-specific high-value targets** (where memory corruption hides in "safe" languages):
151- **Rust**: `unsafe` blocks and FFI boundaries - memory corruption enters here
152- **Go**: `import "C"` (CGo) - C code behind Go interface, plus marshaling bugs
153- **Java**: `native` methods (JNI) - C/C++ code callable from managed code
154155**For binaries (Linux/macOS):**
156157```bash
158# File type and architecture
159file TARGET_BINARY
160readelf -h TARGET_BINARY 2>/dev/null || otool -h TARGET_BINARY 2>/dev/null
161162# Security mitigations in place
163checksec --file=TARGET_BINARY 2>/dev/null || (
164 readelf -l TARGET_BINARY 2>/dev/null | grep -i 'GNU_STACK\|GNU_RELRO'
165 readelf -d TARGET_BINARY 2>/dev/null | grep -i 'BIND_NOW\|FLAGS'
166)
167168# Linked libraries (attack surface)
169ldd TARGET_BINARY 2>/dev/null || otool -L TARGET_BINARY 2>/dev/null
170171# Strings - low-hanging fruit (URLs, paths, format strings, debug messages)
172strings -n 8 TARGET_BINARY | grep -iE 'http://\|https://\|/tmp/\|/etc/\|password\|key\|token\|%s\|%d\|%x\|%n\|debug\|error\|fail' | head -40
173174# Symbols (if not stripped)
175nm -D TARGET_BINARY 2>/dev/null | grep -i 'malloc\|free\|strcpy\|strcat\|sprintf\|gets\|system\|exec\|popen' | head -20
176177# Imports/exports
178readelf -s TARGET_BINARY 2>/dev/null | grep -v 'UND\|LOCAL' | head -30
179```
180181**For binaries (Windows PE):**
182183```powershell
184# PE headers and architecture (Visual Studio tools or dumpbin)
185dumpbin /headers TARGET.exe | Select-String "machine|subsystem|entry point"
186187# Security mitigations - use PE-bear, winchecksec, or dumpbin
188winchecksec.exe TARGET.exe # shows ASLR, DEP, CFG, ACG, CET, SEH, SafeSEH, GS
189# Or manually via dumpbin:
190dumpbin /headers TARGET.exe | Select-String "DLL characteristics"
191# Look for: DYNAMIC_BASE (ASLR), NX_COMPAT (DEP), GUARD_CF (CFG), HIGH_ENTROPY_VA
192193# Imports - what DLLs and functions does it call?
194dumpbin /imports TARGET.exe | Select-String "kernel32|ntdll|ws2_32|advapi32|shell32"
195196# Exports (for DLLs)
197dumpbin /exports TARGET.dll
198```
199200Read `references/binary-analysis.md` (Windows PE Analysis section) for Ghidra PE
201import, x64dbg/WinDbg workflows, and Windows mitigation analysis.
202203**For live systems:**
204205```bash
206# Open ports and services
207nmap -sV -sC -p- TARGET_IP 2>/dev/null || ss -tulpn
208209# Service versions (version-specific vulns)
210nmap -sV --version-intensity 5 -p PORTS TARGET_IP 2>/dev/null
211212# Web application fingerprinting
213curl -sI https://TARGET/ | head -20
214whatweb TARGET 2>/dev/null
215216# SSL/TLS analysis
217testssl.sh TARGET:443 2>/dev/null || openssl s_client -connect TARGET:443 </dev/null 2>/dev/null | openssl x509 -noout -text | head -30
218```
219220**For cloud-hosted targets**, also profile: IAM roles/policies attached to the workload,
221metadata service version (IMDSv1 vs v2), managed services in use (RDS, Atlas, MSK, etc.),
222cross-account trust relationships, and whether backends are directly reachable or gated
223behind an API gateway. See `references/vulnerability-classes.md` section 9 for full patterns.
224225**Build the attack surface map:**
226227| Component | Entry Points | Input Format | Trust Boundary | Priority |
228|-----------|-------------|--------------|----------------|----------|
229| [service] | [endpoints] | [JSON/binary/etc] | [auth/unauth] | [H/M/L] |
230231Priority is based on: unauthenticated > authenticated, parser/deserializer > business logic,
232network-facing > local-only, complex input formats > simple ones.
233234**Proceed to Phase 2 when:** the attack surface map has at least one high-priority entry point.
235If everything is low-priority, reconsider whether this target is worth deep analysis.
236237### Phase 2: Vulnerability Class Selection
238239Based on the target profile, select which vulnerability classes to hunt. Don't search for
240everything - pick 2-3 classes most likely to yield results given the target's language,
241architecture, and attack surface.
242243Read `references/vulnerability-classes.md` for the full catalog organized by:
2442451. **Memory corruption** (C/C++, unsafe Rust, CGo) - buffer overflows, use-after-free, double-free, integer overflow/underflow, type confusion, uninitialized memory
2462. **Injection** (all languages) - SQL, command, LDAP, template, header, CRLF, expression language
2473. **Logic flaws** (all languages) - authentication bypass, authorization gaps, race conditions (TOCTOU), state machine violations, business logic abuse
2484. **Deserialization** (Java, Python, PHP, .NET, Ruby) - insecure deserialization, gadget chains, type confusion via polymorphism
2495. **Cryptographic** (all languages) - weak algorithms, nonce reuse, padding oracles, timing side channels, key management errors
2506. **Web-specific** (web apps) - novel XSS (mXSS, DOM clobbering), SSTI, prototype pollution chains, SSRF, path traversal, cache poisoning. For XSS sinks: treat sanitizer config as a taint sink - DOMPurify `ALLOWED_TAGS`/`RETURN_DOM` misconfig, custom `sanitize()` hooks, and React innerHTML injection patterns are common bypasses; a misconfigured sanitizer is itself a sink
2517. **Binary-specific** (compiled) - format string bugs, heap metadata corruption, ROP/JOP gadget availability, signal handler races
2528. **Supply chain** (all ecosystems) - dependency confusion, typosquatting, compromised maintainer accounts, malicious updates
2539. **Cloud-native** (AWS, GCP, Azure, managed services) - IMDS abuse, IAM confused deputy, cross-tenant isolation failures, serverless event injection, managed DB/Kafka misconfigs
254255**Selection heuristic:**
256- C/C++ binary -> memory corruption first, always
257- Web app (any language) -> logic flaws + web-specific (mXSS, SSTI, prototype pollution) + injection
258- Java/Python service -> deserialization + logic flaws
259- Crypto library or auth system -> cryptographic + logic flaws
260- Complex parser/protocol -> memory corruption (if C/C++) or logic flaws (if managed language)
261- Project with large dependency tree -> supply chain + injection
262- Cloud-hosted app/service -> cloud-native + logic flaws (IAM, isolation, metadata)
263264**When classes tie:** prioritize by exploitability ceiling. Memory corruption and deserialization
265yield RCE most reliably. Injection is next. Logic flaws require deeper understanding but produce
266the most creative findings - pick these when the target has a complex state machine or multi-step
267auth flow.
268269**Proceed to Phase 3 when:** you've selected 2-3 vulnerability classes and can articulate why
270they fit this target's architecture and attack surface.
271272### Phase 3: Deep Analysis
273274This is the core of the research. Pick one attack surface from Phase 1 and one vulnerability
275class from Phase 2. Go deep, not wide.
276277**If the first pick yields nothing:** don't switch both variables at once. Change the
278vulnerability class first (same attack surface, different class). If that fails too, change
279the attack surface. Switching both simultaneously means you learned nothing from the first
280attempt.
281282**Source code - manual taint analysis:**
283284Read `references/taint-analysis.md` for the full methodology. Summary:
2852861. Identify **sources** - where external/untrusted data enters (HTTP params, file reads, env vars, IPC, database results from user-controlled queries)
2872. Identify **sinks** - where data causes impact (exec, SQL, file writes, memory operations, crypto operations, response bodies)
2883. Trace every path from source to sink. For each path:
289 - What sanitization/validation exists?
290 - Can the sanitization be bypassed? (encoding tricks, type juggling, truncation)
291 - Are there paths that skip sanitization entirely? (error handlers, fallback paths, admin routes)
292 - Does the data pass through a transformation that changes its security properties? (base64, URL encoding, serialization)
293294**Source code - variant analysis:**
295296When a CVE is published for a component you're reviewing:
2972981. Read the advisory and patch diff
2992. Identify the *root cause pattern* (not just the specific instance)
3003. Search the codebase for the same pattern:
301302```bash
303# CodeQL (if available) - write a query for the pattern
304codeql query run --database=TARGET_DB path/to/variant-query.ql
305306# Semgrep - write a custom rule
307semgrep --config path/to/variant-rule.yaml .
308309# Joern (code property graph) - query for dataflow pattern
310joern --script path/to/variant-query.sc
311312# Manual grep for structural similarity
313grep -rn 'PATTERN' --include='*.EXT' . | head -30
314```
3153164. For each match, determine if the same exploit conditions exist
317318**Binary analysis:**
319320Read `references/binary-analysis.md` for the full methodology covering:
3213221. **Static analysis** - Ghidra/Rizin decompilation, function identification, cross-references
3232. **Patch diffing** - BinDiff/Diaphora to compare pre-patch and post-patch binaries, identify fixed functions, understand the vulnerability class
3243. **Dynamic analysis** - GDB/LLDB debugging, strace/ltrace syscall tracing, input/output observation
3254. **Fuzzing** - AFL++ harness writing, corpus selection, crash triage
326327**System analysis:**
3283291. Map every externally reachable service
3302. Identify service versions and check for *recent patches* (recently patched = variant analysis target)
3313. Examine custom/non-standard services more closely (less audited = more likely to have bugs)
3324. Check for misconfigurations that *expand* attack surface (debug endpoints, unnecessary services, permissive CORS)
3335. Hand off to **lockpick** if you find an exploitable vulnerability and want to demonstrate impact on the live system
334335**Cloud-native analysis:**
336337Read `references/vulnerability-classes.md` section 9 for the full catalog. Key methodology:
3383391. **Enumerate IAM** - map roles, policies, and trust relationships. Look for `sts:AssumeRole`
340 without `ExternalId`, wildcard permissions, and dangerous combos (`iam:PassRole` + service creation)
3412. **Test IMDS reachability** - from every SSRF-capable endpoint, attempt metadata access.
342 Check IMDSv1 vs v2 enforcement. Even partial SSRF (no response body) can leak via DNS
3433. **Probe managed service isolation** - can tenant A's credentials reach tenant B's resources?
344 Test across RDS instances, Kafka topics, K8s namespaces, S3 buckets
3454. **Audit serverless event sources** - Lambda/Cloud Function triggers (S3, SNS, API Gateway,
346 Kafka) pass event payloads as untrusted input. Trace from event to sink like any other taint analysis
3475. **Check for direct backend access** - bypass API gateways by hitting the backend service
348 URL directly. Many "protected" APIs are only protected by the gateway, not the service itself
349350**Proceed to Phase 4 when:** you have a specific, reproducible trigger condition for a
351vulnerability. "This buffer can overflow" is not enough - you need the exact input or sequence
352that causes it.
353354### Phase 4: Proof of Concept
355356A vulnerability without a PoC is a theory. Build one.
357358**PoC requirements:**
359- Triggers the vulnerability reliably (not "sometimes crashes")
360- Demonstrates security impact (code execution, data leak, auth bypass - not just a crash dump)
361- Minimal - smallest possible input/sequence that triggers the bug
362- Self-contained - another researcher can reproduce it without your environment
363- Non-destructive - doesn't delete data, DoS production, or cause lasting damage
364365Before investing in a full exploit, check mitigations (`checksec` / `winchecksec`). Full
366RELRO + PIE + canary + NX + CFI makes RCE impractical for most targets. A controlled crash
367or info leak PoC is still valuable for disclosure.
368369**PoC development patterns by vulnerability class:**
370371Read `references/exploit-patterns.md` for detailed PoC templates covering:
3723731. **Memory corruption** - crafted input to trigger overflow, heap spray for reliability, ROP chain for code execution
3742. **Injection** - payload that demonstrates data exfiltration or command execution
3753. **Logic flaw** - step-by-step request sequence that bypasses intended controls
3764. **Deserialization** - crafted serialized object with gadget chain
3775. **Crypto** - script that recovers key material or forges signatures
3786. **SSRF/path traversal** - request that reads internal resources or sensitive files
3797. **Cloud/IAM** - demonstrate credential theft via IMDS, cross-tenant access, or privilege escalation via IAM policy chain
380381**Testing the PoC:**
382- Run against a local/lab copy of the target, never production
383- Verify it works on the latest unpatched version
384- Verify it fails on the patched version (if a patch exists)
385- Document exact versions, configurations, and prerequisites
386387**Proceed to Phase 5 when:** the PoC reliably demonstrates the vulnerability on the target
388version in a lab environment.
389390### Phase 5: Impact Assessment & Reporting
391392**Assess impact using CVSS 4.0 base metrics:**
393394| Metric | Question |
395|--------|----------|
396| Attack Vector | Network, adjacent, local, or physical? |
397| Attack Complexity | Any special conditions needed? |
398| Privileges Required | None, low, or high? |
399| User Interaction | None, passive, or active? |
400| Confidentiality | None, low, or high impact? |
401| Integrity | None, low, or high impact? |
402| Availability | None, low, or high impact? |
403404CVSS 4.0 also adds Subsequent System metrics (impact beyond the vulnerable component) and
405Supplemental metrics (Automatable, Recovery, Provider Urgency). Include these when the
406vulnerability affects systems beyond the immediate target.
407408Use the FIRST CVSS calculator: https://www.first.org/cvss/calculator/4.0
409410**Write the vulnerability report:**
411412```markdown
413# [TITLE]: [Brief description]
414415## Summary
416[1-2 sentences: what the vulnerability is and why it matters]
417418## Affected Versions
419- [product] [version range]
420- Confirmed on: [exact version tested]
421422## Root Cause
423[Technical explanation of the underlying flaw]
424425## Attack Scenario
426[Step-by-step description of how an attacker exploits this]
427428## Proof of Concept
429[Minimal reproduction steps or script]
430431## Impact
432- CVSS 4.0 Base Score: [score] ([vector string])
433- [What an attacker gains: RCE, data leak, auth bypass, DoS, etc.]
434435## Suggested Fix
436[Recommended remediation approach]
437438## Timeline
439- [date] - Vulnerability discovered
440- [date] - Vendor notified via [channel]
441- [date] - Vendor acknowledged
442- [date] - Patch released (pending)
443- [date] - Public disclosure (coordinated)
444445## Credit
446[Researcher name/handle]
447```
448449**Responsible disclosure timeline:**
450- Notify the vendor/maintainer immediately after confirming the vulnerability
451- Standard disclosure window: 90 days (Google Project Zero standard)
452- For actively exploited vulns: 7 days (expedited)
453- If vendor is unresponsive after 90 days: disclose with full details
454- Always check if the project has a `SECURITY.md` or security policy first
455456## Tooling Quick Reference
457458Read `references/tooling-quick-reference.md` for the tool catalog, install paths,
459and when to reach for each tool during source, binary, or live-system analysis.
460461## Reference Files
462463- `references/vulnerability-classes.md` - full vulnerability class catalog with detection patterns, common root causes, language-specific variants, and novel web vectors (mXSS, DOM clobbering, SSTI by engine, prototype pollution gadget chains)
464- `references/taint-analysis.md` - manual data flow analysis methodology for source code, with worked examples per language
465- `references/binary-analysis.md` - binary reverse engineering workflow, patch diffing, fuzzing harness development, dynamic analysis
466- `references/exploit-patterns.md` - proof-of-concept development templates by vulnerability class, with safety guidelines
467- `references/tooling-quick-reference.md` - tool catalog with install paths and best-fit usage notes
468- `references/target-versions.md` - May 2026 version snapshot for static analysis, reversing, fuzzing, and debugger tools
469470## Output Contract
471472See `skills/_shared/output-contract.md` for the full contract.
473474- **Skill name:** ZERO-DAY
475- **Deliverable bucket:** `audits`
476- **Mode:** conditional. When invoked to **analyze, review, audit, or improve** existing repo content, emit the full contract -- boxed inline header, body summary inline plus per-finding detail in the deliverable file, boxed conclusion, conclusion table -- and write the deliverable to `docs/local/audits/zero-day/<YYYY-MM-DD>-<slug>.md`. When invoked to **answer a question, teach a concept, build a new artifact, or generate content**, respond freely without the contract.
477- **Severity scale:** `P0 | P1 | P2 | P3 | info` (see shared contract; only used in audit/review mode).
478479## Related Skills
480481- **security-audit** - scans for *known* vulnerability patterns (OWASP, CVEs, misconfigs) using automated tools. Zero-day finds *novel* vulnerabilities through deep manual analysis. Use security-audit for breadth; use zero-day for depth. If security-audit finds something interesting, zero-day can investigate whether it's the tip of a larger iceberg.
482- **lockpick** - exploits vulnerabilities on *live systems* for privilege escalation and lateral movement. Zero-day *discovers* the vulnerabilities. Use zero-day to find the bug, lockpick to demonstrate exploitation on a live target. Zero-day's system mode hands off to lockpick once a vulnerability is confirmed.
483- **code-review** - finds correctness bugs (logic errors, race conditions). Zero-day finds *security-relevant* logic flaws. Overlap: a race condition is both a bug and potentially a vulnerability. Zero-day owns it when exploitability is the question.
484- **networking** - configures and troubleshoots network services. Zero-day may analyze these services for vulnerabilities but doesn't configure them.
485486## Rules
4874881. **Authorization is non-negotiable.** Every target requires explicit authorization: own repos, active bug bounty programs with published scope, or written permission from the system owner. "It's open source" does not mean "I can attack their infrastructure."
4892. **Responsible disclosure by default.** Findings go to the vendor/maintainer first. Follow the project's `SECURITY.md` if one exists. Standard 90-day disclosure window. Never drop 0-day publicly without giving the vendor a chance to patch.
4903. **PoC must be non-destructive.** Proof of concepts demonstrate the vulnerability without causing lasting damage. No data destruction, no persistent backdoors, no denial of service against production systems.
4914. **Depth over breadth.** Pick a specific attack surface and vulnerability class. Go deep. A thorough analysis of one parser beats a shallow scan of the whole codebase. Automated scanning is security-audit's job.
4925. **Verify before reporting.** Every claimed vulnerability must have a working PoC or a clear, reproducible trigger condition. Theoretical vulnerabilities get noted internally, not reported externally.
4936. **Document the research process.** Record what you analyzed, what you tried, and what you ruled out. Future researchers (including yourself) need this context for variant analysis.
4947. **Lab before production.** All dynamic testing, fuzzing, and PoC execution happens on local copies or dedicated lab environments. Never fuzz or exploit production systems.
4958. **Hand off correctly.** Once a vulnerability is confirmed and you want to demonstrate exploitation on a live authorized system, hand off to **lockpick**. Once you want to scan broadly for known patterns, hand off to **security-audit**.
Run npx get-skill add aibot88/zero-day in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
· Hunt novel vulnerabilities: reversing, patch diffing, fuzzing, attack surface, PoCs. Triggers: 'zero-day', '0-day', 'vulnerability research', 'variant analysis', 'fuzz', 'exploit dev', 'CVE'. Not for SAST (use security-audit). It is listed under Security on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: CAUTION, Skill Scanner: WARNING. Capability flags: makes network calls, reads secrets. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free. This skill is licensed under MIT.
aibot88 (@aibot88) published this skill. Their other Agent Skills are listed on their SkillMD profile.