红日靶场5实战

网络拓扑

主机 IP 作用
win7 192.168.135.150
192.168.138.151
双网卡主机/跳板机
win2008 192.168.138.138 内网域控
kali 192.168.135.128 攻击机

外网渗透

win7开启phpstudy

image-20260202153318701

nmap扫描外网IP开放端口,445端口也是开启状态

image-20260202153435638

访问80端口

image-20260202153501429

thinkphp,使用该框架的漏洞扫描利用工具进行扫描,并一键上传木马

image-20260202153546470

哥斯拉连接成功

image-20260202153646822

使用kali里自带的CS生成木马文件,并上传至踏板机

image-20260202153937660

cs成功上线,转移进程Spawn(派生一个新的隐藏进程)

1
spawn x64

kill掉原来进程

whoami查看权限为最高权限

内网渗透

CS内置模块扫描内网存活主机

image-20260202154557242

扫描DC主机端口开放情况

image-20260202154925640

Mimikatz获取该主机存储的账号密码

尝试psexec横向移动

image-20260202155139976

成功上线DC域控主机

image-20260202155221108

同时这两台主机也有永恒之蓝漏洞

权限维持

将木马文件加入服务自启

1
shell sc create "WindowsUpdate" binpath= "cmd /c start "C:\phpStudy\PHPTutorial\WWW\public\2.exe""&&sc config "WindowsUpdate" start= auto&&net start WindowsUpdate

image-20260202155803093

总结

一次很常规的内网渗透…