# Single-Packet Attack
> James Kettle's timing primitive that makes remote race conditions "local": multiplex many HTTP/2 requests onto one TCP packet and release them together, so network jitter no longer decides who wins the race.
## How it works
Over HTTP/1.1 a race depends on dozens of parallel connections whose requests arrive spread out by jitter — the window is blurred by the network. The single-packet attack removes the network from the equation:
- Open many **HTTP/2 streams** on one connection and send each request **minus its last frame/byte**. The server buffers each, waiting for completion; nothing is processed yet.
- Send the withheld final bytes of **every** stream in a **single TCP packet**. The server reassembles and hands all requests to the application at once (**last-byte sync**).
- Result: 20–30 requests processed within a sub-millisecond window, independent of RTT.
This is also the detection primitive: send a request 10× sequentially, then 10× within <1 ms via the single-packet attack, and flag any anomaly ([[raw/portswigger.net/how-to-build-custom-scanners-for-web-security-research-automation-5577|custom scanners]]).
## Breaking the limits
TCP's ~1,500-byte (one Ethernet frame) soft limit caps last-byte sync at 20–30 requests, which is too few for limit-overruns needing thousands of attempts. RyotaK (Flatt Security) pushed past it with **first-sequence sync**:
- **IP fragmentation** splits one large TCP packet across many Ethernet frames; the receiver's IP layer holds them until all fragments arrive, so a full TCP window (up to 65,535 bytes) can be synchronised.
- **TCP sequence reordering**: send every TCP segment *except* the one carrying the first sequence number. The server queues them (it must process in sequence order) and stalls. Sending the first-sequence segment last releases everything simultaneously.
- Benchmark: **10,000 requests in ~166 ms** (0.0166 ms/request) across a 250 ms-RTT intercontinental link. A one-time-token rate limit of 5 attempts was pushed to ~1,000.
The real ceiling is HTTP/2 `SETTINGS_MAX_CONCURRENT_STREAMS` (all requests must share one connection for first-sequence sync): Apache 128, nginx 128, Go 250 — but RFC 9113's default is *unlimited*, and nghttp2 / Node (4294967295) are generous, so the technique's power is implementation-dependent.
## HTTP/3 and beyond
QUIC removes TCP's two bottlenecks: each HTTP/3 request is its own stream, streams are delivered independently (packet loss stalls only its own stream), and opening one is just sending its first frame. One connection comfortably carries 256 in-flight requests.
- **Single Datagram Attack** — the HTTP/3 analogue of last-byte sync ("QUIC-er Races: HTTP/3 won't save you from TOCTOU vulnerabilities").
- **Server-Side Race Orchestration via QPACK blocked streams** — hold streams blocked on a pending QPACK dynamic-table entry, then release ("Chaos by Design"). Used only when the server supports it.
- [[Turbo Intruder]]'s HTTP3 engine auto-selects (`gateMode='auto'`); **h3fuzz** reaches ~100k–180k RPS with a resized per-connection pool.
## Tooling
- **[[Turbo Intruder]]** — `race-http1.py` gate system (`gate='race1'`, `engine.openGate('race1')`); single-packet engine for HTTP/2; `race-http3.py` for HTTP/3.
- **Burp Repeater** — "Send group in parallel" performs the single-packet attack on a tab group; 2025.5 adds a **Trigger race condition** template.
- RyotaK's `first-sequence-sync` PoC (`rc-benchmark`, `rc-pin-bypass`); current limits — plaintext-H2 only, no live TCP-window updates.
- **Nuclei** `race: true` uses last-byte gating for templated checks.
## Related
- [[Race Conditions]] — parent guide; this page is the timing primitive behind every remote web race.
- [[Limit-Overrun Race Conditions]] — the main beneficiary of first-sequence sync (thousands of attempts in one window).
- [[Multi-Endpoint Races]] — single-packet delivery of *different* requests that must land together.
- [[API Rate Limiting]] — single-packet concurrency lands many attempts inside one rate-limit tick.
- [[Turbo Intruder]], WebSocket Turbo Intruder — the delivery tools.
## Sources
- [[raw/flatt.tech/beyond-the-limit-expanding-single-packet-race-condition-with-a-first-s-6120|Beyond the Limit: Expanding single-packet race condition with first-sequence sync]]
- [[raw/medium.com/how-i-turned-a-single-packet-mismatch-into-a-10-000-single-packet-race-14400|How I Turned a Single Packet Mismatch into a $10,000 Single-Packet Race Condition]]
- [[raw/portswigger.net/how-to-build-custom-scanners-for-web-security-research-automation-5577|How to build custom scanners for web security research automation]]
- [[raw/portswigger.net/turbo-intruder-embracing-the-billion-request-attack-4240|Turbo Intruder: Embracing the Billion-Request Attack]]
- [[raw/portswigger.net/http-3-in-burp-suite-it-s-time-to-find-a-bigger-wordlist-12081|HTTP/3 in Burp Suite - it's time to find a bigger wordlist]]
- [[raw/slcyber.io/how-practical-is-100k-requests-per-second-introducing-h3fuzz-12316|How practical is 100k requests per second? Introducing h3fuzz]]
- [[raw/portswigger.net/burp-suite-professional-2025-5-release-3409|Burp Suite Professional 2025.5 Release]]