Update T1053.003.yaml (#1221)

Add code to make cleanup commands.

Co-authored-by: Carrie Roberts <clr2of8@gmail.com>
This commit is contained in:
Brian Thacker
2020-09-15 09:53:11 -05:00
committed by GitHub
parent 45f59adc44
commit 7b90e89acd
+6 -1
View File
@@ -25,7 +25,10 @@ atomic_tests:
executor:
name: bash
command: |
crontab -l > /tmp/notevil
echo "* * * * * #{command}" > #{tmp_cron} && crontab #{tmp_cron}
cleanup_command: |
crontab /tmp/notevil
- name: Cron - Add script to cron folder
auto_generated_guid: b7d42afa-9086-4c8a-b7b0-8ea3faa6ebb0
@@ -50,4 +53,6 @@ atomic_tests:
elevation_required: true
name: bash
command: |
echo "#{command}" > /etc/cron.daily/#{cron_script_name}
echo "#{command}" > /etc/cron.daily/#{cron_script_name}
cleanup_command: |
rm /etc/cron.daily/#{cron_script_name}