Domain 1Recon & ReportingINTRO

Vulnerability Scanning

Study notes for Vulnerability Scanning covering key PEN-200 methodology and lab techniques.

Domain: Domain 1: Reconnaissance & Reporting•Updated: 2026-09-05
#Vulnerability Scanning#PEN-200

OSCP Study Guide: Vulnerability Scanning

Chapter 04 — Master the art of automated and manual vulnerability discovery.


Table of Contents

  1. Vulnerability Scanning vs Penetration Testing
  2. Nessus
  3. OpenVAS / Greenbone
  4. Nikto Web Server Scanning
  5. Nmap NSE Scripts for Vulnerability Detection
  6. CVSS Scoring and Vulnerability Prioritization
  7. False Positives and False Negatives
  8. Scan Policy Configuration
  9. Authentication-Based Scanning
  10. Web Application Vulnerability Scanners
  11. Database Vulnerability Scanning
  12. Wireless Vulnerability Scanning
  13. Compliance Scanning
  14. Plugin Management and Updates
  15. Report Generation and Interpretation
  16. Integrating Scan Results into Pentest Workflow

1. Vulnerability Scanning vs Penetration Testing

Core Differences

Aspect Vulnerability Scanning Penetration Testing
Goal Identify and catalog vulnerabilities Exploit vulnerabilities to prove impact
Automation Highly automated Manual + automated
Depth Broad coverage, shallow depth Narrow scope, deep exploitation
Output Reports with CVSS scores Exploits, shells, proof of compromise
Frequency Continuous / scheduled Periodic / project-based
Skills Tool operation, report analysis Exploitation, pivoting, creativity
Risk Low (non-intrusive) High (active exploitation)

Key Concepts

  • Vulnerability scanning is the first phase of a pentest.
  • Scanners find potential issues. Pentesters validate and exploit them.
  • A scanner tells you “port 445 is open and may have MS17-010.”
  • A pentester confirms MS17-010 and launches EternalBlue for a shell.
  • Never rely solely on scanner output. Always manually verify critical findings.

Scanning in the OSCP Context

flowchart LR
    A[Recon / Enum] --> B[Vuln Scan]
    B --> C[Analyze Results]
    C --> D[Manual Verification]
    D --> E[Exploitation]
    E --> F[Post-Exploitation]
    F --> G[Reporting]

    style B fill:#4CAF50,color:#fff
    style C fill:#2196F3,color:#fff
    style D fill:#FF9800,color:#fff
  • OSCP exams expect you to run a scan, read the report, and exploit what you find.
  • Nessus Essentials is the most common scanner used in exams.
  • Focus on high and critical severity findings first.

2. Nessus

Purpose and Capabilities

  • Commercial vulnerability scanner by Tenable.
  • Industry standard for network vulnerability assessment.
  • Detects misconfigurations, missing patches, known CVEs, and compliance issues.
  • Nessus Essentials (free) is sufficient for OSCP.

Installation

Step Command / Action
1. Download Get nessus-essentials from Tenable website
2. Install (Kali) sudo dpkg -i nessus_<version>_debian10_amd64.deb
3. Start service sudo systemctl enable --now nessusd
4. Access UI Open https://localhost:8834
5. Create admin Set username and password during first setup
6. Register Choose “Nessus Essentials” activation

Service Management

# Start Nessus
sudo systemctl start nessusd

# Stop Nessus
sudo systemctl stop nessusd

# Check status
sudo systemctl status nessusd

# Check plugin updates
sudo /opt/nessus/sbin/nessuscli update

# CLI interface
sudo nessuscli --help

Configuration

Setting Description Recommended Value
Max Checks Host Concurrent checks per host 5 (slower but thorough)
Max Hosts Concurrent hosts scanned 30 (default)
Scan Delay Delay between checks (ms) 0 (no delay)
Retries Number of retries per check 1
Throttle Bandwidth throttling Disabled (for labs)

Scan Types

Scan Type Purpose When to Use
Basic Network Scan Quick overview of common vulns First pass on any target
Full Network Scan Deep scan with all plugins Thorough assessment
Web Application Tests OWASP Top 10 web vulns Web app targets
Discover Host discovery only Initial reconnaissance
Default Balanced scan General purpose
PCI Scan PCI-DSS compliance Compliance audits
MS Patch Audit Windows patch compliance Windows environments
Authenticated Windows SMB-authenticated deep scan When creds are available
Authenticated Linux SSH-authenticated deep scan When creds are available

Creating a Scan in Nessus

flowchart TD
    A[New Scan] --> B[Choose Template]
    B --> C[Name the Scan]
    C --> D[Set Targets<br/>IP / CIDR / Hostname]
    D --> E[Configure Settings<br/>Credentials / Ports / Plugins]
    E --> F[Save and Launch]
    F --> G[Monitor Progress]
    G --> H[Download Report]

    style A fill:#1565C0,color:#fff
    style F fill:#2E7D32,color:#fff
    style H fill:#C62828,color:#fff

Target Specification

  • Single IP: 192.168.1.100
  • Range: 192.168.1.1-254
  • CIDR: 192.168.1.0/24
  • Multiple: 192.168.1.100, 10.0.0.50
  • Hostname: target.example.com

Report Analysis

Severity Levels

Severity Color CVSS Range Action
Critical Red 9.0 - 10.0 Exploit immediately
High Orange 7.0 - 8.9 Prioritize exploitation
Medium Gold 4.0 - 6.9 Investigate further
Low Blue 0.1 - 3.9 Note for reporting
Info Grey 0.0 Informational only

Report Sections

  1. Executive Summary — High-level overview for management.
  2. Vulnerability Summary — Count by severity.
  3. Host Details — Per-host findings.
  4. Plugin Output — Raw scanner output per finding.
  5. Proof — Evidence (screenshots, banners, responses).

Reading a Finding

Each Nessus finding contains:

  • Plugin ID — Unique identifier (e.g., 41015)
  • Synopsis — Short description
  • Description — Detailed explanation
  • Solution — Remediation steps
  • CVSS Base Score — Severity rating
  • References — CVE, BID, URL links
  • Plugin Output — Raw evidence and data

Key Nessus Plugins for OSCP

Plugin ID Name What It Detects
10850 SMB - Detect MS17-010 EternalBlue vulnerability
41015 SMB - Multiple Vulnerabilities Windows version and patch level
34907 SSH - Detect OpenSSH Version OpenSSH version disclosure
10375 HTTP Server Type Detection Web server identification
54685 SSL / TLS Heartbleed CVE-2014-0160
63832 SMB - EternalRomance MS17-010 variant
111291 SMB - RCE (EternalBlue) Confirmed MS17-010 exploitability

Limitations and Best Practices

Limitations:

  • Cannot exploit vulnerabilities — only detect them.
  • May miss logic flaws and business logic vulnerabilities.
  • Authenticated scans require valid credentials.
  • Large scans consume significant resources.

Best Practices:

  • Always use the Basic Network Scan template first.
  • Add credentials for authenticated scans when available.
  • Filter results by Critical and High severity.
  • Cross-reference findings with Nmap results.
  • Manually verify before exploitation.
  • Export reports in Nessus (.nessus) or HTML format.

3. OpenVAS / Greenbone

Purpose and Capabilities

  • Open-source vulnerability scanner (alternative to Nessus).
  • Greenbone Vulnerability Management (GVM) is the modern framework.
  • Community-maintained with thousands of NVTs (Network Vulnerability Tests).
  • Free but requires more setup effort.

Setup on Kali

# Install OpenVAS
sudo apt install gvm

# Setup and initialize
sudo gvm-setup

# This will:
# - Create a local PostgreSQL database
# - Start all Greenbone services
# - Generate admin credentials
# - Feed initial NVT data

# Check status
sudo gvm-start

# Stop services
sudo gvm-stop

Access and Configuration

Component Default
Web UI https://localhost:9392
Default User admin
Default Password Generated during gvm-setup
Feed Manager sudo greenbone-feed-sync

Nessus vs OpenVAS Comparison

Feature Nessus OpenVAS / Greenbone
Cost Free (Essentials) / Paid Free (open source)
Ease of Use Very easy Moderate setup
Plugin Count ~100,000+ ~55,000+ NVTs
Accuracy Very high High
Report Quality Excellent Good
Performance Optimized Resource-heavy
Support Commercial Community
OSCP Relevance Primary tool Alternative
Auth Scanning SMB, SSH, SNMP, etc. SMB, SSH, SNMP, etc.
Compliance PCI, HIPAA, CIS CIS, other policies

Key Features

  • NVTs (Network Vulnerability Tests) — Equivalent to Nessus plugins.
  • SCAP (Security Content Automation Protocol) — Standardized vulnerability data.
  • OID (Object Identifiers) — Unique identifiers for each NVT.
  • VT (Vulnerability Tests) Family — Grouped by technology/category.

Common NVT Families

Family Description
Port scanners Service detection
Web application tests HTTP/HTTPS vulns
Windows Windows-specific checks
Linux Linux-specific checks
Databases DB vulnerability checks
Misc General purpose tests

Output Interpretation

  • Results displayed in the Scans > Results section.
  • Filter by severity: high, medium, low, log.
  • Each result shows:
    • Host and port
    • NVT OID and name
    • Severity score (0-10)
    • Description and solution
    • CVSS vector string

Limitations and Best Practices

Limitations:

  • Slower than Nessus on large networks.
  • Feed sync can take hours for initial setup.
  • UI is less polished than Nessus.
  • Fewer compliance policies built-in.

Best Practices:

  • Run greenbone-feed-sync before scanning.
  • Use Target > Port Range to limit scope.
  • Enable auto-dead host control to skip offline hosts.
  • For OSCP, Nessus is preferred — use OpenVAS as backup.

4. Nikto Web Server Scanning

Purpose and Capabilities

  • Command-line web server scanner.
  • Tests for dangerous files, outdated server software, and misconfigurations.
  • Fast and lightweight — great for quick web assessments.
  • Part of Kali Linux by default.

Installation

# Already installed on Kali
nikto -version

# Install manually
sudo apt install nikto

# Update plugins
nikto -update

Basic Usage

# Basic scan
nikto -h http://192.168.1.100

# Scan with SSL
nikto -h https://192.168.1.100

# Specify port
nikto -h http://192.168.1.100 -p 8080

# Save output to file
nikto -h http://192.168.1.100 -o report.txt

# Output formats
nikto -h http://192.168.1.100 -o report.html -Format html
nikto -h http://192.168.1.100 -o report.csv -Format csv
nikto -h http://192.168.1.100 -o report.xml -Format xml

# Use proxy
nikto -h http://192.168.1.100 -proxy http://127.0.0.1:8080

# Authentication
nikto -h http://192.168.1.100 -id admin:password

# Custom user-agent
nikto -h http://192.168.1.100 -Smuggle

# Tune options (exclude categories)
nikto -h http://192.168.1.100 -Tuning 1

Tuning Options

Code Category Description
0 Default All tests
1 Interesting File Files worth looking at
2 Misconfiguration Server misconfigurations
3 Information Disclosure Info leakage
4 Injection (XSS/Script) Injection tests
5 Remote File Retrieval Local network access
6 Denial of Service DoS tests (dangerous)
7 Remote File Retrieval (Server) Source code access
8 SQL Injection SQLi tests
9 Command Execution RCE tests
a Authentication Bypass Auth bypass tests
b Software Identification Version detection
c Review Cookies Cookie analysis
e CGI Vulnerabilities CGI script vulns
f Dangerous HTTP Methods PUT, DELETE, TRACE
g CRLF Injection Header injection
x Reverse Tests Tests requiring response

Key Checks Performed

Check Type Examples
Server Version Apache, IIS, Nginx version disclosure
Dangerous Files .htaccess, .git, .env, phpinfo.php
Outdated Software Known vulnerable versions
HTTP Methods PUT, DELETE, TRACE enabled
Directory Listing Enabled directory browsing
Default Pages Default welcome pages
CGI Scripts Vulnerable CGI scripts
SSL/TLS Issues Weak ciphers, expired certs
Headers Missing security headers

Sample Output

- Nikto v2.1.6
+ Target IP:          192.168.1.100
+ Target Hostname:    192.168.1.100
+ Target Port:        80
+ Start Time:         2024-01-15 10:30:00 (GMT0)
---------------------------------------------------------------------------
+ Server: Apache/2.4.29 (Ubuntu)
+ /: The anti-clickjacking X-Frame-Options header is not present.
+ /: The X-Content-Type-Options header is not set.
+ /icons/: Directory indexing found.
+ /phpmyadmin/: phpMyAdmin found.
+ 7151 requests: 0 error(s) and 5 item(s) reported on remote host
+ End Time:           2024-01-15 10:32:15 (GMT0) (135 seconds)

Limitations and Best Practices

Limitations:

  • No exploitation capability — detection only.
  • May trigger IDS/IPS alerts.
  • Limited to HTTP/HTTPS protocols.
  • Cannot test complex web application logic.
  • High false positive rate on some checks.

Best Practices:

  • Run after Nmap port scan confirms web services.
  • Use -Tuning to focus on relevant checks.
  • Combine with Dirb/Dirbuster for directory enumeration.
  • Cross-reference findings with manual testing.
  • Use with Burp Suite for deeper web app analysis.

5. Nmap NSE Scripts for Vulnerability Detection

Purpose and Capabilities

  • Nmap Scripting Engine (NSE) extends Nmap beyond port scanning.
  • Over 600 scripts available for vulnerability detection.
  • Scripts categorized by purpose and aggressiveness.
  • Lightweight and scriptable — ideal for targeted checks.

NSE Script Categories

Category Description Use Case
auth Authentication tests Brute force, credential checks
broadcast LAN discovery Network mapping
brute Brute force attacks Password cracking
default Run with -sC / -A General purpose
discovery Service discovery Protocol detection
dos Denial of service Do NOT use in exams
exploit Exploitation Active exploitation
external External services DNS, threat intel lookups
fuzzer Fuzzing inputs Error-based discovery
intrusive Aggressive scanning May crash services
malware Malware detection Backdoor checks
safe Non-intrusive tests Production-safe scanning
version Version detection Service versioning
vuln Vulnerability detection Primary pentest category

Essential Vuln Scripts for OSCP

Script Purpose Example
vuln All vulnerability scripts nmap --script vuln -p 80 <target>
http-vuln-cve2017-5638 Apache Struts RCE nmap --script http-vuln-cve2017-5638 -p 8080 <target>
http-vuln-cve2017-1001000 Apache Struts RCE v2 nmap --script http-vuln-cve2017-1001000 -p 80 <target>
smb-vuln-ms17-010 EternalBlue detection nmap --script smb-vuln-ms17-010 -p 445 <target>
smb-vuln-ms08-067 Conficker detection nmap --script smb-vuln-ms08-067 -p 445 <target>
ssl-heartbleed Heartbleed CVE-2014-0160 nmap --script ssl-heartbleed -p 443 <target>
http-vuln-cve2014-360 Shellshock detection nmap --script http-vuln-cve2014-360 -p 80 <target>
ftp-vsftpd-backdoor vsFTPd backdoor nmap --script ftp-vsftpd-backdoor -p 21 <target>
mysql-vuln-cve2012-2122 MySQL auth bypass nmap --script mysql-vuln-cve2012-2122 -p 3306 <target>
ssl-poodle POODLE attack nmap --script ssl-poodle -p 443 <target>
http-shellshock Shellshock via HTTP nmap --script http-shellshock -p 80 <target>
smb-vuln-conficker Conficker worm nmap --script smb-vuln-conficker -p 445 <target>
http-sql-injection SQL injection detection nmap --script http-sql-injection -p 80 <target>
http-stored-xss Stored XSS detection nmap --script http-stored-xss -p 80 <target>
snmp-netstat SNMP enumeration nmap --script snmp-netstat -p 161 <target>

Common Nmap NSE Commands

# Run all vuln scripts on specific ports
nmap --script vuln -p 21,22,80,443,445,3306,8080 <target>

# Run specific script
nmap --script smb-vuln-ms17-010 -p 445 <target>

# Run multiple scripts
nmap --script "smb-vuln-*" -p 445 <target>

# Run with version detection
nmap -sV --script vuln -p 80,443,8080 <target>

# Run safe scripts only
nmap --script safe -p- <target>

# Run with aggressive timing
nmap -T4 --script vuln -p 80,443 <target>

# Output to file
nmap --script vuln -p 80,443 <target> -oN nmap_vuln.txt

# XML output for parsing
nmap --script vuln -p 80,443 <target> -oX nmap_vuln.xml

# Combine with default scripts
nmap -sC -sV --script vuln -p- <target>

# Script arguments
nmap --script http-enum --script-args http-enum.basepath=/ -p 80 <target>

Script Arguments

# Common script arguments
--script-args userdb=/path/to/users,passdb=/path/to/passwords
--script-args http.useragent="Mozilla/5.0"
--script-args smbdomain=WORKGROUP
--script-args mssql.instance-port=1433
--script-args ssh.user=root,ssh.keyfile=/path/to/key

Output Interpretation

PORT    STATE SERVICE  VERSION
80/tcp  open  http     Apache httpd 2.4.29
| http-vuln-cve2017-5638:
|   VULNERABLE:
|   Apache Struts RCE Vulnerability
|     State: VULNERABLE
|     IDs:  CVE:CVE-2017-5638
|     Risk factor: High
|       The target appears to be vulnerable to CVE-2017-5638.
|_    References:
|_      https://nvd.nist.gov/vuln/detail/CVE-2017-5638

Limitations and Best Practices

Limitations:

  • Scripts may be outdated — check for updates.
  • Some scripts are intrusive and may crash services.
  • Not as comprehensive as Nessus for broad scanning.
  • Requires knowledge of which script to use.

Best Practices:

  • Always run -sV (version detection) before vuln scripts.
  • Use --script vuln for broad vulnerability checks.
  • Target specific scripts for known services.
  • Combine with Nessus for comprehensive coverage.
  • Update NSE scripts: nmap --script-updatedb

6. CVSS Scoring and Vulnerability Prioritization

What is CVSS?

  • Common Vulnerability Scoring System — standardized severity rating.
  • Score range: 0.0 (None) to 10.0 (Critical).
  • Three versions: CVSS v2, v3, and v4.
  • Used by Nessus, OpenVAS, and all major scanners.

