“百度杯”CTF比赛 2017 二月场---爆破-1

题目类型       Misc Web

 

打开链接

 

进行代码审计,这个代码的作用是如果匹配正则表达式/^\w*/,就打印变量 /,就打印变量" role="presentation" style="box-sizing: border-box;outline: 0px;overflow-wrap: break-word; max-width: none;max-height: none;min-width: 0px;min-height: 0px;float:none; word-spacing:normal" id="MathJax-Element-1-Frame">/,就打印变量/,就打印变量/,就打印变量$a
a是hello, a是hello," role="presentation" style="box-sizing: border-box;outline: 0px;overflow-wrap: break-word; max-width: none;max-height: none;min-width: 0px;min-height: 0px;float:none; word-spacing:normal" id="MathJax-Element-2-Frame">a是hello,a是hello,a是hello,a是六位变量a是六位变量a是六位变量hello
由于$a在函数中,所以函数之外无法访问。如果要访问,将hello修改为超全局变量GLOBALS。
在URL后加?hello=GLOBALS,将参数hello修改为Globals

 

获取到flag,提交

posted @ 2022-03-28 15:01  六月暖阳  阅读(36)  评论(0编辑  收藏  举报