Milestone 3 Tech Journal - Aaatrox/SEC-480 GitHub Wiki
Create a Windows Server VM in ESXi
Add a second hard disk, ensure both disks are thin provisioned, and point the CD/DVD drive to the proper ISO file
Boot up the VM, run through the installation using the defaults, and select the Desktop Experience installation
When prompted to create a password for the Administrator account, hit Ctrl+Shift+F3 (may need to use a virtual keyboard)
Don't click OK when prompted with the System Preparation Tool, just move it to the side temporarily
Open up command prompt and enter sconfig
Change timezone to EST under 9) Date and Time
Set updates to Manual under 5) Windows Update Settings
Download all updates (may need to do this multiple times) under 6) Download and Install Updates
Install VMWare Tools through the Guest menu
Open up Powershell and create a Deployer account:
> $Password = Read-Host -AsSecureString
> <password>
> New-LocalUser -Name "Deployer" -Password $Password
> Add-LocalGroupMember -Group "Administrators" -Member "Deployer"
> Get-LocalGroup -Name Administrators | Get-LocalGroupMember
If successful, the last command should display the Administrator and Deployer accounts
Add SSH and make Powershell the default shell for incoming SSH connections:
> Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
> Start-Service sshd
> Set-Service -Name sshd -StartupType Automatic
> Set-ItemProperty "HKLM:\Software\Microsoft\Powershell\1\ShellIds" -Name ConsolePrompting -Value $true
> New-ItemProperty -Path HKLM:\Software\OpenSSH -Name DefaultShell -Value "C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe" -PropertyType String -Force
Open the Disk Cleanup tool, select all the boxes, and click OK
Open the Disk Cleanup tool again, go to More Options, and clean up System Restore and Shadow Copies if necessary
In the System Preparation Tool that was put aside earlier, select the OOBE option, select the Generalize box, and choose Shutdown as the Shutdown option
If an error occurs, restart the system through the Start menu
Use the same options for the System Preparation Tool
Once the system is fully shutdown, disconnect the ISO file from the CD/DVD drive
Create a Base snapshot of the VM
Before booting the system, change the Network Adapter to 480-WAN
Start up the VM again and give the Administrator account a strong password
Set the static IP address to 10.0.17.4 and subnet mask to 255.255.255.0
Set the Default Gateway and DNS server to 10.0.17.2
Set the Hostname to "dcXX" (dc10)
Open up Powershell and use the following commands:
> Install-WindowsFeature AD-Domain-Services
> Install-ADDSForest -DomainName <name>.local (josh.local)
Hit "Y" when prompted and continue with the reboot
After the VM starts up again, open Powershell and enter the following commands:
> Install-WindowsFeature DHCP -IncludeManagementTools
> netsh.exe DHCP Add SecurityGroups
> Restart-Service DHCPServer
> Add-DhcpServerInDC -DnsName dcXX.<name>.local (dc10.josh.local) -IPAddress 10.0.17.4
> Add-DhcpServerv4Scope -Name "DHCP Scope" -StartRange 10.0.17.101 -EndRange 10.0.17.150 -SubnetMask 255.255.255.0 -State Active
> Set-DhcpServerv4OptionValue -DnsDomain <name>.local (josh.local) -DnsServer 10.0.17.4 -Router 10.0.17.2
> Add-DnsServerResourceRecordA -Name "vcenter" -ZoneName "<name>.local" ("josh.local") -IPv4Address "10.0.17.3"
> Add-DnsServerResourceRecordPtr -Name "3" -ZoneName "17.0.10.in-addr.arpa" -PtrDomainName "vcenter.<name>.local" ("vcenter.josh.local")
> Add-DnsServerResourceRecordA -Name "vyos" -ZoneName "<name>.local" ("josh.local") -IPv4Address "10.0.17.2"
> Add-DnsServerResourceRecordPtr -Name "2" -ZoneName "17.0.10.in-addr.arpa" -PtrDomainName "vyos.<name>.local" ("vyos.josh.local")
Switch over to the Xubuntu VM, and open Network Settings
Change the DNS Server to 10.0.17.4 and add ".local" ("josh.local") to the Search Domain
Head back to the Windows Server VM and open Powershell again:
> Add-DnsServerResourceRecordA -Name "xubuntu-wan" -ZoneName "<name>.local" ("josh.local") -IPv4Address "10.0.17.100"
> Add-DnsServerResourceRecordPtr -Name "100" -ZoneName "17.0.10.in-addr.arpa" -PtrDomainName "xubuntu-wan.<name>.local" ("xubuntu-wan.josh.local")
Open up Powershell and use the following commands:
> Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 0
> Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
Navigate to Settings from the Start menu, select System, and then Remote Desktop
Ensure Enable Remote Desktop is switched on
Open up Powershell and the following commands:
> $Password1 = Read-Host -AsSecureString
> <password>
> New-LocalUser -Name "<name>" ("josh.henderson") -Password $Password1
> Add-LocalGroupMember -Group "Administrators" -Member "<name>" ("josh.henderson")
> Add-LocalGroupMember -Group "Domain Admins" -Members Administrator,Deployer,<name> (josh.henderson)
(May need to run Powershell as administrator to add accounts to the Domain Admins)
Create a new folder on the second Data Store named "vmware" to distinguish from OS ISOs
Upload the vCenter ISO to the new folder
Edit the settings of the xubuntu-wan VM and point the CD/DVD Drive to the vCenter ISO file and click connect
Open up the Xubuntu VM and open the VMware VCSA installation directory:
$ cd /media/<user>/VMware VCSA/vcsa-ui-installer/lin64/
Execute the installer:
$ ./installer
After the GUI opens, click the Install option
Use the default options until Appliance deployment target
Name the server "superXX.cyber.local" ("super10.cyber.local")
Enter the root login and password for ESXi
In Set up appliance VM, name the VM "vCenter" and enter a strong password
In Select deployment size, change the size to Tiny
In Select datastore, select the second data store and enable Thin Disk Mode
In Configure network settings:
- Network: 480-WAN
- FQDN: vcenter..local (vcenter.josh.local)
- IP address: 10.0.17.3
- Subnet mask or prefix length: 24
- Default gateway: 10.0.17.2
-
DNS severs: 10.0.17.4
(All other options remain default)
Review settings and click finish to install
In Stage 2 of the vCenter set up, under Appliance configuration, select either option for Time synchronization mode
If Synchronize time with NTP servers is selected, enter "pool.ntp.org" into NTP servers
In SSO configuration, enter "vsphere.local" for the name and give it a password
In Configure CEIP, select whether or not to join the CEIP (if you're into that)
Review the settings, click finish, and copy the address given
Enter the copied address into a browser and log in to the vSphere client
Reset any alarms to green
Right-click vcenter..local (vcenter.josh.local) in the left-hand panel and select New Datacenter
Name the Datacenter "480-" ("480-josh") and click OK
Right-click the newly created Datacenter and select Add Host
For the Host name or IP address, enter "superXX.cyber.local" ("super10.cyber.local")
Use your root login and password for ESXi in Connection settings
Use the default options for the rest of the setup
Now all VMs should be visible from the hypervisor if done correctly