CVSS v3.1 Severity Ratings

Score Range Severity Color Priority
0.0 None Green Ignore
0.1 - 3.9 Low Blue Low priority
4.0 - 6.9 Medium Orange Medium priority
7.0 - 8.9 High Red-Orange High priority
9.0 - 10.0 Critical Red Exploit first

CVSS v3.1 Metrics

Base Metrics (inherent to the vulnerability)

Metric Values Description
Attack Vector (AV) N / A / L / P Network / Adjacent / Local / Physical
Attack Complexity (AC) H / L High / Low complexity required
Privileges Required (PR) H / L / N High / Low / None
User Interaction (UI) N / R None / Required
Scope (S) U / C Unchanged / Changed
Confidentiality (C) N / L / H None / Low / High impact
Integrity (I) N / L / H None / Low / High impact
Availability (A) N / L / H None / Low / High impact

Attack Vector Detail

Value Meaning Score Impact
N (Network) Exploitable over network Highest score
A (Adjacent) Requires local network High score
L (Local) Requires local access Medium score
P (Physical) Requires physical access Lowest score

CVSS Vector String Example

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Breakdown:

  • AV:N — Attackable over Network
  • AC:L — Low complexity
  • PR:N — No privileges required
  • UI:N — No user interaction
  • S:U — Scope Unchanged
  • C:H/I:H/A:H — High impact on all three

This scores 10.0 (Critical) — the worst possible vulnerability.

Prioritization Strategy for OSCP

flowchart TD
    A[Scan Results] --> B{Severity?}
    B -->|Critical 9-10| C[Exploit Immediately]
    B -->|High 7-8.9| D[Prioritize After Critical]
    B -->|Medium 4-6.9| E[Investigate If Time Permits]
    B -->|Low 0.1-3.9| F[Note for Report]
    B -->|Info 0| G[Skip]

    C --> H[Manual Verification]
    D --> H
    E --> H

    H --> I{Exploitable?}
    I -->|Yes| J[Exploit]
    I -->|No| K[Try Next Finding]

    style C fill:#D32F2F,color:#fff
    style D fill:#F57C00,color:#fff
    style J fill:#388E3C,color:#fff

Prioritization Rules

  1. Critical (9.0-10.0) — Remote code execution, no auth required.
  2. High (7.0-8.9) — Auth bypass, privilege escalation, SQLi.
  3. Medium (4.0-6.9) — Information disclosure, XSS, minor issues.
  4. Low (0.1-3.9) — Configuration issues, missing headers.
  5. Info (0.0) — Version detection, open ports.

OSCP-Specific Prioritization

Finding Type Priority Why
RCE vulnerabilities #1 Direct shell access
Authentication bypass #2 Gain unauthorized access
SQL Injection #3 Data extraction, auth bypass
Default credentials #4 Easy access
Known CVEs with exploits #5 SearchSploit available
Outdated software #6 May have known exploits
Information disclosure #7 Helps further enumeration

7. False Positives and False Negatives

Definitions

Term Definition Example
False Positive Scanner reports a vuln that doesn’t exist MS17-010 reported but patched
False Negative Scanner misses a real vulnerability Scanner doesn’t detect custom web vuln
True Positive Scanner correctly identifies a real vuln MS17-010 detected and confirmed
True Negative Scanner correctly reports no vuln System is patched, no finding

Common False Positive Causes

Cause Description Mitigation
Outdated plugins Plugin doesn’t know about patches Update scanner plugins
Network issues Timeouts cause incorrect results Retry scan, adjust timing
Firewall interference Blocked responses misinterpreted Scan from different network
Virtual patches WAF blocks exploit but vuln exists Bypass WAF, test manually
Service impersonation Service fakes a different version Manual banner grab
Rate limiting Server throttles scanner responses Slow down scan rate
SSL/TLS issues Cipher negotiation failures Configure SSL settings

Common False Negative Causes

Cause Description Mitigation
New/zero-day vulns Not in plugin database Manual testing
Custom applications Scanner doesn’t recognize app Web app scanner + manual
Non-standard ports Scanner only checks default ports Specify all ports
Authentication barriers Scanner can’t reach protected content Provide credentials
Logic flaws Business logic can’t be auto-detected Manual pentesting
WAF protection WAF blocks scanner probes Use browser proxy

Handling Strategy

flowchart TD
    A[Scanner Finding] --> B{Severity High/Critical?}
    B -->|Yes| C[Manual Verification]
    B -->|No| D[Lower Priority Review]

    C --> E{Confirmed?}
    E -->|Yes - True Positive| F[Exploit / Document]
    E -->|No - False Positive| G[Mark as FP, Note Why]

    D --> H{Time Available?}
    H -->|Yes| C
    H -->|No| I[Accept Risk, Document]

    F --> J[Add to Report]
    G --> J
    I --> J

    style F fill:#388E3C,color:#fff
    style G fill:#F57C00,color:#fff

Verification Techniques

Technique Tool Purpose
Manual banner grab nc, curl, telnet Confirm service version
Exploit attempt searchsploit, Metasploit Verify exploitability
Cross-scan Nmap + Nessus Compare results
Browser testing Firefox/Chrome Manual web testing
Packet capture Wireshark Analyze scanner traffic
Plugin output review Nessus plugin text Read raw evidence

OSCP Tips

  • Always manually verify before claiming a vulnerability.
  • If Nessus says MS17-010, confirm with Nmap smb-vuln-ms17-010.
  • If a finding seems wrong, read the plugin output carefully.
  • Document false positives in your report with reasoning.
  • When in doubt, try to exploit it — proof is the best verification.

8. Scan Policy Configuration

What is a Scan Policy?

  • A scan policy defines what to scan, how to scan, and when to scan.
  • Controls plugins, timing, credentials, and targets.
  • Well-configured policies reduce false positives and improve accuracy.

Nessus Scan Policy Components

