> For the complete documentation index, see [llms.txt](https://paul-gleason.gitbook.io/sec-480-adv-topics-in-cyber-security-devops/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://paul-gleason.gitbook.io/sec-480-adv-topics-in-cyber-security-devops/labs/milestone-2.md).

# Milestone 2

## Creating AD Controller

### Create VM:

<figure><img src="https://lh5.googleusercontent.com/M6prUNAZD2lk-g4Cbbe0uczkHxssTBxEQipt0mxrcbyuS33FvyWIUJxgadlaOVcI95slGwJVWvbjnElQ5o4r0Xd9l80P-WaC1c9-8uZ48o0qUDkWKEr0PUFpImPEJt03779hAdR_0NoW9UA6NVipwlE" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh6.googleusercontent.com/Lj7IK_yCXoJg0RI_utAApku30tYhKMMytLy8BmjDixoOSw1HYbxpx4mSA4v9hoKVPvrfnXQbu_ItKyK1PafIxSslgedq-Bvw3qVvWRZdR2WTcjBrxMhQ7GMB5fwu-hQb0-6NtE7jCOd9cSqTaZJjkY0" alt=""><figcaption></figcaption></figure>

Power on machine and follow install

**(Once you hit the page asking for password hit ctrl+shift+f3)**

#### VM Provisioning

Open Admin Powershell

1. `sconfig`
2. \``5`\` “`Windows Update Settings`”
   * \``M`\` “`Manual`”

<figure><img src="https://lh6.googleusercontent.com/NFJrdoXL6dTeKuGRROTp3EERnmhCF49BPoeVfKq6oK7sEN4bfbDwcWhWYKUmSSDEhOJmzrYKQuorwA1cmMVHYSemTuRGv6rQZtMjAoqb6NEuXKX6MyPTHeeGg3-o0kgoFyNu60Hj4wAw5G8vTyZxcfo" alt=""><figcaption></figcaption></figure>

4. \``9`\` “`Date and Time`”
   * Change time zone for EST

<figure><img src="https://lh3.googleusercontent.com/MXvKa_kazVoLUzkDM-vInnBXSBWlniwmveX-A-suLTZGbm3bi060WOTZhWolT34kEeNN6oyaBGBDQTg-CbU-C58MVw_qYArdKhZ4uycR8o8E4jN-3yOcI-f3Jnf18yEHjXBbg6vERB624xhgn32xLbw" alt=""><figcaption></figcaption></figure>

5. \`6\` “Download and Install Updates”
   * \`A\` “All Updates”

<figure><img src="https://lh5.googleusercontent.com/afreV_jXCLIkPExl0NWvYOt18BQ7y81A_GFROrBXgSn6_dnyM_SBZJ-3aadDmcoRtZ2pXBkEVm-VGRhCWkOys7iJndQabiWXr5tn7ja8SS5Wb-_2AMroIp3hosr8jacCJTRSAV-Q2qitF4MYCHGOjUQ" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh5.googleusercontent.com/l6UzO2kuS0HUuWtYDal3vV-HPgEme3KvIPexa-fFvCtaOlWTrMKb2lH5r5tVbbt5X5-dpMXH-DfRjZTY-9Sh1kI6KXVndiAAMjV2Apo4wgfB2fc92oJ4ptRUPyFP6hFJFVUJ_IB4AYmOmuMb2Z1J4vs" alt=""><figcaption></figcaption></figure>

Will Prompt with restart

6. Install VMware Tools (This will make D: VMware tools installer)

<figure><img src="https://lh6.googleusercontent.com/UZkqxnBZd8LuVE4BJwCqB1Qw37J01F1knkUy3z2IcXBnREI-nfS45Ja6O6_V15EOulwKgriUGnP-M9w4yajDzBWpqdfHMG-JmlZD5qn3PrXJMdZ1y9EEWzQ_K2NoerfjCR9uq1cCCGYZ3dmsHkGuGUE" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh4.googleusercontent.com/4k8Liu3ehoIUSUXICoO7KjuvwckOrTaTh66Tmr31tKb8hGKkuH50irgxqKuhldwjVUXoulW8aOlvyWAe24ddkGf8irRvApj16A9hsSxjfDyTO0hC1JtR4neGMQyb5fYFGDZp_IUug3fbzA346zAk214" alt=""><figcaption></figcaption></figure>

I did typical install

#### Sysprep

1. Get Sysprep file

<figure><img src="https://lh4.googleusercontent.com/FidKBk43hOTk2bDHQnll1U6n_lqX5ZoEAq9OSOk9COiB5yHZ5VuVAUs9-ZUYkLm2iaHR0--YB9Hwlfb0cnrhSwDqNqe-FOa0S7OFOiO6kSdV5MSwxs58wWwdfDHy2nGCXZ6F5UQJZSY-DmmSF42Eogc" alt=""><figcaption></figcaption></figure>

2. Uncomment top 4 lines and comment bottom 2

<figure><img src="https://lh3.googleusercontent.com/Xl6AX_XbojH_2-cW781IiutYBWUZd2X6YqXRAZn4mICXBjN9EuXDqwH_mmhrTIfMkrBzaYNeqyOB3waBBP8xg_S7YMZHCnIlEQ82W2wSX2OViHv9D5_vWDh-MOpmxzCbb4fj70Cvt0vQALOb9hTh8N0" alt=""><figcaption></figcaption></figure>

3. Run file and set execution policy

<figure><img src="https://lh5.googleusercontent.com/g-_sVxykzBoFCeq2Ewi8dUHg1Y5A14BgRqQKfCAMtpRU0PydUkWuG1uX_BWUnwKjUdTsZazJ3EGdbOcGEmqXJ7JdW6gVsyDE5V_zKjizsRskWjHZxvoOnnInQS_PuLlAw1lqVazXxz827SDnd7wbPF0" alt=""><figcaption></figcaption></figure>

4. Put in deployer password
5. Then restart DC1

END OF SYSPREP

Change adapter to 480-WAN

### Install ADDS:

Set Admin passwd

Configure network

<figure><img src="https://lh4.googleusercontent.com/Vr6MX3RoP7fdHOI3ABrnVHXQUTHj5yIm-1RW2FrzWBTbtHAk2BEEFg5pOD6ysV46iE-bXTzxWz84ZlTrGI6UgNEPZJ7QZ6QIutFNQdl2GO3trwSHB8ky7vuP_hzI_2cguxXwiyticsqvuSfMphozj3A" alt=""><figcaption></figcaption></figure>

Rename Computer (Do this before forest install)

<figure><img src="https://lh6.googleusercontent.com/Clf7qpkA84zrtG-wDxlaGvZBBDSrQzY_PSoh2pMoObZJwsTghXKsRWjc-VA7iuH84jzMU97I5lVqCWuW5Gx1oiof3x_EqH347-x2ilEERKUuLTEN9L8UaxMdBaUZUDwhUfiZXIL2o3Iqo3YLoxyfFAU" alt=""><figcaption></figcaption></figure>

#### SSH from xubuntu to dc1

`Get-WindowsFeature` - Will show all windows features are installed and can be installed

<figure><img src="https://lh6.googleusercontent.com/jojj27Xu6r6CQtS-DRgDAJYStZbRFbV3eGH1ytdkx0OJ8RnYZ-1WskhUXmcBnXPXKOtJQnZgGEjMwDejqpPhk0yfQe01MkIgRQofXeEhM5BIq64Mr200J8O5ffYfgBw44TLXEuL4F1ELWf7qqcqdmfI" alt=""><figcaption></figcaption></figure>

`Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools`

<figure><img src="https://lh3.googleusercontent.com/PV0m8TEsUeTDcWpPpeST-foLUKLKXrJGBYEG4ojJXzeeej7x5RWSMjthaIOAwwVUuHDfnEugwe_u0y5q3S7O1EtOjLeb86pCM-lU-g7eVyaZLKUkXlW1LpIAf6PkR-PkfjOHmuQgjRNdlNqfGul5Yws" alt=""><figcaption></figcaption></figure>

#### To view see available module commands you can run

`Get-Command -Module ADDSDeployment`

<figure><img src="https://lh5.googleusercontent.com/Me_8BOCE6IZCD2gyDR9pRD2v0oYFb6gKUdSWKxMAzNcp8iqBtA81_kZ359ccAeKG7CDMQerKKl40or6Ir8ikuJTWsCsJEGUL4lIeCGsTXLOAvCdY1LCjivUZ94srK3u_2cnIxBoXlbWxszof88d_QjQ" alt=""><figcaption></figcaption></figure>

### New Domain Admin User:

`$pw = Read-Host -Prompt 'Enter a Password for this user' -AsSecureString`&#x20;

`New-ADUser -Name paul-adm.gleason -AccountPassword $pw -Passwordneverexpires $true -Enabled $true`

`Add-ADGroupMember -Identity "Domain Admins" -Members paul-adm.gleason`

<figure><img src="https://lh4.googleusercontent.com/NKiY_E24Sb4sqc88SCXrimmuaNMf7opLv8UW-we9wMwdmAZWkRRyvWszasrCvuJM9AA5y-Dg2kbT4cg244VdZTMjPCvgcJv_g6FYcvgJWO0NRaBsjAis3HOPQcoGKYg3BlV1KR4k4wkj-_oT7a3JImQ" alt=""><figcaption></figcaption></figure>

### Install Forest:

`Install-ADDSForest -DomainName “paul.local”`

<figure><img src="https://lh6.googleusercontent.com/vxbgs8ul0XOunvXQw2q6yV9QHYn_28Zmt__WMVzEBrxF9p7O7gynDOqAhcEnGZueRV0pu1MrJ9-gZwt1ZwimtYPlHvqxFsCYqzMDz7MHADiho8tAn65zsMxp-V2HQSDJUOIsV8pDoZ0nih7KFwK-UJM" alt=""><figcaption></figcaption></figure>

\
Forest Made

<figure><img src="https://lh3.googleusercontent.com/IPMzWY2Q6d01bihh4qYrSMqEW9_5udx8HRQo2_py6stx4uHXJFvMLRvmgOAQ7HPlu9ccCPudmtKpcSM3bg0WYGTtDnHGUUrdluE5k_f8xA5z3CifMbW4LkmkkWSgbnkDrahsCmUt3YvUKFmnulna8A" alt=""><figcaption></figcaption></figure>

### DNS Role:

`Get-WindowsFeature | where {($_.name -like “DNS”)}`

`Install-WindowsFeature DNS -IncludeManagementTools`

![](https://lh3.googleusercontent.com/7QP2srRMJ7oy2w6OyVWD_llOvsMzaCseSlFsdot45Owxmn2JcA20eemTZllRk0INqwwUAx2pwR_8PPJPJZmxKJ3gLiTZCsYcLp5ZLVffm4vZdjOOF1TXn0BVQWuexjcg7Q3heaCnxgFbPF9xRnnsng)

#### Reverse Zone Creation:

`Add-DnsServerPrimaryZone -NetworkId “10.0.17.0/24” -ReplicationScope “Domain”`

<figure><img src="https://lh4.googleusercontent.com/AxaXzIlAIOuBwgz98fijD2wM8C8dS0kc550yLosNpSsgWr_Ehx40i7bxWVLIElmR-jNU6tslf9jeA0lrhY9Pq-N8NcPwXcPXhw_iPAv1H02w6P-Be4EDNfM-pegE1a10IB25FFVMOBGbf5QyCFDqAQ" alt=""><figcaption></figcaption></figure>

#### Create A type with PTR:

`Add-DnsServerResourceRecordA -Name "480-fw" -ZoneName "paul.local" -AllowUpdateAny -IPv4Address "10.0.17.2" -TimeToLive 01:00:00 -CreatePTR`

<figure><img src="https://lh4.googleusercontent.com/6AlVeBHmfmhmHAlbcQcDlVm6N2K25qN26YOm9SUZemoab7HMLloAFy0_rzkVIp_zPI9MqTWuxij6Pj-XKTo135C7OHAoB-2mWdvylhyZSuWXqmN3S-tPw5_PHLLPAiARcmCQahsCRn8StNX7HX5HyA" alt=""><figcaption></figcaption></figure>

#### Create PTR alone:

`Add-DnsServerResourceRecordPtr -Name "4" -ZoneName "17.0.10.in-addr.arpa" -AllowUpdateAny -TimeToLive 01:00:00 -AgeRecord -PtrDomainName "dc1-paul.paul.local"`

Highlighted ones are correct the middle 2 were mistakes

<figure><img src="https://lh4.googleusercontent.com/i7EJ9Y15jNB6ljMtEdoZHcCY9zfI74zGx9294dygrXtOa9FEUKeFgnalNMkLb_IRFtKvVonLnbEgJuxIrLBdyWsT3aOPknyVh1m9iskssl18zs93qPDRAlo6EX-WSra-mBW6sfvZj_epyuiMJs2wpA" alt=""><figcaption></figcaption></figure>

#### DNS Forwarder:

Was already set to the firewall.

#### Test DNS:

`Test-DnsServer -IPAddress 10.0.17.4 -ZoneName “paul.local”`

![](https://lh5.googleusercontent.com/EfgZuXK6kOGYZpvrv-sDDIuAGDJxbT7gEkjWe_79-c3w5RIXko9czdc2lj_WjzQVxuNdgnlUusWWSbUZTYqkO-EDeyO5EL359GHn98_6K5nKC_XX6fBwFz4Po0sfunXOMR_6kzd2-qzuovTwoGd3RD4)

### Install DHCP:

`Install-WindowsFeature DHCP -IncludeManagementTools`

`Netsh dhcp add securitygroups`

`Restart-service dhcpserver`

<figure><img src="https://lh3.googleusercontent.com/J1DYPrje2k5vh7NWG7UOzsBEiWusrYm-PRpVE3Q0k9W4gxb_cUfC_dOUCbpjjUIYNaMTEFtXJotOR-D8LQ_KRBwCvVrIBW_by0VdcGVPypwiwJjKhlnD7Ed_g3v2DfN_tq-wXw2BgSMwDq0BdIwYT00" alt=""><figcaption></figcaption></figure>

`Add-DHCPServerv4Scope -Name “Main” -StartRange 10.0.17.101 -EndRange 10.0.17.150 -SubnetMask 255.255.255.0 -State Active`

`Set-DhcpServerv4Scope -ScopeId 10.0.17.0 -LeaseDuration 1.00:00:00`

`Set-DHCPServerv4OptionValue -ScopeID 10.0.17.0 -DnsDomain paul.local -DnsServer 10.0.17.4 -Router 10.0.17.2`

Had to do this part as admin:

`Add-DhcpServerInDC -DnsName paul.local -IpAddress 10.0.17.4`

`Get-DhcpServerInDC`

<figure><img src="https://lh3.googleusercontent.com/vpsir6manWB7praHwQRUgLom2KBdebJsFpPU2tFfLgToGWYF88ysPFxaqo7Jnmr7lF7lH2c9NaB00AT7JeM8HWil2InGdUVpwwvoyBUyeMpWzU5hwlAfJVXrqV5M70AFIisbFtIKJlSN76CVSF--qrM" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh5.googleusercontent.com/ePLBBVogI9nOTMKZ50gkGHZWnvClsMytxjeuqp70gidvGRnslofBhn2QSx6cJxr2tGLRiCSQLui2r6U3sENteQBiFc0Da7zV06feqDMNzcTwPKbs4l9C5iGTy8p6xEmarKkl-i3xiPs0aUAXoYuGPao" alt=""><figcaption></figcaption></figure>

Restart-service dhcpserver

### Remote Desktop Setup:

On xubuntu:

`sudo apt install remmina`

On DC1-paul:

`Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 0`

`Enable-NetFirewallRule -DisplayGroup "Remote Desktop"`<br>

### Proof:

<https://drive.google.com/file/d/19xPNRBQgF9WTB9XcnoHtP2k9Fs-RSDoP/view?usp=sharing>

Notes:

Audit mode: ctrl+shift+f3 (Hit at set password screen)

Reference From Devin: <https://malwaremily.medium.com/install-ad-ds-dns-and-dhcp-using-powershell-on-windows-server-2016-ac331e5988a7>&#x20;

ADDS Installer:  <https://www.dell.com/support/kbdoc/en-us/000121955/installing-active-directory-domain-services-and-promoting-the-server-to-a-domain-controller>&#x20;

Remote Desktop: <https://pureinfotech.com/enable-remote-desktop-powershell-windows-10/>&#x20;

DHCP installer: <https://learn.microsoft.com/en-us/windows-server/networking/technologies/dhcp/dhcp-deploy-wps>&#x20;


---

# 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://paul-gleason.gitbook.io/sec-480-adv-topics-in-cyber-security-devops/labs/milestone-2.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.
