A kernel fingerprint is only useful if you match it honestly against public exploits. Most search results will not apply to your target, and running the wrong exploit wastes time at best and crashes the box at worst. This sub-skill covers disciplined exploit matching: searching by version and subsystem, reading exploit headers for constraints, cross-checking fix dates against build dates, filtering by architecture and configuration, and producing a shortlist where every candidate has a written verdict. Authorized penetration tests, labs, and CTFs only.
Quick Workflow
- Start from the fingerprint file produced by the version-enumeration sub-skill; never match from memory.
- Search Exploit-DB and searchsploit by kernel version, subsystem keyword, and driver or module name.
- For each hit, read the exploit's header comments: supported version range, architecture, and required configuration.
- Check the CVE fix date against the target's kernel build date and the distro security tracker.
- Filter by architecture and by the subsystem prerequisites you verified empirically.
- Write a verdict per candidate (applies, ruled out with reason, or needs testing) and shortlist at most two or three.
- Read the full source of shortlisted exploits before any compilation or testing.
1. Searching by version and subsystem
Search broadly first, then narrow. Combine version searches with subsystem and driver searches.
searchsploit "Linux Kernel 5.15" | head -30
searchsploit --cve CVE-2023-XXXX 2>/dev/null | head
Example output shape: a table of EDB IDs, dates, and titles. Titles mentioning the subsystem (io_uring, netfilter, overlayfs) matter more than titles with bare version numbers. Also search by loaded module or driver name from your fingerprint: searchsploit vboxguest, driverquery names on Windows. On Windows, search by build number and component: searchsploit "Windows 10 19045" plus the driver name.
2. Reading exploit headers for constraints
The header comments are the exploit author's contract about what the code supports. Read them fully.
searchsploit -p 99999
head -80 $(searchsploit -p 99999 | grep Path | awk '{print $2}')
Look for: Tested on: lines with exact kernel builds, #define blocks with per-version offsets (good sign: the author handled multiple builds), hardcoded addresses without version checks (bad sign), required sysctls or mounts, and notes like "needs CONFIG_USER_NS". An exploit whose tested builds do not include anything near your fingerprint is a weak candidate; one with per-version offset tables covering your build is strong.
3. Fix date versus build date cross-check
This is the step that rules out most candidates honestly.
grep -i "fixed\|patch\|commit" exploit_header_notes.txt
Workflow per candidate: find the CVE's upstream fix commit date (NVD page, distro tracker, or the exploit's own references), compare against the target kernel's compile date from your fingerprint, then check the distro tracker for backport status. If the distro tracker marks the installed build as patched, write the verdict as ruled out with the tracker URL. If the build predates the fix and the tracker is silent, the candidate stays alive. Record dates, not impressions.
4. Architecture and configuration filtering
Apply the empirical prerequisite checks from your fingerprint as hard filters.
- Architecture: x86_64 exploits do not run on aarch64; check
uname -magainst the exploit's assumptions and any inline assembly. - User namespaces: userns exploits die when
unshare --userfailed during enumeration. - eBPF: unprivileged eBPF exploits die when
unprivileged_bpf_disabled=2. - Drivers: driver exploits die when the driver is absent from
lsmodordriverquery. - Container: any kernel exploit inside a container targets the host kernel, which changes authorization, not just technique.
Each filter applied is a line in your notes with the evidence. Candidates that survive all filters earn testing; the rest earn a written ruled-out verdict.
5. Spotting unreliable exploits
Public exploit code varies wildly in quality. Treat these as warning signs.
- No version checks and hardcoded kernel offsets for a single build: likely to crash anything else.
- Proof-of-concept that only triggers a warning or info leak framed as privesc: read what it actually achieves.
- Recently uploaded exploits with no comments, no tested-on lines, and obfuscated code: verify provenance before trusting.
- Windows exploits requiring a driver that the target never had: the prerequisite check from section 4 already ruled these out.
- Exploits whose comments say "sometimes crashes" or "run multiple times": each retry is a crash opportunity, so they need explicit risk acceptance.
Prefer exploits from reputable researchers with writeups explaining the bug; the writeup lets you verify the vulnerable code path exists on your target independently of the exploit.
Edge cases
- searchsploit databases go stale; update with
searchsploit -uon your attack box before relying on results. - Some CVEs have multiple exploits of varying quality; evaluate each independently rather than assuming the CVE is covered because one exploit exists.
- Distro trackers occasionally mark CVEs as ignored when the vulnerable configuration is not shipped; read the note to confirm it matches your target's configuration.
- Exploit titles sometimes name the wrong version range; trust the header comments and code over the title.
- Private or modified exploit code from CTF teammates needs the same header-and-source review as public code.
- A CVE fixed upstream but not backported to an LTS build is still exploitable; the distro tracker, not the upstream date alone, decides.
Escalation
- If no candidate survives filtering, close the kernel path with written verdicts and return to misconfiguration vectors; a clean negative finding is report-grade.
- When two candidates survive, rank by reliability evidence (tested-on lines matching your build, clean failure modes) and test the safer one first.
- If matching stalls on ambiguous tracker data, test prerequisites empirically rather than debating documentation.
- Hand the shortlisted exploits to the safe-testing sub-skill; matching ends where testing discipline begins.
Detection and defender view
Exploit matching itself is done offline on the attack box, so it generates no target telemetry; the discipline here protects the engagement from crashes and wasted time rather than from detection. Defenders shrink the candidate list through patching, livepatch, and disabling unneeded subsystems, which is why the prerequisite checks in section 4 so often rule everything out on mature targets. From the authorized tester side, the written verdicts per candidate are the methodology evidence the report needs: they show the kernel path was triaged rigorously, not skipped or attempted recklessly.
Key references
- MITRE ATT&CK T1068 (Exploitation for Privilege Escalation)
- Exploit-DB: https://www.exploit-db.com
- NVD (fix dates and references): https://nvd.nist.gov
- Ubuntu CVE tracker: https://ubuntu.com/security/cves
- Red Hat CVE database: https://access.redhat.com/security/updates/cve
- Microsoft Security Update Guide: https://msrc.microsoft.com/update-guide
- Google Project Zero writeups (bug analysis technique): https://googleprojectzero.blogspot.com
