Adding final ESXI deployment code
This commit is contained in:
@@ -62,6 +62,12 @@ fix_eth1_static_ip() {
|
||||
echo "[*] Using KVM, no need to fix DHCP for eth1 iface"
|
||||
return 0
|
||||
fi
|
||||
if [ -f /sys/class/net/eth2/address ]; then
|
||||
if [ "$(cat /sys/class/net/eth2/address)" == "00:50:56:a3:b1:c4" ]; then
|
||||
echo "[*] Using ESXi, no need to change anything"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
# There's a fun issue where dhclient keeps messing with eth1 despite the fact
|
||||
# that eth1 has a static IP set. We workaround this by setting a static DHCP lease.
|
||||
echo -e 'interface "eth1" {
|
||||
|
||||
@@ -122,8 +122,7 @@ Invoke-Command -computername dc -Credential (new-object pscredential("windomain\
|
||||
{
|
||||
Write-Host "[$env:computername] ATA Gateway already installed. Moving On."
|
||||
}
|
||||
Write-Host "Sleeping 5 minutes to allow ATA gateway to start up..."
|
||||
Start-Sleep -Seconds 300
|
||||
(Get-Service ATAGateway).WaitForStatus('Running', '00:10:00')
|
||||
If ((Get-Service "ATAGateway").Status -ne "Running")
|
||||
{
|
||||
throw "ATA lightweight gateway not running"
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing Red Team Tooling..."
|
||||
|
||||
# Windows Defender should be disabled already by O&O ShutUp10
|
||||
# Adding Defender exclusions just in case
|
||||
Add-MpPreference -ExclusionPath “C:\Tools”
|
||||
Add-MpPreference -ExclusionPath “C:\Users\vagrant\AppData\Local\Temp”
|
||||
|
||||
# Purpose: Downloads and unzips a copy of the latest Mimikatz trunk
|
||||
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Determining latest release of Mimikatz..."
|
||||
@@ -48,11 +51,4 @@ if (-not (Test-Path $atomicRedTeamRepoPath)) {
|
||||
Write-Host "Atomic Red Team was already installed. Moving On."
|
||||
}
|
||||
|
||||
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Configuring Invoke-AtomicTest..."
|
||||
# Copy over a Powershell profile that includes the Atomic Red Team stuff
|
||||
Copy-Item "C:\vagrant\resources\windows\Microsoft.PowerShell_profile.ps1" "C:\Windows\System32\WindowsPowerShell\v1.0" -Force
|
||||
# Install prereqs
|
||||
Install-PackageProvider -Name NuGet -force
|
||||
Install-Module -Name powershell-yaml -Force
|
||||
|
||||
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Red Team tooling installation complete!"
|
||||
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Red Team tooling installation complete!"
|
||||
Reference in New Issue
Block a user