Skip to content

Commit

Permalink
Create 403-429-bypass.bcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowsurface authored Nov 27, 2024
1 parent 5f63176 commit 2d3b80b
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions other/bypass/403-429-bypass.bcheck
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
metadata:
language: v2-beta
name: "403/429 bypass using HTTP Header"
description: "Attempts to bypass 403/429 using the HTTP headers with local IP address"
author: "Shadow Surface"
tags: "bypass"

define:
bypass_ip = "127.0.0.1"

run for each:
bypass_header =
"Forwarded",
"Via",
"X-Client-IP",
"X-Forwarded-For",
"X-Forwarded-Host",
"X-Forwarded-Proto",
"X-Forwarded-Server",
"X-Forward-For",
"X-Forwared-Host",
"X-Host",
"X-Originating-IP",
"X-Real-IP",
"X-Remote-Addr",
"X-Remote-IP",
"X-Requested-By",
"X-Requested-For",
"X-Trusted-IP"

given request then
if {base.response.status_code} matches "(403|429)" then
send request:
replacing headers:
{bypass_header}: {bypass_ip}

if not( {latest.response.status_code} is {base.response.status_code} ) then
report issue:
severity: high
confidence: tentative
detail: `Potential {base.response.status_code} bypass using {bypass_header} header.`
remediation: `Avoid using {bypass_header} for authorization or rate limiting.`
end if
end if

0 comments on commit 2d3b80b

Please sign in to comment.