From 97cd6fc8fe0ad6b432e7b0356a2637bfdbf1e30c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alonso=20C=C3=A1rdenas?= Date: Thu, 1 Jun 2023 22:10:20 -0500 Subject: [PATCH] - Add freebsd test --- atomics/T1046/T1046.yaml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/atomics/T1046/T1046.yaml b/atomics/T1046/T1046.yaml index 99296f78..f79a2dfd 100644 --- a/atomics/T1046/T1046.yaml +++ b/atomics/T1046/T1046.yaml @@ -68,6 +68,42 @@ atomic_tests: nc -nv #{host} #{port} name: sh elevation_required: true +- name: Port Scan Nmap for FreeBSD + auto_generated_guid: + description: | + Scan ports to check for listening ports with Nmap. + + Upon successful execution, sh will utilize nmap, telnet, and nc to contact a single or range of addresses on port 80 to determine if listening. Results will be via stdout. + supported_platforms: + - freebsd + input_arguments: + host: + description: Host to scan. + type: string + default: 192.168.1.1 + port: + description: Ports to scan. + type: string + default: "80" + network_range: + description: Network Range to Scan. + type: string + default: 192.168.1.0/24 + dependency_executor_name: sh + dependencies: + - description: | + Check if nmap command exists on the machine + prereq_command: | + if [ -x "$(command -v nmap)" ]; then exit 0; else exit 1; fi; + get_prereq_command: | + (which pkg && pkg install -y nmap) + executor: + command: | + nmap -sS #{network_range} -p #{port} + telnet #{host} #{port} + nc -nv #{host} #{port} + name: sh + elevation_required: true - name: Port Scan NMap for Windows auto_generated_guid: d696a3cb-d7a8-4976-8eb5-5af4abf2e3df description: Scan ports to check for listening ports for the local host 127.0.0.1