SearchSploit
SearchSploit is the command-line interface for the Exploit Database (Exploit-DB). It lets you search locally for publicly documented exploits, shellcodes, and related security research.
Use it only for systems you own or are explicitly authorized to assess.
Link -> https://github.com/Err0r-ICA/Searchsploit
1. Install SearchSploit
On Kali Linux:
sudo apt update sudo apt install exploitdb -y
Check:
searchsploit --help
Version:
searchsploit --version
2. Basic Syntax
The basic format is:
searchsploit [options] search-term
Example:
searchsploit apache
Search for SSH:
searchsploit ssh
Search for Samba:
searchsploit samba
Search for WordPress:
searchsploit wordpress
3. Understand the Output
Example:
---------------------------------------------- --------------------------------- Exploit Title | Path ---------------------------------------------- --------------------------------- Apache HTTP Server - Example Vulnerability | linux/remote/12345.txt Apache Module - Example Vulnerability | multiple/webapps/12346.py ---------------------------------------------- ---------------------------------
Important columns:
Exploit Title ↓ What the exploit targets Path ↓ Where the exploit exists in the local Exploit-DB database
The path can tell you the general category:
linux/ windows/ multiple/ webapps/ hardware/ dos/
4. Search by Product
Suppose Nmap finds:
Apache httpd 2.4.x
Search:
searchsploit apache 2.4
For OpenSSH:
searchsploit openssh
For vsftpd:
searchsploit vsftpd
For Samba:
searchsploit samba
For MySQL:
searchsploit mysql
5. Search Exact Phrases
SearchSploit supports quoted searches.
searchsploit "Apache Tomcat"
Another example:
searchsploit "Microsoft IIS"
This can reduce unrelated results.
6. Search by Version
If Nmap reports:
Apache httpd 2.4.49
Try:
searchsploit "Apache 2.4.49"
You can also search more broadly:
searchsploit apache 2.4
Then manually compare the exploit's affected versions with the version discovered by Nmap.
Important: A SearchSploit result does not automatically mean the target is vulnerable.
7. Case-Insensitive Searching
SearchSploit searches are generally case-insensitive, so:
searchsploit apache
and:
searchsploit Apache
will normally find the same relevant results.
8. Search Multiple Keywords
You can narrow searches with multiple terms:
searchsploit apache linux
Example:
searchsploit wordpress plugin
Another:
searchsploit samba remote
9. Exclude Results
The --exclude option can remove unwanted results.
Example:
searchsploit apache --exclude="dos"
You can use this when the search returns many denial-of-service results and you are interested in other exploit types.
10. Show Exploit Details
Suppose you find:
linux/remote/12345.py
You can inspect it with:
searchsploit -x 12345
Or:
searchsploit -x linux/remote/12345.py
This displays the exploit source locally.
11. Copy an Exploit
SearchSploit can copy an exploit to your current directory.
searchsploit -m 12345
Or using the path:
searchsploit -m linux/remote/12345.py
Then:
ls
You can inspect the copied file:
cat 12345.py
For Python:
less 12345.py
12. Examine an Exploit Safely
Before running an exploit, inspect it.
less 12345.py
Look for:
Target version Target operating system Required arguments Network port Authentication requirements Dependencies Payload behavior
You can also identify the file:
file 12345.py
For scripts:
head -n 30 12345.py
13. Find the Exploit-DB ID
Search:
searchsploit apache
You'll see an identifier/path associated with each result.
You can then inspect that specific entry:
searchsploit -x <EDB-ID>
Or copy it:
searchsploit -m <EDB-ID>
14. SearchShellcodes
Search:
searchsploit shellcode
Architecture-specific searches can also be useful:
searchsploit linux x86 shellcode
searchsploit linux x64 shellcode
searchsploit windows x86 shellcode
Remember that shellcode is payload-level material, not automatically an exploit by itself.
15. Search Web Applications
For web applications:
searchsploit wordpress
searchsploit joomla
searchsploit drupal
For a specific plugin:
searchsploit wordpress plugin
For a CMS version:
searchsploit "WordPress 6"
16. Search Network Services
FTP
searchsploit ftp
Specific product:
searchsploit vsftpd
SSH
searchsploit openssh
SMB/Samba
searchsploit samba
Apache
searchsploit apache
Nginx
searchsploit nginx
MySQL
searchsploit mysql
PostgreSQL
searchsploit postgresql
17. Updating SearchSploit
Exploit-DB data can be updated.
On Kali:
sudo searchsploit -u
You may see output indicating that the local Exploit-DB repository is being updated.
After updating:
searchsploit --version
Then test:
searchsploit apache
18. JSON Output
SearchSploit can produce structured output.
searchsploit apache --json
This can be useful if you're processing results programmatically.
For example:
searchsploit wordpress --json > wordpress.json
Then:
cat wordpress.json
19. XML Output
You can also request XML-formatted results:
searchsploit apache --xml
Save them:
searchsploit apache --xml > apache.xml
This can be useful when integrating SearchSploit into assessment tooling.
20. HTML Output
SearchSploit can generate HTML-formatted results:
searchsploit apache --html
Save:
searchsploit apache --html > apache.html
21. URL Information
SearchSploit can display Exploit-DB URLs:
searchsploit apache --www
This is useful when you want to locate the corresponding Exploit-DB entry.
22. Search Without Color
For scripting or cleaner terminal output:
searchsploit --colour apache
Depending on your SearchSploit version, option behavior can differ, so always verify:
searchsploit --help
23. Combining Nmap + SearchSploit
This is the most important practical workflow.
Suppose you run:
nmap -sV 192.168.56.101
You get:
PORT STATE SERVICE VERSION 21/tcp open ftp vsftpd 2.x 22/tcp open ssh OpenSSH 80/tcp open http Apache 139/tcp open netbios Samba 445/tcp open microsoft-ds Samba
Don't immediately exploit everything.
Take one service at a time.
FTP
searchsploit vsftpd
SSH
searchsploit openssh
Apache
searchsploit apache
Samba
searchsploit samba
Then compare:
Nmap result ↓ Product ↓ Exact version ↓ SearchSploit ↓ Potential matching exploit ↓ Read exploit description ↓ Verify affected version ↓ Test only in authorized lab
24. Example With Metasploitable2
For your Kali + Metasploitable2 lab:
Step 1 — Find the target
sudo nmap -sn 192.168.56.0/24
Suppose:
192.168.56.101
Step 2 — Enumerate services
sudo nmap -sV -O 192.168.56.101
Suppose you discover:
21/tcp open ftp 22/tcp open ssh 80/tcp open http 139/tcp open netbios 445/tcp open microsoft-ds
Step 3 — Search each technology
searchsploit ftp
searchsploit ssh
searchsploit apache
searchsploit samba
Step 4 — Narrow the results
For example:
searchsploit samba 3
Step 5 — Inspect a candidate
searchsploit -x <EDB-ID>
Step 6 — Copy it for lab analysis
searchsploit -m <EDB-ID>
Step 7 — Read it
less <exploit-file>
At this point you should understand why the exploit applies, what version it targets, and what prerequisites it has before attempting anything.
25. SearchSploit + Metasploit
One particularly useful feature is finding whether an Exploit-DB entry has a corresponding Metasploit module.
Search:
searchsploit -w <search-term>
Then research the relevant exploit.
Inside Metasploit:
msfconsole
Search for the same vulnerability/product:
search <product>
or:
search cve:<CVE-ID>
This creates a useful relationship:
Nmap ↓ Service + Version ↓ SearchSploit ↓ Exploit-DB / CVE information ↓ Metasploit module ↓ Authorized validation
26. SearchSploit Does NOT Prove Vulnerability
This is extremely important.
If you run:
searchsploit apache
and get 100 results, that does not mean your Apache server has 100 vulnerabilities.
You must compare:
Product Version Operating System Architecture Configuration Vulnerability conditions
For example:
Detected: Apache 2.4.x SearchSploit: Apache 2.4.49 exploit
You cannot conclude that the target is vulnerable until you establish that the actual version and conditions match.
27. Useful Commands Cheat Sheet
# Help searchsploit --help # Version searchsploit --version # Basic search searchsploit apache # Exact phrase searchsploit "Apache Tomcat" # Version search searchsploit "Apache 2.4.49" # Search specific technology searchsploit vsftpd # Search Samba searchsploit samba # Search WordPress searchsploit wordpress # Search shellcode searchsploit shellcode # Exclude results searchsploit apache --exclude="dos" # View exploit searchsploit -x <EDB-ID> # Copy exploit searchsploit -m <EDB-ID> # Show Exploit-DB URL searchsploit --www apache # JSON searchsploit apache --json # XML searchsploit apache --xml # HTML searchsploit apache --html # Update database sudo searchsploit -u
Practical methodology to remember
Nmap tells you what is exposed. SearchSploit tells you what public exploit research exists for it.
Recon ↓ Nmap ↓ Service + Version ↓ SearchSploit ↓ Read / verify candidate ↓ CVE / vendor documentation ↓ Authorized lab validation ↓ Document finding
This is the workflow you should practice on Metasploitable2, rather than simply searching a product name and running the first exploit that appears.