Skip to content

Instantly share code, notes, and snippets.

@peewpw peewpw/ADLabDemo.txt
Created Nov 10, 2018

Embed
What would you like to do?
VPN Server User Data (for Ubuntu 18.04)
---------------------------
#!/bin/bash
wget https://gist.githubusercontent.com/peewpw/a1a367f1ab68e9262a19b13d33357596/raw/4a49617c0842a477592de916fb330636741ce5a5/quick-and-dirty-vpn.sh
chmod +x quick-and-dirty-vpn.sh
./quick-and-dirty-vpn.sh bsides.demo 10.0.0.104
Get VPN Config file
---------------------------
scp -i [key.pem] ubuntu@[IP]:/opt/client-configs/client.ovpn .
DC User Data (for Server 2012 R2)
---------------------------
<powershell>
Install-WindowsFeature AD-Domain-Services -IncludeAllSubFeature -IncludeManagementTools
Import-Module ADDSDeployment
$password1 = ConvertTo-SecureString 'SuperS3cureeee!' -AsPlainText -Force
Install-ADDSForest -CreateDnsDelegation:$false -DatabasePath "C:\Windows\NTDS" -DomainMode "Win2012R2" -DomainName "bsides.demo" -DomainNetbiosName "BSIDES" -ForestMode "Win2012R2" -InstallDns:$true -LogPath "C:\Windows\NTDS" -NoRebootOnCompletion:$false -SysvolPath "C:\Windows\SYSVOL" -Force:$true -SafeModeAdministratorPassword $password1
</powershell>
AD Server User Data
---------------------------
<powershell>
$domain = "bsides.demo"
$password = "Password123!" | ConvertTo-SecureString -asPlainText -Force
$username = "bsides\example"
$credential = New-Object System.Management.Automation.PSCredential($username,$password)
Add-Computer -DomainName $domain -Credential $credential -Restart -NewName SERVER1
</powershell>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.