# DACL

DACL 揭露了域内对象与对象之间的权限关系，可以是用户对用户的，用户对主机的，主机对主机的，诸如此类。例如，用户 John 对用户 app\_security 具有 **GenericWrite** 的权限，那么 **John** 可以为其设置一个 SPN。DACL 无疑是域内最值得我们关注的利用之一。

对于 DACL 的枚举，最直观的就是使用 SharpHound 进行信息搜集然后使用 **BloodHound** 进行查看，虽然 BloodHound 有的时候也会遗漏一些 DACL。

[![image.png](https://raven-medicine.com/uploads/images/gallery/2023-03/scaled-1680-/0iYH4OBNgkeFRTt0-image.png)](https://raven-medicine.com/uploads/images/gallery/2023-03/0iYH4OBNgkeFRTt0-image.png)

除此之外，我们也可以组合 PowerView中的命令，查看某个用户的DACL，以及我们当前用户对其他用户的DACL：

### **枚举特定用户的DACL**

指定目标用户，可以看到其他域对象作用于其的 DACL (对该用户具有 DACL 的对象以及权限)

```powershell
Get-ObjectAcl -Identity <用户名> -ResolveGUIDs | Foreach-Object {$_ | Add-Member -NotePropertyName Identity -NotePropertyValue (ConvertFrom-SID $_.SecurityIdentifier.value) -Force; $_} | Select Identity,AceType,ObjectCN,ActiveDirectorys | findstr '\'
```

我们可以看到，用户 john 对 app\_security 具有 **WriteProperty** 权限。

[![image.png](https://raven-medicine.com/uploads/images/gallery/2023-03/scaled-1680-/818f1STqhyteWymw-image.png)](https://raven-medicine.com/uploads/images/gallery/2023-03/818f1STqhyteWymw-image.png)

###  

### **枚举当前用户对其他用户的权限**

登陆为 **network\_security**，并使用如下命令 (无须修改)，我们发现 **network\_security** 对用户 **backup\_operato**r 具有 **GenericAll** 权限。

```powershell
Get-DomainUser | Get-ObjectAcl -ResolveGUIDs | Foreach-Object {$_ | Add-Member -NotePropertyName Identity -NotePropertyValue (ConvertFrom-SID $_.SecurityIdentifier.value) -Force; $_} | Foreach-Object {if ($_.Identity -eq $("$env:UserDomain\$env:Username")) {$_}} | Select Identity,AceType,ActiveDirectoryRights,ObjectDN
```

[![image.png](https://raven-medicine.com/uploads/images/gallery/2023-03/scaled-1680-/LbcHR4Xu6cDIDu5u-image.png)](https://raven-medicine.com/uploads/images/gallery/2023-03/LbcHR4Xu6cDIDu5u-image.png)

[![image.png](https://raven-medicine.com/uploads/images/gallery/2023-03/scaled-1680-/RjdiDINCQqYhNuhJ-image.png)](https://raven-medicine.com/uploads/images/gallery/2023-03/RjdiDINCQqYhNuhJ-image.png)