Hacktricks-skills search-exploits
How to systematically search for exploits and vulnerabilities for any service, software, or technology. Use this skill whenever the user mentions finding exploits, searching for vulnerabilities, penetration testing, security research, or needs to check if a service/version has known exploits. Trigger on keywords like "exploit", "vulnerability", "CVE", "searchsploit", "exploitdb", "metasploit", "penetration test", "security audit", or when investigating a specific service/version for weaknesses.
git clone https://github.com/abelrguezr/hacktricks-skills
skills/generic-hacking/search-exploits/SKILL.MDSearch Exploits
A systematic approach to finding exploits and vulnerabilities for services, software, and technologies.
Quick Start
When investigating a target, follow this workflow:
- Identify the target - Get service name and version
- Search online databases - Use multiple sources
- Search local databases - Use Searchsploit if available
- Cross-reference findings - Verify across multiple sources
- Document results - Track what you found
Step 1: Identify Your Target
Before searching, gather:
- Service/application name
- Version number (critical!)
- Operating system
- Any additional context (ports, protocols, etc.)
Example: Apache 2.4.49 on Linux, or Windows XP with SMB on port 135
Step 2: Online Search Resources
Google Search
The simplest and often most effective method:
<service_name> [version] exploit
Examples:
apache 2.4.49 exploitwindows xp smb exploittomcat 9.0.50 vulnerability
Pro tip: Add
site:github.com to find PoC code:
apache 2.4.49 exploit site:github.com
Shodan Exploit Search
Shodan indexes exploits from multiple sources. Search by:
- Service name
- CVE number
- Software version
Vulners
Comprehensive vulnerability database with:
- CVE details
- Exploit availability
- Proof-of-concept code
- References to other databases
PacketStorm Security
https://packetstormsecurity.com/
Good for:
- Recent exploits
- Zero-day disclosures
- Exploit collections
Sploitus
Searches multiple exploit databases simultaneously.
Sploitify
Curated exploit list with filters for:
- Vulnerability type: Local Privilege Escalation, Remote Code Execution, etc.
- Service type: Web, SMB, SSH, RDP, etc.
- Operating System: Windows, Linux, macOS, etc.
- Practice labs: Links to machines for testing
search_vulns
Aggregates data from:
- NVD (National Vulnerability Database)
- Exploit-DB
- PoC-in-GitHub
- GitHub Security Advisory database
- endoflife.date
Step 3: Local Search Tools
Searchsploit (Exploit-DB)
If you have
searchsploit installed (part of Exploit-DB), use these commands:
# Basic search by service searchsploit "linux Kernel" searchsploit apache mod_ssl # Get exploit by ID searchsploit -m 7618 # Download to current directory searchsploit -p 7618[.c] # Show complete path searchsploit -x 7618[.c] # Open in editor to inspect # Search from nmap results searchsploit --nmap file.xml # Find vulns in nmap XML output
Workflow:
- Run
to find matchessearchsploit <service> <version> - Note the exploit ID numbers
- Use
to inspect promising exploits-x - Use
to download for analysis-m
MSF-Search (Metasploit)
If Metasploit is available:
msfconsole msf> search platform:windows port:135 target:XP type:exploit msf> search apache mod_ssl msf> search cve:2021-44228
Search parameters:
- Operating systemplatform:
- Service portport:
- Specific targettarget:
- exploit, auxiliary, post, etc.type:
- CVE numbercve:
Pompem
https://github.com/rfunix/Pompem
Alternative tool for searching exploits.
Step 4: Search Strategy
When to use each resource
| Resource | Best For |
|---|---|
| Quick initial search, finding PoC code | |
| Shodan | Exploit availability, real-world instances |
| Vulners | Comprehensive CVE details |
| PacketStorm | Recent exploits, zero-days |
| Searchsploit | Local, offline searching |
| Metasploit | When you have MSF installed |
| Sploitify | Curated, filtered lists |
Search order recommendation
- Start with Google - Fast, broad coverage
- Check Vulners - Get CVE details and references
- Use Searchsploit - If available, for local search
- Cross-reference - Verify findings across 2+ sources
- Download and analyze - Review exploit code before use
Step 5: Analyzing Results
When you find an exploit:
- Check the date - Is it recent? Does it match your target version?
- Verify the version - Ensure it matches your target exactly
- Read the description - Understand what it does and requirements
- Check references - Look for additional context
- Review the code - Understand what it does before running
Common Search Patterns
By Service
<service> <version> exploit <service> <version> vulnerability <service> <version> CVE
By CVE
CVE-YYYY-NNNN exploit CVE-YYYY-NNNN poc
By Technology
<technology> remote code execution <technology> privilege escalation <technology> buffer overflow
Safety Notes
- Always verify exploit compatibility with your target
- Test in isolated environments before production use
- Document your findings for reporting
- Follow legal guidelines - only test systems you own or have permission to test
- Understand the exploit before running it
Example Workflow
Scenario: You found Apache 2.4.49 on a target
- Google search:
apache 2.4.49 exploit - Check Vulners: Search for CVEs affecting 2.4.49
- Searchsploit:
searchsploit apache 2.4.49 - Review results: Look for matching exploits
- Download:
searchsploit -m <exploit_id> - Analyze: Read the exploit code and requirements
- Test: In isolated environment first
Tips for Better Results
- Be specific - Include exact version numbers
- Try variations - Different search terms may yield different results
- Check multiple sources - One database may miss what another has
- Look for PoC code - GitHub often has working examples
- Follow references - Exploits often link to related vulnerabilities
- Stay updated - New exploits are published regularly
When Nothing is Found
If searches return no results:
- Try broader searches - Remove version number
- Check for related services - Similar software may have shared vulnerabilities
- Look for configuration issues - Not all vulnerabilities require exploits
- Consider manual testing - Some vulnerabilities aren't documented
- Wait and check back - New exploits may be published later