diff --git a/Vagrant/scripts/install-sysinternals.ps1 b/Vagrant/scripts/install-sysinternals.ps1 index 79dab0f..2b537a1 100755 --- a/Vagrant/scripts/install-sysinternals.ps1 +++ b/Vagrant/scripts/install-sysinternals.ps1 @@ -30,17 +30,52 @@ $sysmonConfigPath = "$sysmonDir\sysmonConfig.xml" # Microsoft likes TLSv1.2 as well [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Autoruns64.exe..." -(New-Object System.Net.WebClient).DownloadFile('https://live.sysinternals.com/Autoruns64.exe', $autorunsPath) +Try { + (New-Object System.Net.WebClient).DownloadFile('https://live.sysinternals.com/Autoruns64.exe', $autorunsPath) +} Catch { + Write-Host "HTTPS connection failed. Switching to HTTP :(" + (New-Object System.Net.WebClient).DownloadFile('http://live.sysinternals.com/Autoruns64.exe', $autorunsPath) +} + Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Procmon.exe..." -(New-Object System.Net.WebClient).DownloadFile('https://live.sysinternals.com/Procmon.exe', $procmonPath) +Try { + (New-Object System.Net.WebClient).DownloadFile('https://live.sysinternals.com/Procmon.exe', $procmonPath) +} Catch { + Write-Host "HTTPS connection failed. Switching to HTTP :(" + (New-Object System.Net.WebClient).DownloadFile('http://live.sysinternals.com/Procmon.exe', $procmonPath +} + Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading PsExec64.exe..." -(New-Object System.Net.WebClient).DownloadFile('https://live.sysinternals.com/PsExec64.exe', $psexecPath) +Try { + (New-Object System.Net.WebClient).DownloadFile('https://live.sysinternals.com/PsExec64.exe', $psexecPath) +} Catch { + Write-Host "HTTPS connection failed. Switching to HTTP :(" + (New-Object System.Net.WebClient).DownloadFile('http://live.sysinternals.com/PsExec64.exe', $psexecPath) +} + Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading procexp64.exe..." -(New-Object System.Net.WebClient).DownloadFile('https://live.sysinternals.com/procexp64.exe', $procexpPath) +Try { + (New-Object System.Net.WebClient).DownloadFile('https://live.sysinternals.com/procexp64.exe', $procexpPath) +} Catch { + Write-Host "HTTPS connection failed. Switching to HTTP :(" + (New-Object System.Net.WebClient).DownloadFile('http://live.sysinternals.com/procexp64.exe', $procexpPath) +} + Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Sysmon64.exe..." -(New-Object System.Net.WebClient).DownloadFile('https://live.sysinternals.com/Sysmon64.exe', $sysmonPath) +Try { + (New-Object System.Net.WebClient).DownloadFile('https://live.sysinternals.com/Sysmon64.exe', $sysmonPath) +} Catch { + Write-Host "HTTPS connection failed. Switching to HTTP :(" + (New-Object System.Net.WebClient).DownloadFile('http://live.sysinternals.com/Sysmon64.exe', $sysmonPath) +} + Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Tcpview.exe..." -(New-Object System.Net.WebClient).DownloadFile('https://live.sysinternals.com/Tcpview.exe', $tcpviewPath) +Try { + (New-Object System.Net.WebClient).DownloadFile('https://live.sysinternals.com/Tcpview.exe', $tcpviewPath) +} Catch { + Write-Host "HTTPS connection failed. Switching to HTTP :(" + (New-Object System.Net.WebClient).DownloadFile('http://live.sysinternals.com/Tcpview.exe', $tcpviewPath) +} Copy-Item $sysmonPath $sysmonDir # Download Olaf Hartongs Sysmon config