Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malcolm v3.1.0 development #165

Merged
merged 118 commits into from May 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
83e7557
Adjust github links for idaholab/Malcolm for v3.0.1 release
mmguero Mar 3, 2021
63c943f
restore web site generation
mmguero Mar 3, 2021
ca19e04
bump version for development
mmguero Mar 3, 2021
fdfbd6c
initial pass at converting to zeek 4.0
mmguero Mar 3, 2021
1fbece6
working on getting zeek4 plugins working
mmguero Mar 3, 2021
9bad4c2
more work on getting plugins working with zeek 4.0
mmguero Mar 4, 2021
67e13d1
more work on getting plugins working with zeek 4.0
mmguero Mar 4, 2021
ca3571d
more work on getting plugins working with zeek 4.0
mmguero Mar 4, 2021
e23da75
more work on getting plugins working with zeek 4.0
mmguero Mar 4, 2021
f1d89c6
more work on getting plugins working with zeek 4.0
mmguero Mar 4, 2021
e46652d
more work on getting plugins working with zeek 4.0
mmguero Mar 4, 2021
91328c3
more work on getting plugins working with zeek 4.0
mmguero Mar 4, 2021
c8744fe
more work on getting plugins working with zeek 4.0
mmguero Mar 4, 2021
515af0f
more work on getting plugins working with zeek 4.0
mmguero Mar 4, 2021
d3d67fe
updates for 3.0.2 (point upgrade for odfe and sankey plugin stuff)
mmguero Mar 8, 2021
ecb5ca4
more work on getting GQUIC to work
mmguero Mar 8, 2021
fd05823
updates for 3.0.2 (point upgrade for odfe and sankey plugin stuff)
mmguero Mar 8, 2021
aa77219
more work on getting plugins working with zeek 4.0
mmguero Mar 4, 2021
b56ed5f
reduce verbosity for attempt transition messages from elasticsearch
mmguero Mar 9, 2021
0ec1ab1
added todo
mmguero Mar 9, 2021
bdd360c
Merge remote-tracking branch 'mmguero/development' into topic/zeek4
mmguero Mar 9, 2021
49de4c4
switch branch name for quic protocol analyzer
mmguero Mar 9, 2021
571d2e7
reduce verbosity for attempt transition messages from elasticsearch
mmguero Mar 9, 2021
7b87b4c
Merge remote-tracking branch 'mmguero/development' into topic/zeek4
mmguero Mar 9, 2021
37a1564
reduce kibana verbosity a little more
mmguero Mar 9, 2021
a4fe654
Merge remote-tracking branch 'mmguero/development' into topic/zeek4
mmguero Mar 9, 2021
65c6a7e
fix sensor build of zeek
mmguero Mar 9, 2021
c698adf
switch link for legacy stunnel
mmguero Mar 9, 2021
fd23b39
reduce verbosity
mmguero Mar 10, 2021
d84d09f
update kibana plugin build
mmguero Mar 15, 2021
713eb79
for idaholab/Malcolm#39, update clamav rules during image build
mmguero Mar 17, 2021
c4512de
for idaholab/Malcolm#39, update clamav rules during image build
mmguero Mar 17, 2021
0289216
for idaholab/Malcolm#39, update clamav rules during image build
mmguero Mar 17, 2021
637b152
for idaholab/Malcolm#39, update clamav rules during image build
mmguero Mar 17, 2021
1d43c59
remove fuse driver for filesystem which is now in the kernel
mmguero Mar 17, 2021
2b53f41
update logstash plugin build (openjdk 11 and jruby 9.2.13.0)
mmguero Mar 18, 2021
f1fb2f5
Fix cisagov/Malcolm#162, dependency failure between services and sett…
mmguero Mar 18, 2021
b0fa3af
do build stage for zeek in a few steps
mmguero Mar 22, 2021
f56a378
As centos:7 stopped receiving major updates 2020-12, switched the bas…
mmguero Mar 23, 2021
8e8d167
Bump jinja2 from 2.11.2 to 2.11.3 in /sensor-iso/interface (#1)
dependabot[bot] Mar 23, 2021
524f4e5
Bump jinja2 from 2.11.2 to 2.11.3 in /sensor-iso/interface (#1)
dependabot[bot] Mar 23, 2021
fe16c44
more work updating for spicy-analyzers
mmguero Mar 24, 2021
3229026
use capa release binary rather than pip; some zeek/logstash tweaks
mmguero Mar 30, 2021
4a10f80
lost shebang somehow
mmguero Mar 30, 2021
6f0cb8d
Because the Zeek LDAP plugin is not working, I'm temporarily removing it
mmguero Apr 2, 2021
54fffa9
Merge remote-tracking branch 'mmguero/development' into topic/zeek4
mmguero Apr 2, 2021
d493aee
get Zeek 4.0 to build
mmguero Apr 5, 2021
2f973ee
fix logstash build
mmguero Apr 5, 2021
d5914b0
Merge remote-tracking branch 'mmguero/development' into topic/zeek4
mmguero Apr 5, 2021
9e85df0
Bump jinja2 from 2.11.2 to 2.11.3 in /sensor-iso/interface (#1)
mmguero Apr 7, 2021
e2ca5e4
bump version for elasticsearch and kibana ODFE 1.13.2
mmguero Apr 8, 2021
f0a4aa8
Because of https://github.com/opendistro-for-elasticsearch/opendistro…
mmguero Apr 8, 2021
8a61192
Merge remote-tracking branch 'mmguero/development' into topic/zeek4
mmguero Apr 8, 2021
b8bf0f6
fix typo in zeek pipeline
mmguero Apr 12, 2021
46009cf
update filebeat to python3 for scripts
mmguero Apr 12, 2021
45d6342
fixed readme typo, uploaded search quick start guide
mmguero Apr 12, 2021
1de9e7c
few minor tweaks
mmguero Apr 12, 2021
a46a514
Fixed README typo and uploaded "quick start guide" for search
mmguero Apr 12, 2021
2a8c371
updates to quick start guide
mmguero Apr 12, 2021
3ba333a
updates to quick start guide
mmguero Apr 12, 2021
add4ef4
fixed readme typo, uploaded search quick start guide
mmguero Apr 12, 2021
70502ea
merge from upstream
mmguero Apr 12, 2021
09659d0
Merge remote-tracking branch 'mmguero/master' into development
mmguero Apr 12, 2021
f019209
Merge remote-tracking branch 'mmguero/development' into topic/zeek4
mmguero Apr 12, 2021
dcbcc39
stunnel 5.59 now supports LDAP without me having to patch it manually…
mmguero Apr 13, 2021
391e622
Merge remote-tracking branch 'mmguero-dev/development' into topic/zeek4
mmguero Apr 13, 2021
878ce77
be explicit with port listening
mmguero Apr 13, 2021
ed2041c
Merge remote-tracking branch 'mmguero-dev/development' into topic/zeek4
mmguero Apr 13, 2021
703b019
use zkg autoconfig --force
mmguero Apr 14, 2021
88724ed
update capa version
mmguero Apr 14, 2021
c1a12d0
Merge remote-tracking branch 'mmguero/development' into topic/zeek4
mmguero Apr 14, 2021
93ea8c8
remove unnecessary bacnet package to use zeek's instead
mmguero Apr 14, 2021
a35fdf0
pre-switching to .debs for Zeek install
mmguero Apr 15, 2021
07a1437
switched zeek docker file to use debs instead of build from scratch; …
mmguero Apr 15, 2021
6d01d5b
restore pyzmq
mmguero Apr 15, 2021
925c84f
first pass at sensor using Zeek debs
mmguero Apr 15, 2021
1ff817d
Working on getting zeek installed/working on Hedgehog from debs
mmguero Apr 15, 2021
07dba35
oops, restore arkime build
mmguero Apr 15, 2021
7ad1143
restore original resource allocations for hedgehog build
mmguero Apr 15, 2021
bd04479
Added libjansson dev
mmguero Apr 15, 2021
fd784b9
fix build dependencies again
mmguero Apr 15, 2021
107af81
version bumps for nginx and docker-compose
mmguero Apr 15, 2021
e7905c8
make sure some symlinks exist in the spicy clones directory
mmguero Apr 16, 2021
67cbd8d
restore missing python packages
mmguero Apr 16, 2021
fac24f0
tweak size for /var in malcolm install
mmguero Apr 19, 2021
746e38a
get certain packages from regular repo instead of backports
mmguero Apr 20, 2021
83a3908
Starting to add ethercat
mmguero Apr 20, 2021
18ec014
WIP working on IPsec and ECAT
mmguero Apr 20, 2021
d5be192
more work adding new protocols
mmguero Apr 21, 2021
f410d50
additional work on parsing new protocols
mmguero Apr 21, 2021
02e978f
fix fields for wireguard
mmguero Apr 21, 2021
c93e25a
standardize service
mmguero Apr 21, 2021
3c3c8db
bump version for zeek to 4.0.1
mmguero Apr 26, 2021
b63ca6e
in ISO installs, allow non-root users to use user_allow_other in fuse…
mmguero May 3, 2021
4c7e4b9
Merge remote-tracking branch 'mmguero/development' into topic/zeek4
mmguero May 3, 2021
7afac7e
bump versions
mmguero May 3, 2021
6ee8c2d
Bump flask-cors from 3.0.8 to 3.0.9 in /sensor-iso/interface
dependabot[bot] May 6, 2021
37fdaa0
use my ldap parser
mmguero May 6, 2021
d6603dc
fix building protologbeat
mmguero May 7, 2021
084773d
reflect main branch
mmguero May 10, 2021
b2084f6
Merge pull request #41 from idaholab/dependabot/pip/sensor-iso/interf…
mmguero May 10, 2021
42b22e9
Merge remote-tracking branch 'idaholab/master'
mmguero May 10, 2021
0000105
Merge remote-tracking branch 'mmguero/master' into development
mmguero May 10, 2021
913cf9f
Merge remote-tracking branch 'mmguero/development' into topic/zeek4
mmguero May 10, 2021
f0594ea
replace LDAP parser
mmguero May 10, 2021
edd53a1
treat message_id as a term for LDAP; also, ignore_above 1024
mmguero May 11, 2021
477f2e1
restore links for LDAP dashbaords
mmguero May 11, 2021
26148ec
dashboard updates for DNS, LDAP and security overview
mmguero May 11, 2021
bf6f74b
temporarily disable ecat_arp_info
mmguero May 11, 2021
eb597e1
ethercat dashboards
mmguero May 11, 2021
29ab07d
bump version
mmguero May 11, 2021
c880491
update nginx version to 1.20.0
mmguero May 11, 2021
6ef897b
added ethercat dashbaord
mmguero May 11, 2021
7efaf48
fix idaholab/Malcolm#42, logstash fails to start due to permissions i…
mmguero May 11, 2021
678289c
also related to idaholab/Malcolm#42, make sure elasticsearch processe…
mmguero May 11, 2021
2eea362
map ldap to arkime fields
mmguero May 12, 2021
8780faa
parse proto from ldap logs
mmguero May 12, 2021
90433ef
Merge remote-tracking branch 'mmguero-dev/development' into topic/310…
mmguero May 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 10 additions & 3 deletions Dockerfiles/elasticsearch.Dockerfile
@@ -1,4 +1,4 @@
FROM amazon/opendistro-for-elasticsearch:1.13.0
FROM amazon/opendistro-for-elasticsearch:1.13.2

# Copyright (c) 2021 Battelle Energy Alliance, LLC. All rights reserved.
LABEL maintainer="malcolm.netsec@gmail.com"
Expand All @@ -14,6 +14,7 @@ ARG DEFAULT_UID=1000
ARG DEFAULT_GID=1000
ENV DEFAULT_UID $DEFAULT_UID
ENV DEFAULT_GID $DEFAULT_GID
ENV PUID $DEFAULT_UID
ENV PUSER "elasticsearch"
ENV PGROUP "elasticsearch"
ENV PUSER_PRIV_DROP true
Expand All @@ -33,13 +34,19 @@ RUN yum install -y openssl && \
/usr/share/elasticsearch/bin/elasticsearch-plugin remove opendistro_security && \
echo -e 'cluster.name: "docker-cluster"\nnetwork.host: 0.0.0.0' > /usr/share/elasticsearch/config/elasticsearch.yml && \
chown -R $PUSER:$PGROUP /usr/share/elasticsearch/config/elasticsearch.yml && \
sed -i "s/\b1000\b/\${PUID:-${DEFAULT_UID}}/g" /usr/local/bin/docker-entrypoint.sh && \
sed -i "s/user=1000\b/user=%(ENV_PUID)s/g" /usr/share/elasticsearch/plugins/opendistro-performance-analyzer/pa_config/supervisord.conf && \
sed -i "s/user=1000\b/user=%(ENV_PUID)s/g" /usr/share/elasticsearch/performance-analyzer-rca/pa_config/supervisord.conf && \
sed -i '/[^#].*\/usr\/share\/elasticsearch\/bin\/elasticsearch.*/i /usr/local/bin/jdk-cacerts-auto-import.sh || true' /usr/local/bin/docker-entrypoint.sh

# just used for initial keystore creation
ADD shared/bin/docker-uid-gid-setup.sh /usr/local/bin/
ADD shared/bin/jdk-cacerts-auto-import.sh /usr/local/bin/

USER root

ENTRYPOINT ["/usr/local/bin/docker-uid-gid-setup.sh"]

CMD ["/usr/local/bin/docker-entrypoint.sh"]

# to be populated at build-time:
ARG BUILD_DATE
ARG MALCOLM_VERSION
Expand Down
51 changes: 21 additions & 30 deletions Dockerfiles/file-monitor.Dockerfile
Expand Up @@ -75,14 +75,15 @@ ENV EXTRACTED_FILE_ENABLE_CAPA $EXTRACTED_FILE_ENABLE_CAPA
ENV EXTRACTED_FILE_CAPA_VERBOSE $EXTRACTED_FILE_CAPA_VERBOSE
ENV SRC_BASE_DIR "/usr/local/src"
ENV CLAMAV_RULES_DIR "/var/lib/clamav"
ENV YARA_VERSION "4.0.5"
ENV YARA_VERSION "4.1.0"
ENV YARA_URL "https://github.com/VirusTotal/yara/archive/v${YARA_VERSION}.tar.gz"
ENV YARA_RULES_URL "https://github.com/Neo23x0/signature-base"
ENV YARA_RULES_DIR "/yara-rules"
ENV YARA_RULES_SRC_DIR "$SRC_BASE_DIR/signature-base"
ENV CAPA_URL "https://github.com/fireeye/capa"
ENV CAPA_RULES_URL "https://github.com/fireeye/capa-rules"
ENV CAPA_RULES_DIR "/capa-rules"
ENV CAPA_VERSION "1.6.3"
ENV CAPA_URL "https://github.com/fireeye/capa/releases/download/v${CAPA_VERSION}/capa-v${CAPA_VERSION}-linux.zip"
ENV CAPA_DIR "/opt/capa"
ENV CAPA_BIN "${CAPA_DIR}/capa"
ENV EXTRACTED_FILE_HTTP_SERVER_DEBUG $EXTRACTED_FILE_HTTP_SERVER_DEBUG
ENV EXTRACTED_FILE_HTTP_SERVER_ENABLE $EXTRACTED_FILE_HTTP_SERVER_ENABLE
ENV EXTRACTED_FILE_HTTP_SERVER_ENCRYPT $EXTRACTED_FILE_HTTP_SERVER_ENCRYPT
Expand All @@ -106,6 +107,7 @@ RUN sed -i "s/buster main/buster main contrib non-free/g" /etc/apt/sources.list
curl \
gcc \
git \
jq \
libclamunrar9 \
libjansson-dev \
libjansson4 \
Expand All @@ -121,11 +123,6 @@ RUN sed -i "s/buster main/buster main contrib non-free/g" /etc/apt/sources.list
inotify-tools \
libzmq5 \
psmisc \
python \
python-dev \
python-pip \
python-backports-shutil-get-terminal-size \
python-backports.functools-lru-cache \
python3 \
python3-bs4 \
python3-dev \
Expand All @@ -134,7 +131,6 @@ RUN sed -i "s/buster main/buster main contrib non-free/g" /etc/apt/sources.list
python3-requests \
python3-zmq && \
pip3 install clamd supervisor yara-python python-magic psutil pycryptodome && \
pip2 install flare-capa && \
curl -fsSLO "$SUPERCRONIC_URL" && \
echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - && \
chmod +x "$SUPERCRONIC" && \
Expand All @@ -157,17 +153,13 @@ RUN sed -i "s/buster main/buster main contrib non-free/g" /etc/apt/sources.list
git clone --depth 1 --single-branch "${YARA_RULES_URL}" "${YARA_RULES_SRC_DIR}" && \
mkdir -p "${YARA_RULES_DIR}" && \
ln -f -s -r "${YARA_RULES_SRC_DIR}"/yara/* "${YARA_RULES_SRC_DIR}"/vendor/yara/* "${YARA_RULES_DIR}"/ && \
git clone --depth 1 --single-branch --branch "v$(/usr/local/bin/capa --version 2>&1 | awk '{print $2}')" "${CAPA_URL}" /tmp/capa && \
cd /tmp/capa && \
git submodule init rules && \
(git rev-parse @:./rules > /tmp/capa_rules_sha.txt) && \
mkdir -p "${CAPA_RULES_DIR}" && \
cd "${CAPA_RULES_DIR}" && \
git init && \
git remote add origin "${CAPA_RULES_URL}" && \
git fetch --depth 1 origin "$(cat /tmp/capa_rules_sha.txt)" && \
git reset --hard FETCH_HEAD && \
rm -rf /tmp/capa* && \
cd /tmp && \
curl -fsSL -o ./capa.zip "${CAPA_URL}" && \
unzip ./capa.zip && \
chmod 755 ./capa && \
mkdir -p "${CAPA_DIR}" && \
mv ./capa "${CAPA_BIN}" && \
rm -f ./capa.zip && \
apt-get -y -q --allow-downgrades --allow-remove-essential --allow-change-held-packages --purge remove \
automake \
build-essential \
Expand All @@ -180,21 +172,19 @@ RUN sed -i "s/buster main/buster main contrib non-free/g" /etc/apt/sources.list
libssl-dev \
libtool \
make \
python-dev \
python3-dev \
unzip && \
python3-dev && \
apt-get -y -q --allow-downgrades --allow-remove-essential --allow-change-held-packages autoremove && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/lib/apt/lists/* /tmp/* && \
mkdir -p /var/log/clamav "${CLAMAV_RULES_DIR}" && \
curl -s -S -L -o "${CLAMAV_RULES_DIR}"/main.cvd http://database.clamav.net/main.cvd && \
curl -s -S -L -o "${CLAMAV_RULES_DIR}"/daily.cvd http://database.clamav.net/daily.cvd && \
curl -s -S -L -o "${CLAMAV_RULES_DIR}"/bytecode.cvd http://database.clamav.net/bytecode.cvd && \
groupadd --gid ${DEFAULT_GID} ${PGROUP} && \
useradd -m --uid ${DEFAULT_UID} --gid ${DEFAULT_GID} ${PUSER} && \
usermod -a -G tty ${PUSER} && \
chown -R ${PUSER}:${PGROUP} /var/log/clamav "${CLAMAV_RULES_DIR}" "${CAPA_RULES_DIR}" "${YARA_RULES_DIR}" "${YARA_RULES_SRC_DIR}" && \
find /var/log/clamav "${CLAMAV_RULES_DIR}" "${CAPA_RULES_DIR}" "${YARA_RULES_DIR}" "${YARA_RULES_SRC_DIR}" -type d -exec chmod 750 "{}" \; && \
chown -R ${PUSER}:${PGROUP} /var/log/clamav "${CLAMAV_RULES_DIR}" "${CAPA_DIR}" "${YARA_RULES_DIR}" "${YARA_RULES_SRC_DIR}" && \
find /var/log/clamav "${CLAMAV_RULES_DIR}" "${CAPA_DIR}" "${YARA_RULES_DIR}" "${YARA_RULES_SRC_DIR}" -type d -exec chmod 750 "{}" \; && \
sed -i 's/^Foreground .*$/Foreground true/g' /etc/clamav/clamd.conf && \
sed -i "s/^User .*$/User ${PUSER}/g" /etc/clamav/clamd.conf && \
sed -i "s|^LocalSocket .*$|LocalSocket $CLAMD_SOCKET_FILE|g" /etc/clamav/clamd.conf && \
Expand All @@ -211,7 +201,7 @@ RUN sed -i "s/buster main/buster main contrib non-free/g" /etc/apt/sources.list
ln -r -s /usr/local/bin/zeek_carve_scanner.py /usr/local/bin/yara_scan.py && \
ln -r -s /usr/local/bin/zeek_carve_scanner.py /usr/local/bin/capa_scan.py && \
ln -r -s /usr/local/bin/zeek_carve_scanner.py /usr/local/bin/malass_scan.py && \
echo "0 */6 * * * /bin/bash /usr/local/bin/capa-rules-update.sh\n0 */6 * * * /bin/bash /usr/local/bin/yara-rules-update.sh" > ${SUPERCRONIC_CRONTAB}
echo "0 */6 * * * /bin/bash /usr/local/bin/capa-update.sh\n0 */6 * * * /bin/bash /usr/local/bin/yara-rules-update.sh" > ${SUPERCRONIC_CRONTAB}

ADD shared/bin/docker-uid-gid-setup.sh /usr/local/bin/
ADD shared/bin/zeek_carve*.py /usr/local/bin/
Expand All @@ -228,7 +218,9 @@ USER root

WORKDIR /data/zeek/extract_files

VOLUME ["$CAPA_RULES_DIR"]
ENV PATH "${CAPA_DIR}:${PATH}"

VOLUME ["$CAPA_DIR"]
VOLUME ["$CLAMAV_RULES_DIR"]
VOLUME ["$YARA_RULES_DIR"]
VOLUME ["$YARA_RULES_SRC_DIR"]
Expand All @@ -240,7 +232,6 @@ ENTRYPOINT ["/usr/local/bin/docker-uid-gid-setup.sh", "/docker-entrypoint.sh"]

CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisord.conf", "-n"]


# to be populated at build-time:
ARG BUILD_DATE
ARG MALCOLM_VERSION
Expand Down
7 changes: 3 additions & 4 deletions Dockerfiles/filebeat.Dockerfile
Expand Up @@ -48,11 +48,10 @@ USER root

RUN yum install -y epel-release && \
yum update -y && \
yum install -y curl inotify-tools file psmisc tar gzip unzip cpio bzip2 lzma xz p7zip p7zip-plugins unar python-setuptools python-pip && \
yum install -y curl inotify-tools file psmisc tar gzip unzip cpio bzip2 lzma xz p7zip p7zip-plugins unar python3-setuptools python3-pip && \
yum clean all && \
ln -sr /usr/sbin/fuser /bin/fuser && \
easy_install supervisor && \
pip install patool entrypoint2 pyunpack python-magic ordered-set==3.1.1 && \
python3 -m pip install patool entrypoint2 pyunpack python-magic ordered-set supervisor && \
curl -fsSLO "$SUPERCRONIC_URL" && \
echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - && \
chmod +x "$SUPERCRONIC" && \
Expand Down Expand Up @@ -96,7 +95,7 @@ VOLUME ["/usr/share/filebeat/data", "/usr/share/filebeat-nginx/data"]

ENTRYPOINT ["/usr/local/bin/docker-uid-gid-setup.sh"]

CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf", "-u", "root", "-n"]
CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisord.conf", "-u", "root", "-n"]


# to be populated at build-time:
Expand Down
1 change: 1 addition & 0 deletions Dockerfiles/htadmin.Dockerfile
Expand Up @@ -77,6 +77,7 @@ RUN apt-get update && \
ADD shared/bin/docker-uid-gid-setup.sh /usr/local/bin/
ADD docs/images/favicon/favicon.ico /var/www/htadmin/
ADD htadmin/supervisord.conf /supervisord.conf
ADD htadmin/htadmin.sh /usr/local/bin/
ADD htadmin/src /var/www/htadmin/
ADD htadmin/php/php.ini /etc/php/$PHP_VERSION/fpm/php.ini
ADD htadmin/nginx/sites-available/default /etc/nginx/sites-available/default
Expand Down
12 changes: 4 additions & 8 deletions Dockerfiles/kibana.Dockerfile
@@ -1,4 +1,4 @@
FROM centos:7 AS build
FROM amazonlinux:2 AS build

# Copyright (c) 2021 Battelle Energy Alliance, LLC. All rights reserved.

Expand All @@ -20,12 +20,8 @@ ENV ELASTIC_VERSION $ELASTIC_VERSION

USER root

RUN yum install -y epel-release && \
yum update -y && \
yum install -y curl patch psmisc zip unzip gcc-c++ make && \
yum install -y https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.7-1.x86_64.rpm && \
yum install -y git && \
yum clean all && \
RUN amazon-linux-extras install -y epel && \
yum install -y curl patch procps psmisc tar zip unzip gcc-c++ make moreutils jq git && \
groupadd -g ${DEFAULT_GID} ${PGROUP} && \
adduser -u ${DEFAULT_UID} -d /home/kibana -s /bin/bash -G ${PGROUP} -g ${PUSER} ${PUSER} && \
mkdir -p /usr/share && \
Expand Down Expand Up @@ -65,7 +61,7 @@ RUN eval "$(nodenv init -)" && \
yarn build --kibana-version "${ELASTIC_VERSION}" && \
mv ./build/kbnSankeyVis-7.10.2.zip ./build/kbnSankeyVis.zip

FROM amazon/opendistro-for-elasticsearch-kibana:1.13.0
FROM amazon/opendistro-for-elasticsearch-kibana:1.13.2

LABEL maintainer="malcolm.netsec@gmail.com"
LABEL org.opencontainers.image.authors='malcolm.netsec@gmail.com'
Expand Down
49 changes: 34 additions & 15 deletions Dockerfiles/logstash.Dockerfile
@@ -1,26 +1,45 @@
FROM centos:7 AS build
FROM amazonlinux:2 AS build

# Copyright (c) 2021 Battelle Energy Alliance, LLC. All rights reserved.

RUN yum install -y epel-release && \
yum update -y && \
yum install -y java-1.8.0-openjdk-devel curl wget tar which \
patch libyaml-devel libffi-devel glibc-headers autoconf gcc-c++ glibc-devel \
readline-devel zlib-devel openssl-d evel bzip2 automake libtool bison make

ENV OUIFILTER_URL "https://codeload.github.com/mmguero-dev/logstash-filter-ieee_oui/tar.gz/master"
RUN amazon-linux-extras install -y epel && \
yum install -y \
autoconf \
automake \
bison \
bzip2 \
curl \
gcc-c++ \
glibc-devel \
glibc-headers \
java-latest-openjdk-devel \
libffi-devel \
libtool \
libyaml-devel \
make \
openssl-devel \
patch \
procps \
readline-devel \
tar \
wget \
which \
zlib-devel

RUN /bin/bash -lc "command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -" && \
/bin/bash -lc "command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -" && \
/bin/bash -lc "curl -L get.rvm.io | bash -s stable" && \
/bin/bash -lc "rvm autolibs fail" && \
/bin/bash -lc "rvm install jruby-9.2.5.0" && \
/bin/bash -lc "rvm use jruby-9.2.5.0 --default" && \
/bin/bash -lc "gem install bundler --no-ri --no-rdoc" && \
cd /opt && \
mkdir -p ./logstash-filter-ieee_oui && \
curl -sSL "$OUIFILTER_URL" | tar xzvf - -C ./logstash-filter-ieee_oui --strip-components 1 && \
/bin/bash -lc "cd /opt/logstash-filter-ieee_oui && bundle install && gem build logstash-filter-ieee_oui.gemspec && bundle info logstash-filter-ieee_oui"
/bin/bash -lc "rvm install jruby-9.2.17.0" && \
/bin/bash -lc "rvm use jruby-9.2.17.0 --default" && \
/bin/bash -lc "gem install bundler --no-document"

ENV OUIFILTER_URL "https://codeload.github.com/mmguero-dev/logstash-filter-ieee_oui/tar.gz/master"

RUN cd /opt && \
mkdir -p ./logstash-filter-ieee_oui && \
curl -sSL "$OUIFILTER_URL" | tar xzvf - -C ./logstash-filter-ieee_oui --strip-components 1 && \
/bin/bash -lc "export JAVA_HOME=$(realpath $(dirname $(find /usr/lib/jvm -name javac -type f))/../) && cd /opt/logstash-filter-ieee_oui && ( bundle install || bundle install ) && gem build logstash-filter-ieee_oui.gemspec && bundle info logstash-filter-ieee_oui"

FROM docker.elastic.co/logstash/logstash-oss:7.10.2

Expand Down
18 changes: 2 additions & 16 deletions Dockerfiles/nginx.Dockerfile
Expand Up @@ -7,8 +7,6 @@
# jwilder/nginx-proxy - https://github.com/jwilder/nginx-proxy/blob/master/Dockerfile.alpine

####################################################################################
# build a patched APK of stunnel supporting ldap StartTLS (patched protocols.c)
# (based on https://www.stunnel.org/pipermail/stunnel-users/2013-November/004437.html)

FROM alpine:3.13 as stunnel_build

Expand All @@ -20,30 +18,22 @@ ENV PUSER "builder"
ENV PGROUP "abuild"

ADD https://codeload.github.com/alpinelinux/aports/tar.gz/master /aports-master.tar.gz
ADD nginx/src/*.patch /usr/src/patches/

USER root

RUN set -x ; \
apk add --no-cache alpine-sdk patchutils sudo openssl-dev linux-headers; \
apk add --no-cache alpine-sdk sudo openssl-dev linux-headers; \
sed -i 's/^#\s*\(%wheel\s\+ALL=(ALL)\s\+NOPASSWD:\s\+ALL\)/\1/' /etc/sudoers ; \
adduser -D -u ${DEFAULT_UID} -h /apkbuild -G ${PGROUP} ${PUSER} ; \
addgroup ${PUSER} wheel ; \
chmod 644 /aports-master.tar.gz

USER ${PUSER}

# todo: when aports updates stunnel to 5.58, this will need to be updated

RUN set -x ; \
cd /apkbuild ; \
tar xvf /aports-master.tar.gz aports-master/community/stunnel ; \
cp /usr/src/patches/stunnel-5.56-open-ldap.patch /apkbuild/aports-master/community/stunnel/ ; \
cd /apkbuild/aports-master/community/stunnel ; \
sed -i 's@https://www.stunnel.org/downloads/stunnel.*gz@ftp://ftp.stunnel.org/stunnel/archive/5.x/stunnel-5.57.tar.gz@' APKBUILD ; \
sed -i 's/\(^makedepends="\)/\1patchutils /' APKBUILD ; \
sed -i '/^source=/a \ \ \ \ \ \ \ \ stunnel-5.56-open-ldap.patch' APKBUILD ; \
sed -i '/^sha512sums/,$d' APKBUILD ; \
abuild-keygen -a -i -n ; \
abuild checksum ; \
abuild -R
Expand Down Expand Up @@ -83,9 +73,6 @@ ARG NGINX_BASIC_AUTH=true
# and use stunnel to tunnel the connection.
ARG NGINX_LDAP_TLS_STUNNEL=false

# when initiating the "extendedReq(1) LDAP_START_TLS_OID" command, which protocol to use: winldap or openldap
ARG NGINX_LDAP_TLS_STUNNEL_PROTOCOL=winldap

# stunnel will require and verify certificates for StartTLS when one or more
# trusted CA certificate files are placed in the ./nginx/ca-trust directory.
# For additional security, hostname or IP address checking of the associated
Expand All @@ -98,13 +85,12 @@ ARG NGINX_LDAP_TLS_STUNNEL_VERIFY_LEVEL=2

ENV NGINX_BASIC_AUTH $NGINX_BASIC_AUTH
ENV NGINX_LDAP_TLS_STUNNEL $NGINX_LDAP_TLS_STUNNEL
ENV NGINX_LDAP_TLS_STUNNEL_PROTOCOL $NGINX_LDAP_TLS_STUNNEL_PROTOCOL
ENV NGINX_LDAP_TLS_STUNNEL_CHECK_HOST $NGINX_LDAP_TLS_STUNNEL_CHECK_HOST
ENV NGINX_LDAP_TLS_STUNNEL_CHECK_IP $NGINX_LDAP_TLS_STUNNEL_CHECK_IP
ENV NGINX_LDAP_TLS_STUNNEL_VERIFY_LEVEL $NGINX_LDAP_TLS_STUNNEL_VERIFY_LEVEL

# build latest nginx with nginx-auth-ldap
ENV NGINX_VERSION=1.19.7
ENV NGINX_VERSION=1.20.0
ENV NGINX_AUTH_LDAP_BRANCH=master

ADD https://codeload.github.com/mmguero-dev/nginx-auth-ldap/tar.gz/$NGINX_AUTH_LDAP_BRANCH /nginx-auth-ldap.tar.gz
Expand Down