标题:[实践OK]HTTP中的Range: bytes=0-与HTTP.SYS 远程执行代码漏洞分析(MS15-034 ) 出处:向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除 时间:Tue, 05 May 2020 19:35:16 +0000 作者:jackxiang 地址:http://jackxiang.com/post/10521/ 内容: curl "http://111.206.176.86/style/home.css" -H "Host:ishow.cctv.com" -H "Range:bytes=0-18446744073709551615" wget "http://ishow.cctv.com/style/home.css" -S --limit-rate=1M --debug --header="Range: bytes=0-18446744073709551615" 未编译调试支持,忽略 --debug。 --2020-05-05 19:32:50-- http://ishow.cctv.com/style/home.css 正在解析主机 ishow.cctv.com (ishow.cctv.com)... 111.206.176.86 正在连接 ishow.cctv.com (ishow.cctv.com)|111.206.176.86|:80... 已连接。 已发出 HTTP 请求,正在等待回应... HTTP/1.1 200 OK Date: Tue, 05 May 2020 11:32:50 GMT Content-Type: text/css Content-Length: 3500 Connection: keep-alive Expires: Tue, 05 May 2020 12:32:50 GMT Server: nginx Last-Modified: Thu, 23 Apr 2020 04:44:15 GMT ETag: "5ea11d1f-dac" Cache-Control: max-age=3600 ip_network: 32.33 Accept-Ranges: bytes X-Via: 1.1 dwt194:13 (Cdn Cache Server V2.0), 1.1 PS-PEK-01mW4204:7 (Cdn Cache Server V2.0) X-Ws-Request-Id: 5eb14ee2_t205_53295-12877 长度:3500 (3.4K) [text/css] 正在保存至: “home.css.1” home.css.1 100%[============================================================================================>] 3.42K --.-KB/s 用时 0s 2020-05-05 19:32:50 (159 MB/s) - 已保存 “home.css.1” [3500/3500]) 若IIS服务器返回“Requested Range Not Satisfiable”,则是存在漏洞,否则如果返回”The request has an invalid header name“,则说明漏洞已经修补。 HTTP中的Range就是分段请求字节数,也是大家经常说的断点续传。Range头域可以请求实体的一个或者多个子范围,Range的值为0表示第一个字节,也就是Range计算字节数是从0开始的 表示第二个500字节:bytes=500-999 表示最后500个字节:bytes=-500 表示500字节以后的范围:bytes=500- 第一个和最后一个字节:bytes=0-0,-1 同时指定几个范围:bytes=500-600,601-999 Range: bytes=0- Range: bytes=0-如果客服端请求RANGE: bytes=0-;直接透传RANGE: bytes=0-;直接拉取整个文件内容 Range: bytes=0-0 可以探测获取文件大小 curl -r 0-0 -i -x ip地址:80 http://test.vaynedu4.com/test_file_19.mp3 curl Range:bytes=0-0 用wget请求的时候可以正常看http头部返回的信息 wget -S --limit-rate=1M -e http_proxy=http://ip地址 --header="Range: bytes=0-" http://test.vaynedu4.com/test_file_19.mp3 wget Range:bytes=0-0 Range: bytes=0-999 ,利用curl下载1000个字节 来自:https://zhuanlan.zhihu.com/p/112827648 Generated by Jackxiang's Bo-blog 2.1.1 Release