Component Description Options
Browsing Web crawling depth Depth, pages per host
Deception Honeypot detection Enable/disable
Discovery Host discovery methods ICMP, TCP, ARP
Exploits Active exploit attempts Enable/disable (dangerous)
Intrusive Aggressive checks Enable/disable
Performance Speed vs thoroughness Max checks, max hosts
Safety Scan safety controls Skip dangerous tests
SCAP Compliance checks Enable/disable
Target Scan scope Ports, IPs, credentials
Time Scan scheduling Start time, duration
Vuln Tests Vulnerability checks All, selected, none
Web Web app scanning Enable/disable
Setting Value Reason
Template Basic Network Scan Balanced coverage
Max Checks Host 5 Thorough per-host scanning
Max Hosts 30 Reasonable concurrency
Scan Delay 0 ms No delay for lab environments
Optimize Targets Medium Balanced optimization
Safe Checks Enabled Avoid crashing services
UDP Scan Enabled Detect UDP services
Credentials Add if available Authenticated scanning
Exploits Disabled Avoid accidental damage
Web Applications Enabled Detect web vulns

Port Configuration

Setting Recommendation
Default Ports Enabled (common ports)
All TCP Ports Enable for thorough scans (1-65535)
UDP Ports Enable common UDP (161, 53, 69, 123, 500)
Custom Ports Add ports found via Nmap

Plugin Selection

Strategy When to Use
All Plugins Full assessment, time available
Selected Plugins Targeted scan, specific services
Exclude Plugins Skip noisy or irrelevant checks

OpenVAS Scan Configuration

Setting Value
Target Port Range Open Ports or 1-65535
Max Runtime Unlimited or set timeout
Preferred Sensors Default
Credentials Add SSH/SMB if available
NVT Selection All families or selected

9. Authentication-Based Scanning

Why Authenticated Scanning?

  • Unauthenticated scan — sees only external-facing issues.
  • Authenticated scan — sees internal configuration, installed software, missing patches.
  • Authenticated scans find 3-10x more vulnerabilities.

Authentication Methods

Protocol Service Credential Type
SMB Windows Username / Password / Domain
SSH Linux/Unix Username / Password or Key
SNMP Network devices Community string
LDAP Directory services Bind DN / Password
SMTP Mail servers Username / Password
FTP File servers Username / Password
Database MySQL, PostgreSQL, MSSQL Username / Password
Web HTTP auth Username / Password

Configuring Auth in Nessus

flowchart LR
    A[New Scan] --> B[Settings > Credentials]
    B --> C[Add SMB Credential<br/>(Windows)]
    B --> D[Add SSH Credential<br/>(Linux)]
    B --> E[Add SNMP Credential<br/>(Network)]
    C --> F[Launch Scan]
    D --> F
    E --> F

    style B fill:#1565C0,color:#fff
    style F fill:#2E7D32,color:#fff

SMB (Windows)

Field Value
Protocol SMB
Username administrator or domain user
Password Password or hash
Domain Workgroup or domain name

SSH (Linux)

Field Value
Protocol SSH
Username root or sudo user
Password Password
Key File Private key path (optional)

What Auth Scanning Reveals

Unauthenticated Authenticated
Open ports and services Installed software packages
Service versions Missing patches and updates
Banner information Registry misconfigurations
Network-level vulns Local policy violations
External web vulns Internal file permissions
SSL/TLS issues Weak local accounts

OSCP Auth Scanning Tips

  • If you gain low-privilege access, use creds for deeper scanning.
  • Windows: Use SMB auth with any valid user account.
  • Linux: Use SSH auth with any valid user account.
  • Auth scans reveal missing patches — cross-reference with exploits.
  • Never use admin creds on production systems without authorization.

10. Web Application Vulnerability Scanners

OWASP ZAP (Zed Attack Proxy)

Purpose and Capabilities

  • Open-source web app scanner by OWASP.
  • Intercepting proxy + automated scanner.
  • Detects OWASP Top 10 vulnerabilities.
  • Free and actively maintained.

Installation

# Kali (pre-installed)
zap.sh

# Standalone download
# https://www.zaproxy.org/download/

Key Features

Feature Description
Intercepting Proxy Capture**
Spider Crawl web application automatically
Active Scanner Send attack payloads to find vulns
Passive Scanner Analyze traffic without sending attacks
Fuzzer Custom fuzzing of parameters
Forced Browse Directory and file discovery
Site Map Visual application structure

ZAP Workflow

flowchart TD
    A[Start ZAP] --> B[Configure Proxy<br/>Browser -> ZAP]
    B --> C[Spider the Target<br/>Auto-crawl site]
    C --> D[Review Site Map]
    D --> E[Active Scan<br/>Attack payloads]
    E --> F[Review Alerts]
    F --> G[Manual Verification]

    style E fill:#D32F2F,color:#fff
    style F fill:#F57C00,color:#fff

Common ZAP Commands

# GUI mode
zap.sh

# Daemon mode (headless)
zap.sh -daemon -port 8090

# Command line scanning
zap.sh -cmd -quickurl http://target.com -quickout report.html

# Full scan with report
zap.sh -cmd -new_session "MyScan" \
  -quickurl_all http://target.com \
  -quickout /root/zap_report.html

ZAP Alert Severity

Level Description
High Critical vulnerabilities (RCE, SQLi)
Medium Significant issues (XSS, auth bypass)
Low Minor issues (info disclosure)
False Positive Likely not real
Informational Informational findings

Burp Suite Scanner

Purpose and Capabilities

  • Industry-standard web app security tool.
  • Community Edition (free) + Professional (paid).
  • Professional includes automated scanner.
  • Community Edition has manual tools only.

Key Components

Component Purpose
Proxy Intercept and modify traffic
Scanner Automated vulnerability scanning (Pro only)
Intruder Custom attack automation
Repeater Manual request modification
Sequencer Session token analysis
Decoder Encode/decode data
Comparer Compare responses
Extender Plugin ecosystem

Burp vs ZAP Comparison

Feature Burp Suite Pro OWASP ZAP
Cost $449/year Free
Scanner Excellent Good
Proxy Best-in-class Good
Intruder Advanced Fuzzer (basic)
Extensions Large ecosystem Add-ons
UI Polished Functional
Automation API + BApp Store API + scripts
OSCP Relevance Manual tools (Community) Full scanner available

Burp Scanner Findings

Finding Severity Description
SQL Injection High Database manipulation
Cross-Site Scripting Medium/High Script injection
Path Traversal High File system access
Command Injection Critical Remote code execution
XXE High XML external entity
CSRF Medium Cross-site request forgery
Session Fixation Medium Session hijacking

