HackTheBox - Medium - Windows - Scrambled

Scrambled

最近身体有些不舒服,恐怕理论值要与现实产生较大偏差了


Scrambled 是一台中型 Windows Active Directory 计算机。通过枚举远程计算机上托管的网站,潜在攻击者能够推断出用户“ksimpson”的凭据。该网站还指出 NTLM 身份验证已禁用,这意味着将使用 Kerberos 身份验证。使用“ksimpson”的凭据访问“Public”共享时,PDF 文件指出攻击者检索了 SQL 数据库的凭据。这表明远程计算机上正在运行 SQL 服务。枚举普通用户帐户,发现帐户“SqlSvc”具有与其关联的“服务主体名称”(SPN)。攻击者可以使用此信息执行称为“kerberoasting”的攻击并获取“SqlSvc”的哈希值。在破解哈希并获取“SqlSvc”帐户的凭据后,攻击者可以执行“银票”攻击来伪造票并冒充远程 MSSQL 服务上的用户“管理员”。数据库的枚举显示了用户“MiscSvc”的凭据,该凭据可用于使用 PowerShell 远程处理在远程计算机上执行代码。当新用户显示一个正在侦听端口“4411”的“.NET”应用程序时,系统枚举。对应用程序进行逆向工程显示,它使用不安全的“Binary Formatter”类来传输数据,从而允许攻击者上传自己的有效负载并以“ntauthority\system”的身份执行代码。


外部信息收集

端口扫描

循例nmap

HackTheBox - Medium - Windows - Scrambled_第1张图片

Web枚举

HackTheBox - Medium - Windows - Scrambled_第2张图片

禁用了NTLM身份认证

HackTheBox - Medium - Windows - Scrambled_第3张图片

在这里发现了一个username

HackTheBox - Medium - Windows - Scrambled_第4张图片

初始密码策略

HackTheBox - Medium - Windows - Scrambled_第5张图片

SMB枚举

请求TGT

HackTheBox - Medium - Windows - Scrambled_第6张图片

krb5ccache

file

用kerberos协议拿ccache登smbclient

HackTheBox - Medium - Windows - Scrambled_第7张图片

/public有个pdf,下下来

HackTheBox - Medium - Windows - Scrambled_第8张图片

Foothold

提示与SPN有关

HackTheBox - Medium - Windows - Scrambled_第9张图片

这里需要对GetUserSPNs.py修补

HackTheBox - Medium - Windows - Scrambled_第10张图片

request

HackTheBox - Medium - Windows - Scrambled_第11张图片

HackTheBox - Medium - Windows - Scrambled_第12张图片

hashcat直接爆

HackTheBox - Medium - Windows - Scrambled_第13张图片

在/etc/krb5.conf中添加

[libdefaults]
	default_realm = SCRM.LOCAL

[realms]
	SCRM.LOCAL = {
		kdc = dc1.scrm.local
	}

[domain_realm]
	.scrm.local = SCRM.LOCAL

kinit

HackTheBox - Medium - Windows - Scrambled_第14张图片

ldapsearch这里直接看wp配置了

domain administrator sid: S-1-5-21-2743207045-1827831105-2542523200-500
mssqlsvc nt hash: b999a16500b87d17ec7f2e2a68778f05

域权限提升

做DA的银票

HackTheBox - Medium - Windows - Scrambled_第15张图片

登mssqlclient

HackTheBox - Medium - Windows - Scrambled_第16张图片

启用xp_cmdshell

HackTheBox - Medium - Windows - Scrambled_第17张图片

之前的靶机已经遇到过一次这种情况了,由于我们使用的是DA的ticket,所以我们可以通过mssql服务来模拟DA进行文件读取来读flag

HackTheBox - Medium - Windows - Scrambled_第18张图片

getshell后应该也可以对sqlsvc打potato

这台机挺好的,就是身体不在状态

你可能感兴趣的:(HackTheBox,HackTheBox,网络安全,Windows渗透测试,域渗透)