Search Techniques
Overview
Finding the right exploit is often the most time-consuming part of the OSCP exam. You might spend 30 minutes enumerating a service, but then waste hours searching for exploits with poor keywords. This chapter teaches you systematic, high-precision search techniques that will dramatically reduce your exploit research time.
The core philosophy: the quality of your search query determines the quality of your results. A well-crafted query on Google or Exploit-DB will surface the exact exploit in seconds. A vague query returns hundreds of irrelevant results.
1. Keyword Optimization
The Anatomy of a Perfect Search Query
An effective exploit search query should contain three to five key elements, arranged in order of importance:
[Product/Service] + [Version] + [Vulnerability Type] + [Language/Platform] + [Exploit/PoC]
Good vs. Bad Search Terms
| Bad Query | Why It Fails | Good Query | Why It Works |
|---|---|---|---|
apache exploit |
Too broad, returns thousands of results across all Apache products | Apache HTTP Server 2.4.49 path traversal exploit |
Specific product, version, vuln type |
windows privilege escalation |
No version, no context | Windows Server 2019 privilege escalation svcctl |
OS version + specific component |
exchange vulnerability |
“Vulnerability” is too generic | Microsoft Exchange Server 2019 ProxyShell RCE |
Product + version + named attack |
smb exploit |
SMB has hundreds of exploits | SMBv3 3.1.1 double free exploit |
Protocol version + vuln class |
tomcat hack |
“Hack” is not a technical term | Apache Tomcat 9.0.40 CVE-2021-25329 exploit |
Product + version + CVE |
linux kernel exploit |
Way too broad | Linux Kernel 5.4.0 overlayfs privilege escalation |
OS + kernel version + subsystem |
Why Specificity Matters
Each additional specific term in your query acts as a filter, narrowing the result set exponentially:
"apache" → ~50,000 results
"apache 2.4" → ~8,000 results
"apache 2.4.49" → ~200 results
"apache 2.4.49 path traversal" → ~30 results
"apache 2.4.49 path traversal exploit python" → ~5 results (highly relevant)
OSCP-Relevant Service Keyword Patterns
For the OSCP exam, you will encounter specific services repeatedly. Here are optimized keyword patterns for the most common ones:
| Service | Banner Example | Optimized Search Query |
|---|---|---|
| Apache HTTP | Apache/2.4.29 (Ubuntu) |
Apache 2.4.29 exploit or Apache HTTP Server 2.4.29 Ubuntu |
| IIS | Microsoft-IIS/10.0 |
IIS 10.0 Windows Server 2016 exploit |
| Microsoft Exchange | Microsoft Exchange Server 2019 |
Exchange Server 2019 CU10 exploit or Exchange ProxyShell |
| SMB | Samba 4.9.5 |
Samba 4.9.5 exploit or Samba 4.9.5 CVE-2020-1472 |
| WinRM | Port 5985/5986 open | Windows Remote Management exploit or WinRM default credentials |
| OpenSSH | OpenSSH_7.4 |
OpenSSH 7.4 exploit or OpenSSH 7.4 privilege escalation |
| MySQL | MySQL 5.7.26 |
MySQL 5.7.26 exploit or MySQL 5.7 UDF privilege escalation |
| PostgreSQL | PostgreSQL 11.2 |
PostgreSQL 11.2 exploit or PostgreSQL 11 privilege escalation |
| Tomcat | Apache-Coyote/1.1 (header) |
Apache Tomcat 9.0.30 exploit or Tomcat AJP exploit |
| Jenkins | Jenkins 2.289 |
Jenkins 2.289 exploit or Jenkins Groovy Console RCE |
| Node.js | node/14.15.0 |
Node.js 14.15.0 exploit or Node.js prototype pollution |
| PHP | PHP/7.4.3 |
PHP 7.4.3 exploit or PHP 7.4 FFI RCE |
| Docker | Docker/19.03.8 |
Docker 19.03 privilege escalation or Docker socket escape |
| FTP | vsftpd 3.0.3 |
vsftpd 3.0.3 exploit or vsftpd backdoor |
| Redis | Redis server v=6.0.6 |
Redis 6.0.6 exploit or Redis unauthenticated RCE |
The “Named Vulnerability” Shortcut
Many high-profile vulnerabilities have community-given names that are easier to search than CVE numbers:
| Named Vulnerability | Product | Search Query |
|---|---|---|
| ProxyShell | Exchange Server | ProxyShell Exchange exploit |
| PrintNightmare | Windows Print Spooler | PrintNightmare CVE-2021-34527 exploit |
| ZeroLogon | Windows Netlogon | ZeroLogon CVE-2020-1472 exploit |
| SamAccountName | NTPS** | Windows AD |
| Ghostscript | Ghostscript | Ghostscript CVE-2018-16509 exploit |
| Dirty COW | Linux Kernel | Dirty COW CVE-2016-5195 exploit |
| PwnKit | Polkit | PwnKit CVE-2021-4034 exploit |
| Baron Samedit | Samba | Baron Samedit CVE-2021-44142 exploit |
| Spring4Shell | Spring Framework | Spring4Shell CVE-2022-22965 exploit |
| Log4Shell | Log4j | Log4Shell CVE-2021-44228 exploit |
Exam Tip: If you recognize a named vulnerability, search for its name first. Named vulns almost always have well-tested, reliable exploits.
2. Search Operators
Search operators are the most powerful tool in your exploit research arsenal. Mastering these will separate you from candidates who waste hours scrolling through irrelevant results.
Complete Operator Reference
| Operator | Syntax | Purpose | Exploit Example |
|---|---|---|---|
| Quotes | "exact phrase" |
Exact phrase match | "Apache 2.4.49" exploit |
| Minus | -term |
Exclude a term | samba exploit -metasploit |
| OR | term1 OR term2 |
Match either term | python OR ruby exploit |
| site: | site:domain.com |
Restrict to domain | site:exploit-db.com apache |
| filetype: | filetype:ext |
Filter by file type | filetype:py exploit apache |
| inurl: | inurl:keyword |
Keyword in URL | inurl:exploit apache 2.4 |
| intitle: | intitle:keyword |
Keyword in title | intitle:exploit apache |
| intext: | intext:keyword |
Keyword in body text | intext:"CVE-2021-41773" |
| cache: | cache:url |
Cached version of page | cache:exploit-db.com/... |
| related: | related:url |
Similar pages | related:exploit-db.com |
Deep Dive: Each Operator with Exploit-Specific Examples
Quotes (" ") — Exact Phrase Matching
The most important operator. Forces the search engine to find the exact sequence of words.
# Without quotes: returns results for "Apache" AND "2.4" AND "49" anywhere on page
Apache 2.4.49 exploit
# With quotes: returns results containing the exact string "Apache 2.4.49"
"Apache 2.4.49" exploit
# Multiple quoted phrases for maximum precision
"Apache 2.4.49" "path traversal" exploit
# Quoting CVE numbers is critical (the hyphen is significant)
"CVE-2021-41773" exploit
Critical: Always quote version numbers and CVE IDs. Without quotes,
CVE-2021-41773might match pages that mentionCVE,2021, and41773separately but not as a vulnerability identifier.
Minus (-) — Exclusion
Remove noise from results by excluding irrelevant terms:
# Exclude Metasploit modules (you want standalone scripts)
apache 2.4.49 exploit -metasploit
# Exclude results about a different product with the same name
tomcat exploit -minecraft
# Exclude denial-of-service (you want RCE, not DoS)
samba exploit -dos -denial
# Exclude results from a specific site
exchange exploit -site:twitter.com
# Exclude old, irrelevant results
windows privilege escalation -2010 -2011 -2012
OR — Alternative Terms
Search for multiple variations simultaneously:
# Search for exploits in multiple languages
apache exploit python OR ruby OR perl
# Search for multiple vulnerability types
exchange server RCE OR "remote code execution" OR "code injection"
# Search for multiple product names (aliases)
"Microsoft Exchange" OR "Exchange Server" 2019 exploit
# Combine with other operators
("ProxyShell" OR "CVE-2021-34473") exploit python
site: — Domain Restriction
The single most useful operator for exploit research. Restricts results to trusted exploit databases:
# Search only Exploit-DB
site:exploit-db.com "Apache 2.4.49"
# Search only GitHub for Python exploits
site:github.com "CVE-2021-41773" python
# Search only Packet Storm
site:packetstormsecurity.com samba exploit
# Search only Offensive Security blog
site:offensive-security.com exploit
# Search only a specific GitHub user's repos
site:github.com/offensive-security/exploitdb
# Combine site: with filetype:
site:github.com filetype:py "CVE-2021-41773"
Best exploit research domains for site: operator:
| Domain | Content Type | Reliability |
|---|---|---|
exploit-db.com |
Curated exploits | Very High |
github.com |
Community PoCs, scripts | High (check stars) |
packetstormsecurity.com |
Exploits, advisories | High |
cvedetails.com |
CVE details, references | Very High |
nvd.nist.gov |
Official CVE database | Very High |
0day.today |
Aggregated exploits | Medium |
securitylab.github.com |
Research writeups | High |
medium.com |
Writeups, tutorials | Medium-High |
filetype: — File Type Filtering
Directly find exploit source code files:
# Find Python exploit scripts
filetype:py "CVE-2021-41773"
# Find Ruby scripts
filetype:rb samba exploit
# Find Bash scripts
filetype:sh privilege escalation
# Find PowerShell scripts (Windows privesc)
filetype:ps1 windows privilege escalation
# Find C source code (for understanding buffer overflows)
filetype:c overflow exploit
# Find PDF writeups and research papers
filetype:pdf "Apache 2.4.49" analysis
# Find Markdown README files (often contain exploit instructions)
filetype:md exploit instructions
inurl: — URL Pattern Matching
Find pages where the exploit identifier appears in the URL:
# Find Exploit-DB pages (they use IDs in URLs)
inurl:exploits "Apache 2.4.49"
# Find GitHub raw files
inurl:raw "CVE-2021-41773"
# Find specific exploit database entries
inurl:16891 exploit
# Find advisory pages
inurl:advisory samba
intitle: — Title Matching
Find pages with exploit-related titles:
# Find pages titled "exploit"
intitle:exploit "Apache 2.4.49"
# Find proof-of-concept pages
intitle:"proof of concept" exchange
# Find writeup pages
intitle:writeup "CVE-2021-41773"
# Find tutorial pages
intitle:tutorial privilege escalation windows
Combining Operators for Maximum Precision
The real power comes from chaining multiple operators:
# The ultimate precision query
site:exploit-db.com "Apache 2.4.49" "path traversal" -metasploit
# Find Python PoCs on GitHub for a specific CVE
site:github.com filetype:py "CVE-2021-41773" -metasploit
# Find writeups (not just exploits) for a vulnerability
("writeup" OR "analysis" OR "research") "CVE-2021-41773" filetype:pdf
# Search for Windows privesc scripts excluding old results
filetype:py windows "privilege escalation" -2010 -2011 -2012 -2013 -2014
# Find Exchange ProxyShell exploits in Python on GitHub
site:github.com filetype:py ("ProxyShell" OR "CVE-2021-34473" OR "CVE-2021-31207")
3. Google Dorking for Exploits
Google dorking (advanced Google search techniques) is an essential OSCP skill. Google indexes exploit databases, GitHub repositories, personal blogs, and research papers — making it the most comprehensive exploit search engine available.
Core Exploit Dork Patterns
Finding Exploit Code Directly
# Find Python exploit scripts indexed by Google
filetype:py "exploit" "vulnerable"
# Find exploit scripts with specific CVE references
filetype:py "CVE-2021-41773" "exploit"
# Find scripts hosted on GitHub raw content
site:github.com filetype:py "RCE" "exploit"
# Find exploit scripts with usage instructions
filetype:py "Usage:" "exploit" "target"
Finding Proof-of-Concept (PoC) Code
# Find PoC implementations
"proof of concept" OR "poc" "CVE-2021-41773"
# Find PoC on GitHub
site:github.com "poc" "CVE-2021-41773"
# Find PoC with test instructions
"proof of concept" "tested on" exploit
Finding Writeups and Research
# Find detailed writeups
"writeup" "CVE-2021-41773"
# Find research papers
filetype:pdf "vulnerability analysis" "Apache"
# Find blog posts with exploit walkthroughs
"step by step" exploit "Apache 2.4.49"
# Find HackerOne-style disclosures
site:hackerone.com "Apache" vulnerability
Finding Configuration Files and Default Credentials
# Find default credential lists
"default credentials" "Apache" filetype:txt
# Find configuration templates with vulnerabilities
filetype:conf "Apache" "ServerTokens Full"
# Find exposed configuration files
intitle:"index of" "web.config"
# Find exposed admin panels
intitle:"admin" "login" "Apache"
Advanced Dork Chains for OSCP
# The "I need a working exploit NOW" dork
("exploit" OR "poc" OR "proof of concept") "tested" "working" "CVE-2021-41773"
# The "I need to understand this vulnerability" dork
("analysis" OR "writeup" OR "research" OR "deep dive") "CVE-2021-41773"
# The "I need a script I can modify" dork
site:github.com filetype:py "exploit" "TODO" OR "FIXME" OR "TODO:"
# The "I need Windows privesc" dork
("privilege escalation" OR "privesc") windows ("python" OR "powershell") "local"
# The "Exchange Server" mega-dork
("Exchange Server" OR "Microsoft Exchange") ("2016" OR "2019") ("exploit" OR "poc") ("ProxyShell" OR "CVE-2021-34473" OR "CVE-2021-26855")
# The "SMB/Samba" dork
("Samba" OR "SMB") ("exploit" OR "poc") ("RCE" OR "remote code execution") -metasploit
Google-Specific Tips
- Use Google’s time filter: After searching, click “Tools” → “Any time” → “Past year” to get recent exploits
- Use the “Tools” → “Type” → “Videos” filter to find video walkthroughs of exploits
- Use
num=100parameter to show more results per page (some browsers support this) - Use Google Cache (
cache:URL) if an exploit page has been taken down - Use Google Scholar (
scholar.google.com) for academic vulnerability research papers
4. Version-Specific Searches
The Search Hierarchy
When searching for exploits, follow this four-level hierarchy from most specific to most general:
Level 1: Exact Version → "Apache 2.4.49" exploit
Level 2: Version Range → "Apache 2.4.40" through "Apache 2.4.51" exploit
Level 3: Product Family → "Apache HTTP Server" exploit
Level 4: Vendor → "Apache Software Foundation" vulnerabilities
Why the Hierarchy Matters
| Level | Precision | Coverage | When to Use |
|---|---|---|---|
| Level 1 | Highest | Narrowest | You have the exact version |
| Level 2 | High | Wider | You know the major.minor version |
| Level 3 | Medium | Broad | Version is unknown or obfuscated |
| Level 4 | Low | Widest | Only the vendor is known |
Practical Examples of Each Level
Level 1: Exact Version Search
# You have the exact version from banner grabbing
searchsploit "Apache 2.4.49"
# Google search
"Apache 2.4.49" exploit
# CVE Details
# Navigate to: Vendor → Apache → HTTP Server → 2.4.49
Level 2: Version Range Search
When you know the major.minor but not the patch version:
# Search for the major.minor version
searchsploit "Apache 2.4"
# Try adjacent versions
searchsploit "Apache 2.4.48"
searchsploit "Apache 2.4.49"
searchsploit "Apache 2.4.50"
# Google: search for the version range
"Apache 2.4.40" OR "Apache 2.4.41" OR "Apache 2.4.42" exploit
# Search for "versions before" pattern
"Apache" "before 2.4.50" vulnerable
Level 3: Product Family Search
When the version is completely unknown:
# Search for the product name only
searchsploit "Apache HTTP Server"
# Add vulnerability type for filtering
searchsploit "Apache HTTP Server" "path traversal"
# Google: use product name + vulnerability class
"Apache HTTP Server" "remote code execution" exploit
Level 4: Vendor Search
Last resort — when you only know the vendor:
# Search by vendor
searchsploit -p linux apache
# CVE Details: browse by vendor
# cvedetails.com → Vendor → Apache Software Foundation
Handling Partial Version Information
In the OSCP exam, you often get partial version info. Here’s how to handle each scenario:
| Scenario | What You Know | Search Strategy |
|---|---|---|
| Full version | Apache/2.4.29 (Ubuntu) |
Level 1: "Apache 2.4.29" exploit |
| Major.Minor only | Apache/2.4 (Ubuntu) |
Level 2: Search 2.4.x range, check common vulns |
| Major only | Apache/2 (Ubuntu) |
Level 3: "Apache HTTP Server 2.x" exploit |
| Build number | IIS/10.0.17763 |
Search IIS 10.0 Windows Server 2019 |
| No version | Apache/unknown |
Level 3 + fingerprinting techniques |
| Obfuscated | Custom error page | Identify product → Level 3 search |
| Partial banner | Samba 4.x |
Search Samba 4.9 (most common vulnerable range) |
Version Detection Techniques for Better Searches
Before searching, maximize your version detection:
# Nmap version detection (always start here)
nmap -sV -p 80,443,8080 <target>
# Nmap with aggressive version detection
nmap -sV --version-intensity 5 -p 80 <target>
# HTTP header analysis
curl -I http://<target>:80
curl -v http://<target>:80
# WhatWeb for web technology detection
whatweb http://<target>:80
# Wappalyzer (browser extension)
# Install and browse the target
# Nikto for web server enumeration
nikto -h http://<target>:80
# Specific service banners
telnet <target> 21 # FTP banner
telnet <target> 25 # SMTP banner
telnet <target> 3306 # MySQL banner
5. CVE-Based Searches
Why CVE-Based Searches Are Powerful
CVE (Common Vulnerabilities and Exposures) IDs are unique, standardized identifiers. Searching by CVE eliminates ambiguity and returns the most relevant results.
CVE Search Patterns
Direct CVE Search
# Searchsploit
searchsploit "CVE-2021-41773"
# Google
"CVE-2021-41773" exploit
# Exploit-DB web interface
# https://www.exploit-db.com/search?action=search&keywords=CVE-2021-41773
CVE with Technology/Platform
# CVE + programming language
"CVE-2021-41773" python exploit
# CVE + target platform
"CVE-2021-41773" linux exploit
# CVE + specific implementation
"CVE-2021-41773" apache ubuntu
# CVE + exploit type
"CVE-2021-41773" "remote code execution"
Multiple CVE Searches
When a product has multiple related CVEs (common with Exchange ProxyShell):
# Search for any of multiple CVEs
"CVE-2021-34473" OR "CVE-2021-31207" OR "CVE-2021-34523" OR "CVE-2021-26855" exploit
# Searchsploit with multiple CVEs
searchsploit "CVE-2021-34473"
searchsploit "CVE-2021-31207"
# Google: find exploits that chain multiple CVEs
"ProxyShell" "CVE-2021-34473" "CVE-2021-31207" chain exploit
CVE with Exclusions
# Exclude Metasploit (want standalone scripts)
"CVE-2021-41773" exploit -metasploit
# Exclude proof-of-concept (want full exploits)
"CVE-2021-41773" exploit -"proof of concept"
# Exclude old, patched versions
"CVE-2021-41773" exploit -patched -fixed
Finding CVEs for a Product
If you don’t know the CVE yet, find it first:
# Method 1: CVE Details website
# 1. Go to cvedetails.com
# 2. Select vendor from dropdown
# 3. Select product
# 4. Filter by version
# 5. Sort by CVSS score (highest first)
# Method 2: NVD Advanced Search
# 1. Go to nvd.nist.gov
# 2. Use Advanced Search
# 3. Enter CPE or product name
# 4. Filter by version and severity
# Method 3: searchsploit (reverse lookup)
searchsploit "Apache 2.4.49"
# Look at the CVE column in results
# Method 4: Google
"Apache 2.4.49" CVE vulnerable
OSCP-Relevant CVE Quick Reference
| CVE | Product | Type | Severity | Search Query |
|---|---|---|---|---|
| CVE-2021-41773 | Apache 2.4.49-2.4.50 | Path Traversal/RCE | Critical | "CVE-2021-41773" exploit |
| CVE-2017-0144 | MS17-010 (EternalBlue) | SMB RCE | Critical | "MS17-010" exploit |
| CVE-2020-1472 | ZeroLogon | Netlogon RCE | Critical | "ZeroLogon" exploit |
| CVE-2021-34527 | PrintNightmare | Windows Privesc | Critical | "PrintNightmare" exploit |
| CVE-2021-26855 | Exchange Server | SSRF | High | "CVE-2021-26855" exploit |
| CVE-2021-34473 | Exchange Server | RCE (ProxyShell) | Critical | "ProxyShell" exploit |
| CVE-2019-0708 | MS-RPC | Windows RCE | Critical | "CVE-2019-0708" exploit |
| CVE-2019-19781 | SMBGhost | SMB DoS/RCE | Critical | "SMBGhost" exploit |
| CVE-2021-44228 | Log4j | RCE | Critical | "Log4Shell" exploit |
| CVE-2024-3400 | Exchange | RCE | Critical | "CVE-2024-3400" exploit |
6. DuckDuckGo and Alternative Search Engines
When to Use Alternatives
| Engine | Best For | Advantage Over Google |
|---|---|---|
| DuckDuckGo | Privacy-focused searches, no filter bubble | Same operators as Google, no personalized results |
| GitHub Search | Finding PoC code, scripts | Direct code search, language filters |
| Bing | Microsoft product exploits | Better indexing of Microsoft documentation |
| Yahoo | Older exploits | Different indexing, may find archived content |
| Yandex | Russian/Eastern European software | Better for non-English content |
| Baidu | Chinese software/products | Better for Chinese vendor products |
DuckDuckGo-Specific Operators
DuckDuckGo supports most Google operators:
# Exact phrase
"Apache 2.4.49" exploit
# Site restriction
site:exploit-db.com "CVE-2021-41773"
# File type
filetype:py exploit apache
# Exclusion
samba exploit -metasploit
# OR operator
python OR ruby exploit exchange
GitHub Advanced Search
GitHub has its own powerful search syntax:
# Search repository names and READMEs
"CVE-2021-41773" in:name,readme
# Search file contents
"exploit" "Apache" in:filepath language:python
# Search for files with specific extensions
extension:py "CVE-2021-41773"
# Filter by stars (quality indicator)
"CVE-2021-41773" stars:>10
# Filter by recent activity
"CVE-2021-41773" pushed:>2023-01-01
# Search specific repositories
repo:offensive-security/exploitdb "Apache 2.4.49"
# Combine multiple filters
"CVE-2021-41773" language:python stars:>5 pushed:>2021-01-01
Specialized Search Resources
| Resource | URL | Best For |
|---|---|---|
| Exploit-DB | exploit-db.com | Curated, tested exploits |
| Packet Storm | packetstormsecurity.com | Exploits, advisories, tools |
| 0day.today | 0day.today | Aggregated exploits (verify!) |
| Sploitus | sploitus.com | Exploit search engine |
| CVE Details | cvedetails.com | CVE lookup by vendor/product |
| NVD | nvd.nist.gov | Official CVE database |
| GitHub | github.com | Community PoCs, scripts |
| SecLists | github.com/danielmiessler/SecLists | Wordlists, configs, data |
7. DNS/Service Banner-Based Search
From Banner Grab to Exploit Search
The most common OSCP workflow: banner grab → identify service → search for exploit. Here’s how to go directly from a banner to a search query.
Step-by-Step Banner-to-Search Workflow
# Step 1: Banner grab
nmap -sV -p 80,443,8080,8443 <target>
# Output example:
# PORT STATE SERVICE VERSION
# 80/tcp open http Apache httpd 2.4.29 ((Ubuntu))
# 443/tcp open ssl/http Apache httpd 2.4.29 ((Ubuntu))
# Step 2: Extract key information
# Product: Apache httpd
# Version: 2.4.29
# OS hint: Ubuntu
# Step 3: Construct search queries (in order of priority)
searchsploit "Apache 2.4.29"
searchsploit "Apache 2.4.29" ubuntu
"CVE-2018-1301" exploit # If you know the CVE
"Apache 2.4.29" path traversal exploit
Common Banner Patterns and Their Search Translations
| Banner Output | Extracted Info | Search Query |
|---|---|---|
Apache/2.4.29 (Ubuntu) |
Apache 2.4.29, Ubuntu | "Apache 2.4.29" exploit |
Microsoft-IIS/10.0 |
IIS 10.0 | IIS 10.0 Windows Server 2016 exploit |
nginx/1.18.0 |
nginx 1.18.0 | "nginx 1.18.0" exploit |
Samba 4.9.5 |
Samba 4.9.5 | "Samba 4.9.5" exploit |
OpenSSH_7.4p1 |
OpenSSH 7.4 | "OpenSSH 7.4" exploit |
MySQL 5.7.26-0ubuntu0.18.04.1 |
MySQL 5.7.26, Ubuntu 18.04 | "MySQL 5.7.26" exploit |
PostgreSQL 11.2 |
PostgreSQL 11.2 | "PostgreSQL 11.2" exploit |
vsftpd 3.0.3 |
vsftpd 3.0.3 | "vsftpd 3.0.3" exploit |
Redis server v=6.0.6 |
Redis 6.0.6 | "Redis 6.0.6" exploit |
Node.js/14.15.0 |
Node.js 14.15.0 | "Node.js 14.15.0" exploit |
PHP/7.4.3 |
PHP 7.4.3 | "PHP 7.4.3" exploit |
Apache-Coyote/1.1 |
Tomcat (AJP) | Tomcat AJP exploit |
Advanced Banner Analysis
# Full HTTP headers (often reveal more info)
curl -I http://<target>:80
# Example output:
# Server: Apache/2.4.29 (Ubuntu)
# X-Powered-By: PHP/7.4.3
# X-AspNet-Version: 4.0.30319
# X-AspNetMvc-Version: 5.2
# Now you can search for BOTH Apache AND PHP vulnerabilities
searchsploit "Apache 2.4.29"
searchsploit "PHP 7.4.3"
# SSL/TLS banner (for encrypted services)
nmap --script ssl-enum-ciphers -p 443 <target>
# SMB banner
nmap -sV --script smb-enum-shares -p 445 <target>
# SNMP banner (often reveals OS and software)
snmpwalk -v2c -c public <target>
8. Handling Obscure/Unknown Services
The Unknown Service Decision Tree
When you encounter a service you don’t recognize, follow this systematic approach:
Unknown Service Detected
│
▼
Can you identify the product name?
│
┌────┴────┐
Yes No
│ │
▼ ▼
Search by Can you identify the
product + vendor or protocol?
version │
│ ┌─┴──┐
│ Yes No
│ │ │
│ ▼ ▼
│ Search by Analyze the
│ vendor + service behavior
│ protocol (ports, responses)
│ │ │
│ │ ▼
│ │ Try generic search
│ │ "port XXXX exploit"
│ │ │
│ ▼ │
└─────► Combine all │
available info ┘
│
▼
Search with whatever
information you have
Practical Strategies for Unknown Services
Strategy 1: Port-Based Search
# If you know the port but not the service
searchsploit -p windows "port 8080"
# Google search by port
"port 8080" default exploit
"port 8443" exploit
# Common non-standard port services
"port 9090" exploit # Often: Jenkins, Zabbix, Prometheus
"port 8888" exploit # Often: DirBuster, HTTP alt
"port 5000" exploit # Often: Flask, Ruby, various
"port 8000" exploit # Often: Django, HTTP alt
"port 4444" exploit # Often: Metasploit, various
Strategy 2: Response Analysis
# Check HTTP response for clues
curl -v http://<target>:<port>/
# Look for:
# - Server headers
# - X-Powered-By headers
# - Default login pages
# - Error messages that reveal technology
# Check for default pages
curl http://<target>:<port>/admin
curl http://<target>:<port>/login
curl http://<target>:<port>/api
curl http://<target>:<port>/status
Strategy 3: Nmap Scripting Engine
# Use NSE scripts for deep service detection
nmap --script http-enum -p 80 <target>
nmap --script http-headers -p 80 <target>
nmap --script http-title -p 80 <target>
nmap --script smb-enum-shares -p 445 <target>
nmap --script ssl-cert -p 443 <target>
# Comprehensive service detection
nmap -sV -sC -p- <target>
Strategy 4: Technology Stack Fingerprinting
# WhatWeb (comprehensive web tech detection)
whatweb http://<target>:80
# Wfuzz for directory enumeration
wfuzz -c -z file,/usr/share/seclists/Discovery/Web-Content/common.txt http://<target>:80/FUZZ
# Gobuster for directory enumeration
gobuster dir -u http://<target>:80 -w /usr/share/seclists/Discovery/Web-Content/common.txt
Strategy 5: The “Everything You Know” Search
When all else fails, combine every piece of information:
# Combine: port + OS hint + protocol + any text from banners
"port 8080" "Ubuntu" "HTTP" "login" exploit
# Or just search the raw banner text
"Server: Unknown/1.0" exploit
# Search for the error message itself
"Internal Server Error" "Apache" "Ubuntu" exploit
9. Search Strategy Decision Tree
When to Use Which Technique
You need an exploit
│
▼
Do you have the CVE ID?
│ │
Yes No
│ │
▼ ▼
┌────────────────┐ Do you have the
│ CVE-Based │ exact version?
│ Search │ │ │
│ (Section 5) │ Yes No
└────────────────┘ │ │
▼ ▼
┌────────────────┐ Do you have the
│ Version- │ product name?
│ Specific │ │ │
│ Search │ Yes No
│ (Section 4) │ │ │
└────────────────┘ ▼ ▼
┌────────────────┐ Do you know the
│ Product │ vendor/protocol?
│ Family Search │ │ │
│ (Section 4) │ Yes No
└────────────────┘ │ │
▼ ▼
┌────────────────┐ Unknown
│ Vendor/ │ Service
│ Protocol │ Strategy
│ Search │ (Section 8)
└────────────────┘
Quick Decision Matrix
| What You Know | Primary Technique | Secondary Technique | Tertiary Technique |
|---|---|---|---|
| CVE ID | CVE-Based Search | Named Vuln Search | Product + Version |
| Exact Version | Version-Specific (Level 1) | CVE-Based (if CVE found) | Product Family |
| Major.Minor Version | Version-Specific (Level 2) | CVE-Based | Google Dorking |
| Product Name Only | Product Family Search | Google Dorking | Vendor Search |
| Vendor Only | Vendor Search | Protocol Search | Port-Based Search |
| Port Number Only | Port-Based Search | Banner Grab → Retry | Generic Search |
| Named Vulnerability | Named Vuln Search | CVE-Based | Product + Version |
| Nothing | Banner Grab First | Nmap Scripts | SecLists/Defaults |
The OSCP Exam Search Workflow
For the OSCP exam specifically, follow this optimized workflow:
Step 1: Nmap scan with version detection
nmap -sV -sC -p- <target>
Step 2: Extract service + version from output
Step 3: searchsploit with exact version
searchsploit "<product> <version>"
Step 4: If no results, try version range
searchsploit "<product> <major.minor>"
Step 5: If still no results, Google with site: operator
site:exploit-db.com "<product>" "<version>"
Step 6: If still nothing, try GitHub
site:github.com "<product>" "<version>" exploit
Step 7: Last resort — named vulnerability search
"<product>" "known vulnerabilities"
10. Practical Examples with Real Services
Example 1: Apache HTTP Server 2.4.49
# Scenario: Nmap reveals Apache/2.4.49 (Ubuntu)
# Step 1: Exact version search
searchsploit "Apache 2.4.49"
# Expected output includes:
# Apache HTTPd 2.4.49 - Remote Code Execution (RCE) | unix/remote/49362.py
# Step 2: CVE-based search (if you know CVE-2021-41773)
searchsploit "CVE-2021-41773"
# Step 3: Google dork for additional resources
"CVE-2021-41773" exploit python site:github.com
# Step 4: Mirror the exploit
searchsploit -m 49362.py
# Step 5: Review and adapt
cat 49362.py
Example 2: Microsoft Exchange Server 2019
# Scenario: Target runs Microsoft Exchange Server 2019 CU10
# Step 1: Named vulnerability search (ProxyShell is well-known)
searchsploit "ProxyShell"
# Step 2: CVE-based search (ProxyShell chains multiple CVEs)
searchsploit "CVE-2021-34473"
searchsploit "CVE-2021-31207"
# Step 3: Google for comprehensive exploit
"ProxyShell" exploit python site:github.com
# Step 4: Search for all Exchange 2019 vulnerabilities
searchsploit "Exchange Server 2019"
# Step 5: Check CVE Details for complete CVE list
# cvedetails.com → Microsoft → Exchange Server 2019
Example 3: Samba 4.9.5 (ZeroLogon / CVE-2020-1472)
# Scenario: Nmap reveals Samba 4.9.5
# Step 1: Exact version search
searchsploit "Samba 4.9.5"
# Step 2: Named vulnerability search
searchsploit "ZeroLogon"
# Step 3: CVE-based search
searchsploit "CVE-2020-1472"
# Step 4: Google for Python implementation
"CVE-2020-1472" python exploit site:github.com
# Step 5: Mirror and test
searchsploit -m 15006.py
Example 4: Windows Server with SMB (MS17-010)
# Scenario: Windows Server 2016, port 445 open
# Step 1: Check for MS17-010 specifically
searchsploit "MS17-010"
# Step 2: CVE-based search
searchsploit "CVE-2017-0144"
# Step 3: Named vulnerability search
searchsploit "EternalBlue"
# Step 4: Google for working implementations
"MS17-010" exploit python -metasploit site:github.com
# Step 5: Check for Windows-specific privesc too
searchsploit -p windows "privilege escalation" "2016"
Example 5: OpenSSH 7.4 on Linux
# Scenario: Nmap reveals OpenSSH_7.4p1 on Ubuntu 18.04
# Step 1: Exact version search
searchsploit "OpenSSH 7.4"
# Step 2: Version range search
searchsploit "OpenSSH 7"
# Step 3: Platform-specific search
searchsploit -p linux "OpenSSH" "privilege escalation"
# Step 4: If no remote exploit, focus on local privesc
# (OpenSSH remote exploits are rare; check for local vulns instead)
searchsploit -p linux "Ubuntu 18.04" "privilege escalation"
Example 6: Jenkins 2.289
# Scenario: Jenkins 2.289 running on port 8080
# Step 1: Exact version search
searchsploit "Jenkins 2.289"
# Step 2: Product family search
searchsploit "Jenkins" "Groovy Console"
# Step 3: Known vulnerability search
searchsploit "Jenkins" "script console"
# Step 4: Google for default credential attacks
"Jenkins" "default credentials" "admin"
# Step 5: Check for CVE-based exploits
searchsploit "CVE-2024-23897" # Jenkins Open Redirect
Summary Cheat Sheet
Quick Reference: Search Query Templates
# Template 1: Exact version (most common)
"<Product> <Version>" exploit
# Template 2: CVE-based (most precise)
"<CVE-ID>" exploit python
# Template 3: Named vulnerability (fastest)
"<VulnName>" exploit
# Template 4: Product + vulnerability type
"<Product>" "<VulnType>" exploit
# Template 5: Platform-specific
"<Product>" "<OS>" exploit
# Template 6: Google dork (comprehensive)
site:exploit-db.com "<Product>" "<Version>"
# Template 7: GitHub PoC search
site:github.com filetype:py "<CVE-ID>"
# Template 8: Exclude Metasploit
"<Product>" "<Version>" exploit -metasploit
# Template 9: Multiple CVEs
"<CVE-1>" OR "<CVE-2>" OR "<CVE-3>" exploit
# Template 10: Writeup/research search
"<CVE-ID>" ("writeup" OR "analysis" OR "research")
Key Takeaways for OSCP
- Always start with the exact version — it’s your most powerful filter
- Quote version numbers and CVE IDs — prevents false matches
- Use
site:exploit-db.com— the most reliable exploit source - Search for named vulnerabilities — they have the best-tested exploits
- Use
-metasploitwhen you need standalone scripts - Fall back through the hierarchy — exact → range → product → vendor
- Check GitHub — often has newer PoCs than Exploit-DB
- Read the exploit code — never run something you don’t understand
- Test in a lab first — verify before using on the target
- Document your search process — the exam report requires it
Common Mistakes to Avoid
| Mistake | Consequence | Fix |
|---|---|---|
| Searching without quotes | Thousands of irrelevant results | Always quote versions and CVEs |
| Using vague terms | Wasted time scrolling | Use specific product names |
| Ignoring the version | Exploit may not work | Always verify version match |
| Not checking platform | Wrong OS exploit | Include OS in search query |
| Skipping code review | Exploit fails or crashes | Read the exploit before running |
| Only using one source | Missing better exploits | Check Exploit-DB, GitHub, Packet Storm |
| Not updating searchsploit | Missing recent exploits | Run searchsploit --update regularly |