【攻防实操系列】phpStudy日志探索
#phpStudy
#应急响应
#靶场搭建
工具
phpStudy
一、攻击者的shell密码
在桌面看到phpStudy,右键选择“打开文件所在的位置”,获得phpStudy路径:C:\phpStudy_pro。
使用D盾在phpStudy路径下查找webshell,获得webshell路径:C:\phpStudy_pro\WWW\content\plugins\tips\shell.php。
打开webshell文件,获得连接密码的32位md5值的前16位e45e329feb5d925b 。
拿md5值去反查明文,获得webshell的连接密码rebeyond。
另一种方法,是通过web访问日志(accesslog)查找webshell路径。
在phpStudy的C:\phpStudy_pro\Extensions路径下,发现有Apache和Nginx两种中间件。
依次查看,Nginx的accesslog,Apache的accesslog将近15M。
我的:
将Apache的accesslog拷贝到Kali中分析,使用命令
cat access.log.1695168000 | cut -d ' ' -f 7 | sort | uniq -c | sort -nr
发现/content/plugins/tips/shell.php文件被访问14万次,经分析确认是webshell
文件。
我的:
二、攻击者的IP地址
沿用刚刚Apache的accesslog,在Kali中使用命令
cat access.log.1695168000 | grep shell.php | cut -d ' ' -f 1 | sort | uniq -c | sort -nr
获得访问webshell的攻击者IP地址192.168.126.1
我的: