diff --git a/atomics/T1546.004/T1546.004.yaml b/atomics/T1546.004/T1546.004.yaml index cb4faf7a..1fcbf3e9 100644 --- a/atomics/T1546.004/T1546.004.yaml +++ b/atomics/T1546.004/T1546.004.yaml @@ -12,12 +12,13 @@ atomic_tests: command_to_add: description: Command to add to the .bash_profile file type: String - default: echo "Hello from Atomic Red Team T1546.004" + default: echo "Hello from Atomic Red Team T1546.004" > /tmp/T1546.004 executor: command: | echo '#{command_to_add}' >> ~/.bash_profile cleanup_command: | - sed -i '/#{command_to_add}/d' ~/.bash_profile + head -n '-2' ~/.bash_profile > /tmp/T1546.004 + mv /tmp/T1546.004 ~/.bash_profile name: sh - name: Add command to .bashrc auto_generated_guid: 0a898315-4cfa-4007-bafe-33a4646d115f @@ -30,10 +31,11 @@ atomic_tests: command_to_add: description: Command to add to the .bashrc file type: String - default: echo "Hello from Atomic Red Team T1546.004" + default: echo "Hello from Atomic Red Team T1546.004" > /tmp/T1546.004 executor: command: | echo '#{command_to_add}' >> ~/.bashrc cleanup_command: | - sed -i '/#{command_to_add}/d' ~/.bashrc + head -n '-2' ~/.bashrc > /tmp/T1546.004 + mv /tmp/T1546.004 ~/.bashrc name: sh