Skip to content

Commit

Permalink
T1569.002: fix psexec prereq install (redcanaryco#1043)
Browse files Browse the repository at this point in the history
Create folder for psexec_exe

Co-authored-by: Carrie Roberts <[email protected]>
  • Loading branch information
cnotin and clr2of8 committed Jun 26, 2020
1 parent a5cc28b commit 18e70fc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions atomics/T1035/T1035.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ atomic_tests:
default: localhost

dependencies:
- description: |
PsExec tool from Sysinternals must exist on disk at specified location (#{psexec_exe})
prereq_command: |
if (Test-Path "#{psexec_exe}") { exit 0} else { exit 1}
get_prereq_command: |
Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "$env:TEMP\PsTools.zip"
Expand-Archive $env:TEMP\PsTools.zip $env:TEMP\PsTools -Force
Copy-Item $env:TEMP\PsTools\PsExec.exe "#{psexec_exe}" -Force
- description: |
PsExec tool from Sysinternals must exist on disk at specified location (#{psexec_exe})
prereq_command: |
if (Test-Path "#{psexec_exe}") { exit 0} else { exit 1}
get_prereq_command: |
Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "$env:TEMP\PsTools.zip"
Expand-Archive $env:TEMP\PsTools.zip $env:TEMP\PsTools -Force
New-Item -ItemType Directory (Split-Path "#{psexec_exe}") -Force | Out-Null
Copy-Item $env:TEMP\PsTools\PsExec.exe "#{psexec_exe}" -Force
executor:
name: powershell
elevation_required: false
Expand Down

0 comments on commit 18e70fc

Please sign in to comment.