?url=7f000001.7f000002.rbndr.us/flag.php
这是一个新手的做题笔记,记录一下做题的解法。
1.什么是SSRF?
很多web应用都提供了从其他服务器上获取数据的功能,根据用户指定的URL,WEB应用可以获取图片、下载文件、读取文件内容等。这种功能如果被恶意使用,将导致存在缺陷的Web应用被作为代理通道去攻击本地或远程服务器。这种形式的攻击被称为服务器端请求伪造攻击(Server-side-Request Forgery,SSRF)。
如何形成:
SSRF形成的原因大都是由于服务器提供了从其他服务器或应用中获取数据的功能,但没有对目标地址做出有效的过滤或限制造成的。
fastcgi,redis 两题卡了我很久。
2.URL Bypass
先看下什么时URL Bypass,参考下:https://www.cnblogs.com/-qing-/p/10908842.html
绕过的姿势:
1. 单斜线"/"绕过
https://www.landgrey.me/redirect.php?url=/www.evil.com
2. 缺少协议绕过
https://www.landgrey.me/redirect.php?url=//www.evil.com
3. 多斜线"/"前缀绕过
https://www.landgrey.me/redirect.php?url=///www.evil.com
https://www.landgrey.me/redirect.php?url=www.evil.com
4. 利用"@"符号绕过
https://www.landgrey.me/redirect.php?url=https://www.landgrey.me@www.evil.com
比如姿势4中,http://www.landgrey.me和http://www.evil.com 这两个URL都会访问到。
题目描述是必须以http ://http://notfound.ctfhub.com 开头
挨个试下几个姿势从本地访问flag.php
最后拿到flag
url=http://notfound.ctfhub.com@127.0.0.1/flag.php
3.数字ip Bypass
它说ban掉了127以及172.,试试再说
?url=127.0.0.1/flag.php
那就localhost代替127
?url=localhost/flag.php
3.302跳转 Bypass
file协议看下源码,这题好像还是没有对localhost做过滤
可以直接拿。
4.DNS重绑定 Bypass
题目要求以DNS重绑定
的方式绕过。
通过rbndr.us dns rebinding service网站设置DNS:
?url=7f000001.7f000002.rbndr.us/flag.php