Merge pull request #2195 from jmac774/patch-2

Fix T1546.004 for remote execution on Linux
This commit is contained in:
Jose Enrique Hernandez
2022-11-04 13:03:41 -04:00
committed by GitHub
+6 -4
View File
@@ -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