├── .gitignore ├── 01-SSRF漏洞资源 ├── Exploiting_SSRF_like_a_Boss.pdf ├── Hunting_Headers_for_SSRF.pdf ├── README.md ├── owasp-hasegawa-ssrf.pdf └── us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-Languages.pdf ├── 02-SSRF漏洞基础 ├── README.md └── SSRF _Techniques_by_@d0nut_1ndianl33t.jpg ├── 03-SSRF漏洞工具 ├── GopherGo-main.zip └── README.md ├── 04-SSRF渗透测试 └── README.md ├── 05-SSRF代码审计 └── README.md ├── 06-SSRF漏洞赏金 └── README.md └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | 01-SSRF漏洞资源/有道云.png 3 | -------------------------------------------------------------------------------- /01-SSRF漏洞资源/Exploiting_SSRF_like_a_Boss.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASTTeam/SSRF/c24c28bedd07695ed3ca5aa9e588db2bd5bd1327/01-SSRF漏洞资源/Exploiting_SSRF_like_a_Boss.pdf -------------------------------------------------------------------------------- /01-SSRF漏洞资源/Hunting_Headers_for_SSRF.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASTTeam/SSRF/c24c28bedd07695ed3ca5aa9e588db2bd5bd1327/01-SSRF漏洞资源/Hunting_Headers_for_SSRF.pdf -------------------------------------------------------------------------------- /01-SSRF漏洞资源/README.md: -------------------------------------------------------------------------------- 1 | # 01-SSRF漏洞资源 2 | 01-SSRF漏洞资源 3 | -------------------------------------------------------------------------------- /01-SSRF漏洞资源/owasp-hasegawa-ssrf.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASTTeam/SSRF/c24c28bedd07695ed3ca5aa9e588db2bd5bd1327/01-SSRF漏洞资源/owasp-hasegawa-ssrf.pdf -------------------------------------------------------------------------------- /01-SSRF漏洞资源/us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-Languages.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASTTeam/SSRF/c24c28bedd07695ed3ca5aa9e588db2bd5bd1327/01-SSRF漏洞资源/us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-Languages.pdf -------------------------------------------------------------------------------- /02-SSRF漏洞基础/README.md: -------------------------------------------------------------------------------- 1 | # 02-SSRF漏洞基础 2 | 02-SSRF漏洞基础 3 | -------------------------------------------------------------------------------- /02-SSRF漏洞基础/SSRF _Techniques_by_@d0nut_1ndianl33t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASTTeam/SSRF/c24c28bedd07695ed3ca5aa9e588db2bd5bd1327/02-SSRF漏洞基础/SSRF _Techniques_by_@d0nut_1ndianl33t.jpg -------------------------------------------------------------------------------- /03-SSRF漏洞工具/GopherGo-main.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ASTTeam/SSRF/c24c28bedd07695ed3ca5aa9e588db2bd5bd1327/03-SSRF漏洞工具/GopherGo-main.zip -------------------------------------------------------------------------------- /03-SSRF漏洞工具/README.md: -------------------------------------------------------------------------------- 1 | # 03-SSRF漏洞工具 2 | 03-SSRF漏洞工具 3 | -------------------------------------------------------------------------------- /04-SSRF渗透测试/README.md: -------------------------------------------------------------------------------- 1 | # 04-SSRF渗透测试 2 | 04-SSRF渗透测试 3 | -------------------------------------------------------------------------------- /05-SSRF代码审计/README.md: -------------------------------------------------------------------------------- 1 | # 05-SSRF代码审计 2 | 05-SSRF代码审计 3 | -------------------------------------------------------------------------------- /06-SSRF漏洞赏金/README.md: -------------------------------------------------------------------------------- 1 | # 06-SSRF漏洞赏金 2 | 06-SSRF漏洞赏金 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 《深入理解WEB漏洞之SSRF漏洞》 2 | 3 | 本项目用来收集整理SSRF漏洞的相关内容,包括SSRF的利用方法工具或思路等。也包括SSRF漏洞的挖掘技巧及案例等,站在漏洞利用和漏洞赏金的角度可以更好的理解SSRF!深入理解SSRF,发起悄无声息的渗透!作者:[0e0w](https://github.com/0e0w) 4 | 5 | 本项目创建于2022年3月3日,最近的一次更新时间为2023年1月29日。本项目会持续更新,直到海枯石烂! 6 | 7 | - [01-SSRF漏洞资源]() 8 | - [02-SSRF漏洞基础]() 9 | - [03-SSRF漏洞工具]() 10 | - [04-SSRF渗透测试]() 11 | - [05-SSRF代码审计]() 12 | - [06-SSRF漏洞赏金]() 13 | 14 | ## 01-SSRF漏洞资源 15 | 16 | - https://github.com/topics/ssrf 17 | - https://github.com/search?q=ssrf 18 | - https://github.com/topics/server-side-request-forgery 19 | 20 | 一、SSRF书籍文章 21 | - [ ] [SSRF安全指北](https://security.tencent.com/index.php/blog/msg/179)@腾讯蓝军 silence 22 | 23 | 二、SSRF培训演讲 24 | 25 | 三、SSRF其他资源 26 | - https://kathan19.gitbook.io/howtohunt/ssrf/ssrf 27 | - https://tttang.com/archive/1648 28 | - https://www.freebuf.com/articles/web/258449.html 29 | - https://www.freebuf.com/articles/web/265646.html 30 | - https://github.com/jdonsec/AllThingsSSRF 31 | - https://github.com/cujanovic/SSRF-Testing 32 | - https://github.com/github/securitylab/issues/430 33 | 34 | ## 02-SSRF漏洞基础 35 | 36 | 一、SSRF漏洞概念 37 | - SSRF(Server-Side Request Forgery:服务器端请求伪造) 是一种由攻击者构造形成由服务端发起请求的安全漏洞。一般情况下,SSRF攻击的目标是从外网无法访问的内部系统。 38 | - 因为它是由服务端发起的,所以它能够请求到与它相连而与外网隔离的内网。也就是说可以利用一个网络请求的服务,当作跳板进行攻击。 39 | - SSRF 形成的原因往往是由于服务端提供了从其他服务器应用获取数据的功能且没有对目标地址做过滤与限制。如:从指定URL地址获取网页文本内容,加载指定地址的图片,下载等。利用的就是服务端的请求伪造。ssrf是利用存在缺陷的web应用作为代理攻击远程和本地的服务器。 40 | 41 | 二、SSRF漏洞原理 42 | 43 | - SSRF的形成大多是由于服务端提供了从其他服务器应用获取数据的功能且没有对目标地址做过滤与限制。例如,黑客操作服务端从指定URL地址获取网页文本内容,加载指定地址的图片等,利用的是服务端的请求伪造。SSRF利用存在缺陷的Web应用作为代理攻击远程和本地的服务器。 44 | 45 | 三、SSRF漏洞分类 46 | - 按照是否回显分: 47 | - **Basic SSRF**:在响应中返回结果。如传送一个网址,会返回这个网址的界面或对应的 html 代码。 48 | - **Blind SSRF**:响应中不返回服务器中的任何信息。 49 | - **Semi SSRF**:响应中不返回请求结果的所有详细信息,但是会暴露一些数据信息。 50 | - 按照程序语言分类: 51 | - [PHP SSRF](https://github.com/FuckPHP/SSRF) 52 | - [Java SSRF](https://github.com/HackJava/SSRF) 53 | - [ASPX SSRF](https://github.com/Hackaspx/SSRF) 54 | - Python SSRF 55 | - Golang SSRF 56 | 57 | 四、SSRF Parameter 58 | 59 | - share、wap、、url、link、src、source、target、u、3g、display、sourceURl、imageURL、domain...... 60 | 61 | 五、SSRF Payloads 62 | 63 | - https://github.com/tarunkant/Gopherus 64 | - https://github.com/1ndianl33t/Gf-Patterns 65 | 66 | 六、SSRF Bypass 67 | 68 | - 姿势一 69 | 70 | ``` 71 | http://127.1:80 72 | ``` 73 | 74 | - 十进制 75 | ``` 76 | http://2130706433/ = http://127.0.0.1 77 | http://3232235521/ = http://192.168.0.1 78 | http://3232235777/ = http://192.168.1.1 79 | http://2852039166/ = http://169.254.169.254 80 | ``` 81 | 82 | - DNS解析 83 | 84 | ``` 85 | http://customer1.app.my.company.127.0.0.1.nip.io = 127.0.0.1 86 | ``` 87 | 88 | - 其他 89 | ``` 90 | http://169。254。169。254/ 91 | http://169。254。169。254/ 92 | http://⑯⑨。②⑤④。⑯⑨。②⑤④/ 93 | http://⓪ⓧⓐ⑨。⓪ⓧⓕⓔ。⓪ⓧⓐ⑨。⓪ⓧⓕⓔ:80/ 94 | http://⓪ⓧⓐ⑨ⓕⓔⓐ⑨ⓕⓔ:80/ 95 | http://②⑧⑤②⓪③⑨①⑥⑥:80/ 96 | http://④②⑤。⑤①⓪。④②⑤。⑤①⓪:80/ 97 | http://⓪②⑤①。⓪③⑦⑥。⓪②⑤①。⓪③⑦⑥:80/ 98 | http://⓪⓪②⑤①。⓪⓪⓪③⑦⑥。⓪⓪⓪⓪②⑤①。⓪⓪⓪⓪⓪③⑦⑥:80/ 99 | http://[::①⑥⑨。②⑤④。⑯⑨。②⑤④]:80/ 100 | http://[::ⓕⓕⓕⓕ:①⑥⑨。②⑤④。⑯⑨。②⑤④]:80/ 101 | http://⓪ⓧⓐ⑨。⓪③⑦⑥。④③⑤①⑧:80/ 102 | http://⓪ⓧⓐ⑨。⑯⑥⑧⑨⑥⑥②:80/ 103 | http://⓪⓪②⑤①。⑯⑥⑧⑨⑥⑥②:80/ 104 | http://⓪⓪②⑤①。⓪ⓧⓕⓔ。④③⑤①⑧:80/ 105 | ``` 106 | 107 | 七、SSRF漏洞危害 108 | 109 | - 读取或更新内部资源,造成本地文件泄露 110 | - 将含有漏洞防主机用作代理/跳板攻击内网主机,绕过防火墙等 111 | - 可以对外网、服务器所在内网、本地进行端口扫描,获取一些服务的banner 信息 112 | - 对内网 WEB 应用进行指纹识别,通过访问默认文件实现(如:readme文件) 113 | - 攻击内外网的 web 应用,主要是使用 GET 参数就可以实现的攻击(如:Struts2,sqli) 114 | 115 | 八、SSRF漏洞修复 116 | 117 | - 限制请求的端口只能为Web端口,只允许访问HTTP和HTTPS的请求。 118 | - 限制不能访问内网的IP,以防止对内网进行攻击。 119 | - 屏蔽返回的详细信息。 120 | 121 | 九、SSRF漏洞思考 122 | 123 | ## 03-SSRF漏洞工具 124 | 125 | - 如何开发一个SSRF漏洞的渗透测试和代码审计工具? 126 | 127 | 一、SSRF主动扫描 128 | - https://github.com/swisskyrepo/SSRFmap 129 | - https://github.com/hupe1980/gopherfy 130 | - https://github.com/ryandamour/ssrfuzz 131 | 132 | 二、SSRF被动扫描 133 | - https://github.com/ethicalhackingplayground/ssrf-king 134 | 135 | 三、SSRF Automation 136 | 137 | - https://github.com/ksharinarayanan/SSRFire 138 | 139 | 四、待整理工具 140 | - https://github.com/teknogeek/ssrf-sheriff 141 | - https://github.com/knassar702/scant3r 142 | - https://github.com/R0X4R/ssrf-tool 143 | - https://github.com/In3tinct/See-SURF 144 | - https://github.com/bcoles/ssrf_proxy 145 | - https://github.com/pikpikcu/XRCross 146 | - https://github.com/0xAwali/Blind-SSRF 147 | - https://github.com/arkadiyt/ssrf_filter 148 | - https://github.com/dreadlocked/SSRFmap 149 | - https://github.com/Th0h0/autossrf 150 | - https://github.com/h4fan/ssrfscan 151 | - https://github.com/junnlikestea/bulkssrf 152 | - https://github.com/grayddq/SSRF_payload 153 | - https://github.com/Kevin-sa/SSRF_ex 154 | - https://github.com/akincibor/SSRFexploit 155 | - https://github.com/medbsq/ssrf 156 | - https://github.com/ackerleytng/ssrf-clojure-talk-gowherene 157 | - https://github.com/redfr0g/ssrfuzzer 158 | - https://github.com/0xWise64/SSRF_Listener 159 | - https://github.com/alyrezo/ssrf-bypass 160 | - https://github.com/grampae/ssrfscan 161 | - https://github.com/paulveillard/cybersecurity-ssrf 162 | 163 | ## 04-SSRF渗透测试 164 | 165 | 一、SSRF漏洞挖掘 166 | - 漏洞产生场景 167 | - 能够对外发起网络请求的地方,就可能存在 SSRF 漏洞 168 | - 从远程服务器请求资源(Upload from URL,Import & Export RSS Feed) 169 | - 数据库内置功能(Oracle、MongoDB、MSSQL、Postgres、CouchDB) 170 | - Webmail 收取其他邮箱邮件(POP3、IMAP、SMTP) 171 | - 文件处理、编码处理、属性信息处理(ffmpeg、ImageMagic、DOCX、PDF、XML) 172 | 173 | 二、SSRF漏洞实战 174 | 175 | 三、SSRF利用协议 176 | 177 | - PHP 178 | - http、https、ftp、gopher、telnet、dict、file 、ldap、php、local_file、local-file 179 | - https://xz.aliyun.com/t/12374 180 | - Java 181 | 182 | 四、SSRF攻击内网 183 | - 攻击内网应用 184 | - redis 185 | - FastCGI 186 | - mysql 187 | - postgresql 188 | - zabbix 189 | - pymemcache 190 | - smtp 191 | - SSRF Canary 192 | - https://github.com/assetnote/blind-ssrf-chains 193 | - 攻击内网案例 194 | - https://www.sqlsec.com/2021/05/ssrf.html 195 | 196 | 五、SSRF高级利用 197 | - 利用file协议读取本地文件。 198 | - 对外网、服务器所在内网及本地系统进行端口扫描。 199 | - 攻击运行在内网或本地的应用程序。 200 | - 对内网Web应用进行指纹识别,获取企业单位内部的资产信息。 201 | - 通过HTTPGET的请求方式来攻击内外网的Web应用。 202 | - DoS攻击(请求大文件,始终保持连接keep-alive always)。 203 | 204 | ## 05-SSRF代码审计 205 | 206 | 一、SSRF漏洞靶场 207 | - https://github.com/incredibleindishell/SSRF_Vulnerable_Lab 208 | - https://github.com/sqlsec/ssrf-vuls 209 | - https://github.com/Captain-K-101/Ssrf-labs 210 | - https://github.com/adeadfed/simple-ssrf-app 211 | - https://github.com/m6a-UdS/ssrf-lab 212 | 213 | 二、SSRF审计原理 214 | 215 | 三、SSRF危险函数 216 | - PHP 217 | - file_get_contents() 218 | - fsockopen() 219 | - curl_exec() 220 | - fopen() 221 | - fopen() 222 | - curl() 223 | - Java 224 | - ASPX 225 | - Python 226 | - urllib、urllib2、requests 227 | - Golang 228 | 229 | 四、SSRF漏洞分析 230 | - Redis 231 | - FFmpeg 232 | 233 | ## 06-SSRF漏洞赏金 234 | 235 | - https://github.com/HoneTeam/SSRF 236 | --------------------------------------------------------------------------------