Notes OSCP Tools

Tools

SearchSploit

SearchSploit searches the local Exploit-DB copy included with Kali. It can also copy a PoC into the current working directory.

Install

SearchSploit is normally installed on Kali. If it is missing:

sudo apt update
sudo apt install -y exploitdb

Search by product and version:

searchsploit saltstack 3000.1

Search by CVE:

searchsploit --cve 2020-11651

Inspect a PoC

Open an entry in the terminal before copying or running it:

searchsploit -x 48421

Show its location in the local Exploit-DB repository:

searchsploit -p 48421

Copy a PoC

Change to the current machine’s exploit directory:

cd ~/oscp/machines/BOX/exploits

Copy EDB-ID 48421 into that directory:

searchsploit -m 48421

Confirm the file type and read the usage information:

file 48421.py
python3 48421.py -h

Do not run a PoC before reading it. Check:

  • Which target and port it uses.
  • Whether it writes or deletes files.
  • Whether it executes commands automatically.
  • Which dependencies it imports.
  • Whether it expects Python 2 or Python 3.
  • Whether its vulnerable version range matches the discovered service.

Download Fallback

If the local database does not contain the entry:

curl -o 48421.py https://www.exploit-db.com/download/48421

The local SearchSploit copy is preferred because it is quick, works offline, and avoids copying code manually from the website.

Update

searchsploit -u