From f01c4610215da47a81871fd57afb71fe30bbc744 Mon Sep 17 00:00:00 2001 From: CircleCI Atomic Red Team doc generator Date: Mon, 14 Feb 2022 19:20:25 +0000 Subject: [PATCH] Generate docs from job=generate_and_commit_guids_and_docs branch=master [skip ci] --- atomics/Indexes/index.yaml | 28 ++++++++++++++++++++-------- atomics/T1546.004/T1546.004.md | 18 +++++++++++++----- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/atomics/Indexes/index.yaml b/atomics/Indexes/index.yaml index 61a38944..f0e8a67d 100644 --- a/atomics/Indexes/index.yaml +++ b/atomics/Indexes/index.yaml @@ -20120,9 +20120,12 @@ privilege-escalation: command_to_add: description: Command to add to the .bash_profile file type: String - default: "/path/to/script.py" + default: echo "Hello from Atomic Red Team T1546.004" executor: - command: 'echo "#{command_to_add}" >> ~/.bash_profile + command: 'echo ''#{command_to_add}'' >> ~/.bash_profile + +' + cleanup_command: 'sed -i ''/#{command_to_add}/d'' ~/.bash_profile ' name: sh @@ -20138,9 +20141,12 @@ privilege-escalation: command_to_add: description: Command to add to the .bashrc file type: String - default: "/path/to/script.py" + default: echo "Hello from Atomic Red Team T1546.004" executor: - command: 'echo "#{command_to_add}" >> ~/.bashrc + command: 'echo ''#{command_to_add}'' >> ~/.bashrc + +' + cleanup_command: 'sed -i ''/#{command_to_add}/d'' ~/.bashrc ' name: sh @@ -50652,9 +50658,12 @@ persistence: command_to_add: description: Command to add to the .bash_profile file type: String - default: "/path/to/script.py" + default: echo "Hello from Atomic Red Team T1546.004" executor: - command: 'echo "#{command_to_add}" >> ~/.bash_profile + command: 'echo ''#{command_to_add}'' >> ~/.bash_profile + +' + cleanup_command: 'sed -i ''/#{command_to_add}/d'' ~/.bash_profile ' name: sh @@ -50670,9 +50679,12 @@ persistence: command_to_add: description: Command to add to the .bashrc file type: String - default: "/path/to/script.py" + default: echo "Hello from Atomic Red Team T1546.004" executor: - command: 'echo "#{command_to_add}" >> ~/.bashrc + command: 'echo ''#{command_to_add}'' >> ~/.bashrc + +' + cleanup_command: 'sed -i ''/#{command_to_add}/d'' ~/.bashrc ' name: sh diff --git a/atomics/T1546.004/T1546.004.md b/atomics/T1546.004/T1546.004.md index c9b0cccd..894de254 100644 --- a/atomics/T1546.004/T1546.004.md +++ b/atomics/T1546.004/T1546.004.md @@ -30,16 +30,20 @@ Adds a command to the .bash_profile file of the current user #### Inputs: | Name | Description | Type | Default Value | |------|-------------|------|---------------| -| command_to_add | Command to add to the .bash_profile file | String | /path/to/script.py| +| command_to_add | Command to add to the .bash_profile file | String | echo "Hello from Atomic Red Team T1546.004"| #### Attack Commands: Run with `sh`! ```sh -echo "#{command_to_add}" >> ~/.bash_profile +echo '#{command_to_add}' >> ~/.bash_profile ``` +#### Cleanup Commands: +```sh +sed -i '/#{command_to_add}/d' ~/.bash_profile +``` @@ -63,19 +67,23 @@ Adds a command to the .bashrc file of the current user #### Inputs: | Name | Description | Type | Default Value | |------|-------------|------|---------------| -| command_to_add | Command to add to the .bashrc file | String | /path/to/script.py| +| command_to_add | Command to add to the .bashrc file | String | echo "Hello from Atomic Red Team T1546.004"| #### Attack Commands: Run with `sh`! ```sh -echo "#{command_to_add}" >> ~/.bashrc +echo '#{command_to_add}' >> ~/.bashrc +``` + +#### Cleanup Commands: +```sh +sed -i '/#{command_to_add}/d' ~/.bashrc ``` -