From f46fd0dc271eef6e578f88717c8f8411039b834a Mon Sep 17 00:00:00 2001 From: well123cs <119821998+well123cs@users.noreply.github.com> Date: Fri, 17 Mar 2023 19:29:14 -0700 Subject: [PATCH] Add files via upload --- atomics/T1046/src/Dockerfile | 9 +++++++++ atomics/T1046/src/scan.sh | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 atomics/T1046/src/Dockerfile create mode 100644 atomics/T1046/src/scan.sh diff --git a/atomics/T1046/src/Dockerfile b/atomics/T1046/src/Dockerfile new file mode 100644 index 00000000..c4e038dd --- /dev/null +++ b/atomics/T1046/src/Dockerfile @@ -0,0 +1,9 @@ +FROM ubuntu:latest +WORKDIR / +RUN apt-get update && apt-get install nmap -y +RUN apt-get update && apt-get install -y tcpdump +RUN apt-get update && apt-get install net-tools +RUN apt-get update && apt-get install iproute2 -y +COPY scan.sh /scan.sh +RUN chmod +x /scan.sh +ENTRYPOINT ["tail", "-f", "/dev/null"] \ No newline at end of file diff --git a/atomics/T1046/src/scan.sh b/atomics/T1046/src/scan.sh new file mode 100644 index 00000000..a39331e4 --- /dev/null +++ b/atomics/T1046/src/scan.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Find the IP address of the host machine +HOST_IP=$(hostname -I | awk '{print $1}') +echo "Running ifconfig" +ifconfig +echo "Running nmap scan on ${HOST_IP}:" +nmap -sV -O ${HOST_IP} +echo "Running tcpdump -i on ${HOST_IP}:" +tcpdump -i ${HOST_IP} -c 30 +echo "Running ss -tlwn on ${HOST_IP}:" +ss -tuwx