Skip to content
FORGENO ADS GAMESLifetime Pass $8

Ethical Hacking & Cyber Defense · Unit 4 of 8

Unit 4: Reconnaissance and scanning

Passive recon from public sources, scanning with Nmap, services and versions, and turning scanner output into verified, prioritized findings with CVE and CVSS.

Opens the first lesson of this unit in Ethical Hacking & Cyber Defense. Every lesson is open from the start.

Lesson 1: Passive recon: what the public can already see

Goal: Gather information about an in-scope organization from public sources without touching its systems.

Passive reconnaissance means learning about a target without sending anything to its systems. It uses OSINT (open-source intelligence): information anyone can find. Because it does not touch the target, it is usually low risk, but it still belongs inside the engagement's scope and rules, and you must handle anything personal you find with care.

SourceWhat it can reveal
The company websiteProducts, locations, staff names, email address format
DNS records and certificate transparency logsSubdomains, mail and cloud providers, forgotten test sites
Job postingsTechnologies in use (“experience with our Fortinet firewalls and Microsoft 365”)
Professional social networksWho works in IT and security, and what systems they mention
Public code repositoriesCode, configuration and sometimes accidentally published secrets
Search engines and archivesOld pages, exposed documents and past versions of the site

Testers use recon to plan, and defenders use the exact same techniques to see themselves as an attacker would. A digital footprint review often finds things nobody inside knew were public: a developer's repository with an old API key, a forgotten marketing site on an outdated platform, or a staff directory that makes phishing easy. Finding these before a criminal does is valuable work in itself.

Worked example: building an attack-surface picture

  1. The scope is example.com and its subdomains, for a passive review only.
  2. Certificate logs list 14 subdomains, including old-shop.example.com. An archive service shows it was a store that closed in 2021.
  3. A job post asks for experience with a specific VPN product, and public repositories by a company developer include a configuration file with an internal hostname.
  4. The tester records each source, avoids collecting personal details beyond what the test needs, and reports: retire old-shop, review public repositories for secrets, and keep the VPN fully patched.

Without a single packet sent to the company, the review produced three useful fixes. Recon is often where the easiest wins are.

Passive reconnaissance
Gathering information about a target without sending any traffic to its systems.
OSINT
Open-source intelligence: information gathered from public sources.
Attack surface
Everything an attacker could try to interact with: systems, services, people and data that are exposed.
Digital footprint
The information about an organization or person that is publicly available online.

Remember: Look before you touch: public sources often reveal the easiest weaknesses.

Lesson 2: Active scanning with Nmap

Goal: Read Nmap commands and explain host discovery, port selection and scan types, and when scanning is allowed.

Active scanning sends traffic to the target to see what responds. Nmap is the standard free tool, used by testers and network administrators alike. Because scanning touches systems, it needs authorization, and it can trigger alarms or, rarely, upset fragile old devices, which is why rules of engagement often set scanning times. The Nmap project runs scanme.nmap.org specifically so learners can practise scanning a real host with permission.

OptionMeaning
-snHost discovery only: which addresses are up? No port scan.
-sSSYN scan: fast, does not complete the handshake (needs admin rights)
-sTTCP connect scan: completes the handshake through the operating system
-sUUDP scan: slower and less certain
-p 1-1024 / -p-Scan a range of ports / all 65,535
-sVDetect service versions
-oN file.txtSave the results to a file for your evidence

By default Nmap scans the 1,000 most common TCP ports. A typical professional sequence is: discover live hosts, run a quick scan of common ports, then scan all ports and detect versions on the interesting hosts, saving output every time. Nmap also has timing options (from -T0 slowest to -T5 fastest); faster is noisier and can miss results on slow networks, so testers usually stay at the default or -T4 on reliable networks.

Worked example: a careful scan plan

  1. The first command finds which of the 256 addresses respond, without scanning any ports.
  2. Twelve hosts are up. The tester picks the web server at 192.0.2.40 for a full scan.
  3. The second command checks all 65,535 TCP ports with a SYN scan, detects versions and saves the results with a clear file name and the time in the notes.
# Authorized scope: 192.0.2.0/24, 10 p.m.-4 a.m.
nmap -sn 192.0.2.0/24 -oN hosts.txt
nmap -sS -sV -p- 192.0.2.40 -oN web40-full.txt

Start broad and gentle, then go deep on what matters, and save everything. That is how a scan becomes evidence.

Active scanning
Sending traffic to a target's systems to find hosts, ports and services; requires authorization.
Nmap
A free, widely used network scanner for host discovery, port scanning and service detection.
Host discovery
Finding which addresses in a range belong to devices that are up, before scanning their ports.
scanme.nmap.org
A host run by the Nmap project that anyone may scan for practice.

Remember: Discover, quick scan, then deep scan the interesting hosts. Always -oN to save evidence.

Lesson 3: Services, versions and enumeration

Goal: Read service and version detection results and decide what to investigate first.

Knowing that a port is open is only the start. Enumeration means finding out exactly what is behind it: which software, which version, what it is configured to allow. Nmap's -sV sends probes and compares the replies to a large database to name the service and version. Services also announce themselves in banners, the first text a server sends, and in web pages, error messages and headers.

