Module 8 · Kali Linux and Security Tools · Lesson 24 of 75
Nmap in depth, netcat, searchsploit and Metasploit
Host discovery, scan types, timing, version and script scans with Nmap; banner grabbing with netcat; then finding and checking a known vulnerability with searchsploit and Metasploit.
In this lesson · about 45 minutes
- Choose Nmap scan types, port ranges and timing for a situation
- Grab a banner with netcat
- Find an exploit with searchsploit and run a safe check in Metasploit
Nmap essentials
| Option | What it does |
|---|---|
-sn | Host discovery only ("ping sweep"), no port scan |
-sS | SYN ("half-open") scan, the default when run with sudo: fast and quiet |
-sT | Full TCP connect scan (default without root) |
-sU | UDP scan (slow, but finds DNS, SNMP, NTP) |
-p 22,80,443, -p-, --top-ports 100 | Choose ports. The default is the 1,000 most common; -p- is all 65,535. |
-sV | Detect service versions |
-O | Guess the operating system |
-sC / --script vuln | Run default scripts / vulnerability scripts (NSE) |
-A | Aggressive: -sV -O -sC plus traceroute |
-T0…-T5 | Timing, from very slow to very fast; T3 is normal, T4 fine on a lab LAN |
-Pn | Skip host discovery (treat hosts as up), for targets that block ping |
-oA name | Save normal, XML and grepable output |
Port states: open (a service answered), closed (reachable, nothing listening), filtered (a firewall dropped the probe), plus open|filtered for UDP when there is no answer.
A sensible routine: discover hosts with -sn; quick scan of top ports; then a full -p- scan in the background; then -sV -sC only on the open ports you found.
Exploit research
Once you know versions, look them up: vendor advisories, the NVD (Module 13), and Exploit-DB, searchable offline with searchsploit. Always read public exploit code before running it: some is broken, some is dangerous to the target, and some is booby-trapped.
Metasploit basics
msfconsole opens the framework. Modules are exploits, auxiliary (scanners, brute-forcers), post (after access) and payloads (what runs after a successful exploit, such as a Meterpreter session). The workflow: search → use → info → show options → set RHOSTS → check (if supported) → run. Many modules have a check command that tests vulnerability without exploiting it, which is often all a vulnerability assessment needs.
Hands-on lab (simulated terminal)
Lab: map the lab network and check one finding
Authorised scope: the isolated lab network 10.10.40.0/24. You are on Kali. Output is simulated and the hosts are training VMs.
Step 1 of 9. Type each command and press Enter. Nothing runs on your computer.
1. Find which hosts are up, without port scanning.
Flashcards
Module 8 flashcards
0 of 11 known
Say the answer out loud, flip the card, then be honest: cards you miss come back at the end.
Practice exam
Module 8 checkpoint
10 questions, 12 minutes.
- 10 questions · 12 minutes
- No feedback until you submit. Flag questions to come back to them.
- Aim for 85% or better before you move on. The real exam's 750 out of 900 is roughly 80–83%.
Written by Noviq Academy in its own words. All labs are simulations: no real systems are touched, and every name, address, password and hash is made up. The offensive techniques taught here are for defending systems and for authorised testing only; never scan, access or test a system without the owner's written permission. Tool and product names belong to their owners, and command output may differ slightly from yours. Read-aloud uses your device's built-in voices.