web680
进入页面显示post code to run!
传入code=phpinfo();
查看disable_functions:
| assert,system,passthru,exec,pcntl_exec,shell_exec,popen,proc_open,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstoped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,fopen,file_get_contents,fread,file,readfile,opendir,readdir,closedir,rewinddir | |
|---|---|
code=var_dump(scandir(“.”));查看当前目录下有什么东西.
发现有个secret_you_never_know
访问即可获得flag.
web681
用 dirsearch扫描,发现存在.svn,访问可以拿到www.zip获得源码。
index.php:
1 | <?php |
check.php:
1 | <?php |
也就是让result[0]=true即可返回flag。
sql注入,使用||1#\即可绕过。
web682
查看hint里面未混淆的js代码:
1 | eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(3(){(3 a(){7{(3 b(2){9((\'\'+(2/2)).5!==1||2%g===0){(3(){}).8(\'4\')()}c{4}b(++2)})(0)}d(e){f(a,6)}})()})();',17,17,'||i|function|debugger|length|5000|try|constructor|if|||else|catch||setTimeout|20'.split('|'),0,{})); |
先看第一段:
1 | eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(3(){(3 a(){7{(3 b(2){9((\'\'+(2/2)).5!==1||2%g===0){(3(){}).8(\'4\')()}c{4}b(++2)})(0)}d(e){f(a,6)}})()})();',17,17,'||i|function|debugger|length|5000|try|constructor|if|||else|catch||setTimeout|20'.split('|'),0,{})); |
这是一段反调试代码,会不断触发debugger来阻碍调试。
再看c2n函数:
1 | var c2n = c =>{ |
功能是字符串0123456789abcdef转化为数字0-15,即16进制。其他字符转化为0。
再看下一个函数:
1 | var s2n2su = s =>{ |
功能是计算一段字符串的c2n数值之和。
接下来是关键:
1 | function test(){ |
这是主要验证函数,我们需要通过这个来逆向出真正的flag。
剩下的是两个编码函数。
1 | const Base64 = { |
exp:
1 | #!/usr/bin/env python3 |
web683
因为(int)0x787=0
所以可以使用进制绕过。
payload:
秀=0x6b6381
web684
1 | <?php |