Web Scanner Limitations

Common Limitations:

  • Cannot test business logic flaws.
  • May miss vulnerabilities in JavaScript-heavy apps.
  • Struggle with CSRF tokens and complex auth flows.
  • High false positive rates on some checks.
  • Cannot replace manual testing.

Best Practices:

  • Use scanners as a starting point, not the final word.
  • Always manually verify scanner findings.
  • Combine with manual Burp/ZAP proxy testing.
  • Focus on High and Critical findings first.
  • Use Intruder (Burp) for custom attack payloads.

11. Database Vulnerability Scanning

Common Database Services

Database Default Port Protocol
MySQL 3306 MySQL
PostgreSQL 5432 PostgreSQL
Microsoft SQL Server 1433 TDS/MSSQL
Oracle 1521 Oracle Net
MongoDB 27017 MongoDB Wire
Redis 6379 Redis Protocol
MariaDB 3306 MySQL
Elasticsearch 9200 HTTP/REST

Database Vulnerability Types

Vulnerability Description Impact
Default credentials Factory default login Full DB access
Weak passwords Guessable authentication Unauthorized access
Remote access enabled DB exposed to network External exploitation
Outdated version Known CVEs in DB software RCE, data theft
SQL Injection App-level SQL manipulation Data breach
Misconfiguration Insecure settings Info disclosure
Missing encryption Unencrypted data at rest/transit Data interception
Excessive privileges Over-privileged accounts Privilege escalation

Scanning Databases with Nmap

# MySQL version and vulns
nmap -p 3306 -sV --script mysql-info,mysql-vuln-cve2012-2122 <target>

# PostgreSQL version and vulns
nmap -p 5432 -sV --script pgsql-brute <target>

# MSSQL version and vulns
nmap -p 1433 -sV --script ms-sql-info,ms-sql-empty-password,ms-sql-xp-cmdshell <target>

# MongoDB exposed
nmap -p 27017 -sV --script mongodb-info <target>

# Redis exposed
nmap -p 6379 -sV --script redis-info <target>

Nessus Database Plugins

Plugin Database What It Checks
MySQL Default Credentials MySQL Root with no password
PostgreSQL Default Credentials PostgreSQL Default login
MSSQL Default Credentials MSSQL SA with weak password
MongoDB No Authentication MongoDB Unauthenticated access
Redis No Authentication Redis Unauthenticated access
Database Service Detection All Version and exposure

Manual Database Testing

# MySQL - try empty password
mysql -h <target> -u root -p

# PostgreSQL - try default
psql -h <target> -U postgres

# MongoDB - try no auth
mongosh mongodb://<target>:27017

# Redis - try no auth
redis-cli -h <target>

# MSSQL - try with sqlmap
sqlmap -u "http://target/page?id=1" --dbms=mssql

Best Practices

  • Never expose databases to the internet.
  • Change default credentials immediately.
  • Use strong passwords for all DB accounts.
  • Keep database software updated.
  • Enable encryption for data at rest and in transit.
  • Apply principle of least privilege.
  • Use firewall rules to restrict DB access.

12. Wireless Vulnerability Scanning

Wireless Security Overview

Protocol Security Status
WEP RC4 encryption Broken — trivially cracked
WPA TKIP encryption Weak — crackable
WPA2 AES-CCMP encryption Strong — PMKID attack possible
WPA3 SAE handshake Strongest — current standard
Open No encryption Insecure — all traffic visible

Wireless Scanning Tools

Tool Purpose Key Feature
aircrack-ng WiFi cracking suite WEP/WPA cracking
airodump-ng Packet capture Network discovery
aireplay-ng Packet injection Deauth attacks
aircrack-ng Password cracking Dictionary/brute force
wash WPS detection WPS-enabled networks
reaver WPS cracking PIN brute force
bully WPS cracking Alternative to reaver
wifite Automated attacks All-in-one WiFi attack
kismet Wireless detector Passive monitoring

Wireless Attack Workflow

flowchart TD
    A[Enable Monitor Mode<br/>Mode] --> B[Scan for Networks<br/>airodump-ng]
    B --> C{Target Network}
    C -->|WEP| D[Capture IVs<br/>aireplay-ng]
    C -->|WPA/WPA2| E[Capture Handshake<br/>Deauth Attack]
    C -->|WPS| F[Crack WPS PIN<br/>reaver/bully]

    D --> G[Crack WEP Key<br/>aircrack-ng]
    E --> H[Crack Handshake<br/>aircrack-ng + dict]
    F --> I[Obtain WPA Key]

    G --> J[Access Network]
    H --> J
    I --> J

    style A fill:#1565C0,color:#fff
    style J fill:#388E3C,color:#fff

Key Commands

# Enable monitor mode
sudo airmon-ng start wlan0

# Scan for networks
sudo airodump-ng wlan0mon

# Target specific network
sudo airodump-ng -c <channel> --bssid <MAC> -w capture wlan0mon

# Deauth attack (capture WPA handshake)
sudo aireplay-ng -0 5 -a <AP_MAC> -c <CLIENT_MAC> wlan0mon

# Crack WPA handshake
sudo aircrack-ng -w /path/to/wordlist.txt capture-01.cap

# Crack WEP
sudo aircrack-ng -w capture-01.cap

# WPS attack with reaver
sudo reaver -i wlan0mon -b <AP_MAC>

# Automated attack with wifite
sudo wifite

OSCP Relevance

  • Wireless attacks are rarely tested in OSCP exams.
  • Focus on wired network vulnerabilities.
  • Know the basics for the theory exam.
  • WEP cracking is the most commonly tested wireless topic.

13. Compliance Scanning

What is Compliance Scanning?

  • Checks systems against security standards and regulations.
  • Validates configuration against benchmarks.
  • Generates compliance reports for auditors.
  • Part of vulnerability scanner capabilities.

Common Compliance Standards

Standard Full Name Focus Area
PCI-DSS Payment Card Industry Data Security Standard Payment card data
HIPAA Health Insurance Portability and Accountability Act Healthcare data
CIS Benchmarks Center for Internet Security System hardening
NIST National Institute of Standards and Technology General security
SOX Sarbanes-Oxley Act Financial reporting
GDPR General Data Protection Regulation EU data privacy
ISO 27001 Information Security Management ISMS framework

