File tree 7 files changed +74
-16
lines changed
7 files changed +74
-16
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,14 @@ chown tpot:tpot $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEY
66
66
logrotate -s $mySTATUS $myCONF
67
67
}
68
68
69
+ # Let's create a function to clean up and prepare ciscoasa data
70
+ fuCISCOASA () {
71
+ if [ " $myPERSISTENCE " != " on" ]; then rm -rf /data/ciscoasa/* ; fi
72
+ mkdir -p /data/ciscoasa/log
73
+ chmod 760 /data/ciscoasa -R
74
+ chown tpot:tpot /data/ciscoasa -R
75
+ }
76
+
69
77
# Let's create a function to clean up and prepare conpot data
70
78
fuCONPOT () {
71
79
if [ " $myPERSISTENCE " != " on" ]; then rm -rf /data/conpot/* ; fi
@@ -124,6 +132,14 @@ fuGLASTOPF () {
124
132
chown tpot:tpot /data/glastopf -R
125
133
}
126
134
135
+ # Let's create a function to clean up and prepare heralding data
136
+ fuHERALDING () {
137
+ if [ " $myPERSISTENCE " != " on" ]; then rm -rf /data/heralding/* ; fi
138
+ mkdir -p /data/heralding/log
139
+ chmod 760 /data/heralding -R
140
+ chown tpot:tpot /data/heralding -R
141
+ }
142
+
127
143
# Let's create a function to clean up and prepare honeytrap data
128
144
fuHONEYTRAP () {
129
145
if [ " $myPERSISTENCE " != " on" ]; then rm -rf /data/honeytrap/* ; fi
@@ -210,13 +226,15 @@ if [ "$myPERSISTENCE" = "on" ];
210
226
fuLOGROTATE
211
227
else
212
228
echo " Cleaning up and preparing data folders."
229
+ fuCISCOASA
213
230
fuCONPOT
214
231
fuCOWRIE
215
232
fuDIONAEA
216
233
fuELASTICPOT
217
234
fuELK
218
235
fuEMOBILITY
219
236
fuGLASTOPF
237
+ fuHERALDING
220
238
fuHONEYTRAP
221
239
fuMAILONEY
222
240
fuNGINX
Original file line number Diff line number Diff line change 1
1
FROM alpine
2
- MAINTAINER MO
3
2
4
3
# Include dist
5
4
ADD dist/ /root/dist/
6
5
7
6
# Install packages
8
7
RUN apk -U upgrade && \
9
- apk add bash ca-certificates file procps wget && \
10
- apk -U add --repository https://dl-cdn.alpinelinux.org/alpine/edge/community \
8
+ apk add bash \
9
+ ca-certificates \
10
+ file \
11
+ libcap \
12
+ procps \
13
+ wget && \
14
+ apk -U add --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \
11
15
suricata && \
12
16
13
17
# Setup user, groups and configs
@@ -18,12 +22,12 @@ RUN apk -U upgrade && \
18
22
19
23
# Download the latest EmergingThreats ruleset, replace rulebase and enable all rules
20
24
cp /root/dist/update.sh /usr/bin/ && \
21
- chmod u+x /usr/bin/update.sh && \
22
- update.sh && \
25
+ chmod 755 /usr/bin/update.sh && \
26
+ update.sh OPEN && \
23
27
24
28
# Clean up
25
29
rm -rf /root/* && \
26
30
rm -rf /var/cache/apk/*
27
31
28
32
# Start suricata
29
- CMD update.sh && suricata -v -F /etc/suricata/capture-filter.bpf -i $(/sbin/ip address | grep '^2: ' | awk '{ print $2 }' | tr -d [:punct:])
33
+ CMD update.sh $OINKCODE && suricata -v -F /etc/suricata/capture-filter.bpf -i $(/sbin/ip address | grep '^2: ' | awk '{ print $2 }' | tr -d [:punct:])
Original file line number Diff line number Diff line change @@ -6,8 +6,31 @@ function fuCLEANUP {
6
6
}
7
7
trap fuCLEANUP EXIT
8
8
9
- # Download the latest EmergingThreats ruleset, replace rulebase and enable all rules
10
- cd /tmp
11
- wget --tries=2 --timeout=2 https://rules.emergingthreats.net/open/suricata-4.0/emerging.rules.tar.gz
12
- tar xvfz emerging.rules.tar.gz -C /etc/suricata/
9
+ # ## Vars
10
+ myOINKCODE=" $1 "
11
+
12
+ function fuDLRULES {
13
+ # ## Check if args are present then download rules, if not throw error
14
+
15
+ if [ " $myOINKCODE " != " " ] && [ " $myOINKCODE " == " OPEN" ];
16
+ then
17
+ echo " Downloading ET open ruleset."
18
+ wget --tries=2 --timeout=2 https://rules.emergingthreats.net/open/suricata-4.0/emerging.rules.tar.gz -O /tmp/rules.tar.gz
19
+ else
20
+ if [ " $myOINKCODE " != " " ];
21
+ then
22
+ echo " Downloading ET pro ruleset with Oinkcode $myOINKCODE ."
23
+ wget --tries=2 --timeout=2 https://rules.emergingthreatspro.com/$myOINKCODE /suricata-4.0/etpro.rules.tar.gz -O /tmp/rules.tar.gz
24
+ else
25
+ echo " Usage: update.sh <[OPEN, OINKCODE]>"
26
+ exit
27
+ fi
28
+ fi
29
+ }
30
+
31
+ # Download rules
32
+ fuDLRULES
33
+
34
+ # Extract and enable all rules
35
+ tar xvfz /tmp/rules.tar.gz -C /etc/suricata/
13
36
sed -i s/^# alert/alert/ /etc/suricata/rules/*.rules
Original file line number Diff line number Diff line change 1
1
# T-Pot (Standard)
2
2
# For docker-compose ...
3
- version : ' 2.1 '
3
+ version : ' 2.2 '
4
4
5
5
services :
6
6
7
7
# Suricata service
8
8
suricata :
9
+ build : .
9
10
container_name : suricata
10
11
restart : always
12
+ environment :
13
+ # For ET Pro ruleset replace <OPEN> with your OINKCODE
14
+ - OINKCODE=OPEN
11
15
network_mode : " host"
12
16
cap_add :
13
17
- NET_ADMIN
14
18
- SYS_NICE
15
19
- NET_RAW
16
- image : " dtagdevsec/suricata:1710 "
20
+ image : " dtagdevsec/suricata:1804 "
17
21
volumes :
18
22
- /data/suricata/log:/var/log/suricata
Original file line number Diff line number Diff line change @@ -189,12 +189,15 @@ services:
189
189
suricata :
190
190
container_name : suricata
191
191
restart : always
192
+ environment :
193
+ # For ET Pro ruleset replace <OPEN> with your OINKCODE
194
+ - OINKCODE=OPEN
192
195
network_mode : " host"
193
196
cap_add :
194
197
- NET_ADMIN
195
198
- SYS_NICE
196
199
- NET_RAW
197
- image : " dtagdevsec/suricata:1710 "
200
+ image : " dtagdevsec/suricata:1804 "
198
201
volumes :
199
202
- /data/suricata/log:/var/log/suricata
200
203
Original file line number Diff line number Diff line change @@ -291,12 +291,15 @@ services:
291
291
suricata :
292
292
container_name : suricata
293
293
restart : always
294
+ environment :
295
+ # For ET Pro ruleset replace <OPEN> with your OINKCODE
296
+ - OINKCODE=OPEN
294
297
network_mode : " host"
295
298
cap_add :
296
299
- NET_ADMIN
297
300
- SYS_NICE
298
301
- NET_RAW
299
- image : " dtagdevsec/suricata:1710 "
302
+ image : " dtagdevsec/suricata:1804 "
300
303
volumes :
301
304
- /data/suricata/log:/var/log/suricata
302
305
Original file line number Diff line number Diff line change 1
- /data/conpot/log/conpot.json
2
- /data/conpot/log/conpot.log
1
+ /data/ciscoasa/log/ciscoasa.log
2
+ /data/conpot/log/conpot*.json
3
+ /data/conpot/log/conpot*.log
3
4
/data/cowrie/log/cowrie.json
4
5
/data/cowrie/log/cowrie-textlog.log
5
6
/data/cowrie/log/lastlog.txt
16
17
/data/emobility/log/centralsystemEWS.log
17
18
/data/glastopf/log/glastopf.log
18
19
/data/glastopf/db/glastopf.db
20
+ /data/heralding/log/*.log
21
+ /data/heralding/log/*.csv
19
22
/data/honeytrap/log/*.log
20
23
/data/honeytrap/log/*.json
21
24
/data/honeytrap/attacks.tgz
You can’t perform that action at this time.
0 commit comments