Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-Threaded Python Vulnerability Scanner

A lightweight, high-speed network reconnaissance and vulnerability identification tool built in Python. The scanner performs parallel TCP port probing, captures service banners, extracts software version strings, queries the National Vulnerability Database (NVD) REST API for known CVEs, and exports structured JSON security reports.

System Architecture & Workflow

[Target IP] ──> [Multi-Threaded TCP Probe] ──> [Banner Extraction]
                                                       │
[JSON Report] <── [Structured Output] <── [NVD CVE API Lookup]
  • Network Socket Engine: Utilizes Python socket connections with configurable timeouts to perform non-blocking port discovery.
  • Service Banner Grabbing: Transmits targeted HTTP probe headers to elicit detailed server runtime metadata (Server, SimpleHTTP, OpenSSH).
  • Multi-Threading Acceleration: Implements concurrent.futures.ThreadPoolExecutor to probe up to 50 ports simultaneously, reducing scan duration from minutes to seconds.
  • Dynamic Regex Parsing: Leverages regular expressions (re) to parse software names and version numbers from raw ASCII banners.
  • Live CVE Enrichment: Queries the NVD REST API (services.nvd.nist.gov) in real-time to match identified software versions against public vulnerability disclosures.
  • Structured JSON Reporting: Formats scan findings and vulnerability metadata into structured, timestamped JSON artifacts for security analysis.

Key Features

  • Custom Port Targeting: Supports scanning single target IPs and customized port lists via CLI flags.
  • Automated Threat Intelligence: Connects directly to NIST NVD API endpoints for up-to-date CVE intelligence.
  • Concurrent Scanning: Multi-threaded architecture eliminates sequential socket timeout delays.
  • Automated Logging: Exports scan metrics and findings automatically to the reports/ directory.

Installation & Setup

  1. Clone Repository:

    git clone [https://github.com/YOUR_USERNAME/vulnerability-scanner.git](https://github.com/YOUR_USERNAME/vulnerability-scanner.git)
    cd vulnerability-scanner
  2. Install Dependencies:

    python3 -m pip install -r requirements.txt

Usage

Run a scan against local host or an authorized target:

# Basic scan against localhost
python3 scanner.py

# Scan custom target IP and specific ports
python3 scanner.py -t 127.0.0.1 -p 22,80,443,8000,8080

Sample Terminal Output

====================================================================
         CUSTOM VULNERABILITY SCANNER | TARGET: 127.0.0.1
====================================================================

[*] Performing multi-threaded port scan...
[+] Identified 1 open port(s)!

--------------------------------------------------------------------
PORT       SERVICE BANNER                                         
--------------------------------------------------------------------
8000       HTTP/1.0 200 OK

--------------------------------------------------------------------
RECONNAISSANCE & VULNERABILITY FINDINGS:
--------------------------------------------------------------------

[+] Analyzing Port 8000...
  ├── Detected Software: SimpleHTTP 0.6
  └── No known high-severity CVEs identified for this version.

====================================================================
[+] Scan Complete! Report exported to: reports/scan_127.0.0.1_20260821_153000.json
====================================================================

Technologies & Modules Used

  • Language: Python 3
  • Standard Libraries: socket, concurrent.futures, re, json, argparse, os
  • Third-Party Modules: requests
  • External APIs: National Vulnerability Database (NVD) REST API v2.0

About

A multi-threaded Python network reconnaissance tool and CVE scanner that probes TCP ports, extracts service banners, queries the NVD REST API, and exports JSON reports.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages