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.
Metadata
Release files for stealthwall 5.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stealthwall-5.0.0.tar.gz | 314.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stealthwall-5.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 643.7 kB
Release files / stealthwall-5.0.0.tar.gz
| Download URL | stealthwall-5.0.0.tar.gz |
|---|---|
| Size | 314.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22878f6fd721c1f4f98c4625c4223d4583aeef9474678536255d48cccce8a8cc
|
|
BLAKE2b-256 checksum How to use checksums |
2b68b1fd751ccc0c15ec9a3ccea174b00dd0341effc8874b2811d06b2c5671d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / stealthwall-5.0.0-py3-none-any.whl
| Download URL | stealthwall-5.0.0-py3-none-any.whl |
|---|---|
| Size | 329.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8eabe9c4211011b8c4e60b19bfce9170cd9c1908a585734fd5f5258e7dca9d72
|
|
BLAKE2b-256 checksum How to use checksums |
e4b1204d09077473df9d9e7312befd3d61287094fd4d525655734768480744de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|