STEALTHWALL
Self-hosted machine-learning intrusion prevention middleware and firewall. Evaluates sliding-window traffic behavior across 14 normalized statistical features in sub-millisecond time to detect and mitigate automated cyberattacks (SQL injection, directory scans, brute force, exploit probes) before requests reach backend application logic.
Architecture Overview
STEALTHWALL operates as an in-process middleware or reverse-proxy sidecar:
- Pre-Enforcement Gate: Checks incoming requests against local kernel firewall tables (
iptables/nftables) and active cooldown lists. Drops blocked IPs immediately (403 Forbidden). - Feature Extraction: Tracks requests in sliding time windows (60 seconds) per source IP. Computes 14 normalized statistical metrics (Shannon entropy, inter-arrival variance, status code distribution, enumeration entropy, signature presence).
- ML Inference: Evaluates an optimized LightGBM decision model (
coldstart.onnx) running on ONNX Runtime with pure-Python fallback. - Graduated Response: Implements progressive cooldown tiers (
rate_limit->pow_challenge->provisional_block->temp_block->long_cooldown). Includes shared-IP protection for CGNAT / proxy gateways.
Quickstart
Python (FastAPI / Starlette)
pip install stealthwall
from fastapi import FastAPI
from stealthwall import StealthWall
app = FastAPI()
StealthWall(app)
@app.get("/")
def index():
return {"status": "online"}
Node.js (Express)
npm install stealthwall
const express = require('express');
const { stealthwall } = require('stealthwall');
const app = express();
app.use(stealthwall());
app.get('/', (req, res) => {
res.json({ status: 'online' });
});
app.listen(3000);
CLI & Operations Console
# Launch visual monitoring dashboard and WebSocket feed
stealthwall dashboard --port 8000
# Run simulated attack traffic against a target
stealthwall attack --tool sqlmap --target http://localhost:8000
# Print configuration and model artifact status
stealthwall status
# Run full test suite and cross-language parity assertions
stealthwall test
Dashboard Authentication & Docker
When running the dashboard in production, configure admin credentials via environment variables:
export STEALTHWALL_ADMIN_USER="admin"
export STEALTHWALL_ADMIN_PASSWORD="YourStrongPassword123!"
stealthwall dashboard --port 8000
Or deploy the complete stack (Dashboard + Redis + Prometheus) via Docker Compose:
docker compose up -d
Visit http://localhost:8000 to access the real-time dark-theme Operations Console and live incident stream.
Documentation
- Publishing to PyPI & npm
- FastAPI / Python Integration
- Express / Node.js Integration
- Next.js Edge Middleware
- PHP & WordPress Integration
- Nginx Reverse Proxy Integration
- REST & WebSocket API Reference
- Attack Simulator & Penetration Testing
- Changelog
License
MIT License.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stealthwall-5.0.0.tar.gz.
File metadata
- Download URL: stealthwall-5.0.0.tar.gz
- Upload date:
- Size: 314.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22878f6fd721c1f4f98c4625c4223d4583aeef9474678536255d48cccce8a8cc
|
|
| MD5 |
d3d05b935e212671c6ff3005f3771cb2
|
|
| BLAKE2b-256 |
2b68b1fd751ccc0c15ec9a3ccea174b00dd0341effc8874b2811d06b2c5671d6
|
File details
Details for the file stealthwall-5.0.0-py3-none-any.whl.
File metadata
- Download URL: stealthwall-5.0.0-py3-none-any.whl
- Upload date:
- Size: 329.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8eabe9c4211011b8c4e60b19bfce9170cd9c1908a585734fd5f5258e7dca9d72
|
|
| MD5 |
5b96fbbf2f25d412062918ec4df6a4f5
|
|
| BLAKE2b-256 |
e4b1204d09077473df9d9e7312befd3d61287094fd4d525655734768480744de
|