Skip to content

Commit

Permalink
work in progress for mandiant threat intel integration, cisagov#358
Browse files Browse the repository at this point in the history
  • Loading branch information
mmguero committed Nov 6, 2024
1 parent 7a2610c commit 4d3219d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfiles/zeek.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ RUN export BINARCH=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
( find "${ZEEK_DIR}"/lib/zeek/plugins/packages -type f -name "*.hlto" -exec chmod 755 "{}" \; || true ) && \
mkdir -p "${ZEEK_DIR}"/share/zeek/site/intel/STIX && \
mkdir -p "${ZEEK_DIR}"/share/zeek/site/intel/MISP && \
mkdir -p "${ZEEK_DIR}"/share/zeek/site/intel/Mandiant && \
mkdir -p "${ZEEK_DIR}"/share/zeek/site/custom && \
touch "${ZEEK_DIR}"/share/zeek/site/intel/__load__.zeek && \
touch "${ZEEK_DIR}"/share/zeek/site/custom/__load__.zeek && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ find "${ZEEK_DIR}/" -type f -exec file "{}" \; | grep -Pi "ELF 64-bit.*not strip

# set up default zeek local policy and sensor-related directories
cp -f /usr/local/etc/zeek/*.zeek /usr/local/etc/zeek/*.txt "${ZEEK_DIR}"/share/zeek/site/
mkdir -p /opt/sensor/sensor_ctl/zeek/custom /opt/sensor/sensor_ctl/zeek/intel/STIX /opt/sensor/sensor_ctl/zeek/intel/MISP /opt/sensor/sensor_ctl/fluentbit
mkdir -p /opt/sensor/sensor_ctl/zeek/custom /opt/sensor/sensor_ctl/zeek/intel/STIX /opt/sensor/sensor_ctl/zeek/intel/MISP /opt/sensor/sensor_ctl/zeek/intel/Mandiant /opt/sensor/sensor_ctl/fluentbit
touch /opt/sensor/sensor_ctl/zeek/intel/__load__.zeek
touch /opt/sensor/sensor_ctl/zeek/custom/__load__.zeek
[[ -f /usr/local/bin/zeek_intel_setup.sh ]] && mv /usr/local/bin/zeek_intel_setup.sh "${ZEEK_DIR}"/bin/
Expand Down
1 change: 1 addition & 0 deletions malcolm-iso/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ if [ -d "$WORKDIR" ]; then
mkdir -p "$MALCOLM_DEST_DIR/zeek-logs/processed/"
mkdir -p "$MALCOLM_DEST_DIR/zeek-logs/upload/"
mkdir -p "$MALCOLM_DEST_DIR/zeek/custom/"
mkdir -p "$MALCOLM_DEST_DIR/zeek/intel/Mandiant/"
mkdir -p "$MALCOLM_DEST_DIR/zeek/intel/MISP/"
mkdir -p "$MALCOLM_DEST_DIR/zeek/intel/STIX/"
cp ./docker-compose.yml "$MALCOLM_DEST_DIR/docker-compose.yml"
Expand Down
1 change: 1 addition & 0 deletions scripts/malcolm_appliance_packager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ if mkdir "$DESTDIR"; then
mkdir $VERBOSE -p "$DESTDIR/zeek-logs/processed/"
mkdir $VERBOSE -p "$DESTDIR/zeek-logs/upload/"
mkdir $VERBOSE -p "$DESTDIR/zeek/custom/"
mkdir $VERBOSE -p "$DESTDIR/zeek/intel/Mandiant/"
mkdir $VERBOSE -p "$DESTDIR/zeek/intel/MISP/"
mkdir $VERBOSE -p "$DESTDIR/zeek/intel/STIX/"

Expand Down
2 changes: 1 addition & 1 deletion shared/bin/zeekdeploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ fi
# make sure "intel" directory exists, even if empty
[[ -n "$ZEEK_INTEL_PATH" ]] && INTEL_DIR="$ZEEK_INTEL_PATH" || INTEL_DIR=/opt/sensor/sensor_ctl/zeek/intel
export INTEL_DIR
mkdir -p "$INTEL_DIR"/STIX "$INTEL_DIR"/MISP
mkdir -p "$INTEL_DIR"/STIX "$INTEL_DIR"/MISP "$INTEL_DIR"/Mandiant
touch "$INTEL_DIR"/__load__.zeek 2>/dev/null || true
# autoconfigure load directives for intel files
[[ -x "$ZEEK_INSTALL_PATH"/bin/zeek_intel_setup.sh ]] && \
Expand Down
3 changes: 3 additions & 0 deletions zeek/intel/Mandiant/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!.gitignore

0 comments on commit 4d3219d

Please sign in to comment.