---
# System prepended metadata

title: 王者歸來 - 網域AD的善惡法則

---

# 王者歸來 - 網域AD的善惡法則



| Host                                      | IP Address    | Password                                                   |
| ----------------------------------------- | ------------- | ---------------------------------------------------------- |
| Kali Linux 2021.02/03                     | 172.16.90.134 | kali/kali                                                  |
| Ubuntu 20.04 - Wazuh                      | 172.16.90.135 | wazuh/1qaz@WSX3edc; wazuh:rnt4pDwuWHw71L3I77Siyywx_VrWvnTT |
| Windows Server 2019 - training_a.local | 172.16.90.136 | Administrator/1qaz@WSX3edc                                 |
| Windows 10                                | 172.16.90.137 | pc01/1qaz@WSX3edc                                          |
| tool.zip | |1qaz@WSX3edc|

### Azure AD Part 
- Azure AD Credential 

```
https://portal.azure.com/
user$i@dextycorp.onmicrosoft.com
user$i_admin@dextycorp.onmicrosoft.com
1qaz@WSX3edc@ADTraining

```
e.g., user1@dextycorp.onmicrosoft.com user12_admin@dextycorp.onmicrosoft.com


- Set DNS to Google DNS Server, Please check and modify your interfaceindex 
```
Set-DnsClientServerAddress -InterfaceIndex 9 -ServerAddresses ("8.8.8.8")
```

- Please download Azure Tools https://www.icloud.com/iclouddrive/0f2RRGEeqzF8J2TmQStaN5CmQ#Azure_Tool_2


### On-Prem AD Part
VMs
* Windows Server 2019 - DC01(ova)
* Windows 10 (ova)
* Kali Linux (ova)
* Ubuntu Linux - Wazuh(ova)


network setting for VM

->virtual network editor
![image.png](https://hackmd.io/_uploads/HkANizX7T.png)
->change the subnet to 172.16.90.0 255.255.255.0
![image.png](https://hackmd.io/_uploads/HJArsM7Xa.png)

(win10 and win2019) VM system network adapter setting 

1. open control panel 
2. navigate to "network and sharing center"
3. on the left panel, click "change adapter setting"

![image.png](https://hackmd.io/_uploads/SyWRRMQQ6.png)
![image.png](https://hackmd.io/_uploads/HyQkk77mT.png)
![image.png](https://hackmd.io/_uploads/H1rv1mmm6.png)


## 補充資料

```
Import-Module ADDSDeployment 
Install-ADDSForest `
-DomainName "training_a.local" `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "WinThreshold" `
-DomainNetbiosName "TRAINING_A" `
-ForestMode "WinThreshold" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$True 
```


fix for Clock skew error
```
wget -q -O - https://archive.kali.org/archive-key.asc | sudo apt-key add
sudo apt install rdate 
sudo rdate -n 172.16.90.136 

```