From 6806b2ccc10d27997260fcee7fcf4d627ed56945 Mon Sep 17 00:00:00 2001 From: tlor89 <60741301+tlor89@users.noreply.github.com> Date: Tue, 27 Apr 2021 16:58:37 -0500 Subject: [PATCH] T-1562.004_Test6_Update (#1448) * T-1562.004_Test6_Update * add force to the copy command Co-authored-by: Toua Lor Co-authored-by: Carrie Roberts --- atomics/T1562.004/T1562.004.yaml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/atomics/T1562.004/T1562.004.yaml b/atomics/T1562.004/T1562.004.yaml index e50b538b..99dd3dc6 100644 --- a/atomics/T1562.004/T1562.004.yaml +++ b/atomics/T1562.004/T1562.004.yaml @@ -86,16 +86,12 @@ atomic_tests: description: path to exe file type: path default: PathToAtomicsFolder\T1562.004\bin\AtomicTest.exe - dependency_executor_name: powershell - dependencies: - - description: | - exe file must exist on disk in users folder - prereq_command: | - if (Get-Item "C:\Users\$env:UserName\AtomicTest.exe") {exit 0} else {exit 1} - get_prereq_command: | - Copy-Item #{exe_file_path} -Destination "C:\Users\$env:UserName" executor: - command: netsh advfirewall firewall add rule name="Atomic Test" dir=in action=allow program="C:\Users\$env:UserName\AtomicTest.exe" enable=yes - cleanup_command: netsh advfirewall firewall delete rule name="Atomic Test" | Out-Null + command: | + Copy-Item #{exe_file_path} -Destination "C:\Users\$env:UserName" -Force + netsh advfirewall firewall add rule name="Atomic Test" dir=in action=allow program="C:\Users\$env:UserName\AtomicTest.exe" enable=yes + cleanup_command: | + netsh advfirewall firewall delete rule name="Atomic Test" | Out-Null + Remove-Item C:\Users\$env:UserName\AtomicTest.exe -ErrorAction Ignore name: powershell elevation_required: true