T1153-T1531_CleanupErrors (#846)

Co-authored-by: Carrie Roberts <clr2of8@gmail.com>
This commit is contained in:
tlor89
2020-02-28 14:40:26 -06:00
committed by GitHub
parent 9dc3636e3f
commit 833caefbd0
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -147,4 +147,4 @@ atomic_tests:
set-content -path . -stream #{ads_filename} -value "test3"
ls -Recurse | %{ gi $_.Fullname -stream *} | where stream -ne ':$Data' | Select-Object pschildname
cleanup_command: |
Remove-Item -Path #{file_name}
Remove-Item -Path #{file_name} -ErrorAction Ignore
+1 -2
View File
@@ -70,5 +70,4 @@ atomic_tests:
$var.content|out-file "#{temp_file}"
mshta "#{temp_file}"
cleanup_command: |
remove-item "#{temp_file}"
remove-item "#{temp_file}" -ErrorAction Ignore
+3 -2
View File
@@ -41,5 +41,6 @@ atomic_tests:
$ppid=Get-Process #{parent_process_name} | select -expand id
PPID-Spoof -ppid $ppid -spawnto "#{spawnto_process_path}" -dllpath "#{dll_path}"
cleanup_command: |
Stop-Process -Name "#{dll_process_name}"
Stop-Process -Name "#{spawnto_process_name}"
Stop-Process -Name "#{dll_process_name}" -ErrorAction Ignore
Stop-Process -Name "#{spawnto_process_name}" -ErrorAction Ignore