Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/onyks-os/networksandboxengine
Defensive ToolsPacket Sniffing & AnalysisScripting & AutomationConfiguration AuditingNetwork SecurityDevSecOps
GitHubonyks-os/networksandboxengine

NetworkSandboxEngine

A deterministic network sandbox for testing nftables rules. It uses ephemeral Linux network namespaces (netns) and Scapy to validate firewall logic safely.

View Repository
8531 day agoNot yet reviewed
Share
Website

Network Sandbox Engine

A Linux engine for deterministic nftables firewall testing inside isolated network namespaces.

Linux Python CI Status Documentation PyPI License

Why NSE? • Oracle contract • Wire assertions • Features • Requirements • Installation • Quickstart • Examples • How It Works • Project Structure

Why NSE?

Testing firewall rulesets on a live Linux system poses significant risks: malformed rules can drop SSH management sessions, leak cleartext traffic during testing, or leave orphan firewall tables active on the host.

Network Sandbox Engine (NSE) provides a safe, reproducible testing harness. It constructs ephemeral Linux network namespaces, wires virtual ethernet pairs, compiles nftables rulesets, and injects synthetic Layer 2 and Layer 3 packets using Scapy. All evaluation happens inside the sandbox namespace: host firewall state is never altered.

Key architectural properties:

  • The host firewall is never touched: the ruleset under test is loaded only inside the sandbox namespaces. What a run does create on the host is temporary and declared; see What a run changes on the host.
  • Self-verifying Oracle: Every run injects a canary packet before the test packets and again after them, and reports a result only if the kernel trace for both was observed. See The oracle contract.
  • Dual-Stack and Topologies: Native support for IPv4 and IPv6 traffic, plus multi-namespace Gateway topologies for router, NAT, and forwarding ruleset validation.
  • Traffic from a real user, observed four ways: nse.stimuli sends UDP, TCP, ICMP, DNS, QUIC-shaped and STUN traffic from a socket in a process running as a chosen UID/GID, so output-hook rules on skuid/skgid are tested as they run. nse.receivers are known servers that log every arrival. nse.observe() reports sent, on the wire, received and reply seen as separate facts, and "unknown" whenever the capture or the log cannot vouch for an absence. See stimuli, receivers and observing a stimulus.
  • Traffic through a window of time: nse.streams.StimulusStream sends a numbered stimulus at a fixed rate while a rule reload or a restart happens, and correlate() says for each attempt whether it was not sent, refused, sent but not seen, on the wire or received. A stream that paused, a capture that missed a beacon frame or an incomplete log makes the window inconclusive, never clean. See streams.
  • Small, auditable surface: One package, no web server, no JavaScript, with 98% test coverage enforced by a ratchet.

What a run changes on the host

ChangedNot changed
Network namespaces nse_* (/var/run/netns)The host's nftables or iptables ruleset
The host end of each veth link (vhr-*), with its addressesHost sysctls: forwarding and DAD settings are set inside the namespaces
In the gateway topology, routes to the sandbox subnets via that linkExisting interfaces, addresses and routes
Ownership journals and locks under /run/nseAnything outside the run's own records

With create_namespace(..., isolated_host=True) the host end of the link is not in the host either: it goes into a namespace of its own, nsh_<name>, created and removed with the sandbox. By default, traffic from the sandbox to the host end is local input for the host and crosses the host's own firewall. firewalld, for one, drops it. NSE warns when the host ruleset may filter it; see the host endpoint.

Every one of these is recorded in an ownership journal before it is created, and removed at teardown, or by the next NSE start if a run was killed. Processes still running in a sandbox namespace are stopped before it is deleted.

Setup refuses to start rather than shadow anything: an interface name already in use, or a sandbox subnet overlapping an existing host route, is an error before the kernel is touched. A cleanup that cannot prove ownership preserves the resource and says so.

Requires root

NSE creates network namespaces, loads nftables rulesets and reads kernel trace events, so it runs as root. It does not open a socket, a port or an RPC endpoint of any kind — it is a library and a CLI that you invoke, and it holds privileges only for the duration of a run.

Version 2.1.0 removed the FastAPI/Svelte web interface that earlier releases shipped. That interface ran in-process as root from 2.0.0 onward, which was a large attack surface for a testing tool; the code remains in the git history at tag v2.0.0 if you need it.


The oracle contract

A firewall test is a negative assertion — "this packet did not get through" — and a negative assertion is worth nothing unless the instrument is known to be working. A trace monitor that never attached to the kernel and a firewall that blocked everything produce byte-identical output.

NSE therefore refuses to report a verdict it cannot show it measured:

GuaranteeMechanism
The monitor was attached before the first test packetA readiness canary is injected and re-injected until its kernel trace is observed. No observation, no run.
The monitor was still attached after the last oneA liveness canary runs after injection. If it is missed, the verdict stream is declared truncated.
The parser understood what the kernel saidTrace lines that no pattern matches are counted, and any count above zero is an error rather than a debug log.
The monitor did not die quietlyThe read loop records why it ended — clean stop, unexpected EOF, timeout or crash — and only a clean stop is acceptable.
A missing verdict is not a passThe CLI runner fails when the number of observed verdicts differs from the number expected, in either direction.

Canary packets are excluded from results by trace id, so they never appear in your verdict stream.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    920
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    915
  • 3

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    688
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    460
  • 5

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    409
  • 6

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    388

Explore all tools

Browse our collection of tools

View all tools →