PORT     STATE    SERVICE  VERSION
22/tcp   open     ssh      OpenSSH 9.6 (protocol 2.0)
80/tcp   open     http     nginx 1.24.0
443/tcp  open     ssl/http nginx 1.24.0
3306/tcp open     mysql    MySQL 5.5.62
8080/tcp open     http     Apache Tomcat 8.0.32
3389/tcp filtered ms-wbt-server

Versions matter because vulnerabilities are tied to them. A service many years out of date has usually collected a list of public vulnerabilities. In the scan above, MySQL 5.5 and Tomcat 8.0 are both versions whose support ended years ago, which makes them likely findings; a database reachable from outside the server is a finding by itself. Version detection can be wrong, though, and some vendors patch old version numbers without changing the banner, so you confirm before you claim.

Good enumeration also asks configuration questions. Does the web server show a default page or a directory listing? Does the admin panel on 8080 use default credentials (if the rules allow login tests)? Does the SSH server allow password logins, or only keys? These configuration weaknesses are some of the most common real-world findings, and many are fixed with a setting rather than a patch.

Worked example: choosing what to look at first

  1. SSH 9.6 and nginx 1.24 are recent; note them and move on unless something else points back to them.
  2. MySQL 5.5 is open to the network and years past end of support: high priority, both for exposure and age.
  3. Tomcat 8.0 on 8080 is an old application server with a management interface that is often left with weak passwords.
  4. RDP is filtered: a firewall blocks it from here, which is good. Note it, and check from inside the network later if that is in scope.

The first questions are “what is old?” and “what should not be exposed?” MySQL and Tomcat answer both.

Hands-on lab in the room: Scan reader. Read a full scan of an invented server and decide what it tells you.

Enumeration
Finding out exactly which software, versions and settings run behind an open port.
Banner
The identifying text a service sends when you connect, often including its name and version.
End of support
The date after which a vendor stops releasing security fixes for a product version.
Default credentials
The username and password a product ships with, which attackers try first if they were never changed.

Remember: Open is the start. Ask: what exactly is it, how old is it, and should it be exposed at all?

Lesson 4: Vulnerability scanning, CVEs and false positives

Goal: Read CVE IDs and CVSS scores, separate false positives from real issues, and prioritize a scanner's results.

Vulnerability scanners such as Nessus, OpenVAS and Qualys check systems against huge databases of known weaknesses. Public vulnerabilities get a CVE identifier, such as CVE-2024-12345: the year it was assigned and a number. Each CVE is described in the US National Vulnerability Database (NVD) and vendor advisories, usually with a CVSS score from 0.0 to 10.0 that estimates technical severity.

CVSS qualitative ratings (the same bands in CVSS versions 3.1 and 4.0)
CVSS scoreSeverity rating
0.0None
0.1–3.9Low
4.0–6.9Medium
7.0–8.9High
9.0–10.0Critical

A scanner's output is a list of candidates, not facts. A false positive is a reported problem that is not real, for example because the system was patched without the version number changing. A false negative is a real problem the scanner missed, often because it could not log in to see installed software. Credentialed scans, which log in with a read-only account, give far more accurate results than scanning from outside.

Severity is not the same as priority. CVSS measures how bad a weakness is in general; the client cares how bad it is *for them*. A Critical on a lab machine with no data may matter less than a High on the public payment site. Two more inputs help: whether the system is exposed to the internet and holds important data, and whether criminals are actually using the vulnerability. The US agency CISA publishes a Known Exploited Vulnerabilities (KEV) catalog for exactly that reason.

Worked example: prioritizing three scanner results

  1. Result 1: CVSS 9.8 on an internal test server with no real data, not reachable from the internet.
  2. Result 2: CVSS 7.5 on the internet-facing VPN, and the CVE is in CISA's Known Exploited Vulnerabilities catalog.
  3. Result 3: CVSS 5.3 information-disclosure finding on the public website, which the team verified is a false positive (the server was patched by the vendor's backport).

Fix order: Result 2 first (exposed and actively exploited), then Result 1, and close Result 3 as a false positive with a note explaining why. Context turns a score into a decision.

Hands-on lab in the room: Severity and priority. Rate findings by CVSS score, then put real-world findings in the order you would fix them.

CVE
Common Vulnerabilities and Exposures: the public ID system for known vulnerabilities, such as CVE-2024-12345.
CVSS
Common Vulnerability Scoring System: a 0.0–10.0 score estimating a vulnerability's technical severity.
False positive
A reported problem that turns out not to be real.
False negative
A real problem that a tool or analyst failed to detect.
KEV catalog
CISA's Known Exploited Vulnerabilities catalog: vulnerabilities confirmed to be used in real attacks.

Remember: Scanners give candidates. Verify, then prioritize by exposure, data and real-world exploitation, not score alone.

Practise it in Ethical Hacking & Cyber Defense

Each lesson ends with three questions that check you can use the idea, not just recognise it. Wrong answers explain why and come back in Review. The unit ends with a 6-question quiz; pass it with 80% or more to master the unit. Hands-on lab: Scan reader and Severity and priority.

Every lesson is free: no ads, no lives and no paywall.