[BUUOJ]红明谷CTF2021复现

write_shell 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 <?php error_reporting(0); highlight_file(__FILE__); function check($input){ if(preg_match("/'| |_|php|;|~|\\^|\\+|eval|{|}/i",$input)){ // if(preg_match("/'| |_|=|php/",$input)){ die('hacker!!!'); }else{ return $input; } } function waf($input){ if(is_array($input)){ foreach($input as $key=>$output){ $input[$key] = waf($output); } }else{ $input = check($input); } } $dir = 'sandbox/' . md5($_SERVER['REMOTE_ADDR']) . '/'; if(!file_exists($dir)){ mkdir($dir); } switch($_GET["action"] ?? "") { case 'pwd': echo $dir; break; case 'upload': $data = $_GET["data"] ?? ""; waf($data); file_put_contents("$dir" . "index.php", $data); } ?> php命令执行bypass,先传入action=pwd获得文件路径,然后直接payload

[HTB]Laboratory

靶机:Laboratory 难度:Easy 信息收集 1 nmap --min-rate 10000 -A -p- -T4 10.10.10.216 扫描结果

VNCTF2021复现

前言 这次比赛体验真是极好,不仅学到了"rop寄存器",还见识了别人家大一大二的水平。嗯!是我太菜了。。。

[vulnhub]BlueSky_1

Difficulty: Easy Goal: Get the root shell i.e.(root@localhost:~#) and then obtain flag under /root). 信息收集 先探测主机存活: