Race-condition research harness for web applications, APIs, and modern services.
Project description
invariant
Race-condition research harness for web applications, APIs, and modern services.
invariant is built for pentesters and security researchers who need more than "fire parallel requests and diff responses." You declare what must remain true about a system under concurrency. The harness proves whether it does — statistically, repeatably, with a confidence interval and an estimated window width in milliseconds.
The problem with existing tools
Every race-condition tool stops at delivery. They fire requests, show you diffs, and leave the rest to you. That's fine for a quick sanity check. It's not enough to distinguish a flaky single win from a reliably exploitable condition, and it tells you nothing about where in the stack the window lives.
invariant closes that gap with three things existing tools don't have:
- An invariant language — express what must be true: scalar comparisons, aggregations (
sum,count,min,max), uniqueness, monotonicity, and cross-trial conservation laws. - A localization probe — before the main race, a short probe measures baseline latency, inspects response headers, fires a small burst, and samples post-race state at increasing delays to rank hypotheses about which layer the window actually lives in.
- Rigorous trial accounting — every trial runs setup, delivery, settlement, state reads, invariant evaluation, and teardown. Findings report trial count, violation rate, confidence interval, and estimated window width.
How it works
You import an endpoint from a curl command or HAR capture, label its endpoint class (auth, financial, coupon, inventory, rate-limit, etc.) and its suspected sub-state layer (DB row, app counter, Redis, queue, CDN, session store), then declare one or more invariants that must remain true under concurrency.
Templates are YAML, designed as a superset of Nuclei and RatRace formats so existing templates import cleanly.
The invariant language supports scalar comparisons, aggregations, uniqueness, monotonicity, and cross-trial conservation laws — the layer where every existing tool stops short.
The harness runs a localization probe first to rank hypotheses about which layer the race window lives in, then executes the main race through a pluggable delivery backend, repeating the full trial cycle many times. Output is structured JSON for automation plus a human-readable report that summarizes each violated invariant, its statistical support, the localization hypothesis, and the reasoning trail.
What invariant does not do
- No endpoint discovery — you bring the target, scoped and authorized.
- No low-level packet reimplementation — delivery is handled by pluggable backends.
- No exploit weaponization —
invariantproves and measures. Weaponization and scoping are the operator's responsibility.
This tool is intended for authorized security testing, penetration testing engagements, bug bounty research, and CTF competitions.
Status
Under active development. Not yet released.
License
MIT
Project details
Release history Release notifications | RSS feed
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 fenestra-0.0.1.tar.gz.
File metadata
- Download URL: fenestra-0.0.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c1018b7d4be4c7a0bcfc0bcd85ccd154283cff8f95c68f360ae54244ef47f9a
|
|
| MD5 |
503f68d7a7490ba94cb2ad1c16c83ce9
|
|
| BLAKE2b-256 |
040e93051e9dc008ce6de145f2d1795ac475b56ab848b06ec14ad201d53fc104
|
File details
Details for the file fenestra-0.0.1-py3-none-any.whl.
File metadata
- Download URL: fenestra-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d58f4c8597aed362419c2e059dc7d98dec3e49c57aee9bc2743a8beb465e12f8
|
|
| MD5 |
f219f1f0cd340dcb1840877178941792
|
|
| BLAKE2b-256 |
8fcdb91aa314b546b433bd0c67435e6aeb424b018cd445bd6629f3d6b045dcf4
|