You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pentesting-web/rate-limit-bypass.md
+39-2Lines changed: 39 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,6 +110,41 @@ A classic token-bucket or leaky-bucket limiter *resets* on a fixed time boundary
110
110
111
111
This simple optimisation can more than double your throughput without touching any other bypass technique.
112
112
113
+
### Upgrading to WebSockets / gRPC streaming after the handshake
114
+
115
+
Many edge rate-limiters only inspect the **initial HTTP request**. Once the connection is upgraded to WebSocket (HTTP 101) or gRPC bidirectional streaming, subsequent messages often bypass request-per-second counters because they are no longer separate HTTP requests. Cloudflare’s own docs note that only the initial upgrade request is subject to WAF/rate-limiting rules; frames sent afterwards are opaque.
116
+
117
+
Practical workflow:
118
+
119
+
```bash
120
+
# Flood 1,000 OTP guesses through a single WebSocket connection
If the login/OTP endpoint exposes both HTTP and WebSocket/gRPC variants, establish the upgraded channel first and then spray codes within that single connection to evade per-request throttles.
132
+
133
+
### Exploiting CDN PoP‑sharded counters
134
+
135
+
Some CDNs shard rate-limit counters **per data center/PoP instead of globally**. Cloudflare explicitly states counters are not shared across data centers. By routing requests through egress nodes in many regions (residential proxy pools, anycast VPNs, or cloud VMs pinned to different continents), you multiply the allowed throughput: every PoP maintains an independent bucket for the same key.
136
+
137
+
Quick and dirty layout using open proxies (example with `proxychains` + a country‑rotating list):
138
+
139
+
```bash
140
+
forpin$(cat proxies.txt);do
141
+
HTTPS_PROXY=$p curl -s -X POST https://target/api/login -d @payload.json &
142
+
done
143
+
wait
144
+
```
145
+
146
+
Make sure the limiter key is not per-account; otherwise also rotate user IDs / session tokens.
147
+
113
148
---
114
149
115
150
## Tools
@@ -121,7 +156,9 @@ This simple optimisation can more than double your throughput without touching a
121
156
122
157
## References
123
158
124
-
- PortSwigger Research – “Bypassing rate limits with GraphQL aliasing” (2023) <https://portswigger.net/research/graphql-authorization-bypass>
125
-
- PortSwigger Research – “HTTP/2: The Sequel is Always Worse” (section *Connection-based throttling*) (2024) <https://portswigger.net/research/http2>
159
+
-[PortSwigger Research – “Bypassing rate limits with GraphQL aliasing” (2023)](https://portswigger.net/research/graphql-authorization-bypass)
160
+
-[PortSwigger Research – “HTTP/2: The Sequel is Always Worse” (connection-based throttling) (2024)](https://portswigger.net/research/http2)
0 commit comments