7

【XSS-Game】 Level 4 - Context matters

 2 years ago
source link: https://exp-blog.com/safe/ctf/xss-game/level-4-context-matters/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

【XSS-Game】 Level 4



输入任意数值 n ,页面会阻塞计时 n 秒。

输入一个较大的数值让页面停留在计时页面,然后查看页面源码可以看到 JS 代码。

01.png

从 JS 代码可以找到注入点在这里:

<img src="/static/loading.gif" onload="startTimer('注入点');">

闭合单引号和括号,构造 payload : 1');alert('exp

即相当于变成这样: startTimer('1');alert('exp'); ,成功突破。

02.png


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK