Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
NetLogic — NetLogic is an advanced network analysis and cybersecurity toolkit for traffic inspection, packet analysis, and threat detection | Kitploit
Tools/GitHubGitHub/dmitryflynn/netlogic
OSINT (Open Source Intelligence)ReconnaissanceVulnerability ScannersWeb SecurityNetwork SecurityPenetration TestingCloud SecuritySubdomain EnumerationDNS AnalysisAI Security
GitHubdmitryflynn/netlogic

NetLogic

1710 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

NetLogic is an advanced network analysis and cybersecurity toolkit for traffic inspection, packet analysis, and threat detection

View Repository

NetLogic

Cloud-Native Attack Surface Mapper & Vulnerability Correlator — v3.0

NetLogic is a network security platform combining active port scanning, CVE correlation (live NVD API), SSL/TLS analysis, HTTP security auditing, DNS/email security assessment, subdomain takeover detection, passive OSINT, active vulnerability probing, an AI-driven reasoning engine, cross-host attack chain discovery, and deep probe agent architecture — delivered as a web app (React dashboard + FastAPI). The core scan engine is pure Python 3.9+ stdlib with zero third-party dependencies.

Python 3.9+ License: MIT Platform


Features

ModuleDescription
Port ScannerTCP connect scan with 43/58 ports, 22 service probes, banner grabbing
CVE CorrelatorLive NVD API v2.0 + EPSS enrichment via FIRST.org
TLS AnalyzerProtocol versions, weak ciphers, POODLE/BEAST/CRIME/DROWN, cert expiry
HTTP Header AuditHSTS, CSP, X-Frame-Options, CORS, cookie flags; 0–100 score
Stack FingerprintCMS, framework, cloud provider, CDN, WAF detection from banner/header/body
DNS SecuritySPF, DKIM, DMARC, DNSSEC, zone transfer, spoofability score
Passive OSINTCertificate Transparency logs, DoH DNS, ASN lookup — no direct target contact
Service ProberUnauthenticated Redis/Mongo/ES/Docker/K8s/etcd probes, 33 admin paths
Takeover DetectorCT log subdomain discovery + 25 cloud provider CNAME fingerprints
Nuclei IntegrationWrapper for 13k+ community templates (CVE, tech, exposure, misconfig) — MIT license
Fusion PipelineMulti-sensor signal gate → deterministic agreement → AI adjudication → attack graph → 6-section report
Web FingerprintFavicon hash (Shodan-compatible mmh3), JS secrets, version markers, exposed files, default lander detection
AI AnalysisOpenAI / Anthropic / OpenRouter / Ollama / Gemini / Groq / Kimi / Qwen — token-streaming SSE
Reasoning EngineAdaptive observe→reason→act loop with EvidenceGraph, hypothesis engine, confidence decay, provenance, scheduler, playbooks, change detection, active validation
Deep ProbePer-service agent architecture: ScoutAgent (recon), ProbeAgent (targeted CVE checks), Coordinator, Sandbox
AI Investigation AgentReAct-style loop: after baseline sensors, the AI drives a curated, scope-gated, audited tool surface (~35 tools) to verify leads and build attack chains — with opt-in aggressive tools (crash probes, freeform proof, freeform exploit) for authorized targets
Verifier EngineAI-driven CVE re-verification: designs raw-HTTP probe plans from CVE context, executes via stdlib sockets

How to Run

There are exactly two ways to run NetLogic:

ModeCommandWhat it does
Web appnetlogic --guiStarts FastAPI + serves the React SPA + in-process scan agent, auto-generates secrets, and opens the dashboard in your browser. This is the only way to run the web app.
CLInetlogic <target> [flags]

The product surface is the web app (React dashboard + FastAPI). The scan engine under src/ powers jobs started from the UI.


Quick Start

root@kitploit:~
# One-time install
pip install -r requirements-api.txt
pip install -e .

# Run the web dashboard
netlogic --gui
# → Dashboard at http://localhost:8000, auto-generated secrets in ~/.netlogic/secrets.json
# (first run builds the dashboard automatically; requires Node.js)

# Or a one-shot CLI scan
netlogic scanme.nmap.org --full

CLI Reference

root@kitploit:~
netlogic [target] [flags]

The entry point is api.cli:main (defined in pyproject.toml), which delegates to netlogic.py:main(). All scan logic is in src/.

Target specification

Scan scope

root@kitploit:~
# Basic scan — 43 common ports + CVE correlation
netlogic example.com

# Full scan — all modules enabled
netlogic example.com --full

# Deep TLS + HTTP header audit
netlogic example.com --tls --headers

# Subdomain takeover detection
netlogic example.com --takeover

# Passive OSINT only
netlogic example.com --osint

# Technology stack + WAF fingerprinting
netlogic example.com --stack

# DNS/email security (SPF, DKIM, DMARC, DNSSEC)
netlogic example.com --dns

# Active service probing (unauthenticated access, default creds, CVE-specific checks)
netlogic 10.0.0.5 --probe

# Everything — all flags combined
netlogic example.com --full --probe

Port selection

root@kitploit:~
# Quick — 43 common ports (default)
netlogic example.com --ports quick

# Full — 58 extended ports
netlogic example.com --ports full

