Updating Powershell web calls to use TLS1.2
This commit is contained in:
@@ -3,5 +3,7 @@ Write-Host "Downloading and unzipping the Palantir osquery Repo from Github..."
|
||||
|
||||
$osqueryRepoPath = 'C:\Users\vagrant\AppData\Local\Temp\osquery-Master.zip'
|
||||
|
||||
# GitHub requires TLS 1.2 as of 2/1/2018
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
Invoke-WebRequest -Uri "https://github.com/palantir/osquery-configuration/archive/master.zip" -OutFile $osqueryRepoPath
|
||||
Expand-Archive -path "$osqueryRepoPath" -destinationpath 'c:\Users\vagrant\AppData\Local\Temp' -Force
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
# Purpose: Downloads and unzips a copy of the Palantir WEF Github Repo. This includes WEF subscriptions and custom WEF channels.
|
||||
|
||||
# GitHub requires TLS 1.2
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
Write-Host "Downloading and unzipping the Palantir Windows Event Forwarding Repo from Github..."
|
||||
|
||||
$wefRepoPath = 'C:\Users\vagrant\AppData\Local\Temp\wef-Master.zip'
|
||||
|
||||
# GitHub requires TLS 1.2 as of 2/1/2018
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
Invoke-WebRequest -Uri "https://github.com/palantir/windows-event-forwarding/archive/master.zip" -OutFile $wefRepoPath
|
||||
Expand-Archive -path "$wefRepoPath" -destinationpath 'c:\Users\vagrant\AppData\Local\Temp' -Force
|
||||
|
||||
@@ -14,6 +14,8 @@ If (-not (Test-Path "C:\Program Files\cagent\cagent.exe")) {
|
||||
Write-Host "Downloading Caldera Agent (cagent.exe)"
|
||||
$cagentPath = "C:\Program Files\cagent\cagent.exe"
|
||||
$cagentConfPath = "C:\Program Files\cagent\conf.yml"
|
||||
# GitHub requires TLS 1.2 as of 2/1/2018
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
(New-Object System.Net.WebClient).DownloadFile('https://github.com/mitre/caldera-agent/releases/download/v0.1.0/cagent.exe', $cagentPath)
|
||||
# Ignore SSL warning for conf file download
|
||||
# https://stackoverflow.com/questions/34331206/ignore-ssl-warning-with-powershell-downloadstring
|
||||
|
||||
@@ -27,6 +27,8 @@ If ($env:computername -eq "WIN10") {
|
||||
|
||||
# Purpose: Downloads and unzips a copy of the latest Mimikatz trunk
|
||||
Write-Host "Determining latest release of Mimikatz..."
|
||||
# GitHub requires TLS 1.2 as of 2/27
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
$tag = (Invoke-WebRequest "https://api.github.com/repos/gentilkiwi/mimikatz/releases" -UseBasicParsing | ConvertFrom-Json)[0].tag_name
|
||||
$mimikatzDownloadUrl = "https://github.com/gentilkiwi/mimikatz/releases/download/$tag/mimikatz_trunk.zip"
|
||||
$mimikatzRepoPath = 'C:\Users\vagrant\AppData\Local\Temp\mimikatz_trunk.zip'
|
||||
|
||||
Reference in New Issue
Block a user