【BUUCTF-Web】[ACTF2020 新生赛]BackupFile

258 阅读1分钟

Subject

Backup File 源码泄露


Mind Palace

找source file;问题:老是扫不出来东西怎么办 emm

扫描出文件index.php.bak

<?php
include_once "flag.php";

if(isset($_GET['key'])) {
    $key = $_GET['key'];
    if(!is_numeric($key)) {
        exit("Just num!");
    }
    $key = intval($key);
  	// intval — Get the integer value of a variable
    
  	$str = "123ffwsfwefwf24r2f32ir23jrw923rskfjwtsw54w3";
    if($key == $str) {		// ** 弱类型比较
        echo $flag;
    }
}
else {
    echo "Try to find out source file!";
}
?>

弱类型比较 => payload = url/index.php?key=123 => 得到flag

参考:


Look Ahead

字典老是不是非常nice 以至于扫不出想要的结果 => 非常十分急需解决的问题!!


END o( ̄▽ ̄)d