MISC
PAPAPAPA
下载下来附件是一张全白的图片,通过修改jpg的宽高获得flag

从FF
到01
中间,修改成FF C0 00 11 08 02 00 02 10 03 01 31 00 02 31 01 03 31 01
右边就是flag
WEB
UNDER-CONSTRUCTION
给了一个flask和一个php的服务,没有办法ssti注入
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
| function getResponse() { if (!isset($_POST['username']) || !isset($_POST['password'])) { return NULL; }
$username = $_POST['username']; $password = $_POST['password'];
if (!is_string($username) || !is_string($password)) { return "Please provide username and password as string"; }
$tier = getUserTier($username, $password);
if ($tier === NULL) { return "Invalid credentials"; }
$response = "Login successful. Welcome " . htmlspecialchars($username) . ".";
if ($tier === "gold") { $response .= " " . getenv("FLAG"); }
return $response; }
|
通过代码分析,在php的服务上,只要让tier=gold
就输出flag。
可以在注册账号的时候传两个tier。
flask识别第一个tier,php识别第二个tier,注册完后在php服务登录得到falg。
其他的太难了,看都看不懂
http://blog.xmcve.com/2023/06/26/Google-CTF-2023-Writeup/
可以看这个