From e3dba0cbe2248cec3973cd694ba8324e12d4b94e Mon Sep 17 00:00:00 2001 From: Hare Sudhan Muthusamy Date: Fri, 19 Jun 2020 16:20:06 -0600 Subject: [PATCH] Pre Req issue fix. (#1072) * Check Prereqs error fix * Check Prereqs error fix in T1046. * Prereq issue fix. * Attack command issue fix. * Extra backslash removed --- atomics/T1018/T1018.yaml | 2 +- atomics/T1046/T1046.yaml | 2 +- atomics/T1049/T1049.yaml | 2 +- atomics/T1082/T1082.yaml | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/atomics/T1018/T1018.yaml b/atomics/T1018/T1018.yaml index 5a8690f5..a2d5eb2e 100644 --- a/atomics/T1018/T1018.yaml +++ b/atomics/T1018/T1018.yaml @@ -81,7 +81,7 @@ atomic_tests: - description: | Check if arp command exists on the machine prereq_command: | - if [ -x "$(command -v arp)" ]; then exit 0; else exit 1; + if [ -x "$(command -v arp)" ]; then exit 0; else exit 1; fi; get_prereq_command: | echo "Install arp on the machine."; exit 1; executor: diff --git a/atomics/T1046/T1046.yaml b/atomics/T1046/T1046.yaml index 0127fd09..5c2f8c62 100644 --- a/atomics/T1046/T1046.yaml +++ b/atomics/T1046/T1046.yaml @@ -44,7 +44,7 @@ atomic_tests: - description: | Check if nmap command exists on the machine prereq_command: | - if [ -x "$(command -v nmap)" ]; then exit 0; else exit 1; + if [ -x "$(command -v nmap)" ]; then exit 0; else exit 1; fi; get_prereq_command: | echo "Install nmap on the machine to run the test."; exit 1; executor: diff --git a/atomics/T1049/T1049.yaml b/atomics/T1049/T1049.yaml index 8e3cca89..07e2a22c 100644 --- a/atomics/T1049/T1049.yaml +++ b/atomics/T1049/T1049.yaml @@ -41,7 +41,7 @@ atomic_tests: - description: | Check if netstat command exists on the machine prereq_command: | - if [ -x "$(command -v netstat)" ]; then exit 0; else exit 1; + if [ -x "$(command -v netstat)" ]; then exit 0; else exit 1; fi; get_prereq_command: | echo "Install netstat on the machine."; exit 1; executor: diff --git a/atomics/T1082/T1082.yaml b/atomics/T1082/T1082.yaml index a66aa927..ccd5e32f 100644 --- a/atomics/T1082/T1082.yaml +++ b/atomics/T1082/T1082.yaml @@ -42,7 +42,7 @@ atomic_tests: if [ -f /etc/redhat-release ]; then cat /etc/redhat-release >> #{output_file}; fi; if [ -f /etc/issue ]; then cat /etc/issue >> #{output_file}; fi; uptime >> #{output_file} - cat #{output_file} 2>/dev/null\ + cat #{output_file} 2>/dev/null cleanup_command: | rm #{output_file} 2>/dev/null name: sh @@ -60,8 +60,8 @@ atomic_tests: if [ -x "$(command -v dmidecode)" ]; then sudo dmidecode | grep -i "microsoft\|vmware\|virtualbox\|quemu\|domu"; fi; if [ -f /proc/scsi/scsi ]; then cat /proc/scsi/scsi | grep -i "vmware\|vbox"; fi; if [ -f /proc/ide/hd0/model ]; then cat /proc/ide/hd0/model | grep -i "vmware\|vbox\|qemu\|virtual"; fi; - if [ -x "$(command -v lspci)" ]; then sudo lspci | grep -i "vmware\|virtualbox" - if [ -x "$(command -v lscpu)" ]; then sudo lscpu | grep -i "Xen\|KVM\|Microsoft" + if [ -x "$(command -v lspci)" ]; then sudo lspci | grep -i "vmware\|virtualbox"; fi; + if [ -x "$(command -v lscpu)" ]; then sudo lscpu | grep -i "Xen\|KVM\|Microsoft"; fi; name: bash - name: Linux VM Check via Kernel Modules auto_generated_guid: 8057d484-0fae-49a4-8302-4812c4f1e64e