Nginx
Theory
Misconfigurations
Tools
#Static analyze
gixy /etc/nginx/nginx.conf#Target tab in Burp, select host, right click, copy all URLs in this host, copy to a file
cat urllist | unfurl paths | cut -d"/" -f2-3 | sort -u > /tmp/pathlist
#Or get the list of paths you already discovered in the application in some other way.
#Note: the paths should not start with /
#Finally, run it
python3 nginxpwner.py https://example.com /tmp/pathlistMissing Root Location
server {
root /etc/nginx;
location /hello.txt {
try_files $uri $uri/ =404;
proxy_pass http://127.0.0.1:8080/;
}
}#We can get sensitive files as the nginx.conf
curl http://example.com/nginx.confOff-By-Slash Misconfiguration
Unsafe Variable Use
Raw Backend Response Reading
Merge_slashes Set To Off
Proxy_pass Misconfigurations
HTTP Splitting
Controlling proxied host
Resources
Last updated