# Custom list
netlogic example.com --ports custom=22,80,443,8080,9200

AI analysis

root@kitploit:~
# OpenRouter (default)
netlogic example.com --ai --ai-key $KEY

# OpenAI
netlogic example.com --ai --ai-provider openai --ai-key $KEY --ai-model gpt-4o-mini

# Anthropic
netlogic example.com --ai --ai-provider anthropic --ai-key $KEY

# Gemini
netlogic example.com --ai --ai-provider gemini --ai-key $KEY --ai-model gemini-2.0-flash

# Local Ollama
netlogic example.com --ai --ai-provider ollama

# Custom OpenAI-compatible endpoint
netlogic example.com --ai --ai-provider custom --ai-base-url https://... --ai-model model-name

AI providers supported

Reasoning engine

root@kitploit:~
# Adaptive observe→reason→act loop (deterministic by default; AI-augmented with --ai)
netlogic example.com --reason

# Multi-host world modeling — discovers in-scope neighbours, reasons per host
netlogic example.com --reason --multi-host

# Change detection — diffs against prior saved report
netlogic example.com --since-last

# Active validation — confirms hypotheses with safe non-destructive GETs
netlogic example.com --reason --active-validate

# Deep probe — per-service agent architecture with context isolation
netlogic example.com --deep-probe

AI Investigation Agent

After baseline sensors run, an optional ReAct-style agent lets the AI drive its own tools to verify leads and build attack chains, instead of leaving version/banner CVE hits as unverified leads. The AI proposes tool calls; a deterministic runtime executes them — every tool is scope-gated to the target, sanitized, and recorded as an observation. The AI never touches the wire directly.

root@kitploit:~
# AI chooses tools after baseline (needs --ai)
netlogic example.com --ai --ai-agent

# Depth mode — higher budgets, chases CVE leads + attack chains, blocks early stop
netlogic example.com --ai --agent-depth --agent-max-steps 24 --agent-max-requests 80

The agent has ~35 read-only/safe-active tools by default: HTTP/TLS/DNS probes, dir_enum, confirm_tech, timing_probe, cve_probe (curated known-CVE marker checks), sqli_boolean/sqli_time, ssrf_canary, idor_diff, file_disclosure, browser_get (headless, passes JS challenges), plus HackerOne bookkeeping (record_poc, severity_suggest, submit_readiness).

Opt-in aggressive tools — off by default, AUTHORIZED / owned in-scope targets only (never on a public or stranger scan). Each requires --ai-agent:

The deterministic ActionGate keeps the core at safe_active; these three flags are the explicit, audited opt-ins above it. Example (owned lab box + local model):

root@kitploit:~
netlogic YOUR_LAB_HOST --full --ai --ai-agent --agent-depth \
  --allow-crash-probes --allow-exploit-requests \
  --ai-provider ollama --ai-model gemma4:31b-cloud \
  --ai-base-url http://localhost:11434/v1 --ai-key ollama

Authenticated scanning

root@kitploit:~
# SSH key-based — reads real installed package versions
netlogic example.com --ssh-user admin --ssh-key ~/.ssh/id_rsa

# SSH password (requires sshpass)
netlogic example.com --ssh-user admin --ssh-pass SECRET

# Custom SSH port
netlogic example.com --ssh-user admin --ssh-key ~/.ssh/id_rsa --ssh-port 2222

Benchmark

root@kitploit:~
# Fusion pipeline benchmark against recorded cassettes (oracle mode — perfect AI upper bound)
netlogic --benchmark

# With real AI model
netlogic --benchmark --benchmark-ai

# Export report
netlogic --benchmark --benchmark-export report.md

# Verbose per-subject output
netlogic --benchmark --benchmark-verbose

Output

root@kitploit:~
# Report format
netlogic example.com --report terminal     # terminal output (default)
netlogic example.com --report json         # JSON file
netlogic example.com --report html         # HTML report
netlogic example.com --report all          # terminal + JSON + HTML

# Output directory
netlogic example.com --out ./reports

# CVSS threshold
netlogic example.com --min-cvss 7.0

# Colour
netlogic example.com --no-color

NVD cache management

root@kitploit:~
netlogic --cache-stats
netlogic example.com --nvd-key YOUR_NVD_KEY

Misc

root@kitploit:~
netlogic --version            # Show version and exit
netlogic --gui                # Start web dashboard

Fusion Pipeline

The fusion pipeline is a sensors → gate → AI adjudication → synthesis funnel that replaces monolithic AI calls with a precision gate. It lives in src/fusion/ (12 files).

Signal schema (src/fusion/signals.py)

Evidence-bearing data contract. Every sensor emits Signal objects:

  • source: probe/banner/nuclei/wappalyzer/nvd/osv/tls/dns
  • kind: vuln/tech/exposure/misconfig/service
  • claim: normalised subject (e.g. , )

Gate (src/fusion/gate.py)

Deterministic agreement — given list[Signal], groups by subject and returns list[Verdict]:

Condition

AI Adjudication (src/fusion/adjudicator.py)

Only touches the gray band. Safety constraints enforced in code (not prompt):

  • High/critical gray items can NEVER be discarded — at worst demoted to potential
  • Version-only matches capped at potential (distros backport without version bumps)
  • AI also discovers new findings from full host context
  • Fail-soft: AI outage leaves gray band as potential — no silent data loss

