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

use git to clone zeek-parser-Bacnet #130

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions osect_sensor/Infrastructure/edge_cron/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RUN apt-get update \
flex \
kmod \
gawk \
git \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build環境へgitのinstallです。git cloneのために

libmount-dev \
libpcre3-dev \
libyaml-dev \
Expand Down Expand Up @@ -76,6 +77,10 @@ RUN wget -q http://rules.emergingthreats.net/open/suricata-6.0/emerging.rules.ta
&& rm rules/*ja3.rules \
&& grep -h -ve "^#" -ve "^$" rules/*.rules > /var/lib/suricata/rules/suricata.rules

# zeek-parser-Bacnetのclone
WORKDIR /home/work
RUN git clone https://github.com/nttcom/zeek-parser-Bacnet.git
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zeek-parser-Bacnetリポジトリのclone


# 本番イメージ
FROM zeek/zeek:5.0.0
ENV LANG C.UTF-8
Expand Down Expand Up @@ -157,6 +162,7 @@ RUN zkg install --force --skiptest \
# icsnpp-ethercat \
# icsnpp-opcua-binary \
icsnpp-modbus \
icsnpp-bacnet \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

icsnpp-bacnet moduleの追加

zeek/corelight/zeek-long-connections \
zeek-af_packet-plugin

Expand Down Expand Up @@ -202,6 +208,8 @@ RUN cp -p ot_tools/broscript/CIFS_B/CIFS_B.hlto /usr/local/zeek/lib/zeek-spicy/m
RUN mkdir /var/log/yaf
COPY --from=build-env /usr/local/bin /usr/local/bin
COPY --from=build-env /usr/local/lib /usr/local/lib
# zeek-parser-Bacnetのコピー
COPY --from=build-env /home/work/zeek-parser-Bacnet /home/work/zeek-parser-Bacnet
Comment on lines +211 to +212
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build環境からzeek-parser-Bacnet をイメージの中にコピーする


# Suricataはほぼ無駄がないためそのままインストール
# Suricata rulesをコピー
Expand Down Expand Up @@ -232,9 +240,10 @@ RUN mkdir /opt/ot_tools \
&& cp -p ot_tools/broscript/dns.zeek /usr/local/zeek/share/zeek/base/protocols/dns/main.zeek \
&& cp -p ot_tools/*.sh /opt/ot_tools/ \
&& cp -p ot_tools/yaf.awk /opt/ot_tools/ \
&& cp -pr ot_tools/p0f /opt/
&& cp -pr ot_tools/p0f /opt/ \
&& cp -p zeek-parser-Bacnet/scripts/bacnet_ip.zeek /usr/local/zeek/share/zeek/site/icsnpp-bacnet/main.zeek \
&& cp -p zeek-parser-Bacnet/scripts/consts_bacnet_ip.zeek /usr/local/zeek/lib/zeek/plugins/packages/icsnpp-bacnet/scripts/consts.zeek
Comment on lines +244 to +245
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zeek-parser-Bacnetのscriptsを該当場所にコピーする


# 環境変数
RUN printenv | grep -e https_proxy -e HTTPS_PROXY -e http_proxy -e HTTP_PROXY -e no_proxy -e NO_PROXY| awk '{print "export " $1}' > /opt/ot_tools/proxy_env.txt \
&& mv supervisord.conf /etc/supervisor/conf.d/