该漏洞主要是cdn安全配置的问题,cdn主要存储以下文件,加快访问速度

class, css, jar, js, jpg, jpeg, gif, ico, png, bmp, pict, csv, doc, docx, xls, xlsx, ps, pdf,
pls, ppt, pptx, tif, tiff, ttf, otf, webp, woff, woff2, svg, svgz, eot, eps, ejs, swf, torrent,
midi, mid

存在漏洞的地址:http://www.xx.com/cc.css位于cdn缓存上,但是访问该css同http://www.xx.com/home.php一样,所以造成了该漏洞

漏洞利用:将http://www.xx.com/cc.css地址发给笑脸用户,用户在上面的操作会留在cdn缓存上,造成了泄漏,这个时候,恶意攻击者访问该用户就造成了,缓存欺骗。

以下为hackone案例,仅供参考,顺便提下,案例二的poc可以进行证明漏洞

一:ronr submitted a report to Vanilla.

Jun 2nd (8 months ago)

I have found a Vulnerability in vanilla forums which called Web cache deception attack.

Web Cache Deception Attack

Websites often tend to use web cache functionality to store files that are often retrieved, to reduce latency from the web server.

Websites often tend to use web cache functionality (for example over a CDN, a load balancer, or simply a reverse proxy). The purpose is simple: store files that are often retrieved, to reduce latency from the web server.
When accessing a URL like http://www.example.com/home.php/non-existent.css
A GET request to that URL will be produced by the browser. The server returns the content of http://www.example.com/home.php. And yes, the URL remains http://www.example.com/home.php/non-existent.css. The HTTP headers will be the same as for accessing http://www.example.com/home.php directly: same caching headers and same content type (text/html, in this case).
The web cache servre saves the returned page in the server's cache. Then the attacker can go to the url: http://www.example.com/home.php/non-existent.css and the page of the victim will be presented with the victim's sensitive information (The page content).

The dangerous part in this attack, unlike phishing attacks, is that the url isn't looks suspicious at all. It looks like a normal url from the original website, so the victim thinks that it is ok to click on the link.

Steps:

  1. The attacker sends the following link to the victim: https://open.vanillaforums.com/messages/all/non-existent.css
  2. The victim opens the link and the inbox page will be loaded normally. (The web cache server then saves this page)
  3. The attacker open the same link (https://open.vanillaforums.com/messages/all/non-existent.css), and the inbox page of the victim with all his private contant is loaded.

If you need a video to understand it better, ask me and I will send you one.

Impact

The attacker can achieve all the private content of a specific victim, without the victim knowing about it.

二:

Hello,
Your Web-Server is vulnerable to web cache poisoning attacks.
This means, that the attacker are able to get another user informations.

If you are logged in and visit this website (For example):
https://postmates.com/SomeRandomText.css

Then the server will store the information in the cache, BUT with the logged in user information :)
A non-logged-in user can then visit this website and see the information contained therein.
In that case, this url: https://postmates.com/SomeRandomText.css

I have written a small javascript / html code, which executes this attack fully automated, you just need to visit the website and wait like 3 seconds.

Here is the small PoC code

  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <script>
  6. var cachedUrl = 'https://postmates.com/' + generateId() + '.css';
  7. const popup = window.open(cachedUrl);
  8. function generateId() {
  9. var content = '';
  10. const alphaWithNumber = 'QWERTZUIOPASDFGHJUKLYXCVBNM1234567890';
  11. for (var i = 0; i < 10; i++) {
  12. content += alphaWithNumber.charAt(Math.floor(Math.random() * alphaWithNumber.length))
  13. }
  14. return content;
  15. }
  16. var checker = setInterval(function() {
  17. if (popup.closed) {
  18. clearInterval(checker);
  19. }
  20. }, 200);
  21. var closer = setInterval(function() {
  22. popup.close();
  23. document.body.innerHTML = 'Victims content is now cached <a href="' + cachedUrl + '">here and the url can be saved on the hackers server</a><br><b>Full Url: ' + cachedUrl + '</b>';
  24. clearInterval(closer);
  25. }, 3000);
  26. </script>
  27. </body>
  28. </html>

Theoretically, the attacker could then store this information on his server, but in this example, the URL is simply shown.
I would suggest keeping an eye on caching for more security and hope you enjoyed my report.

Some informations about the attack:
https://www.blackhat.com/docs/us-17/wednesday/us-17-Gil-Web-Cache-Deception-Attack.pdf

The screenshots with the steps are in the attachments

Not important for this report, but i want to look deeper in your website: Can you create an account for me? Im from Germany and dont have american phone number :)

Impact

Web cache poisoning attack can be used to steal user informations like lastname and member id which is important for the login security feature. (For example)

Web缓存欺骗的更多相关文章

  1. 【转】一种新型的Web缓存欺骗攻击技术

    为了减少WEB响应时延并减小WEB服务器负担,现在WEB缓存技术已经用的非常普遍了,除了专门的CDN,负载均衡以及反向代理现在也会缓存一部分的网页内容.这里我要介绍一种WEB缓存欺骗攻击技术,这种攻击 ...

  2. 作为前端应当了解的Web缓存知识

    缓存优点 通常所说的Web缓存指的是可以自动保存常见http请求副本的http设备.对于前端开发者来说,浏览器充当了重要角色.除此外常见的还有各种各样的代理服务器也可以做缓存.当Web请求到达缓存时, ...

  3. Web缓存杂谈

    一.概述 缓存通俗点,就是将已经得到的‘东东’存放在一个相对于自己而言,尽可能近的地方,以便下次需要时,不会再二笔地跑到起始点(很远的地方)去获取,而是就近解决,从而缩短时间和节约金钱(坐车要钱嘛). ...

  4. 前端应当了解的Web缓存知识

    缓存优点 通常所说的Web缓存指的是可以自动保存常见http请求副本的http设备.对于前端开发者来说,浏览器充当了重要角色.除此外常见的还有各种各样的代理服务器也可以做缓存.当Web请求到达缓存时, ...

  5. 浅谈Web缓存

    在前端开发中性能一直都是被大家所重视的一点,然后判断一个网站的性能最直观的就是看网页打开的速度. 其中提高网页反应的速度的一个方式就是使用缓存.一个优秀的缓存策略可以缩短网页请求资源的距离,减少延迟, ...

  6. web缓存

    web缓存HTTP协议的一个核心特性,它能最小化网络流量,并且提升用户所感知的整个系统响应速度. 什么能被缓存? *Logo和商标图像 *普通的不变化的图像(例如,导航图标) *CSS样式表 *普通的 ...

  7. Web 技术人员需知的 Web 缓存知识(转)

    最近的译文距今已有4年之久,原文有一定的更新.今天踩着前辈们的肩膀,再次把这篇文章翻译整理下.一来让自己对web缓存的理解更深刻些,二来让大家注意力稍稍转移下,不要整天HTML5, 面试题啊叨啊叨的~ ...

  8. c# web 缓存管理

    using System; using System.Collections; using System.Text.RegularExpressions; using System.Web; usin ...

  9. HTML5时代的Web缓存机制

    HTML5 之离线应用Manifest 我们知道,使用传统的技术,就算是对站点的资源都实施了比较好的缓存策略,但是在断网的情况下,是无法访问的,因为入口的HTML页面我们一般运维的考虑,不会对其进行缓 ...

随机推荐

  1. VSCode 安装 React 项目

    1 下载nodejs 安装 (此时npm 和 node环境都已经装好) 2 安装淘宝镜像 npm install -g cnpm --registry=https://registry.npm.tao ...

  2. libevent(五)使用例子

    客户端: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/t ...

  3. 用纯css、JavaScript、jQuery简单的轮播图

    完成一个可以自动切换或点击数字的轮播图 HTML代码只需要一个div 包含着一个图片和一个列表,我们主要的思路就是通过点击相应的数字,改变图片的 路径. 有4张图片都在img文件夹里,名称为  img ...

  4. vue将后台的值赋给前台

    后台传List到前台: 赋值给table 赋值给form(只能一个个的赋值,对应prop属性) 后台传map到前台:(不需要使用下标取值)

  5. Python-SHA256加密算法接口测试

    前言 小伙伴们在做接口测试的时候,是否遇到一些需要加密的接口,但是不知如何进行测试呢?今天我们来学习一下SHA256加密算法接口如何进行测试的. SHA256加密算法介绍: 比特币挖矿的御用算法 SH ...

  6. 使用Pandas读取CSV文件

    使用Pandas读取CSV文件 import pandas as pd csv_data = pd.read_csv('birth_weight.csv') # 读取训练数据 print(csv_da ...

  7. 安卓集成Unity开发示例(一)

    本项目目的是在移动端的 Native App 中以库的形式集成已经写好的 Unity 工程,利用 Unity 游戏引擎便捷的开发手段进行跨平台开发. Unity官方文档 Unity as a Libr ...

  8. C:__attribute__ weak 的作用

    关于 weak weak经常出现在各种c代码中,其作用是将当前文件的对应函数声明为弱函数符号,如果外部文件出现相同的函数名,最终编译出来的 文件会优先指向外部文件的函数符号: 通常需要使用__attr ...

  9. HDU 2012 (水)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2012 题目大意:给你段连续数字,判断每个数字带入函数 n^2+n+41 是否都为素数,是输入OK,否则 ...

  10. aop面向切面编程的实现

    aop主要用于日志记录,跟踪,优化和监控 下面是来自慕课网学习的一些案例,复制黏贴就完事了,注意类和方法的位置 pom添加依赖: <dependency> <groupId>o ...