Created
November 10, 2018 17:55
-
-
Save peewpw/a580d2fcdd08b740d421f4eb3a58f38c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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