参考:https://blog.csdn.net/administratorlws/article/details/139521078
Xterm连接之后看到/var/www有网站,直接下载下来用工具扫扫木马。

客户端太拉了,下次直接用河马在线网站扫。
找shell.php.
提交flag{1}发现不对,河马客户端没给它扫出来。
然后乱翻翻到了
flag{027ccd04-5065-48b6-a32d-77c704a5e26d}

打开shell.php
https://github.com/BeichenDream/Godzilla
明显是哥斯拉木马。
powershell MD5加密脚本:
$MD5String= "https://github.com/BeichenDream/Godzilla"
$md5 = New-Object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider
$utf8 = New-Object -TypeName System.Text.UTF8Encoding
$hash = [System.BitConverter]::ToString($md5.ComputeHash($utf8.GetBytes($MD5String))).replace('-','').ToLower()
$hash
flag{39392de3218c333f794befef07ac9257}
可疑函数调用
PHP: eval(), system(), exec(), shell_exec(), passthru(), assert(), base64_decode()
ASP: Execute(), Eval(), CreateObject()
JSP: Runtime.getRuntime().exec()
文件操作
PHP: fopen(), fwrite(), file_get_contents(), file_put_contents()
ASP: FileSystemObject
网络操作
PHP: fsockopen(), curl_exec(), file_get_contents('http://...')
ASP: WinHttp.WinHttpRequest
//搜索目录下适配当前应用的网页文件,查看内容是否有Webshell特征
find ./ type f -name "*.jsp" | xargs grep "exec("
find ./ type f -name "*.php" | xargs grep "eval("
find ./ type f -name "*.asp" | xargs grep "execute("
find ./ type f -name "*.aspx" | xargs grep "eval("
//对于免杀Webshell,可以查看是否使用编码
find ./ type f -name "*.php" | xargs grep "base64_decode"
这里手动查杀好使,find ./ type f -name "*.php" | xargs grep "eval("
/var/www/html/include/Db/.Mysqli.php
$MD5String= "/var/www/html/include/Db/.Mysqli.php"
$md5 = New-Object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider
$utf8 = New-Object -TypeName System.Text.UTF8Encoding
$hash = [System.BitConverter]::ToString($md5.ComputeHash($utf8.GetBytes($MD5String))).replace('-','').ToLower()
$hash
我找了web日志,但是免杀马不是用POST传上去的,应该是通过之前的马传上去的,所以过滤POST没看到,只能通过GET和?参数来过滤查找。
find /var/www/ type f -name "*.php" | xargs grep "base64_decode"
/var/www/html/wap/top.php
$MD5String= "/var/www/html/wap/top.php"
$md5 = New-Object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider
$utf8 = New-Object -TypeName System.Text.UTF8Encoding
$hash = [System.BitConverter]::ToString($md5.ComputeHash($utf8.GetBytes($MD5String))).replace('-','').ToLower()
$hash
还是在线的河马查杀靠谱一点,全找出来了。

在实践环境中,除了工具查杀外与手动查杀外,还需要对web日志记录进行过滤查找。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?