Synthesis (src/fusion/synthesis.py)

build_attack_graph(verdicts) → deterministic reachability graph from CONFIRMED findings. full_synthesize(...) → 6-section AI report:

  1. Executive Summary
  2. Key Findings (table)
  3. Attack Chains (graph-based, LLM narrates real edges)
  4. Beyond Known CVEs
  5. False Positives & Noise
  6. Remediation

Sensors

Cross-host (src/fusion/cross_host.py)

Post-adjudication grouping of verdicts across hosts by shared service+version for multi-hop attack chain narration in synthesis.

Pipeline Flow

root@kitploit:~
Engine artifacts / Cassette data
    ↓
engine_bridge.py / cassette.py     → Signal list
    ↓
gate.py::adjudicate()              → Verdict list (confirmed/discarded/gray)
    ↓
adjudicator.py::run_adjudication() → AI on gray band only
    ↓
synthesis.py::full_synthesize()    → 6-section report + attack graph

Reasoning Engine

Located in src/reasoning/ (~58 files). Multi-phase, safety-gated, observe→reason→act loop. Enabled with --reason.

Core loop (src/reasoning/director.py — ReconDirector.run())

  1. Phase 2 Sensor Sweep: StrategyManager selects persona → Scheduler picks action → SensorStep executes → EvidenceGraph folds observations → ConfidenceEngine refreshes beliefs
  2. Phase 3 AI Cycle: Deterministic generators populate objectives/hypotheses → AI agents propose typed Proposal envelopes → AICoordinator normalises/ranks/verifies → accepted proposals seed state → Compiler → ExecutionPlanner → ExecutionKernel runs probes → InferenceEngine resolves
  3. Phase 6c Multi-host: Cross-host discovery via CrossHostGraph, spawns child HostReasoner instances

State hierarchy (src/reasoning/state.py)

Key components

AI subsystem (src/reasoning/ai/)

Pipeline: Generate → Normalize → Rank → (MetaReasoner prune) → Verify → Store


Deep Probe Architecture

Located in src/deep/ (7 files). Used with --deep-probe. Per-service agent architecture for context-isolated probe execution.

DeepCoordinator.run() flow:

  1. Build AI sensor plan (_build_sensor_plan via sensor_director)
  2. Dispatch ScoutAgent for passive recon
  3. Group findings by service → per-service ProbeAgent instances (each with isolated CVE/tech context)
  4. Run service enumeration, Nuclei (AI-selected tags), verifier engine, takeover, AI-directed subnet probe, topology, authenticated SSH, scan diff, reachability probing

Verifier Engine

Located in src/verifier/ (3 files). AI-driven CVE confirmation with targeted probes.

Phase 2 re-verification (reverify_with_context) provides full host context to refine failed tests.


AI Sensor Directors

Located in src/directors/ (4 files). LLM-driven scan parameter selection.


Multi-Host Orchestration

Located in src/orchestrator.py. Triggered by comma-separated targets. Runs run_scan() per host, aggregates results, builds cross-host context from combined fusion verdicts. Cross-host groups detect shared services/versions across hosts for multi-hop attack chain narration.


CVE Coverage

Live: NVD API v2.0 (src/nvd_lookup.py)

  • Live lookup for uncovered products/versions
  • 192 offline signatures for air-gapped environments
  • On-disk cache with atomic writes
  • NVD API key for higher rate limits (--nvd-key)

Enrichment

  • EPSS (src/epss.py): FIRST.org API in batches of 100 CVE IDs, 24h disk cache at ~/.netlogic/epss_cache.json, fail-soft to 0.0
  • CISA KEV: CVEs actively exploited in the wild
  • Public exploit tracking: Metasploit and PoC markers

Nuclei Integration

src/external/nuclei_runner.py wraps the Nuclei binary (MIT license). Optional — degrades gracefully when binary not found. Results feed into fusion pipeline as typed signals (severity labels stripped to prevent LLM bias).

root@kitploit:~
# Install Nuclei
scoop install nuclei    # Windows
brew install nuclei     # macOS
go install github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest  # Linux

Fusion Benchmark