PCI-DSS Key Requirements

Requirement Description Scanner Check
1. Firewall config Network segmentation Port exposure checks
2. Default creds Change vendor defaults Default credential tests
3. Protect stored data Encryption at rest Encryption checks
4. Encrypt transmission TLS/SSL in transit SSL/TLS configuration
5. Anti-virus Malware protection AV detection
6. Secure systems Patch management Missing patch checks
7. Access control Need-to-know access Account audits
8. Identify auth Strong authentication Weak password checks
9. Physical access Physical security N/A (manual)
10. Track access Logging and monitoring Log configuration
11. Test security Regular testing Vuln scan frequency
12. Security policy Information security policy N/A (manual)

HIPAA Key Requirements

Requirement Description
Access Control Unique user IDs, emergency access
Audit Controls Log access to ePHI
Integrity Prevent unauthorized alteration
Transmission Security Encrypt data in transit
Encryption Protect data at rest

Nessus Compliance Scanning

Feature Description
PCI Scan Template Pre-configured PCI-DSS checks
Compliance Plugins CIS, NIST, STIG checks
SCAP Support Standardized compliance content
Export Formats PDF, HTML, CSV reports

OpenVAS Compliance

Feature Description
CIS Policies CIS benchmark checks
SCAP Feed Compliance data feeds
Custom Policies User-defined compliance rules

OSCP Relevance

  • Compliance scanning is not directly tested in OSCP labs.
  • Understanding compliance helps with professional pentesting.
  • Know the concepts for the theory exam.
  • Focus on vulnerability exploitation for the practical exam.

14. Plugin Management and Updates

Why Plugin Updates Matter

  • New vulnerabilities discovered daily.
  • Plugins contain detection logic for CVEs.
  • Outdated plugins = missed vulnerabilities.
  • Updated plugins = fewer false positives.

Nessus Plugin Updates

# Check for updates via CLI
sudo /opt/nessus/sbin/nessuscli update

# Update via UI
# Settings > Account > Update Now

# Check plugin version
sudo /opt/nessus/sbin/nessuscli show plugins

# Feed status
sudo /opt/nessus/sbin/nessusd --check-for-updates

Update Frequency

Environment Recommended Frequency
Lab / OSCP Before each exam attempt
Production Daily or weekly
Critical systems Daily

OpenVAS NVT Updates

# Sync vulnerability feed
sudo greenbone-feed-sync --type gvmd

# Sync SCAP data
sudo greenbone-feed-sync --type scap

# Sync CERT data
sudo greenbone-feed-sync --type cert

# Check feed status
sudo gvmd --get-scanners

Nmap NSE Script Updates

# Update NSE scripts
nmap --script-updatedb

# Check script version
nmap --version

# List available scripts
ls /usr/share/nmap/scripts/

# Search for specific scripts
ls /usr/share/nmap/scripts/ | grep smb-vuln

Nikto Plugin Updates

# Update Nikto plugins
nikto -update

# Check version
nikto -version

Plugin Management Best Practices

Practice Description
Update before scanning Always update plugins first
Verify update success Check plugin count/version
Document plugin version Include in scan reports
Test after updates Verify scanner still works
Automate updates Schedule regular updates
Check release notes Review new plugin capabilities

15. Report Generation and Interpretation

Report Types

Format Extension Use Case
Nessus .nessus Native format, re-importable
HTML .html Human-readable, shareable
PDF .pdf Formal reports, printing
CSV .csv Data analysis, filtering
XML .xml Programmatic processing
SCAP .xml Compliance reporting
JSON .json API integration

Nessus Report Export

flowchart LR
    A[Completed Scan] --> B[Click Scan Name]
    B --> C[Export Button]
    C --> D[Select Format]
    D --> E[Choose Filters<br/>Severity / Host / Plugin]
    E --> F[Download Report]

    style D fill:#1565C0,color:#fff
    style F fill:#2E7D32,color:#fff

Report Structure

Executive Summary

  • Scan scope and targets
  • Total vulnerabilities found
  • Severity distribution
  • Key findings and risks
  • Recommendations overview

Technical Details

  • Per-host vulnerability listings
  • Plugin IDs and descriptions
  • CVSS scores and vectors
  • Proof of vulnerability
  • Remediation steps

Appendix

  • Scan configuration
  • Plugin versions used
  • Scan timestamps
  • Exclusions and limitations

Interpreting Key Metrics

Metric What It Tells You Action
Critical count Immediate risks Exploit / patch now
High count Significant risks Prioritize next
Affected hosts Scope of impact Assess blast radius
Top vulnerabilities Most common issues Address systemic problems
Open ports Attack surface Close unnecessary ports
Missing patches Patch compliance Update systems

Report Writing Tips for OSCP

  1. Include scan evidence — screenshots of Nessus findings.
  2. List exploited vulnerabilities — with CVE references.
  3. Document false positives — with reasoning.
  4. Provide remediation — for each finding.
  5. Use severity ratings — to prioritize findings.
  6. Keep it concise — focus on actionable items.

16. Integrating Scan Results into Pentest Workflow

The Complete Workflow

flowchart TD
    A[Phase 1: Reconnaissance] --> B[Phase 2: Scanning]
    B --> C[Phase 3: Analysis]
    C --> D[Phase 4: Exploitation]
    D --> E[Phase 5: Post-Exploitation]
    E --> F[Phase 6: Reporting]

    subgraph S1 [Reconnaissance]
        A1[Passive Recon]
        A2[Active Recon]
        A3[Port Scanning<br/>Nmap]
    end

    subgraph S2 [Vulnerability Scanning]
        B1[Nessus Scan]
        B2[Nmap NSE Scripts]
        B3[Nikto Web Scan]
        B4[Manual Enumeration]
    end

    subgraph S3 [Analysis]
        C1[Filter by Severity]
        C2[Cross-Reference Tools]
        C3[Manual Verification]
        C4[Prioritize Targets]
    end

    subgraph S4 [Exploitation]
        D1[SearchSploit]
        D2[Metasploit]
        D3[Manual Exploits]
        D4[Custom Exploits]
    end

    A --> A1 --> A2 --> A3
    A3 --> B1 & B2 & B3 & B4
    B1 & B2 & B3 & B4 --> C1 --> C2 --> C3 --> C4
    C4 --> D1 & D2 & D3 & D4

    style S2 fill:#E8F5E9,stroke:#4CAF50
    style S3 fill:#E3F2FD,stroke:#2196F3
    style S4 fill:#FFF3E0,stroke:#FF9800

Step-by-Step Integration

Step 1: Initial Nmap Scan

# Quick port scan
nmap -sC -sV -oA nmap/initial <target>

# Full port scan
nmap -sC -sV -p- -oA nmap/full <target>

Step 2: Nessus Scan

1. Create new scan (Basic Network Scan)
2. Add target IP(s)
3. Add credentials if available
4. Launch scan
5. Wait for completion

Step 3: Analyze Results

1. Open Nessus report
2. Filter by Critical and High severity
3. Read plugin output for each finding
4. Cross-reference with Nmap results
5. Note CVE numbers and exploit availability

Step 4: Manual Verification

# Verify service-specific tools
# Example: Verify MS17-010
nmap --script smb-vuln-ms17-010 -p 445 <target>

# Example: Verify web vuln
nikto -h http://<target>

# Example: Check exploit availability
searchsploit <CVE_OR_SERVICE>

Step 5: Exploitation

# Search for exploits
searchsploit Apache 2.4.29

# Use Metasploit
msfconsole
use exploit/multi/http/apache_struts_rce
set RHOSTS <target>
set RPORT 8080
exploit

# Use custom exploit
python exploit.py <target> 80

Step 6: Document Everything

1. Screenshot scanner findings
2. Record exploitation commands
3. Capture shell access proof
4. Document post-exploitation steps
5. Write final report

Tool Integration Matrix

Phase Primary Tool Secondary Tools Output Used By
Port Scan Nmap Masscan Nessus targets
Vuln Scan Nessus OpenVAS Exploitation plan
Web Scan Nikto OWASP ZAP Manual web testing
Script Scan Nmap NSE — Quick vuln checks
Exploit Search SearchSploit ExploitDB Metasploit / custom
Exploitation Metasploit Custom scripts Shell access
Reporting Nessus export Screenshots Final report

OSCP Exam Strategy

Time Budget Activity Duration
0-30 min Nmap full scan 30 min
30-90 min Nessus scan (run in background) 60 min
During scan Manual enumeration 60 min
Scan complete Analyze + prioritize 15 min
Exploitation Attack top findings Remaining time

Common Pitfalls to Avoid

Pitfall Consequence Prevention
Trusting scanner blindly Wasted time on false positives Always verify manually
Ignoring medium findings Missed easy exploits Review all severities
Not reading plugin output Missed critical details Read every finding carefully
Skipping Nmap Missed services Always scan with Nmap first
Not updating plugins Missed new vulns Update before scanning
Rushing exploitation Failed attacks Verify before exploiting

Quick Reference Cheat Sheet

Essential Commands

# === Nessus ===
sudo systemctl start nessusd
sudo /opt/nessus/sbin/nessuscli update
# UI: https://localhost:8834

# === Nmap ===
nmap -sC -sV -p- -oA nmap/full <target>
nmap --script vuln -p 80,443,445,3306,8080 <target>
nmap --script smb-vuln-ms17-010 -p 445 <target>

# === Nikto ===
nikto -h http://<target>
nikto -h http://<target> -o report.html -Format html

# === SearchSploit ===
searchsploit <service> <version>
searchsploit -m <path> .

# === OpenVAS ===
sudo gvm-start
sudo greenbone-feed-sync --type gvmd
# UI: https://localhost:9392

Port-to-Service Quick Reference

Port Service Scanner Focus
21 FTP Default creds, anonymous
22 SSH Weak creds, outdated version
23 Telnet Cleartext credentials
25 SMTP Open relay, info disclosure
53 DNS Zone transfer, cache poisoning
80 HTTP Web vulns, directory listing
111 RPCBind RPC services
135 MSRPC Windows RPC
139 NetBIOS SMB over NetBIOS
143 IMAP Default creds
443 HTTPS SSL/TLS vulns, web vulns
445 SMB MS17-010, default creds
445 SMB EternalBlue, EternalRomance
993 IMAPS Default creds
1433 MSSQL Default creds, xp_cmdshell
1521 Oracle Default creds
3306 MySQL Default creds, empty password
3389 RDP BlueKeep, weak creds
5432 PostgreSQL Default creds
5900 VNC Weak creds, no auth
6379 Redis No auth, RCE
8080 HTTP-Alt Web vulns, proxy
8443 HTTPS-Alt Web vulns
27017 MongoDB No auth, data exposure

CVSS Quick Decision Tree

Is it remotely exploitable? (AV:N)
├── Yes → Is it complex? (AC:H)
│         ├── Yes → Medium priority
│         └── No → Does it need auth? (PR:N)
│                   ├── Yes → Medium priority
│                   └── No → Does it need user interaction? (UI:N)
│                             ├── Yes → Medium priority
│                             └── No → CRITICAL — Exploit now!
└── No → Is it local? (AV:L)
          ├── Yes → Low-Medium priority
          └── Physical? (AV:P)
                    └── Low priority

Summary

Vulnerability scanning is the bridge between reconnaissance and exploitation. Master these key points:

  1. Nessus is your primary tool — learn it inside and out.
  2. Always verify findings manually — scanners make mistakes.
  3. Prioritize by severity — Critical and High first.
  4. Use authenticated scans when credentials are available.
  5. Combine tools — Nmap + Nessus + Nikto for comprehensive coverage.
  6. Read plugin output — the raw evidence is often more valuable than the summary.
  7. Update plugins before every scan.
  8. Document everything — screenshots, commands, and findings.
  9. Scanning supports exploitation — it does not replace it.
  10. Time management matters — run Nessus while doing manual enumeration.

This study guide covers the vulnerability scanning chapter of the OSCP curriculum. Focus on hands-on practice with Nessus and Nmap NSE scripts, as these are the most frequently used tools in the OSCP exam.