How to Detect Vulnerabilities on a Network
Before an attacker finds the weak spot in your network, you should. This is a practical, tool-by-tool guide to how vulnerabilities are actually detected — the scanners, the commands, and the intelligence sources that turn raw findings into real defense.
Every network is a collection of doors — open ports, running services, web apps, user accounts. Vulnerability detection is the discipline of finding the doors that are unlocked, propped open, or fitted with a broken latch, and doing it before someone with bad intentions walks through. In this guide we’ll work through the main categories of detection, the specific tools that do the job, and exactly how you’d run each one in a home lab.
01 / SCANNINGAutomated vulnerability scanning
Vulnerability scanners are the workhorses of detection. They connect to hosts, enumerate the services running on them, and compare what they find against a database of known flaws — the CVEs (Common Vulnerabilities and Exposures). The output is a prioritized report: missing patches, weak configurations, exposed services, each usually scored with a CVSS severity rating.
Nessus
FreemiumNessus is what most analysts meet first. You point it at a target or subnet, pick a scan policy (a basic network scan is a great start), and it returns findings grouped by severity with remediation guidance for each one. It’s the tool you’d use to answer “what’s wrong with this host, and what do I fix first?”
OpenVAS / Greenbone
Free / Open SourceOpenVAS (now part of the Greenbone Community Edition) does the same job as Nessus without the licensing. It maintains its own feed of vulnerability tests and produces detailed reports. Slightly more setup, but a superb learning tool precisely because you have to configure it yourself.
02 / DISCOVERYPort scanning & service enumeration
Before you can assess a service, you have to know it’s there. Port scanning maps which ports are open, which services are listening, and often which operating system a host is running. An unexpected open port — Telnet on 23, SMB on 445, an admin panel on 8080 — is frequently the very first thread you pull.
Nmap
Free / Open SourceNmap does host discovery, port scanning, service/version detection, OS fingerprinting, and — through the Nmap Scripting Engine (NSE) — actual vulnerability checks. If you learn one tool deeply, make it this one.
# Ping sweep — which hosts are alive on the subnet? nmap -sn 192.168.222.0/24 # Service + version detection on a single target nmap -sV 192.168.222.134 # Aggressive: OS detect, versions, scripts, traceroute nmap -A 192.168.222.134 # Run the vuln script category via NSE nmap --script vuln 192.168.222.134
The -sV flag alone turns a bare port number into something meaningful: not “port 21 open” but “vsftpd 2.3.4” — a version you can immediately search against a CVE database.
03 / TRAFFICPacket analysis & network monitoring
Some vulnerabilities never show up in a scanner report — they live in the traffic. Cleartext credentials, unencrypted protocols, odd outbound connections, misconfigured services chattering on the wire. Packet analysis is how you see them.
Wireshark
Free / Open SourceWireshark captures live traffic and lets you inspect it packet by packet, protocol by protocol. Its power is in the display filters — you can isolate exactly the conversation you care about and read it in plain terms.
# Only HTTP traffic http # Traffic to/from one host ip.addr == 192.168.222.137 # Catch cleartext FTP/Telnet logins ftp || telnet # Follow a full TCP conversation: right-click → Follow → TCP Stream
tcpdump
Free / Open SourceWhen there’s no GUI (a remote server over SSH, for example), tcpdump captures traffic straight from the terminal. It’s also the fastest way to grab a capture file you can later open in Wireshark.
# Capture on eth0, write to a file for later analysis tcpdump -i eth0 -w capture.pcap # Only port 80 traffic, printed live tcpdump -i eth0 port 80
04 / MONITORINGIntrusion detection systems (IDS)
Scanners find weaknesses at a point in time. An IDS watches continuously, comparing live traffic against rule sets and raising alerts when it sees exploit attempts, malware signatures, or policy violations. This is detection as an ongoing sensor, not a one-off audit.
Suricata
Free / Open SourceSuricata inspects traffic against signature rules and generates structured alerts (it even outputs JSON you can feed into a SIEM). It can run purely as a detector (IDS) or inline to actively block traffic (IPS).
# Test the config and rules suricata -T -c /etc/suricata/suricata.yaml # Run against a live interface suricata -c /etc/suricata/suricata.yaml -i eth0 # Watch the alerts roll in tail -f /var/log/suricata/fast.log
Snort
Free / Open SourceSnort pioneered signature-based detection and its rule syntax is a de-facto standard. Learning to read a Snort/Suricata rule — understanding what triggers an alert — is a core blue-team skill.
05 / WEBWeb application scanning
Web apps are their own attack surface, and general network scanners only scratch it. Dedicated web scanners probe for the classic weaknesses — the kind catalogued in the OWASP Top 10: injection, cross-site scripting (XSS), security misconfiguration, and more.
Nikto
Free / Open SourceNikto checks a web server for thousands of potentially dangerous files, outdated versions, and revealing misconfigurations. It’s noisy and not stealthy — but for pure detection in a lab, it’s quick and informative.
# Scan a target web server nikto -h http://192.168.222.134
OWASP ZAP & Burp Suite
Free / FreemiumZAP (fully free) and Burp Suite (free community edition, paid pro) sit between your browser and the target as a proxy, letting you inspect and manipulate every request. Both include automated scanners plus manual tooling to hunt for injection, broken authentication, and logic flaws — a step deeper than Nikto’s surface scan.
06 / HARDENINGConfiguration & patch auditing
Not every vulnerability is a missing patch — many are insecure defaults: weak permissions, unnecessary services, exposed management interfaces. Configuration auditing checks systems against a known-good hardening standard. (For a worked example on a real environment, see our guide on securing a Windows Active Directory environment.)
| Method | What it checks | Example |
|---|---|---|
| CIS Benchmarks | System config against consensus hardening guides | OS, cloud, and app baselines |
| Lynis | Linux/Unix host hardening audit | lynis audit system |
| Patch management | Installed versions vs. vendor advisories | Flagging end-of-life software |
| Compliance scans | Config against a regulatory baseline | Nessus/OpenVAS policy scans |
07 / VALIDATIONConfirming findings with exploitation
Detection tells you a vulnerability might exist. Penetration testing confirms whether it’s genuinely exploitable — separating the theoretical from the dangerous. This is where a scanner finding becomes a proven risk.
Metasploit Framework
Free / Open SourceMetasploit lets you take a detected weakness — say, that outdated vsftpd Nmap flagged — and safely test whether it can actually be exploited in your lab. Confirming exploitability is what lets you prioritize honestly: a “critical” that can’t be reached matters less than a “medium” sitting wide open.
08 / AFTER THE BREACHDetecting post-exploitation activity on web servers
Detection doesn’t stop at the front door. If an attacker has already gotten in — through an unpatched web server, a stolen credential, a vulnerable upload form — everything they do next leaves traces. Post-exploitation is the phase after initial access: escalating privileges, planting a way back in, harvesting credentials, moving deeper into the network, and quietly removing the evidence. Knowing what those activities look like is what lets you catch a breach that your perimeter scanners already missed.
| Attacker activity | What it looks like on the host | How you detect it |
|---|---|---|
| Privilege escalation | Low-priv account (www-data) suddenly running root commands | auditd rules, sudo logs, unexpected SUID binaries |
| Persistence | New web shell, cron job, systemd timer, or SSH key | File integrity monitoring, cron/timer review |
| Credential harvesting | Reads of config files holding DB creds or tokens | File access auditing on .env, wp-config.php |
| Lateral movement | Web server initiating connections to internal hosts | Egress monitoring, IDS east-west rules |
| Data exfiltration | Large or unusual outbound transfers | NetFlow, Suricata, bandwidth baselining |
| Covering tracks | Truncated or missing log entries, altered timestamps | Remote/append-only logging, log gap analysis |
AIDE / Tripwire
Free / Open SourceAn attacker who wants to keep access has to write something to disk. FIM tools take a cryptographic baseline of your filesystem and tell you when anything drifts from it — which turns a hidden backdoor into a line in a report.
# Build the baseline database of known-good files sudo aideinit # Compare the live filesystem against that baseline sudo aide --check # Quick manual check: anything written to the web root in the last day? find /var/www/html -type f -mtime -1 -ls # Classic web shell tells — code execution functions in a PHP file grep -rniE --include=*.php "eval\(|base64_decode\(|shell_exec\(" /var/www/html
auditd & log review
Free / Open SourcePersistence and privilege escalation both leave audit trails, but only if you’re recording them. auditd watches specific paths and syscalls; the standard system logs cover the rest.
# Alert on any write or attribute change inside the web root sudo auditctl -w /var/www/html -p wa -k webroot_change # Review what that rule caught sudo ausearch -k webroot_change -i # Authentication history — successes and failures grep -E "Accepted|Failed password" /var/log/auth.log # Persistence sweep: cron, timers, and stray SSH keys sudo ls -la /etc/cron.* /var/spool/cron/crontabs/ sudo systemctl list-timers --all sudo find /home /root -name authorized_keys -ls # Unexpected SUID binaries — a common escalation path sudo find / -perm -4000 -type f 2>/dev/null
Egress monitoring
Free / Open SourceA web server has a very predictable traffic profile: it receives connections on 80 and 443 and talks to its database. The moment it starts initiating outbound connections to the internet or scanning its own subnet, something is wrong. This is the same tooling from sections 03 and 04, pointed in the opposite direction.
# What connections is this host holding open, and which process owns them? sudo ss -tunp | grep ESTAB # Live view of anything leaving the box that isn't normal web traffic sudo tcpdump -i eth0 -n 'not port 80 and not port 443' # Reverse-shell and C2 signatures firing in the IDS grep -iE "shell|trojan|exfil" /var/log/suricata/fast.log
The broader lesson is defense in depth. Initial compromise of an internet-facing web server is a bad day; it shouldn’t be a catastrophic one. Segmentation, least privilege, egress filtering, and monitoring are what stop a single foothold from becoming full network compromise — and every one of them also produces the signal that tells you the foothold exists.
09 / INTELLIGENCEPopular threat intelligence websites
Finding a vulnerability is half the job — understanding it is the other half. Threat intelligence sources let you look up a CVE, check an indicator, score a severity, and learn how real adversaries are using a given weakness. These are the references analysts keep bookmarked.
10 / WORKFLOWPutting it together
The tools above aren’t rivals — they’re a pipeline. A realistic detection flow chains them together, each stage feeding the next:
| Stage | Tool | Question answered |
|---|---|---|
| 1. Discover | Nmap ping sweep | What hosts are alive? |
| 2. Enumerate | Nmap -sV | What services & versions run? |
| 3. Scan | Nessus / OpenVAS | Which have known vulnerabilities? |
| 4. Research | NVD / CISA KEV | How severe & are they exploited? |
| 5. Validate | Metasploit | Is it actually exploitable? |
| 6. Monitor | Suricata / Wireshark | Is anyone attacking it now? |
| 7. Hunt | AIDE / auditd / Suricata | Has someone already gotten in? |
Run that loop against a lab target like Metasploitable and you’ll have touched every category of network vulnerability detection — from first packet to confirmed finding. To go further and bake this kind of security testing into a development pipeline, see our beginner’s guide to DevSecOps.
