<htmllang="en">
<head>
<metacharset="UTF-8" />
<metaname="viewport"content="width=device-width, initial-scale=1.0" />
<title>XSS Challenge</title>
</head>
<body>
<style>
body,
html {
margin: 0;
padding: 0;
background: #000;
height: 100%;
overflow: hidden;
}
canvas {
display: block;
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
}
.xss-lab-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 2;
font-family: "VT323", monospace;
font-size: calc(40px + 4vw);
color: #3f3;
text-shadow: 0 0 10px #0f0, 0 0 20px rgba(0, 255, 0, 0.5);
mix-blend-mode: difference;
pointer-events: none;
}
</style>
<canvasid="matrix"></canvas>
<divclass="xss-lab-text">XSS LAB</div>
<script>
const canvas = document.getElementById("matrix");
const ctx = canvas.getContext("2d");
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
const letters =
"アカサタナハマヤラワABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
const fontSize = 16;
const columns = Math.floor(canvas.width / fontSize);
const drops = Array(columns).fill(1);
function draw() {
ctx.fillStyle = "rgba(0, 0, 0, 0.05)";
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = "#0f0";
ctx.font = fontSize + "px monospace";
drops.forEach((y, i) => {
const text = letters[Math.floor(Math.random() * letters.length)];
ctx.fillText(text, i * fontSize, y * fontSize);
if (y * fontSize > canvas.height && Math.random() > 0.975) {
drops[i] = 0;
}
drops[i]++;
});
}
function loop() {
draw();
requestAnimationFrame(loop);
}
loop();
window.addEventListener("resize", () => {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
});
var p = function () {
const s = new URLSearchParams(location.search);
const p = {};
s.forEach((v, k) => {
v.indexOf("https:") > -1 ? (p[k] = v) : void 0;
});
return p;
};
(s = {
"debug.spix0r.online": ["debug_mode"],
}),
(c = [".spix0r-lab.online", ".spix0r.academy", ".spix0r.team"]);
var u = function (e) {
var t;
if (!e) return !1;
var n = /^https?:///i.test(e) ? new URL(e).host : e;
return (
null !== (t = s[window.location.hostname]) && void 0 !== t ? t : c
).some(function (e) {
return n.endsWith(e);
});
};
u(p().l) ? (location.href = p().l) : false;
</script>
</body>
</html>
这个实验基于TikTok漏洞赏金计划中的一个价值5000美元的DOM XSS漏洞。我已经包含了准确的代码并实现了该场景。你能通过实现DOM XSS来解决它吗?
要运行该实验,只需在浏览器中打开HTML文件,或者使用以下命令通过Python启动服务器:
python -m http.server 9090
然后,在浏览器中打开实验室网址:
http://127.0.0.1:9090
推荐站内搜索:最好用的开发软件、免费开源系统、渗透测试工具云盘下载、最新渗透测试资料、最新黑客工具下载……
还没有评论,来说两句吧...