src/fusion/benchmark.py — offline measurement against labeled HTTP cassettes (benchmark/*.json and src/fusion/data/). Metrics:

MetricGate threshold
FP reduction≥ 80%
Critical recall= 100%

Two modes:

  • Oracle (--benchmark): perfect-AI upper bound — measures deterministic machinery alone
  • Real model (--benchmark --benchmark-ai): measured with configured LLM

Architecture

root@kitploit:~
netlogic/
├── netlogic.py                  ← Local launcher (`--gui`, optional CLI helpers)
│
├── src/                         ← Scan engine (used by the web API)
│   ├── scanner.py               ← TCP scanner, 22 service probes, banner grabbing
│   ├── engine.py                ← Orchestrator: SensorStep pipeline, all scan modules + fusion
│   ├── orchestrator.py          ← Multi-host: per-host scan → cross-host context
│   ├── ai_analyst.py            ← LLM integration (9 providers, stdlib-only transport)
│   ├── cve_correlator.py        ← CVE matching: NVD 
│   ├── nvd_lookup.py            ← NVD API v2.0 client, disk cache, CISA KEV
│   ├── epss.py                  ← EPSS enrichment (FIRST.org, 24h cache)
│   ├── service_prober.py        ← Unauthenticated service access, default creds, admin paths
│   ├── vuln_prober.py           ← CVE-specific safe active probes
│   ├── osint.py                 ← DoH, CT logs, ASN lookup
│   ├── tls_analyzer.py          ← SSL/TLS deep analysis
│   ├── header_audit.py          ← HTTP security header audit
│   ├── stack_fingerprint.py     ← CMS, framework, cloud, CDN, WAF detector
│   ├── web_fingerprint.py       ← Favicon mmh3, JS secrets, version files, exposed paths, lander detection
│   ├── dns_security.py          ← SPF, DKIM, DMARC, DNSSEC, zone transfer
│   ├── takeover.py              ← Subdomain takeover (25 provider fingerprints)
│   ├── authenticated.py         ← SSH subprocess: dpkg/rpm/apk parsing, 60+ product mappings
│   ├── topology.py              ← PTR, IPv6, traceroute, ASN/org/country
│   ├── reachability_prober.py   ← Lateral movement matrix from subnet adjacency
│   ├── network_prober.py        ← /24 subnet sweep: live-host → full port scan
│   ├── service_enum.py          ← Protocol attribute extraction (SSH KEX, SMBv1, RDP NLA, SNMP)
│   ├── ssl_utils.py             ← Configurable SSL context management, TLS probe
│   ├── scan_diff.py             ← Change-over-time: diffs against prior JSON report
│   ├── json_bridge.py           ← Streaming JSON events for agent / REST API
│   ├── reporter.py              ← Terminal, JSON, HTML output renderers
│   │
│   ├── fusion/                  ← Precision funnel (12 files)
│   │   ├── signals.py           ← Signal schema
│   │   ├── gate.py              ← Deterministic agreement
│   │   ├── adjudicator.py       ← AI adjudication (gray band only)
│   │   ├── synthesis.py         ← Attack graph + 6-section report
│   │   ├── ai.py                ← CompleteFn/StreamCompleteFn adapter
│   │   ├── engine_bridge.py     ← Artifacts → Signals → verdicts
│   │   ├── benchmark.py         ← Offline benchmark (oracle + real model)
│   │   ├── cassette.py          ← HTTP cassette record/replay
│   │   ├── corpus.py            ← Cassette→case conversion + CLI
│   │   ├── cross_host.py        ← Cross-host verdict correlation
│   │   ├── sensors/nuclei.py    ← Nuclei YAML → Signal conversion
│   │   └── sensors/wappalyzer.py← Wappalyzer fingerprint → Signal
│   │
│   ├── directors/               ← AI sensor directors (4 files)
│   │   ├── sensor_director.py   ← LLM selects which sensors to enable
│   │   ├── reprobe.py           ← LLM designs re-probe plans
│   │   ├── nuclei_selector.py   ← LLM selects Nuclei template tags
│   │   └── subnet_director.py   ← LLM directs subnet probing
│   │
│   ├── verifier/                ← AI CVE verification (3 files)
│   │   ├── engine.py            ← Verifier orchestration
│   │   ├── planner.py           ← Built-in + AI-generated probe plans
│   │   └── runner.py            ← Raw TCP/TLS probe execution
│   │
│   ├── deep/                    ← Deep probe agents (7 files)
│   │   ├── coordinator.py       ← Full deep pipeline orchestrator
│   │   ├── scout_agent.py       ← Passive recon agent
│   │   ├── probe_agent.py       ← Per-service probe agent
│   │   ├── chain.py             ← Exploit chain planning + PoC generation
│   │   ├── sandbox.py           ← Restricted PoC execution
│   │   ├── base_agent.py        ← Abstract base
│   │   └── models.py            ← Mission/AgentReport data models
│   │
│   ├── reasoning/               ← Adaptive reasoning engine (~58 files)
│   │   ├── director.py          ← ReconDirector (main loop)
│   │   ├── state.py             ← WorldModel/InvestigationState/ExecutionState
│   │   ├── hypothesis.py        ← Hypothesis engine (competing candidates)
│   │   ├── evidence_graph.py    ← Temporal entity graph (content-addressed obs)
│   │   ├── confidence.py        ← Noisy-OR belief computation
│   │   ├── provenance.py        ← Observation→Inference→Hypothesis edges
│   │   ├── scheduler.py         ← Information-gain action selection
│   │   ├── strategy.py          ← Meta-reasoning: personas, explore/exploit
│   │   ├── strategies.py        ← Concrete strategy implementations
│   │   ├── action_gate.py       ← Risk-tiered probe authorisation
│   │   ├── change_detection.py  ← Phase 7: observation-level diff
│   │   ├── active_validation.py ← Phase 8b: SAFE_ACTIVE probes
│   │   ├── cross_host.py        ← Cross-host world modeling
│   │   ├── objective.py         ← Objective DAG management
│   │   ├── intent.py            ← Intent model + EvidenceType enum (29 types)
│   │   ├── candidate.py         ← Action candidate with lazy factory
│   │   ├── actions.py           ← Action model with RiskTier + Predicate
│   │   ├── compiler.py          ← Intent → InvestigationGraph
│   │   ├── execution_planner.py ← InvestigationGraph → ProbePlanGraph
│   │   ├── execution_kernel.py  ← Probe execution with validators
│   │   ├── probe_executor.py    ← Read-only probe backends
│   │   ├── primitive_registry.py← Probe primitive catalogue
│   │   ├── generators.py        ← Deterministic objective/hypothesis population
│   │   ├── playbooks.py         ← YAML playbook system
│   │   ├── planning_pass.py     ← GoalPlanner integration
│   │   ├── budget.py            ← Probe budget management
│   │   ├── inference.py         ← Deterministic rule-based inference
│   │   ├── novel_inference.py   ← Novel-vuln hypothesis rules
│   │   ├── investigation_planner.py  ← Goal-directed investigation planning
│   │   ├── investigation_memory.py   ← Strategy attempt memory
│   │   ├── observation_translator.py ← Raw data → structured observations
│   │   ├── observation.py       ← Immutable, content-addressed observation
│   │   ├── reflect.py           ← PlannerFeedback generation
│   │   ├── reasoning_validator.py ← Continuous integrity audit
│   │   ├── builder.py           ← State population from artifacts
│   │   ├── trace.py             ← Execution tracing
│   │   ├── explanation.py       ← Explanation records
│   │   ├── ai/                  ← AI cognitive layer (subsystem)
│   │   ├── packs/               ← Technology pack calibration
│   │   ├── playbooks/           ← YAML playbook templates
│   │   └── rules/               ← JSON inference rules
│   │
│   └── external/nuclei_runner.py ← Nuclei binary wrapper
│
├── api/                         ← FastAPI controller
│   ├── main.py                  ← App factory, lifespan, middleware stack
│   ├── cli.py                   ← Typer -> netlogic.py bridge
│   ├── db.py                    ← PostgreSQL connection + migration runner
│   ├── crypto.py                ← Fernet seal/unseal (AES-128-CBC + HMAC-SHA256)
│   ├── auth/
│   │   ├── api_keys.py          ← Dual-store (memory/PG), SHA-256 hashed
│   │   ├── jwt_handler.py       ← Stdlib-only HS256 JWT
│   │   ├── oidc.py              ← Clerk/IdP OIDC (RS256 + JWKS)
│   │   ├── license.py           ← LicenseManager (stub → real payment API)
│   │   ├── rate_limit.py        ← Sliding-window, IP banning
│   │   ├── provisioning.py      ← Clerk auto-provisioning
│   │   └── dependencies.py      ← require_org FastAPI dependency
│   ├── agents/
│   │   ├── registry.py          ← Agent lifecycle (concurrency-aware, JSON persistence)
│   │   └── local_agent.py       ← Built-in in-process agent
│   ├── jobs/
│   │   ├── manager.py           ← ScanJob lifecycle, capped event deque (10k), SSE, Postgres
│   │   └── executor.py          ← Dispatch (capability/selector, least-loaded, reclaimer)
│   ├── middleware/audit.py      ← X-Request-ID + structured audit + SIEM shipping
│   ├── models/
│   │   ├── scan_request.py      ← Pydantic ScanRequest (ipaddress validation)
│   │   └── agent.py             ← AgentRegistration constraints
│   ├── routes/
│   │   ├── auth.py              ← /v1/auth/*
│   │   ├── jobs.py              ← /v1/jobs/*
│   │   ├── agents.py            ← /v1/agents/*
│   │   ├── health.py            ← /health + /v1/health
│   │   ├── license.py           ← /v1/license/*
│   │   └── settings.py          ← /v1/settings/*
│   └── storage/
│       ├── json_store.py         ← 10 MB cap, 500 file cap, atomic writes
│       ├── pg_store.py           ← Postgres JSONB upsert
│       └── reasoning_store.py    ← Dual-store for reasoning state
│
├── dashboard/                   ← React SPA (Vite + TypeScript + Tailwind + Clerk)
│   └── src/
│       └── pages/               ← Dashboard, NewScan, ScanDetail, Agents, Targets,
│                                   TargetTimeline, Settings, License, Login, SignUp, Legal
│
├── docs/                        ← Design documentation
│   ├── DEPLOY_SAAS.md, saas-auth.md
│   ├── REASONING_ENGINE_DESIGN.md
│   ├── LEGAL_COMPLIANCE.md
│   ├── ENTERPRISE_READINESS.md
│   └── DESIGN_PARTNER_PACK.md
│
├── db/migrations/               ← PostgreSQL schema migrations
└── benchmark/                   ← HTTP cassette recordings for fusion benchmark

API Reference

All routes under /v1/ prefix. Authentication:

  • Machine: API key → POST /v1/auth/token → HS256 JWT (default 1h expiry)
  • Human: Clerk OIDC session JWT → require_org dependency verifies against JWKS

Auth

root@kitploit:~
POST   /v1/auth/token          Exchange API key for JWT          [10/min/IP]
POST   /v1/auth/keys           Create API key (X-Admin-Key)       [admin]
GET    /v1/auth/keys           List keys (masked)                 [admin]
DELETE /v1/auth/keys           Revoke key (body, not URL)         [admin]

Jobs

root@kitploit:~
POST   /v1/jobs                Create scan job                    [30/min/org]
GET    /v1/jobs                List recent jobs
GET    /v1/jobs/history/{target}  Scan history for target
GET    /v1/jobs/{id}           Job detail
GET    /v1/jobs/{id}/stream    SSE event stream                   [60/min/org]
GET    /v1/jobs/{id}/export    Export (format=json|md|raw)
POST   /v1/jobs/{id}/explore-beyond  AI deep-dive on finding
POST   /v1/jobs/{id}/cancel    Cancel job
DELETE /v1/jobs/{id}           Remove job

Agents

root@kitploit:~
POST   /v1/agents/register               Register agent         [5/hr/IP]
POST   /v1/agents/{id}/heartbeat         Keep-alive             [3/min]
GET    /v1/agents/{id}/tasks             Poll pending jobs
POST   /v1/agents/{id}/tasks/{job_id}/events   Submit events    [60/min, 500/batch]
POST   /v1/agents/{id}/tasks/{job_id}/complete  Mark done/failed
GET    /v1/agents                        List agents (org-scoped)
GET    /v1/agents/{id}                   Agent detail
DELETE /v1/agents/{id}                   Deregister
POST   /v1/agents/{id}/activate         Enable agent
POST   /v1/agents/{id}/deactivate       Disable agent

License / Settings

root@kitploit:~
GET    /v1/license              License status
POST   /v1/license/activate     Activate key                    [3/hr/IP]
GET    /v1/settings/ai          Get org AI config (key masked)
POST   /v1/settings/ai          Update org AI config (encrypted)
POST   /v1/settings/ai/test     Test AI connection

System

root@kitploit:~
GET    /health                  Service status + uptime
GET    /docs                    OpenAPI docs
GET    /redoc                   ReDoc docs

Environment Variables

Controller

Agent

VariableDefaultDescription
NETLOGIC_CONTROLLERhttp://localhost:8000Controller base URL
NETLOGIC_API_KEY(unset)API key for registration

Security Architecture

Middleware stack (order applied)

  1. AuditMiddleware — X-Request-ID correlation, structured JSON audit log, SIEM shipping
  2. RequestSizeLimitMiddleware — 10 MB body limit (DoS protection)
  3. LicenseMiddleware — blocks all /v1/ routes when unlicensed (returns 402)
  4. SecurityHeadersMiddleware — HSTS (1y), CSP (differentiated HTML vs API), X-Frame-Options, X-Content-Type-Options, Permissions-Policy, Referrer-Policy
  5. OriginCheckMiddleware — POST/PUT/DELETE Origin validation (CSRF defence-in-depth)
  6. CORSMiddleware — restrictive: no wildcard, specific origins only

Authentication

  • API keys: SHA-256 hashed at rest; plaintext only on create() and in request body during verify()
  • JWT: HS256 with stdlib (hashlib+hmac+base64), alg field pinned before verification (prevents alg=none), ephemeral random fallback for dev
  • OIDC: Clerk/Auth0/WorkOS — RS256 + JWKS, auto-provisions users + orgs on first login
  • Agent tokens: SHA-256 hashed in registry, constant-time comparison, 7-day expiry

Rate limiting

Sliding-window in-memory. Per-endpoint, per-scope (IP, org_id, agent_id). IP banning after 5 failed token exchanges in 10 minutes (1h ban).

Data protection

  • LLM API keys: Fernet-encrypted at rest (AES-128-CBC + HMAC-SHA256). Production-fail-closed: requires NETLOGIC_SECRETS_KEY
  • Multi-tenancy: all data scoped to org_id; cross-org lookup returns 404 (not 403)
  • Path traversal: all storage paths validated, separators and .. rejected

CI / Testing

root@kitploit:~
pip install -r requirements-dev.txt
python -m pytest

CI pipeline (.github/workflows/ci.yml) — 5 jobs:

  1. test — 1,000+ pytest cases
  2. postgres-integration — DB migrations + durable jobs + per-org keys
  3. fusion-benchmark — FP reduction ≥ 80% + critical recall = 100%
  4. security — Bandit (HIGH) + pip-audit
  5. build-dashboard — npm ci + npm run build

Legal Notice

NetLogic is intended for authorized security assessments, penetration testing, and network administration only. Scanning or probing hosts without explicit written permission is illegal in most jurisdictions. The author assumes no liability for unauthorized use.


License

MIT © 2026 Dmitry Flynn — See LICENSE.txt

Download Tool
Multi-Host OrchestrationFull scan pipeline per host → cross-host context and reachability matrix → attack chain discovery
AI Sensor DirectorsLLM decides which sensors to prioritise based on open ports, tech stack, and CVEs
Authenticated SSHCredentialed ssh subprocess reads real installed package versions (60+ product mappings)
Service EnumProtocol-level attribute extraction (SSH KEX, SMBv1, RDP NLA, SNMP community, HTTP auth state)
Topology MapperReverse DNS, IPv6, traceroute, ASN/org/country via ip-api.com
Reachability ProberPost-compromise lateral movement matrix from subnet adjacency
Network ProberActive subnet sweep (/24 private neighbours) with two-phase discovery (live sweep → full port scan)
Scan DiffChange-over-time: diffs current scan against most recent prior JSON report per target
License ManagementCommercial license system with key activation (stub for Stripe/Paddle/Lemon Squeezy)
Per-Org AI ConfigEach org stores its own LLM credentials encrypted at rest via Fernet
OIDC / ClerkHuman logins via Clerk-issued session JWTs verified against public JWKS with auto-provisioning
PostgreSQLFull multi-tenant persistence with auto-applied migrations (scan jobs, org settings, reasoning state, audit)
Fusion BenchmarkOffline benchmark against recorded HTTP cassettes; precision/recall/critical-recall/FP-reduction metrics
One-shot terminal scan (no server), prints/writes the report.
FormatExampleMode
Hostnameexample.comSingle-host scan
IPv410.0.0.5Single-host scan
CIDR192.168.1.0/24CIDR sweep (scanner only, no fusion)
Comma-separatedtarget1,target2Multi-host orchestration (cross-host context)
ProviderDefault modelAPI style
openrouteranthropic/claude-sonnet-4OpenAI
openaigpt-4o-miniOpenAI
anthropicclaude-3-5-sonnet-20241022Anthropic Messages
kimi (Moonshot)kimi-k2.6OpenAI
qwen (Alibaba)qwen-plusOpenAI
groqllama-3.3-70b-versatileOpenAI
gemini (Google)gemini-2.0-flashOpenAI
ollamallama3OpenAI
customuser-specifiedOpenAI
FlagToolWhat it unlocksRails kept
--allow-crash-probescrash_probeCurated crash/DoS CVE checks (http.sys, MS15-034) that MAY crash the hostFixed 3-CVE catalog — not freeform
--allow-freeform-proofhttp_proofTier C: freeform GET/HEAD/OPTIONS (+ POST on search/login/graphql-like paths)Destructive patterns + PUT/PATCH/DELETE blocked; proof, not mutation
--allow-exploit-requestsexploit_requestTier E: any method (incl. PUT/PATCH/DELETE) + arbitrary path/headers/body against the targetScope-gated; fail-closed on mass-destructive patterns (DROP/TRUNCATE TABLE, rm -rf) and CR/LF header injection; every request audited
"CVE-2021-44228"
"nginx"
  • host, port, service, evidence (capped 600 chars)
  • confidence (0..1), reliability (high/medium/low)
  • kev, epss (0..1), cvss (0..10), exploit_available, version_matched, probe_confirmed
  • exposure dict (reachability, WAF, vantage)
  • observed_data (raw bytes sent to AI — NOT sensor names or severities to prevent label bias)
  • ai_view() strips sensor metadata, returns only observed facts
  • Verdict
    KEV-listed OR probe-confirmed OR critical+exploit/high-EPSSConfirmed (pinned — un-droppable)
    ≥2 independent sources agree, ≥1 high-reliabilityConfirmed (unless all are version-matched → gray)
    Solo low-reliability, low/medium impact, no corroborationDiscarded
    Everything elseGray (costs an AI token)
    SensorFileWhat it produces
    Engine bridgeengine_bridge.pyConverts scan artifacts → Signals from NVD, probes, stack, Nuclei, verifier
    Wappalyzersensors/wappalyzer.pyZero-dependency Wappalyzer-compatible fingerprinting of HTTP responses
    Nucleisensors/nuclei.pyRuns YAML templates against responses (subset of Nuclei syntax)
    Cassettecassette.pyRecord/replay from HTTP cassettes (offline benchmark data)
  • Phase 8 Planning Pass: GoalPlanner produces investigation plans
  • Continuous: ReasoningValidator integrity audit → ProvenanceBuilder records edges → state persisted
  • LayerClassWhat it tracks
    WorldModelWorldModelEvidenceGraph, observations, beliefs, hosts, technology, reachability
    InvestigationStateInvestigationStateObjectives (DAG), hypotheses, contradictions, dead-ends, current persona
    ExecutionStateExecutionStateBudget, probe_history, provenance, investigation_plans, AI transcript
    LearnedPatternsLearnedPatternsCross-scan heuristics + playbooks
    ComponentFileDescription
    EvidenceGraphevidence_graph.pyDeduplicated temporal entity graph (content-addressed observations via SHA-256)
    Hypothesis enginehypothesis.pyCompeting candidates with likelihoods, entropy, information gain, posterior resolution
    ConfidenceEngineconfidence.pyNoisy-OR over distinct sources; version-only capped at 0.60; KEV/probe pinned at 0.97
    ProvenanceBuilderprovenance.pyObservation→Inference→Hypothesis edges, content-hash addressed
    Schedulerscheduler.pyInformation-gain action selection with explore_reserve (10%)
    StrategyManagerstrategy.pyMeta-reasoning: persona selection, explore/exploit mode, plateau detection
    ActionGateaction_gate.pyDefense-in-depth: risk tiers (READ_ONLY < SAFE_ACTIVE < INTRUSIVE < EXPLOIT), core max is SAFE_ACTIVE
    InferenceEngineinference.pyDeterministic rules from rules/*.json, never writes confidence
    NovelInferenceEnginenovel_inference.pyRules for cache_poisoning, request_smuggling, auth_bypass etc.
    ExecutionKernelexecution_kernel.pyValidates + executes + traces probes (scope → read-only → budget → dedup → depth)
    Playbook systemplaybooks.pyYAML playbooks with trigger conditions and intent templates
    Change detectionchange_detection.pyPhase 7: diffs immutable observations (not state), produces ScanDelta of DeltaEvents
    Active validationactive_validation.pyPhase 8b: non-destructive SAFE_ACTIVE probes through ActionGate
    FileComponent
    coordinator.pyAICoordinator — staged pipeline orchestration
    proposals.pyTyped Proposal envelope with kind-specific payload, provenance, economics
    normalize.pyProposalNormalizer — total validation gate
    rank.pyProposalRanker — score = raw_score × prob_correct × reputation_weight
    meta_reasoner.pyDeterministic pruning (loop detection, uncertainty reduction)
    verifier.py4-stage: Syntax → Semantic → Evidence → Safety
    store.pyProposalStore — lifecycle ledger
    transcript.pyInvestigationTranscript — causal chain recording
    evaluation.pyCassette-based deterministic evaluation harness
    reputation.pyAgentReputation — tracks accept/reject rate per agent
    agents/hypothesis_generator.pyC1 — proposes competing explanations + novel-vuln hypotheses
    agents/counterfactual.pyC11 — proposes refutation objectives
    agents/investigation_designer.pyC2 — designs evidence-gathering plans
    ComponentFileDescription
    DeepCoordinatorcoordinator.pyOrchestrates full deep pipeline: AI sensor plan → ScoutAgent → per-service ProbeAgent → service enum → Nuclei → verifier → takeover → subnet probe → topology → auth → diff → reachability
    ScoutAgentscout_agent.pyPassive recon: TLS, headers, stack, DNS, OSINT
    ProbeAgentprobe_agent.pyTargets one service with isolated CVE/tech context — runs probes + verifier
    ExploitChainchain.pyBFS attack path planning over fusion-confirmed verdicts, PoC generation
    Sandboxsandbox.pyRestricted subprocess for PoC validation (temp dir, timeout, clean-up)
    Mission / AgentReportmodels.pyData models for agent directives and results
    ComponentFileDescription
    run_verifier()engine.pyOrchestrates: generate plans → execute → construct probe-confirmed Signals
    generate_plans_for_cves()planner.pyPer-CVE (CVSS ≥ 7.0): checks ~20 built-in plans → AI generates raw-HTTP plan (method, path, headers, body, expected status/body)
    run_test()runner.pyRaw TCP/TLS socket execution, manual HTTP/1.0 parsing, expected body pattern matching
    DirectorFileWhat it decides
    SensorDirectorsensor_director.pyWhich sensors to enable/disable and at what priority, based on open ports + tech stack + CVEs
    ReprobeDirectorreprobe.pyWhether potential findings can be resolved with targeted HTTP probes
    NucleiSelectornuclei_selector.pyWhich Nuclei template tags to include/exclude (reduces irrelevant runs)
    SubnetDirectorsubnet_director.pyWhich adjacent hosts to probe, which ports, at what depth (skip/quick/standard/deep)
    VariableDefaultDescription
    NETLOGIC_ENV(unset)production/prod = secret validation at startup
    NETLOGIC_JWT_SECRETchangeme-in-productionHS256 signing secret, ≥32 chars
    NETLOGIC_JWT_EXPIRY3600JWT lifetime in seconds
    NETLOGIC_ADMIN_KEYadmin-changemeAdmin credential, ≥32 chars in production
    NETLOGIC_API_KEYS(empty)Seed keys: key1:org1,key2:org2,...
    NETLOGIC_CORS_ORIGINS(empty)Allowed origins (CORS disabled if empty)
    NETLOGIC_PORT8000Bind port
    NETLOGIC_HOST0.0.0.0Bind address
    NETLOGIC_NO_BROWSER(unset)1 disables auto-open
    NETLOGIC_OIDC_ISSUER(unset)Clerk Frontend API URL → OIDC login
    NETLOGIC_OIDC_AUDIENCE(unset)OIDC audience
    NETLOGIC_OIDC_DEFAULT_ORG(unset)Fallback org_id for OIDC users
    NETLOGIC_DATABASE_URL(unset)PostgreSQL connection string
    NETLOGIC_SECRETS_KEY(unset)Fernet key for credentials at rest
    NETLOGIC_AGENT_TOKEN_MAX_AGE604800Agent token lifetime (7 days)
    NETLOGIC_AGENT_PENDING_CAP50Max queued tasks per agent
    NETLOGIC_MAX_AGENTS_PER_ORG100Max registered agents
    NETLOGIC_AI_PROVIDERopenrouterDefault AI provider
    NETLOGIC_AI_API_KEY(empty)Default AI key
    NETLOGIC_AI_MODELprovider defaultDefault model
    NETLOGIC_AI_BASE_URLprovider defaultCustom base URL
    NETLOGIC_NVD_KEY(empty)NVD API key
    NETLOGIC_VALID_LICENSES(empty)Dev/test license overrides
    NETLOGIC_LICENSE_KEY(empty)Instance license key
    NETLOGIC_SCANS_DIR(default)Scan storage directory
    NETLOGIC_SIEM_ENDPOINT(empty)Audit log shipping URL
    NETLOGIC_WAPPALYZER_DATA(built-in)Wappalyzer fingerprints path