Cybersecurity & Risk Management

Architecting an AI-Powered Vulnerability Assessment and Risk Management Platform

By Yogesh Aryal10 min readVulnerability Assessment

A practical exploration of building a centralized platform for asset discovery, network scanning, service enumeration, vulnerability matching, risk assessment, AI-assisted remediation, and security visualization.

1. Introduction: The Evolution of Asset Security

Cybersecurity operations have evolved beyond the foundational requirements of simple port scanning. In modern threat landscapes, visibility is the primary currency. Organizations must transition from reactive troubleshooting to a proactive stance that encompasses asset discovery, service enumeration, and actionable remediation.

This shift necessitates the development of a “Vulnerability Assessment & Risk Management Platform” a centralized system designed to identify vulnerabilities and prioritize risks before they are exploited.

By automating the pipeline from discovery to visual analysis, security teams can transform raw network data into strategic defensive intelligence.

Core Idea

By automating the pipeline from discovery to visual analysis, security teams can transform raw network data into strategic defensive intelligence.

2. Project Vision and Core Objectives

The platform was conceptualized to automate a comprehensive security assessment workflow within a controlled laboratory environment. The following eight objectives define its core functionality:

1

Asset Discovery

Identify all reachable devices on the local network to maintain a real-time inventory of potential targets.

2

Network Scanning

Execute targeted scans to discover active hosts and identify exposed network ports.

3

Service Enumeration

Determine the specific software services and version strings running on discovered ports.

4

Vulnerability Matching

Cross-reference detected services against an internal knowledge base to identify potential security weaknesses.

5

Risk Assessment

Categorize findings into standardized severity levels (Low, Medium, High, Critical) for prioritization.

6

Persistent Storage

Archive all assessment data in a centralized database to facilitate historical analysis and trend tracking.

7

AI-Assisted Remediation

Integrate local Large Language Models (LLMs) to generate context-aware security recommendations.

8

Security Dashboard

Provide a centralized visual interface to monitor the security posture and track remediation efforts.

3. The Technology Stack

The development stack was selected to prioritize modularity, local data privacy, and rapid prototyping within a macOS environment.

Development Stack & Tooling

TechnologyPurpose
PythonCore application logic and automation scripts
NmapIndustry-standard engine for network discovery and service enumeration
python-nmapPython library for programmatic interaction with the Nmap engine
SQLiteLightweight, file-based database for persistent findings storage
PandasData manipulation and processing for dashboard integration
StreamlitFramework for building the web-based security dashboard
OllamaLocal inference engine for running LLMs without external API calls
Llama 3.2Local LLM used for generating intelligent remediation guidance
macOS TerminalPrimary development and testing environment

Privacy-First AI Architecture

Running AI inference locally via Ollama provides a critical security advantage: sensitive network details, such as internal IP addresses and hostnames, never leave the local environment, ensuring total data sovereignty.

4. High-Level Architecture and Workflow

The platform utilizes a modular "pipeline architecture," enforcing a strict separation of concerns. By isolating network scanning logic from database management and dashboard visualization, the system remains extensible and resilient to changes in individual components.

The assessment workflow follows a standardized logical sequence:

STEP 1
Discover
STEP 2
Scan
STEP 3
Enumerate
STEP 4
Match
STEP 5
Assess
STEP 6
Store
STEP 7
Analyze
STEP 8
Visualize
Discover → Scan → Enumerate → Match → Assess → Store → Analyze → Visualize

5. Implementation Phase: Network Discovery and Service Enumeration

The assessment begins with network interrogation using Nmap to identify the attack surface.

Host Discovery

The platform utilizes the following command to identify active hosts within a subnet:

nmap -sn 192.168.1.0/24

Flag Definition: The -sn flag initiates a "Ping Scan" (no port scan), which determines if a host is online without performing a more intrusive service check.

During development on a macOS-based environment, it was observed that a host may be reachable but fail to respond to ICMP-based discovery. This is often indicative of a "stealth posture" where local firewalls drop discovery packets.

Service Enumeration

Once a host is confirmed, the platform identifies the services running on exposed ports:

nmap -sV 192.168.1.15

Flag Definition: The -sV flag enables service/version detection, probing open ports to determine the service name and exact version number.

Controlled Laboratory Testing

In scenarios where a target host (such as a local MacBook) exposes no open ports by default, a "Test Service" is required to validate the assessment logic. This is achieved by deploying a "Known Vulnerable Target" using Python’s built-in HTTP server:

python3 -m http.server 8000

This creates a verifiable target on port 8000 within an authorized laboratory environment, ensuring that scanning activities remain ethical and within defined boundaries.

6. The Logic Engines: Matching and Risk Scoring

The core intelligence of the platform resides in the matching and risk engines, which transform raw Nmap strings into actionable findings.

Vulnerability Matching

The platform employs a prototype knowledge base. Unlike enterprise scanners that query massive CVE databases, this prototype utilizes targeted logic to identify known service weaknesses.

Risk Engine

The risk engine maps the results of the matching logic to a severity-to-risk hierarchy.

Low
Medium
High
Critical

Severity Levels: Findings are ranked as Low, Medium, High, or Critical.

Purpose: This provides a consistent prioritization mechanism, allowing security teams to focus on the most impactful risks first.

7. AI-Powered Remediation with Ollama

The platform integrates Llama 3.2 via Ollama to serve as an "AI Security Advisor." This component provides the bridge between technical findings and remediation steps.

Privacy-First Integration

Local inference ensures that network architecture and security weaknesses are not exposed to third-party cloud providers.

Human-in-the-Loop Requirement

While the AI generates highly relevant remediation steps, all output must be treated as advisory. A "Human-in-the-Loop" approach is mandatory; security teams must validate and approve any AI-generated configuration changes before they are applied to production systems.

8. The Security Dashboard

The visual interface, built with Streamlit, provides the final layer of the pipeline. By reading directly from the SQLite database and processing data through Pandas, the dashboard transforms rows of technical data into a structured UI.

🗄️

SQLite

Persistent findings storage

📊

Pandas

Data processing

🖥️

Streamlit

Security visualization

This allows for the rapid review of findings, making the assessment results accessible to both technical analysts and security management.

9. Ethics, Limitations, and Future Roadmap

Security Considerations

Assessment tools must be used responsibly. Authorized scanning is limited to:

1.Systems owned by the operator.
2.Dedicated cybersecurity laboratories.
3.Environments where explicit written authorization has been granted.

Limitations

The current prototype is designed for educational and portfolio purposes and has the following constraints:

Manual Knowledge Base

The vulnerability mapping is restricted to a simplified, manually defined list.

Simplified Scoring

The risk model does not yet utilize full CVSS vector strings.

Discovery Constraints

Stealthy firewall configurations may prevent Nmap from identifying every active device.

10. Future Roadmap

CVE Intelligence Integration

Automating the mapping of services to global vulnerability databases.

CVSS Scoring

Implementing standardized scoring for industry-compliant risk reporting.

Executive Reporting

Adding functionality to generate automated PDF reports for stakeholders, including risk distribution and remediation summaries.

11. Conclusion: Portfolio Synergy

The Vulnerability Assessment & Risk Management Platform represents a proactive approach to security, complementing reactive tools like log-based threat investigators (e.g., "CyberGuard AI").

While reactive tools focus on incident response, this platform focuses on risk reduction through the identification and mitigation of weaknesses.

Vulnerability Assessment & Risk Management Platform • Cybersecurity & Risk Management