【前端页面劫持漏洞】

📅 发布时间:2026/7/7 7:54:38 👁️ 浏览次数:
【前端页面劫持漏洞】
前端页面劫持漏洞漏洞利用通过按钮产生新窗口后在新窗口的控制台界面输入window.opener.locationhttps://www.baidu.com可以控制父窗口访问任何地址前端漏洞代码!DOCTYPE html !-- 内网页面模拟你的系统 -- h1我是内网页面http://127.0.0.1/inner.html/h1 button onclickopenBlankWin()打开空白新窗口/button script function openBlankWin() { const win window.open(,_blank); win.document.write(h2我是新窗口/h2) } /script /html漏洞修复!DOCTYPE html !-- 内网页面模拟你的系统 -- h1我是内网页面http://127.0.0.1/inner.html/h1 button onclickopenBlankWin()打开空白新窗口/button script function openBlankWin() { const win window.open(,_blank); // 修复代码 将子窗口和父窗口解绑 win.opener null; win.document.write(h2我是新窗口/h2) } /script /html