Skip to content

Commit

Permalink
Update T1486.yaml (#3005)
Browse files Browse the repository at this point in the history
Co-authored-by: Carrie Roberts <[email protected]>
  • Loading branch information
kienmarkdo and clr2of8 authored Dec 11, 2024
1 parent 0e512a6 commit 78a9b82
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions atomics/T1486/T1486.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,20 +259,23 @@ atomic_tests:
default: '$env:temp\test.txt'
dependencies:
- description: |
GPG must exist at (#{GPG_Exe_Location})
GPG must exist at (#{GPG_Exe_Location}). If -GetPrereqs fails, try to install GPG4WIN manually at 'https://www.gpg4win.org/download.html'. Once done, run -CheckPrereqs to confirm that it works.
prereq_command: |
if (test-path '#{GPG_Exe_Location}'){exit 0} else {exit 1}
get_prereq_command: |
Set-Content -Path "#{File_to_Encrypt_Location}" -Value "populating this file with some text" # Create the test.txt file
New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null
invoke-webrequest "https://files.gpg4win.org/gpg4win-4.1.0.exe" -outfile "PathToAtomicsFolder\..\ExternalPayloads\gpginstall.exe"
cmd /c "PathToAtomicsFolder\..\ExternalPayloads\gpginstall.exe" /S
executor:
name: powershell
elevation_required: false
command: |
cmd /c '#{GPG_Exe_Location}' -c '#{File_to_Encrypt_Location}'
Set-Content -Path "#{File_to_Encrypt_Location}" -Value "populating this file with some text" # Create the test.txt file again in case prereqs failed
cmd /c "`"C:\Program Files (x86)\GnuPG\bin\gpg.exe`" --passphrase 'SomeParaphraseBlah' --batch --yes -c `"#{File_to_Encrypt_Location}`""
cleanup_command: |
remove-item '#{File_to_Encrypt_Location}.gpg' -force -erroraction silentlycontinue | out-null
Remove-Item -Path "#{File_to_Encrypt_Location}" -Force -ErrorAction SilentlyContinue
Remove-Item -Path "#{File_to_Encrypt_Location}.gpg" -Force -ErrorAction SilentlyContinue
- name: Data Encrypt Using DiskCryptor
auto_generated_guid: 44b68e11-9da2-4d45-a0d9-893dabd60f30
Expand Down

0 comments on commit 78a9b82

Please sign in to comment.