956 Commits

Author SHA1 Message Date
af09aa96b1 Update 2022-04-12 13:58:34 +02:00
5d1640c1f8 Update 2022-04-12 12:47:07 +02:00
edc5188f08 Update 2022-04-12 12:25:34 +02:00
cf3fdc68db Update 2022-04-12 12:17:37 +02:00
fce42602a4 Release 22.04.0 code to master
Prepping for T-Pot 22.04.0 release.
2022-04-12 11:34:16 +02:00
27d838d8a3 Update 2022-04-12 09:47:54 +02:00
c2aa0af2f3 Merge branch 'master' into 22.x 2022-04-11 16:47:44 +02:00
020500d333 keep # DEV tags, point 22.04.0 to master, prep PR 2022-04-11 14:37:04 +00:00
f52f1a8f4f Update 2022-04-11 16:30:05 +02:00
bfbb77a5a0 Fix Error
Thanks to @tadashi-oya for spotting and reporting! #1065
2022-04-11 09:50:31 +02:00
555bf2245d fix installer path to packages.txt 2022-04-08 15:03:59 +00:00
36774d0b71 update tags / version to 2204, tweaking README 2022-04-08 13:45:53 +00:00
428b57ebc9 Finalize README 2022-04-08 12:57:48 +02:00
7cd85164e6 Update 2022-04-07 18:20:10 +02:00
6dab897ccd Update 2022-04-06 17:50:46 +02:00
a584144679 Update 2022-04-05 18:29:27 +02:00
2d97c90eb8 Update 2022-04-05 18:26:08 +02:00
60aff2aeb5 Working on documentation. 2022-04-05 18:20:43 +02:00
4ee806eab0 update 2022-04-05 12:34:27 +02:00
6d3cd2b3e2 update 2022-04-05 11:55:03 +02:00
db46ab037e Add files via upload 2022-04-04 18:13:03 +02:00
ab46fcb298 as proposed by @tadashi-oya, #1059 #1053 2022-04-04 10:58:33 +00:00
eda2878024 update version 2022-04-01 15:21:04 +00:00
cf11a3bd91 update editions 2022-04-01 15:07:42 +00:00
2b61f3da56 fix regression for personalized iso 2022-04-01 14:58:47 +00:00
f49f454a42 tweaking ciscoasa 2022-04-01 12:55:21 +00:00
d3546b1ae0 makeiso.sh now aware of switch to timesyncd 2022-03-31 15:06:48 +00:00
5f18f7f17f finetune logstash image and compose settings 2022-03-31 14:46:56 +00:00
bf39f85df0 pin sentrypeer to v1.2.0 2022-03-31 12:20:45 +00:00
4ea2a11a44 adjust updater 2022-03-30 21:04:19 +00:00
3a3117ab19 remove glances from purge 2022-03-30 21:01:07 +00:00
572d540ead tweaking ntp and logstash
remove ntp and replace with timesyncd (client only)

adjust logstash config
2022-03-30 20:32:24 +00:00
9705538dba fix typo 2022-03-30 18:00:15 +00:00
22276d1cc6 fix permissions for distributed setup 2022-03-30 15:53:08 +00:00
bb6be77f53 avoid race condition
in some conditions issue is not update with the correct ip
2022-03-30 11:39:58 +00:00
a8b19e37ec fixing, tweaking
fix missing glances, dhcp lease timeout and windows title
2022-03-30 09:48:51 +00:00
5bbe07de9e fix dep 2022-03-25 14:52:28 +00:00
328139d9b9 image builder, tweaking 2022-03-24 18:54:56 +01:00
14a9b09f74 dynamic display of issue text 2022-03-24 12:01:36 +00:00
f4c271ebe8 tweaking editions 2022-03-23 22:39:27 +00:00
68c57e6766 adjust installer editions 2022-03-23 22:21:34 +00:00
75c1b3400f tweaking editions 2022-03-23 21:56:44 +00:00
691ac58abf tweaking 2022-03-22 14:33:06 +00:00
7d6c69ae76 add udp support 2022-03-22 13:51:05 +00:00
f518d84da9 reduce hptest to nmap usage 2022-03-21 23:15:58 +01:00
3d81bc3ab0 tweaking 2022-03-21 20:46:04 +01:00
564718e516 tweaking 2022-03-20 10:19:12 +00:00
5745d54c21 update tweaking 2022-03-20 09:42:29 +00:00
717167b55c updater tweaking 2022-03-19 21:32:11 +00:00
cbf431d960 tweak updater for 22.x update 2022-03-18 18:17:12 +00:00
e2752458d4 bump elk to 7.17.0 to support 8.0.1 in 22.x 2022-03-18 16:23:27 +00:00
b7096d6df6 bump elk to 8.0.1 2022-03-18 07:58:00 +00:00
d7698fd376 tweak package list, installer 2022-03-17 17:53:36 +00:00
233ffe8aaf move package list into separate file 2022-03-17 17:42:22 +00:00
54e738fde8 move container cleaning outside tpot.service 2022-03-17 17:09:00 +00:00
1f12cb24c2 tweaking updater, installer
updater: add conntrack, tpot.service

installer: no ipv4 pinning
2022-03-16 16:08:14 +00:00
dd5f2c2a8d reduce build times, tweaking 2022-03-14 21:50:19 +00:00
9a0e6bf1d8 tweaking process cpu 2022-03-14 10:37:11 +00:00
3bcf85a92f tweaking, reduce build times 2022-03-13 10:19:08 +00:00
e87a6fa53f heralding, honeypots reduce build time, tweaking 2022-03-12 17:59:31 +00:00
a0d82ddc45 tweaking, reduce build times 2022-03-12 15:11:20 +00:00
1974a7e6ab cowrie, ddospot, reduce build times, tweaking 2022-03-12 14:42:34 +00:00
96d5986407 cowrie, test reduce build times 2022-03-12 14:27:34 +00:00
f39b371d6b tweaking 2022-03-12 13:27:28 +00:00
ae52dafdaf conpot, test reduce build times 2022-03-12 13:13:31 +00:00
886a7f159e add /modify cpu healtchecks for adbhoney, conpot, dionaea 2022-03-11 18:02:20 +00:00
068f4bb67e adbhoney add healtcheck for CPU usage, tweaking 2022-03-11 13:29:44 +00:00
0a8ff0297f tweaking 2022-03-09 23:07:28 +01:00
4bcd24ed19 tweaking 2022-03-09 20:46:12 +00:00
99c719eed4 bump conpot to latest master, cleanup 2022-03-09 15:19:51 +00:00
d2f3be9477 Merge branch '22.x' of https://github.com/telekom-security/tpotce into 22.x 2022-03-09 00:24:40 +00:00
3e7b825705 update elkbase 2022-03-09 00:23:39 +00:00
c00ce3fd35 Kibana Visualizations reworked 2022-03-09 01:11:11 +01:00
9d7c24892d image tweaking 2022-03-08 23:36:03 +00:00
22904d402a drop root privileges for suricata 2022-03-08 17:29:03 +00:00
02d4d79a60 tweaking 2022-03-05 00:50:47 +00:00
075551d218 harden, reduce size log4pot 2022-03-04 13:13:48 +00:00
3b65fb039b bump log4pot to latest master 2022-03-04 11:45:25 +00:00
518c56def9 spiderfoot, editions tweaking 2022-02-28 22:00:54 +00:00
c496b274f3 fix entrypoint 2022-02-25 17:14:42 +00:00
3d0d69c541 tweaking, license info, readme credits, avoid redis port conflict 2022-02-25 16:59:17 +00:00
8f8bdcbefa fix expose from parent 2022-02-25 13:47:00 +00:00
5237215bf0 tweaking, add sentrypeer to logstash config 2022-02-24 17:39:57 +00:00
aa6afc37fe prep for sentrypeer 2022-02-23 23:19:18 +00:00
8d16d7587d add sentrypeer, wordpot tweaking, fix udp src_ip issues 2022-02-22 17:57:55 +00:00
af2174ee9f fix websocket timeout 2022-02-21 11:43:41 +00:00
fc7c748b20 add attack map to web gui 2022-02-20 23:11:24 +00:00
656c99446e fix template 2022-02-20 16:38:15 +00:00
a73c4b67d9 reduce index refresh to 1s 2022-02-18 19:55:31 +00:00
416d4a810f redis tweaking 2022-02-17 01:26:10 +00:00
21d245a5d8 Add files via upload 2022-02-16 19:52:58 +01:00
7ee263e8e8 bump elastic stack to 8.0.0 2022-02-16 02:55:20 +00:00
17a1cbdf40 update map 2022-02-15 21:46:43 +00:00
e9a907ef7b tweaking 2022-02-14 00:35:37 +00:00
e1643308b2 tweaking 2022-02-14 00:32:57 +00:00
264120c751 bump map_server to latest master 2022-02-14 00:30:18 +00:00
7e0b964ca5 fix typo 2022-02-12 01:17:48 +00:00
6fed549f58 map server tweaking 2022-02-12 01:04:02 +00:00
1f610b84d7 Merge pull request #1006 from tmariuss/feature/multi_region_aws
Make a template for deploying T-Pot in multiple regions on AWS using terraform
2022-02-11 11:38:15 +01:00
53afb1ba10 incl. XFF for qhoneypots, some tweaking 2022-02-11 10:32:31 +00:00
d2e54d5cf0 fix date 2022-02-09 19:26:02 +00:00
2a4fe20b88 work in progress (map, wordpot) 2022-02-09 19:13:18 +00:00
7913e27ee8 Fix signle terraform AWS deployment 2022-02-08 21:21:00 +00:00
6570117603 Fix cloud init script for Bullseye 2022-02-08 21:19:34 +00:00
8a5ccc732f Update ec2_ami map with Debian 11 Bullseye versions 2022-02-07 18:09:37 +00:00
e741f97f9a fix typo 2022-02-07 17:07:17 +00:00
c27c13d617 tweaking 2022-02-07 16:06:09 +00:00
148fd335c5 Blackhole will load automatically, dps.sh will show blackhole status 2022-02-07 15:57:09 +00:00
7465b2b701 Update admin_ip with a default value 2022-02-07 15:20:10 +00:00
3cc90fdf8e tweaking, switch to maltrail mass scanner list 2022-02-07 11:56:31 +00:00
83530588d0 Make a template for deploying T-Pot in multiple regions using terraform 2022-02-07 11:18:07 +00:00
22bfb69f28 blackhole tweaking 2022-02-03 23:32:34 +00:00
278c7aa61a bump elastic stack to 7.17.0 2022-02-02 22:57:50 +00:00
a7dd8b4a42 add option to blackhole mass scanners 2022-02-02 22:51:54 +00:00
58713e9b84 Check if username tpot exists for post install
Abort installation in case the user exists
2022-02-02 00:10:19 +00:00
6aa69e82aa Extending T-Pot ISO Creator by ARM64 architecture
Still needs some finetuning, though :)
2022-02-01 23:16:59 +00:00
b37178ba98 tweaking honeysap, rdpy, editions, installer
move honeysap, rdpy to deprecated as currently no Py3 version available
remove honeysap, rdpy from editions
adjust installer for running on ARM64 (post-install)
2022-01-31 16:59:36 +00:00
778c6c6a70 tweak cyberchef size by removing zip 2022-01-30 01:07:12 +00:00
72289e07d6 tweaking for nginx, cyberchef, elasticvue
create builder for cyberchef and elasticvue based on respective masters
builders will build webapps and copy output to nginx html folder as tgz
some tweaking for elasticvue to properly load original favicon
with cyberchef now run as nginx webapp we gain another 40MB of RAM
while webapps will be built on AMD64 all final docker images can now be built as multi arch images for AMD64 and ARM64
2022-01-30 00:48:10 +00:00
a51744988f adjust editions for new nginx 2022-01-29 00:45:41 +00:00
e6f392a098 Tweaking
Finalize qhoneypots config, thanks to @giga-a for native JSON logging!
Completely rework T-Pot Landing Page based on Bento (https://github.com/migueravila/Bento).
New NGINX image is down by 100MB and only uses 3.3 MB of RAM at runtime.
Keep legacy Sensor option (without logstash).
2022-01-29 00:00:29 +00:00
12a413b4cb replace es-head with elasticvue, tweaking
es-head does not support building with ARM64 and had to be replaced with the even better elasticvue
elasticvue will now run within the nginx container, freeing some RAM :) on the way
2022-01-27 02:39:23 +00:00
6a277fd1e9 dionaea: adjust for multiarch builds 2022-01-24 01:31:31 +00:00
cfcf870da3 elasticsearch, kibana: prep for multiarch, move to ubuntu
heade: alpine 3.15
2022-01-23 21:12:34 +00:00
a507bc5f39 logstash cleanup, prep for multiarch, move to ubuntu
log4pot tweaking
2022-01-23 14:49:07 +00:00
ae18cb592e tweaking, prep for docker buildx 2022-01-22 01:04:21 +00:00
ef31fc155b re-add FROMURL example for Suricata in compose files 2022-01-20 18:34:51 +00:00
3524bafda2 Cleanup, Tweaking
Remove old Sensor Edition and replace with Pot Edition
Rename Pot Edition to new Sensor Edition
POT is now called SENSOR
2022-01-20 18:26:43 +00:00
66b4ef047a bump tanner to latest master, alpine 3.15 2022-01-20 17:47:29 +00:00
2586e10285 Bump Mailoney to Alpine 3.15, reduced to Mailoney Code, no PyPi 2022-01-20 16:31:40 +00:00
602d1cc673 bump Elastic Stack to 7.16.3, change deprecated fields 2022-01-20 10:32:10 +00:00
3542ab728f adjust spiderfoot.db location 2022-01-19 00:56:22 +00:00
22acb6fa84 bump to Alpine 3.15 2022-01-19 00:46:04 +00:00
2a7ff7b3cb update Dockerfiles 2022-01-18 01:10:20 +00:00
889c85e248 update Dockerfiles 2022-01-18 00:50:23 +00:00
d301cf0447 tweaking, remove honeypy => deprecated 2022-01-17 17:45:03 +00:00
c611101987 improve nginx logging 2022-01-17 17:15:04 +00:00
cac7cdcec6 fix data fields with regard to the request field, log4pot, nginx 2022-01-17 17:10:48 +01:00
a07918d149 update log4pot to the latest master 2022-01-17 14:52:32 +00:00
68d6aa4180 fix data fields with regard to the request field, log4pot, nginx 2022-01-17 14:50:50 +00:00
2226780086 Optimize RAM management for Elastic Stack. 2022-01-14 18:08:55 +00:00
007e786221 remove old images via update.sh 2022-01-14 16:57:37 +00:00
f5a400bb0a point editions to 2203 images 2022-01-14 16:24:15 +00:00
0e5986d2df Tweaking
Remove Elasticsearch-Curator in packages, configs and references (BREAKING CHANGE)
Add Index Lifecycle Management in favor of elasticsearch-curator
Point all images to 2203 tags
2022-01-14 15:52:08 +00:00
86479db8af fix packaging 2022-01-14 13:05:05 +00:00
eca395a770 fix packaging 2022-01-14 12:54:53 +00:00
3792a5f6a1 fix packaging 2022-01-14 12:51:15 +00:00
1f96e3ddac adjust packages 2022-01-13 16:41:07 +00:00
8bc6151382 prep dev environment for 22.03 2022-01-13 15:34:50 +00:00
ed79b72869 Update objects for qeeqbox honeypots 2022-01-13 15:22:49 +01:00
e7e521edba tweaking 2022-01-12 01:28:06 +00:00
7d012726b7 tweaking 2022-01-11 15:43:45 +00:00
d6ea4cdde2 prep for elk 8.x, pave way for next t-pot release 2022-01-07 18:03:00 +00:00
f441ec0bfc Merge branch 'master' of https://github.com/telekom-security/tpotce 2022-01-07 15:42:46 +00:00
fb49a77180 tweaking, json_batch transfer to hive 2022-01-07 15:41:57 +00:00
5dc6350106 New objects for next release 2022-01-06 17:47:39 +01:00
202246a3cd tweaking 2022-01-06 16:45:51 +00:00
467dfae320 cleanup, move to correct folders 2022-01-04 18:35:44 +00:00
788a4c4f98 prepare for new attack map feature
tweaking, cleanup
2022-01-04 16:16:27 +00:00
0178b4c4d3 Work in progress!
This is the foundation for the distributed T-Pot feature,
highly work in progress, only works with local docker image builds,
will be available for prod for upcoming T-Pot 22xx.
2022-01-03 18:25:31 +00:00
68b080a3a8 Work in progress!
This is the foundation for the distributed T-Pot feature,
highly work in progress, only works with local docker image builds,
will be available for prod for upcoming T-Pot 22xx.
2022-01-03 18:24:17 +00:00
ef1a1fa057 Merge branch 'master' of https://github.com/telekom-security/tpotce 2021-12-21 11:37:18 +00:00
daf41b4b71 tweaking 2021-12-21 11:36:38 +00:00
0bca794fe7 bump log4pot to latest master
rebuild on ubuntu for payload download support
2021-12-20 18:40:38 +00:00
aaccb43471 bump elk stack to 7.16.2
ELK 7.16.2 includes log4j 2.17.0 to address latest issues
2021-12-20 11:17:18 +00:00
beb9abca16 fixes #973 2021-12-17 02:25:10 +01:00
fb93d85119 Log4Pot Credits, Install Flavor 2021-12-16 23:10:25 +01:00
ceee197e68 Add Kibana Objects for Log4Pot 2021-12-16 21:53:04 +00:00
b0339610a2 Prep for Log4Pot integration 2021-12-16 20:25:40 +00:00
a98b447556 ELK 7.16.1 fixes log4j vulns. 2021-12-13 15:59:48 +00:00
b4c1805551 disable log4j lookups 2021-12-13 10:54:07 +00:00
0ef2e89cac remove log4j JndiLookup Class 2021-12-13 10:35:22 +00:00
b76f0f109f tweaking 2021-12-09 22:17:30 +00:00
5f29516197 tweaking 2021-12-08 23:55:13 +00:00
ff1c12e848 Disable FATT submissions for now 2021-11-30 16:04:58 +01:00
2ee2d08e5a rename 2021-11-20 13:11:12 +00:00
3103c94355 add mini edition 2021-11-20 13:08:35 +00:00
a3be0011fb Merge branch 'master' of https://github.com/telekom-security/tpotce 2021-11-19 23:22:11 +00:00
ce39e1bd4f logstash logging for honeypots 2021-11-19 23:20:13 +00:00
6fb2fa783a update for new honeypots 2021-11-18 21:32:48 +01:00
e76a643296 Update Readme for new honeypots 2021-11-18 20:58:17 +01:00
6c155ad87f add qeeqbox honeypots 2021-11-18 19:55:44 +00:00
81b8242c68 bump ewsposter to latest master 2021-11-18 13:48:02 +00:00
d2cbf6ebbc build fix for tanner 2021-11-18 13:39:05 +00:00
591be0791b Fixes #939
https://stackoverflow.com/questions/28785383/how-to-disable-persistence-with-redis
2021-11-18 13:05:01 +01:00
adee51bee5 bump heralding to latest master 2021-11-16 18:23:25 +00:00
b214db6e9d bump cowrie to 2.3.0, ewsposter to 1.21 2021-11-05 17:43:47 +00:00
2694c05953 Updated Kibana objects for new honeypots 2021-11-02 20:19:02 +01:00
c9b909e51d finetune new honeypots logging 2021-11-02 19:13:28 +00:00
db74c610ad bump hellpot to 0.3 and train config for CVE-2021-39341 2021-11-01 13:36:44 +00:00
ea624351b5 finetuning logstash.conf for new honeypots 2021-10-29 16:28:16 +00:00
c1eb9f7216 logstash parsing for ddospot, hellpot 2021-10-28 18:57:55 +00:00
1a844d13ba start integrating new honeypots into ELK 2021-10-27 16:14:52 +00:00
348a5d572b bump elastic stack to 7.15.1 2021-10-26 13:56:38 +00:00
77dcd771df move debian to ubuntu 20.04 2021-10-05 15:26:02 +00:00
b566b39688 move honeytrap to ubuntu 20.04
thanks to @adepasquale's work
2021-10-04 20:19:40 +00:00
8285657e5d remove snare, tanner from nextgen 2021-10-01 16:26:18 +00:00
dd7fb325b6 add new honeypots to nextgen to prep for ELK setup
honeytrap testing
2021-10-01 16:18:10 +00:00
ab092faa2c prep conpot rebuild 2021-10-01 15:10:37 +00:00
28681ef398 prep heralding rebuild 2021-10-01 14:32:24 +00:00
eefd38a335 bump elastic stack to 7.15.0
no image upgrade before 7.15.1
2021-09-30 20:40:42 +00:00
261b380db7 cleaup fatt, bump suricata to 6.0.3 2021-09-30 19:39:59 +00:00
77e2dd2da6 cleanup spiderfoot, prep fatt rebuild 2021-09-30 19:14:11 +00:00
183136c1f1 bump spiderfoot to v3.4 2021-09-30 17:03:28 +00:00
1fe0247095 prep p0f, medpot for image rebuild 2021-09-30 15:58:10 +00:00
adab02a067 prep for updated nginx image 2021-09-28 19:51:08 +00:00
58aa3162cb prep for ewsposter fix 2021-09-28 15:58:15 +00:00
405ee521a6 prep ubuntu rebuild for honeytrap 2021-09-24 17:09:55 +00:00
9a3465aef1 bump cowrie to latest master, prep for rebuild 2021-09-24 17:03:55 +00:00
e23c57e58d some tests with dionaea 2021-09-24 16:10:14 +00:00
44749fe9e7 bump honeysap to alpine3.11 2021-09-24 15:47:05 +00:00
f5d11bb008 bump snare, tanner, prep for rebuild 2021-09-24 15:18:59 +00:00
efa9d991ba revert honeypy to alpine 2021-09-23 22:28:33 +00:00
a7faafeba9 test mailoney 2021-09-23 21:50:37 +00:00
f05abc07c9 cleanup 2021-09-23 21:20:25 +00:00
eeae863820 revert to alpine 2021-09-23 21:11:24 +00:00
9f9d1a65bd debian test 2021-09-23 20:53:38 +00:00
a48840d1b2 prep rdpy for debian rebuild 2021-09-23 20:15:33 +00:00
48de3d846c fix typo in crontab 2021-09-23 10:00:20 +00:00
122135dd80 prepare rebuilding dicompot 2021-09-20 21:57:39 +00:00
8576e576a6 prep mailoney for rebuild 2021-09-20 20:20:04 +00:00
32e1e8a8ea prep for rebuilding ciscoasa, elasticpot, honeypy 2021-09-20 16:08:16 +00:00
ed224215a4 tweak cyberchef image for better security, prep citrixhoneypot for rebuild 2021-09-20 14:29:42 +00:00
e9c03e512c prep rebuild for adbhoney, cyberchef 2021-09-20 09:15:28 +00:00
ed0c5aa89f add logstash-output-gelf, fixes #861 2021-09-15 17:39:04 +00:00
d5290e68ff Update Kibana objects 2021-09-15 18:00:56 +02:00
9de1bdd0b5 tweaking, bump elastic stack to 7.14.1, rebuild dashboards 2021-09-15 15:58:44 +00:00
00457b8b70 Merge pull request #887 from shaderecker/ansible
Minor Ansible improvements
2021-09-02 09:50:56 +02:00
e26600ad75 Minor Ansible improvements 2021-09-01 21:55:22 +02:00
310f560c65 Update credts and licenses 2021-08-26 15:14:04 +02:00
06ef8850fe prep for ELK 7.13.4, start full integration of new honeypots 2021-08-25 15:04:27 +00:00
05a7d33c9f add paths, logrotate settings, cleaner settings for new honeypots 2021-08-24 11:51:01 +00:00
baaba5311a Merge pull request #881 from brianlechthaler/patch-5
🔄 🇯🇵 Update AMIs & add region ap-northeast-3
2021-08-24 12:40:48 +02:00
35014a15ca 🔄 🇯🇵 Update AMIs & add region ap-northeast-3
This commit updates all AMIs to debian-10-arm64-20210721-710, and add the AWS region 🇯🇵 ap-northeast-3 (Osaka, Japan) to the list.
2021-08-21 14:14:09 -07:00
2aa4c3c2c6 disable ntp server on host, start working on ddospot 2021-07-09 23:16:19 +00:00
0867d8f011 prep for redishoneypot 2021-07-05 19:59:44 +00:00
a2071eb4d2 hellpot cleanup and prep for endlessh 2021-07-03 15:51:32 +00:00
e6402b793c start including hellpot 2021-07-02 22:12:47 +00:00
4cb84166c5 bump ewsposter to 1.2.0, elk stack to 7.13.2 2021-06-28 16:30:40 +00:00
b6be931641 prep for new ewsposter, rollout to follow next week 2021-06-24 16:26:53 +00:00
f51ab7ec0f prepare to bump elastic stack to 7.13.1 2021-06-10 17:03:22 +00:00
f22ec3a360 Merge branch 'master' of https://github.com/telekom-security/tpotce 2021-05-26 11:01:47 +00:00
de38e5e86f Rebuild Logstash, Elasticsearch
Setting static limits for Elasticsearch / Logstash on Xms, Xmx and Container RAM results in unwanted side effects for some installations. With Elastic supporting dynamic heap management for Java 14+ we now use OpenJDK 16 JRE and as such remove limitations. This should improve stability for T-Pot, provided the minimum requirements will be met.
2021-05-26 11:00:49 +00:00
bd9cb43960 Merge pull request #837 from shaderecker/terraform
Terraform improvements
2021-05-19 16:05:01 +02:00
7763ceff4c Test connection before git clone
Test the connection to github before cloning the repository.
Previously it could happen that the git clone failed due to the external network connection not being established immediately after boot.
2021-05-19 15:57:30 +02:00
0e1a86f93b Use b64_url for eip bandwidth name
Missed this one in #819
2021-05-19 14:28:40 +02:00
0f0c728c90 Merge pull request #836 from shaderecker/tf-disk
TF: Use SAS disk on OTC
2021-05-18 17:03:42 +02:00
16d5a6e0c1 Use SAS disk 2021-05-18 16:49:56 +02:00
0c5ab33b8a bump elastic stack to 7.12.1 2021-05-17 16:32:03 +00:00
cd91183b8b Prep obejcts for 7.12.1 2021-05-12 15:38:04 +02:00
12c4308b89 Merge pull request #818 from trixam/suricata-updatescript
Update update.sh
2021-05-03 14:43:01 +02:00
bbf5d70d98 Update sensor.yml 2021-05-03 14:42:39 +02:00
60e57bce52 Update update.sh
Adding quotation marks for $URL
2021-05-03 14:40:08 +02:00
460214f848 Update sensor.yml 2021-05-03 14:37:52 +02:00
334b98c01b Merge pull request #819 from shaderecker/tf-ecs-name
Terraform: Use b64_url for ecs name
2021-04-26 11:34:07 +02:00
0493e5eb3d Use b64_url for ecs name
Previously it could happen that special characters were generated in the name.
Now it allows only letters, digits, underscore & hyphen to conform with ecs naming requirements.
2021-04-26 11:31:47 +02:00
dceaa984c9 Update update.sh
Download rules via URL
2021-04-21 12:44:36 +02:00
8abd1be5bb Merge pull request #815 from shaderecker/cloud-updates
Cloud updates (Ansible & Terraform)
2021-04-15 17:35:57 +02:00
d0cc43e89e Ansible: Create VM: Use default timeout and explicitly declare auto_ip 2021-04-15 17:00:13 +02:00
8c19ea68c8 Ansible: Use OTC nameservers for subnet 2021-04-15 16:58:56 +02:00
0649d56521 Improve Ansible resource naming 2021-04-15 16:58:19 +02:00
628ea0224c Update Terraform readme 2021-04-15 16:34:52 +02:00
c9ec5347d5 TF: Formatting 2021-04-15 16:23:49 +02:00
de3d7c7f4f TF: Check input variables also for AWS 2021-04-15 16:22:55 +02:00
b0ea90c65b TF: Rework ECS and EIP setup 2021-04-15 16:18:17 +02:00
0c7d0d0eaa TF: Check if input variables are defined 2021-04-15 15:16:33 +02:00
aec0761580 TF: More formatting 2021-04-15 14:59:03 +02:00
77e0b8c313 Update provider versions 2021-04-15 14:51:12 +02:00
c659572df1 TF: Formatting 2021-04-15 14:44:55 +02:00
37120a7324 Update gitignore 2021-04-15 12:37:30 +02:00
532907c27c rebuild honeytrap 2021-02-25 11:57:16 +00:00
fb860fb861 fix protocols for conpot testing 2021-02-25 11:55:51 +00:00
1c7e5274aa fix protocols for conpot
fixes #781
2021-02-25 11:32:59 +00:00
7587efaed8 cleanup 2021-02-22 11:21:18 +00:00
f7d696007c Release 20.06.2 2021-02-22 10:51:51 +00:00
46e297386b Update CHANGELOG.md 2021-02-19 15:55:22 +01:00
7d423f29da rebuild snare, tanner, redis, phpox 2021-02-19 13:02:08 +00:00
41c0255ea6 Add Elastic License info 2021-02-19 10:21:53 +00:00
d5f0ceb15b push elastic stack to 7.11.1 2021-02-19 10:17:30 +00:00
5f38e730d4 rebuild conpot for latest alpine edge, bump to latest master 2021-02-18 17:39:52 +00:00
c48ad0863d bump ewsposter to latest master 2021-02-18 16:52:43 +00:00
4bc2b1bf03 rebuild cowrie for alpine 3.13 2021-02-18 16:38:35 +00:00
3d123f35a4 rebuild glutton for alpine 3.13, update to latest master 2021-02-18 11:12:21 +00:00
d4519892f6 rebuild dionaea 2021-02-18 10:37:17 +00:00
0aa1a05c92 enable smtps for heralding 2021-02-16 17:14:56 +00:00
69c535619d bump heralding to 1.0.7 and rebuild for alpine 1.13 2021-02-16 16:59:17 +00:00
5fe59c3bd8 rebuild ipphoney for alpine 3.13 2021-02-16 16:14:37 +00:00
d8d0a6f190 rebuild fatt for alpine 3.13 2021-02-16 13:27:56 +00:00
4d407b420d rebuild ewsposter for alpine 3.13 2021-02-16 13:15:26 +00:00
181e3585b7 bump spiderfoot to 3.3 and rebuild for alpine 3.13 2021-02-16 11:01:43 +00:00
2597af73ee rebuild dicompot for alpine 3.13 2021-02-15 12:34:11 +00:00
0ab220ebf0 rebuild p0f for alpine 3.13 2021-02-15 12:12:24 +00:00
2777fc1f41 rebuild medpot for alpine 3.13 2021-02-15 12:09:19 +00:00
91483a231d rebuild honeysap 2021-02-15 11:46:55 +00:00
95ea079f4d rebuild heimdall, nginx for php7.4, alpine 3.13 2021-02-15 11:00:00 +00:00
8112f48270 rebuild elasticpot for alpine 3.13 2021-02-15 10:14:52 +00:00
898f8be4db rebuild citrixhoneypot for alpine 3.13 2021-02-15 10:05:29 +00:00
a28ee97f13 rebuild ciscoasa for alpine 3.13 2021-02-15 10:01:03 +00:00
b01bf50aaf Merge pull request #769 from shaderecker/ansible
Ansible updates
2021-02-15 10:12:14 +01:00
86cc54ee88 Update README.md 2021-02-13 20:39:32 +01:00
2fb1967ef1 Update README.md 2021-02-13 20:16:34 +01:00
48e02ceb1c Allow for creation of multiple T-Pots 2021-02-13 20:12:58 +01:00
c014e9635d Update README.md 2021-02-13 19:03:56 +01:00
ca4946c87c Update gitignore 2021-02-13 18:58:42 +01:00
9ff9c3c4df Merge branch 'ansible' of github.com:shaderecker/tpotce into ansible 2021-02-13 18:29:45 +01:00
423914f63f Unify cloud parameter 2021-02-13 18:29:27 +01:00
f6db541293 Update README.md 2021-02-13 18:20:01 +01:00
efb51f8233 Add collection requirements 2021-02-13 18:04:23 +01:00
acc64c2771 Fix name 2021-02-13 17:52:18 +01:00
780acd0384 Fix name 2021-02-13 17:47:48 +01:00
b014f73045 Use FQCNs 2021-02-13 17:46:28 +01:00
bb8d2f27c6 Split network and vm creation into own roles 2021-02-13 17:22:49 +01:00
487c091ba7 Use ansible internal tools to generate random name 2021-02-13 15:36:39 +01:00
c3ebf8487b Lowercase group names 2021-02-13 15:27:36 +01:00
51b15b6510 Update docu links 2021-02-13 15:04:50 +01:00
f2c48d7efc bump cyberchef to latest release 2021-02-12 17:09:44 +00:00
039f3c115a update adbhoney image 2021-02-12 14:21:31 +00:00
80d9efa729 bump elk stack images to alpine 3.13 2021-02-12 13:54:42 +00:00
e5f29f3c90 bump elk stack to 7.11.0 2021-02-12 13:21:35 +00:00
01af362ff6 Merge pull request #764 from shaderecker/terraform-otc
OTC: Retrieve Debian Image ID from Terraform Data Source
2021-02-05 16:59:50 +01:00
98c7dd17d7 OTC: Retrieve Debian Image ID from Terraform Data Source 2021-02-05 16:07:53 +01:00
70c152377d Merge pull request #763 from shaderecker/terraform-otc
Terraform updates
2021-02-05 11:54:31 +01:00
b214bed014 Merge branch 'master' into terraform-otc 2021-02-04 22:57:41 +01:00
bde60734ea Update variables.tf
- Latest Debian 10.7 AMIs (https://wiki.debian.org/Cloud/AmazonEC2Image/Buster?action=recall&rev=21)
- Add MEDICAL
2021-02-04 22:51:01 +01:00
362dd75473 Add provider constraints and dependency lock file 2021-02-04 22:29:02 +01:00
a7be2ca0a8 Cosmetics 2021-02-04 22:23:09 +01:00
da81f12877 Update variables.tf
- Update flavor to newest s3 generation
- Update to latest OTC Debian 10 image
- Add MEDICAL
2021-02-04 22:08:22 +01:00
4e8a1e8ea9 TF 0.14: Add dependency lock file 2021-02-04 22:00:40 +01:00
1b386ed32f Update providers and add version constraints 2021-02-04 21:59:49 +01:00
5a65ceb5b5 b64 is deprecated, switch to b64_std for newer version 2021-02-04 21:57:50 +01:00
c60d53ca3f Merge pull request #754 from shaderecker/cloud-region
Explicitly add region name to clouds.yaml
2021-01-26 16:38:41 +01:00
e7a41feef4 Explicitly add region name 2021-01-26 16:24:09 +01:00
ee3d667615 bump dionaea to 0.11.0 2021-01-19 10:59:32 +00:00
df27ba4e5f Merge pull request #750 from shaderecker/patch-2
Update Ansible Docu
2021-01-14 09:43:29 +01:00
459db01e23 Update Ansible Docu
Add disclaimer about Ansible 2.10 & how to install with pip
2021-01-13 23:53:39 +01:00
f767179cc9 Merge pull request #749 from shaderecker/pip3
Ansible: Set pip executable to pip3
2021-01-12 17:14:46 +01:00
749e7ee246 Set to pip3 to avoid Python Autodiscovery 2021-01-12 17:04:03 +01:00
3a7eda96fa Merge pull request #747 from shaderecker/patch-1
Add MEDICAL to tpot.conf.dist
2021-01-08 12:02:23 +01:00
43ae92cf44 Remove redundant tpot.conf.dist file content 2021-01-08 11:34:03 +01:00
2fb51f3b3a Add MEDICAL to tpot.conf.dist 2021-01-08 11:31:58 +01:00
d2dc43e1ef Update internet IF retrieval
To be consistent with @adepasquale PR #746 fatt, glutton and p0f Dockerfiles were updated accordingly.
2021-01-06 17:05:09 +00:00
db73a0656e Merge pull request #746 from adepasquale/master
Change method to get default Suricata interface

@adepasquale Thanks again!
2021-01-06 17:45:32 +01:00
b3b983afe6 Change method to get default Suricata interface
On some systems, interface number 2 is not always the correct one.
With AWK we now collect the first active interface having both an
address and a broadcast.
2021-01-06 11:14:24 +01:00
273cab4759 Update general-issue-for-t-pot.md 2021-01-05 16:03:42 +01:00
e1745bdea1 fix broken sqlite db 2020-12-28 21:49:28 +00:00
c34570f665 remove docker parallel pulls 2020-12-28 20:54:09 +00:00
020cbb5355 avoid ghcr.io because of slow transfers 2020-12-28 20:37:47 +00:00
aea14c9ead docker pull background 2020-12-28 17:46:05 +00:00
b57f6ddd1e remove netselect-apt
causes too many unpredictable errors
#733 as the latest example
2020-12-28 10:40:19 +00:00
af6ce8854d bump elastic stack to 7.10.1 2020-12-10 15:20:18 +00:00
6069b214a5 bump ewsposter to 1.12 2020-12-10 11:40:53 +00:00
252051dfe7 Merge pull request #731 from shaderecker/patch-1
More Python 3 stuff
2020-12-04 15:41:27 +01:00
f9fa1bcc74 Fix setup on Debian
On Debian there are not the same preinstalled packages as on Ubuntu.
Fix the compilation of netifaces, which requires gcc and python3-dev.
2020-12-04 14:42:32 +01:00
f3f9f6ae72 cleanup 2020-12-03 00:01:38 +00:00
bdf095367d prep for ewsposter 1.11 2020-12-02 23:21:23 +00:00
4abb0e5ce6 Missed this one
Python 3 is our friend :D
2020-12-02 23:56:54 +01:00
ba87ebfdaa update objects for Elastic Stack 7.10.0 2020-12-02 22:54:54 +00:00
8a7e81815e prep for Elastic Stack 7.10.0 2020-12-02 22:36:17 +00:00
17eff81e9c Merge pull request #728 from shaderecker/patch-1
Update pip dependency to Python3
2020-11-30 20:06:05 +01:00
f8f1bc1757 Merge pull request #727 from adepasquale/suricata-update
Suricata: use suricata-update for rule management
2020-11-30 20:05:24 +01:00
87a27e4f2b Suricata: use suricata-update for rule management
As a bonus we can now run "suricata-update" using docker-exec,
triggering both a rule update and a Suricata rule reload.
2020-11-30 17:56:14 +01:00
7f8f3a01c3 Update pip dependency to Python3 2020-11-30 17:27:28 +01:00
2ecef8c607 enable MQTT
as eagle eyed by @adepasquale
2020-11-27 19:07:12 +01:00
d992a25a0a Merge pull request #726 from adepasquale/suricata-yaml-6.0.x
Suricata: update suricata.yaml config to 6.0.x
2020-11-27 18:55:57 +01:00
73a5847753 Suricata: update suricata.yaml config to 6.0.x
Merge in the latest updates from suricata-6.0.x while at the same time
keeping the custom T-Pot configuration.

https://github.com/OISF/suricata/blob/suricata-6.0.0/suricata.yaml.in
2020-11-26 19:16:01 +01:00
c976aea73e Merge pull request #725 from adepasquale/suricata-yaml-5.x
Suricata: update suricata.yaml config to 5.x
2020-11-26 16:23:50 +01:00
4ada38988c bump cowrie to 2.2.0 2020-11-26 08:17:09 +00:00
0010f99662 Suricata: disable eve.stats since it's unused
Prevent the error below by disabling stats globally and in eve-log:

<Error> - [ERRCODE: SC_ERR_STATS_LOG_GENERIC(278)] - eve.stats: stats are disabled globally: set stats.enabled to true.
2020-11-25 17:07:49 +01:00
e2f76c44cb Suricata: update suricata.yaml config to 5.x
Merge in the latest updates from suricata-5.x while at the same time
keeping the custom T-Pot configuration.

https://github.com/OISF/suricata/blob/master-5.0.x/suricata.yaml.in
2020-11-25 15:51:41 +01:00
e26853c7fa bump suricata to 5.0.4 2020-10-28 17:53:23 +00:00
d64cbe6741 bump ipphoney to latest master 2020-10-28 17:34:28 +00:00
c3809b5a98 bump heralding to latest master 2020-10-28 17:27:09 +00:00
a3d40cc57c bump spiderfoot to 3.2.1 2020-10-28 17:08:55 +00:00
e3fda4d464 bump dionaea to 0.9.2 2020-10-28 16:45:53 +00:00
4bf245d13b bump conpot to latest master 2020-10-28 13:56:52 +00:00
92925cecbd bump dicompot to latest master 2020-10-27 21:30:33 +00:00
f204cdf9b8 bump elk to 7.3 2020-10-27 19:43:32 +00:00
ff4a394e3b reverting elk to 7.9.1 2020-10-15 12:24:46 +00:00
ce7b79b71a Merge pull request #707 from brianlechthaler/patch-3
Bump Elastic dependencies to 7.9.2
2020-10-15 13:37:11 +02:00
b28cc2edd0 prepare for new ewsposter 2020-10-15 09:14:30 +00:00
84a741ec64 IMPORTANT: Fix Node Version
Bump node version to `10.22.1-alpine`

**KIBANA WILL NOT WORK WITHOUT THIS**
2020-10-07 13:53:21 -07:00
6b37578d8d Merge pull request #706 from brianlechthaler/patch-2
Debian 10.6 AMI + Add AWS Regions
2020-10-07 14:28:19 +02:00
d351a89096 Bump Kibana version to 7.9.2 2020-10-04 18:05:16 -07:00
488da48df7 Bump Logstash version to 7.9.2 2020-10-04 18:04:15 -07:00
85da099cd0 Bump Elasticsearch to 7.9.2 2020-10-04 18:03:00 -07:00
bd8a9ca92d Debian 10.6 AMI + Add AWS Regions
# Changes:
1) 🇿🇦 Add AWS Capetown, South Africa Region (`af-south-1`)
2) 🇮🇹 Add AWS Milan, Italy Region (`eu-south-1`)
3) Bump all AMIs to Debian Buster 10.6

# References:
1) Debian 10 (Buster) Wiki Article on Official EC2 Images: https://wiki.debian.org/Cloud/AmazonEC2Image/Buster?action=recall&rev=16
2) For information on Debian 10.6, see: https://www.debian.org/News/2020/20200926
3) Official AWS Documentation on Regions and Zones can be found here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html
2020-10-03 22:22:57 -07:00
1afbb89ef4 Merge pull request #691 from brianlechthaler/patch-1
Update Suricata Capture Filter for New Docker Repo
2020-09-08 20:08:28 +02:00
b1d8e293de add DockerHub back in cap filter
see https://github.com/telekom-security/tpotce/pull/691#issuecomment-688648225
2020-09-08 10:45:58 -07:00
7fdf9edb60 Update Suricata Capture Filter for New Docker Repo 2020-09-07 19:57:15 -07:00
0e7abb8d2c restore mibfix for conpot 2020-09-07 15:46:52 +00:00
2bac239763 fix version string for update check 2020-09-04 18:59:15 +02:00
a90f135f06 Merge pull request #690 from telekom-security/ghcr
Move to GitHub Container Registry, Cleanup, Bump ELK stack to 7.9.1
2020-09-04 18:55:54 +02:00
adee659baa Add files via upload 2020-09-04 18:54:40 +02:00
1e8f6305c9 adjust changelog 2020-09-04 16:40:51 +00:00
38b792a06e prepare ghcr for merge 2020-09-04 16:27:05 +00:00
1ee9c29805 set new container registry, point installer to branch 2020-09-04 13:29:14 +00:00
2e5639a50b fix links 2020-09-04 13:01:21 +00:00
47dca8b835 continue pin / prep images ghcr 2020-09-04 12:37:28 +00:00
1ac79d6be7 begin prep for move to GitHub Container Registry
Start pinning Dockerfiles to specific releases / commits
2020-09-02 15:18:32 +00:00
9a7f55bb52 Merge pull request #687 from shaderecker/terraform-otc
Update Terraform config for 0.13
2020-08-26 12:14:17 +02:00
42852a85ea Update README.md 2020-08-26 11:46:16 +02:00
c33229b53a Fix variable typo 2020-08-26 11:45:17 +02:00
840662da48 Update OTC Debian 10 base image id 2020-08-26 11:21:55 +02:00
d8f14d9c9f AWS: Update required_providers for Terraform 0.13 2020-08-26 11:04:34 +02:00
72e4134c86 OTC: Update required_providers for Terraform 0.13 2020-08-26 10:59:39 +02:00
5b1e07b9c8 finalize objects for ipphoney 2020-08-25 16:12:29 +00:00
2be185a371 add kibana objects for ipphoney 2020-08-25 15:08:28 +00:00
54a6a944aa prep for ipphoney 2020-08-25 12:25:59 +00:00
b86d2c715b prep for ipphoney 2020-08-24 21:36:08 +00:00
8f06b5b499 start prepping for ipphoney 2020-08-24 15:55:50 +00:00
6ec5a04802 fix deps issue with conpot 2020-08-24 15:55:10 +00:00
5080151b7c prep for elk 7.9 2020-08-24 10:35:46 +00:00
c1f7146800 prep elk stack for 7.9.0 2020-08-20 15:03:16 +00:00
743616fa09 update conpot to latest working master 2020-08-13 16:30:37 +00:00
6e18b6f660 bump elasticpot to latest master 2020-08-13 10:37:03 +00:00
50d67fc286 bump spiderfoot to 3.1 final
Fix Spiderfoot issue not showing current scan
2020-08-13 09:06:49 +00:00
c28642932a bump elk stack to 7.8.1 2020-08-13 08:34:44 +00:00
969e269bd1 improve cowrie dashboard, fixes #664 2020-07-09 15:11:32 +00:00
8af45c9440 prevent cowrie from unwanted log rotation 2020-07-07 00:00:57 +00:00
6d29f504df provide fix for #669 2020-07-06 23:30:11 +00:00
9b7f100f74 Add testimonial from @robcowart 2020-07-01 11:53:38 +02:00
e1485bfd04 Merge pull request #663 from dtag-dev-sec/dev
fix crontab
2020-06-30 18:34:34 +02:00
31c6bc6f96 fix crontab 2020-06-30 16:31:22 +00:00
3badae587c Release T-Pot 20.06.0
# Release Notes

## Upgrade from 19.03.x
- If you are running T-Pot 19.x you can upgrade to T-Pot 20.06.0 by running `/opt/tpot/update.sh`. Please be aware upgrades can break things, so please backup all of your data or take snapshot of your machine **before** you run the update procedure.
- To protect possible changes of your Kibana objects you need to manually [export](https://github.com/dtag-dev-sec/tpotce/wiki/Import---Export-Kibana-Objects) (backup) your objects and manually [import](https://github.com/dtag-dev-sec/tpotce/wiki/Import---Export-Kibana-Objects) (overwrite) the provided T-Pot Kibana Objects after upgrading.

## Changelog
- **Release T-Pot 20.06.0**
  - After 4 months of public testing with the NextGen edition T-Pot 20.06 can finally be released.
- **Debian Buster**
  - With the release of Debian Buster T-Pot now has access to all packages required right out of the box.
- **Add new honeypots**
  - [Dicompot](https://github.com/nsmfoo/dicompot) by @nsmfoo is a low interaction honeypot for the Dicom protocol which is the international standard to process medical imaging information. Together with Medpot which supports the HL7 protocol T-Pot is now offering a Medical Installation type.
  - [Honeysap](https://github.com/SecureAuthCorp/HoneySAP) by SecureAuthCorp is a low interaction honeypot for the SAP services, in case of T-Pot configured for the SAP router.
  - [Elasticpot](https://gitlab.com/bontchev/elasticpot) by Vesselin Bontchev replaces ElasticpotPY as a low interaction honeypot for Elasticsearch with more features, plugins and scripted responses.
- **Rebuild Images**
  - All docker images were rebuilt based on the latest (and stable running) versions of the tools and honeypots. Mostly the images now run on Alpine 3.12 / Debian Buster. However some honeypots / tools still reuire Alpine 3.11 / 3.10 to run properly.
- **Install Types**
  - All docker-compose files (`/opt/tpot/etc/compose`) were remixed and most of the NextGen honeypots are now available in Standard.
  - There is now a **Medical** Installation Type with Dicompot and Medpot which will be of most interest for medical institutions to get started with T-Pot.
- **Update Tools**
  - Connecting to T-Pot via `https://<ip>:64297` brings you to the T-Pot Landing Page now which is based on Heimdall and the latest NGINX enforcing TLS 1.3.
  - The ELK stack was updated to 7.8.0 and stripped down to the necessary core functions (where possible) for T-Pot while keeping ELK RAM requirements to a minimum (8GB of RAM is recommended now). The number of index pattern fields was reduced to **697** which increases performance significantly. There are **22** Kibana Dashboards, **397** Kibana Visualizations and **24** Kibana Searches readily available to cover all your needs to get started and familiar with T-Pot.
  - Cyberchef was updated to 9.21.0.
  - Elasticsearch Head was updated to the latest version available on GitHub.
  - Spiderfoot was updated to latest 3.1 dev.
- **Landing Page**
  - After logging into T-Pot via web you are now greeted with a beautifully designed landing page.
- **Countless Tweaks and improvements**
  - Under the hood lots of tiny tweaks, improvements and a few bugfixes will increase your overall experience with T-Pot.
2020-06-30 17:27:07 +02:00
530564fb3f stage updater 2020-06-30 15:21:09 +00:00
7f0a191530 stage 2020-06-30 13:04:15 +00:00
3c32c9ca88 fix install error 2020-06-30 12:04:12 +00:00
04e3748781 add medical to installer, remove git clone from iso image 2020-06-30 11:22:21 +00:00
77d21d9e65 update changelog 2020-06-30 09:48:05 +00:00
47c5a7bcef fix link 2020-06-30 07:56:22 +00:00
3873b8d6e4 Add Medical Edition to README, cleanup 2020-06-30 07:32:08 +00:00
1d0e502b78 fix link 2020-06-29 15:18:13 +00:00
e4ef35f3f7 tweaking, update docs
remix sensor installation type
update docs, README and screenshots
2020-06-29 15:14:36 +00:00
6c8acb36fb preinstall cockpit-docker again 2020-06-29 12:01:08 +00:00
8bfc64a945 add medical edition
add compose file for medical edition
2020-06-29 11:36:49 +00:00
618ee3c6e9 tweaking
add kibana export / import config function
ewsposter remove transmitting old elasticpot data (need update)
final export of all objects
2020-06-29 10:45:33 +00:00
3a418534d8 tweaking
random reboot times for crontab
remix compose files
some tweaking
2020-06-28 20:03:14 +00:00
4e6510b5c7 dicompot tweaking 2020-06-27 00:37:12 +00:00
16a7cdb975 tweaking
Update logstash config for new Dicompot fields
Revert Dionaea back to 0.8.0, latest master was unstable
2020-06-26 23:48:48 +00:00
6419f4d521 restrict dionaea to networks local again 2020-06-26 16:34:40 +00:00
0031980416 cleanup and prepare for docker image rebuilds 2020-06-26 14:34:05 +00:00
6a98496e8c cleanup and prepare for docker image rebuilds 2020-06-25 22:58:23 +00:00
ec8f5d9b66 cleanup and prepare for docker image rebuilds 2020-06-25 16:14:37 +00:00
da7d095d6f tweaking
finish dashboards
optimize mappings
create viz for dicompot, honeysap
create searches for dicompot, honeysap
some clean up
2020-06-24 18:20:13 +00:00
238a08b055 tweaking
cleanup index-pattern
add dicompot log to logstash
2020-06-24 13:21:29 +00:00
99d8cf9b32 fix for query fields 2020-06-24 10:22:09 +00:00
81c6351cf1 fix for keeping daily index 2020-06-23 21:40:38 +00:00
39c0abb92e add dicompot to logrotate 2020-06-21 21:12:15 +00:00
65e849cf33 bump elk stack to 7.8 2020-06-21 21:11:21 +00:00
a396356785 add honeysap logstash config 2020-06-19 22:53:56 +00:00
6ab87e684a update readme for honeysap 2020-06-19 11:58:30 +00:00
a7c653e7fe start integrating honeysap 2020-06-19 11:54:50 +00:00
5a479b0d8e fix path 2020-06-18 16:45:07 +00:00
697c5cb3f6 begin integration of dicompot 2020-06-18 16:38:43 +00:00
2882668826 Add a new elasticsearch honeypot
adjust installer
adjust elasticpot configs to T-Pot's environment
create Dockerfile
adjust logstash config
update Readme
2020-06-17 18:09:59 +00:00
739c7c1154 update ascii logo version 2020-06-16 16:32:34 +00:00
66d9005c61 establish base for kibana objects 2020-06-16 15:46:06 +00:00
d1dd805f80 rebuild compose files 2020-06-16 12:55:45 +00:00
27a5db9edf alpine 3.11 needs py3-pip in extra package 2020-06-16 11:28:56 +00:00
77ddb68413 begin integration for 20.06
change version string
change compose files
clone from dev for testing
2020-06-16 09:43:33 +00:00
0aaf73e205 Merge pull request #652 from dtag-dev-sec/dev
tweaking
2020-06-09 21:10:17 +02:00
dc1ec0f48c tweaking
fix typo
get rid of npm error in update.sh
2020-06-09 19:08:21 +00:00
1e06136016 Merge pull request #651 from dtag-dev-sec/dev
merge dev to master
2020-06-09 20:26:57 +02:00
4cc1aa08c2 tweaking
Bump ELK stack to 7.7.1
Install curator via pip
Some tweaks
2020-06-08 21:56:16 +00:00
be918033e0 bump to ELK 7.7.0 2020-05-14 16:27:57 +00:00
f502b6876a installer avail check for listbot 2020-05-12 11:58:29 +00:00
cd973301fd Merge pull request #637 from dtag-dev-sec/dev
Dev
2020-05-12 11:26:00 +02:00
680194adf7 prep for new listbot FQDN 2020-05-12 09:19:09 +00:00
be7afd8042 Merge pull request #636 from dtag-dev-sec/master
merge master to dev
2020-05-12 10:31:34 +02:00
fea6b8a646 correct typo
fixes #635
2020-05-11 17:21:22 +02:00
cbefe6a074 Update capture-filter.bpf 2020-04-22 17:49:59 +02:00
ed73d83317 Update update.sh 2020-04-22 17:48:32 +02:00
34bbbf59ac Update Dockerfile 2020-04-22 17:16:19 +02:00
a6c8d3d712 Update Dockerfile 2020-04-22 17:15:44 +02:00
1a7b3b3795 Load listbot data from OTC 2020-04-22 16:50:41 +02:00
2f9648d1f6 Merge pull request #617 from dtag-dev-sec/master
master to dev
2020-04-22 16:48:19 +02:00
75c1b253e5 Update issue templates 2020-04-22 16:47:32 +02:00
46707683c7 Delete ISSUE_TEMPLATE.md 2020-04-22 15:39:21 +02:00
349f6ed6a9 Update issue templates 2020-04-22 15:37:55 +02:00
489de1854a Merge pull request #609 from dtag-dev-sec/dev
CDN, ELK
2020-04-08 16:12:02 +02:00
73e1842c16 offload listbot from netlify CDN 2020-04-02 13:12:11 +00:00
e8af9a0aa7 Merge pull request #605 from dtag-dev-sec/master
update from master
2020-04-02 14:31:34 +02:00
be1a90524a Merge pull request #602 from shaderecker/terraform-otc
Terraform OTC
2020-03-27 17:38:46 +01:00
bde3d5df29 Update README.md 2020-03-27 17:00:26 +01:00
bedd13af20 Update README.md 2020-03-27 11:36:28 +01:00
63131b6712 Update README.md 2020-03-27 09:08:18 +01:00
78587cb85c Update README.md 2020-03-27 08:45:35 +01:00
6b77862e5c Update README.md 2020-03-27 08:44:57 +01:00
4db8f60ddf Update README.md 2020-03-27 08:42:53 +01:00
3d217d1eaf Update README.md 2020-03-26 18:41:05 +01:00
7191beaa68 Merge pull request #598 from dtag-dev-sec/master
merge to dev
2020-03-25 19:03:53 +01:00
7b081d164f Merge pull request #597 from shaderecker/terraform-aws
Update AWS Terraform
2020-03-25 16:08:07 +01:00
f69455a3b0 Add Open Telekom Cloud Terraform Deployment 2020-03-25 16:03:10 +01:00
2acd5da25b Merge pull request #595 from shaderecker/aws-ami
Update AWS AMIs
2020-03-25 14:19:26 +01:00
a73f34490d Update AWS Terraform
- Add variables to cloud-init.yaml
- Allow to set Linux OS password via cloud-init
- Pass the tpot.conf file as inline content to allow variables
- Remove obsolete tpot.conf file in terraform/ directory
2020-03-25 13:34:22 +01:00
435e8c2034 Update AWS AMIs
https://wiki.debian.org/Cloud/AmazonEC2Image/Buster
2020-03-25 11:51:53 +01:00
f73ca5b328 Merge pull request #592 from shaderecker/master
Ansible: Use clouds.yaml
2020-03-23 10:43:14 +01:00
f606187350 Update README.md 2020-03-22 02:29:50 +01:00
7815f4e8e4 Fix some ansible-lint errors 2020-03-22 00:50:24 +01:00
f5b097b19a Switch to clouds.yaml file for authentication and use Open Telekom Cloud Vendor profile 2020-03-22 00:34:10 +01:00
e588e62815 Update README.md 2020-03-16 16:38:39 +01:00
20cdb4f454 Update CHANGELOG.md 2020-03-16 16:29:39 +01:00
9d7b37b126 Merge pull request #585 from dtag-dev-sec/dev
Prepare release 19.03.3
2020-03-16 16:18:23 +01:00
62aae45dd6 prepare for release 19.03.3 2020-03-16 15:01:18 +00:00
21d48ca2bb remove honeysap for testing 2020-03-15 21:55:10 +00:00
80ee3cc5dd update elasticdump install location 2020-03-15 21:24:01 +00:00
67e70780bf tweaking for testing 2020-03-15 21:10:28 +00:00
5bbebd6fc4 Merge pull request #583 from dtag-dev-sec/t3chn0m4g3-patch-1
t3chn0m4g3 patch 1
2020-03-15 21:32:35 +01:00
cc70144c41 Update version 2020-03-15 21:29:10 +01:00
140a3d22ac Update update.sh 2020-03-15 21:28:46 +01:00
6a1f4f9aea Update update.sh 2020-03-15 21:27:33 +01:00
4409d9cdac Update tpot.seed 2020-03-15 21:25:44 +01:00
1452ca4e4c Update install.sh 2020-03-15 21:24:42 +01:00
313df2f644 Merge pull request #582 from dtag-dev-sec/master
sync
2020-03-15 21:20:57 +01:00
f6503cce3c Update update.sh 2020-03-15 21:13:07 +01:00
5badf352be deal with changes in sid
move to testing
cockpit-docker removed upstream, remove here
2020-03-15 21:11:26 +01:00
2201e072f6 testing honeysap 2020-03-12 16:02:43 +00:00
5192ce1dc7 Merge pull request #578 from dtag-dev-sec/dev
get top 100 src_ip's
2020-03-11 14:56:37 +01:00
5319c548ad get top 100 src_ip's 2020-03-11 13:51:49 +00:00
c32a150c51 typo 2020-03-10 16:49:41 +01:00
e77d24db08 Merge pull request #576 from dtag-dev-sec/dev
Dev
2020-03-10 16:47:31 +01:00
857190ec20 add 2fa, update reamde and changelog 2020-03-10 15:39:16 +00:00
809d598076 reactivate netselect-apt
automatic mirror detection needs ICMP
2020-03-10 10:12:50 +00:00
9a64c88aba Merge pull request #574 from dtag-dev-sec/dev
Update CHANGELOG.md
2020-03-09 15:15:23 +01:00
af3242e8d5 Update CHANGELOG.md 2020-03-09 15:14:46 +01:00
5ddf1fdd07 Merge pull request #573 from dtag-dev-sec/dev
bump version
2020-03-09 13:12:40 +01:00
020d4e9738 bump version 2020-03-09 12:11:13 +00:00
7081bafb6e Merge pull request #572 from dtag-dev-sec/dev
Bump NextGen to 20.06
2020-03-09 13:00:24 +01:00
fb06c46793 Merge branch 'dev' of https://github.com/dtag-dev-sec/tpotce into dev 2020-03-09 10:44:36 +00:00
f76d8ab161 update delivery window 2020-03-09 10:43:52 +00:00
a256ecedc8 Merge branch 'master' into dev 2020-03-09 11:20:39 +01:00
fb3777141b tanner, prepare merger w/ master 2020-03-09 09:44:26 +00:00
a18304dfdc tanner, prepare merger w/ master 2020-03-09 09:35:19 +00:00
6a703544c6 tweaking 2020-03-05 23:58:27 +00:00
941a0e1587 tweaking 2020-03-05 23:22:03 +00:00
692a21ddb1 tanner tweaking and testing
include unsecure, fix name bug
2020-03-05 23:12:49 +00:00
df22adb45d bump elk stack to 7.6.1 2020-03-05 21:20:11 +00:00
07c68c85bb tweaking 2020-03-04 14:36:03 +00:00
a4227e6a9f tweaking 2020-03-04 12:12:12 +00:00
3b8c959c66 tweaking 2020-03-03 12:30:57 +00:00
5d7a6f3270 tweaking 2020-03-02 15:23:05 +00:00
ee1342ce2a remove tanner_web from nextgen 2020-02-27 11:29:42 +00:00
53e9470d58 cleanup 2020-02-27 10:35:50 +00:00
21c68f75e2 tweaking 2020-02-26 14:43:02 +00:00
bf7d1299ca tweaking 2020-02-26 14:22:48 +00:00
70dca02ce4 tweaking 2020-02-25 16:59:22 +00:00
6bfcf8b1c4 tweaking 2020-02-24 16:43:34 +00:00
b7b6e9fa0e Merge pull request #553 from skoops/skoops-patch-1
Update install.sh
2020-02-24 13:31:26 +01:00
d889651d63 Update install.sh
fix password check by providing cracklib-check for later usage
2020-02-24 13:22:00 +01:00
bd0e6936eb bump heralding to latest master
fixed by https://github.com/johnnykv/heralding/issues/129#event-3058184614
2020-02-21 11:38:29 +00:00
545209dce6 fix for honeytrap 2020-02-15 15:40:47 +00:00
153f7be9dc cleanup 2020-02-14 17:26:53 +00:00
faa5667246 bump adbhoney, cowrie, honeytrap to 20.06 2020-02-14 17:22:30 +00:00
aa4a93684d bump more images to 20.06 2020-02-14 15:30:55 +00:00
f11ad6b523 tweaking
ELK 7.6.0 is not ready for production, however it works if APM is enabled (disabled in config, so image wont build as precaution)
Remove SISSDEN from ewsposter, suricata
Bump suricata to 5.0.1
Alpine now support suricata incl. enabled JA3 support, move back to Alpine install
2020-02-14 15:28:06 +00:00
a49d560809 up java mem limit 2020-02-05 15:24:32 +00:00
f2abb1d1bd release mailoney, elk 7.x into NextGen 19.03.x 2020-02-03 17:46:11 +01:00
b31225b97c Merge pull request #524 from pisces-period/pisces-period-cowrie-patch
make Dockerfile compatible with any Python version
2020-02-03 17:17:25 +01:00
ad861200de update mailoney 2020-02-03 14:46:43 +00:00
5ce5911ec1 cleanup 2020-02-03 12:59:21 +00:00
b9da9f04af adjust default field 2020-02-03 12:18:43 +00:00
92c0543c55 Merge branch 'dev' of https://github.com/dtag-dev-sec/tpotce into dev 2020-02-01 14:09:33 +00:00
984ba958fb logstash template not upgraded
with daily index enabled logstash will not be able to put new events into ES
simple solution, just deleting logstash template upon logstash start and leave it to logstash to upload the latest template
.
2020-02-01 14:08:23 +00:00
2d249ac6b1 tweak export script for new references 2020-01-31 17:43:04 +00:00
64729f5064 remove ilm support, breaks existing index at upgrade 2020-01-31 15:50:34 +00:00
5a4724bcba elk 7.x dev test 2020-01-31 14:21:55 +00:00
64907a2eba random loop timer ewsposter 2020-01-30 11:07:28 +00:00
fa0fdbb579 prepare for ELK migration to 7.x 2020-01-29 14:21:40 +00:00
1e47497c30 fixes for update.sh 2020-01-28 17:52:44 +00:00
a3e0c51493 switch to new nginx, heimdall, landing page in nextgen 2020-01-28 16:11:05 +00:00
33222a92b6 finish heimdall integration 2020-01-27 17:03:44 +00:00
1167231560 fix error log path 2020-01-27 08:51:34 +00:00
62b519999e tweaking 2020-01-24 15:38:00 +00:00
8b19228d99 tweaking heimdall, read only for now 2020-01-24 15:16:25 +00:00
2d16a9c9f6 tweaking new landing page 2020-01-24 14:14:09 +00:00
95a075e764 start working on new landing page 2020-01-24 02:21:33 +00:00
dc75b5567a make Dockerfile compatible with any Python version
adding a temporary variable to store the current (updated) version of Python, thus fixing the situation where the version is != 3.7 (e.g. Alpine python package at version 3.8.1-r1), causing lines 39-41 to break in the original code (install path is hard-coded at 3.7).
2020-01-23 17:42:48 +01:00
d643ca7a01 logrotate all mailoney log files 2020-01-22 12:23:21 +00:00
f110eb08b0 prepare for mailoney json logging 2020-01-22 12:17:30 +00:00
a470a7b12f Update CHANGELOG.md 2020-01-16 22:10:03 +01:00
c7eed86bd7 update changelog 2020-01-16 20:05:45 +00:00
20d6c6ab7f include citrixhoneypot dashboards
for fresh installs of NextGen
2020-01-16 19:56:05 +00:00
b033d515c6 dashboard files with citrixhoneypot support
for manual kibana import
2020-01-16 20:49:32 +01:00
1d0aad3b34 tweak logstash.conf for citrixhoneypot 2020-01-16 18:04:29 +00:00
a6ed6613a5 prepare citrixhoneypot for ELK integration 2020-01-16 15:13:58 +00:00
a953542f8f rebase citrixhoneypot 2020-01-16 10:29:58 +00:00
be3e998a92 prepare citrixhoneypot for JSON logging 2020-01-15 13:59:11 +00:00
1bc514a067 Update update.sh 2020-01-15 14:19:38 +01:00
9ad83fae51 Update CHANGELOG.md 2020-01-15 13:41:45 +01:00
e803d188c9 prepare for citrixhoneypot 2020-01-15 12:33:41 +00:00
8a844e6dd3 prepare for CitrixHoneypot 2020-01-15 12:14:23 +00:00
0ef2b083fc Merge branch 'master' of https://github.com/dtag-dev-sec/tpotce 2020-01-15 10:39:48 +00:00
755cbb77db prepare for citrixhoneypot 2020-01-15 10:37:48 +00:00
3498f3e635 fix typo 2020-01-13 22:44:14 +01:00
2ed0f939d1 rebuild, tweak spiderfoot 2020-01-03 17:04:18 +00:00
af3ef271d4 rebuild cyberchef 2020-01-03 16:25:33 +00:00
3713139fc6 rebuild snare, tanner 2020-01-03 14:06:29 +00:00
0928e37326 rebuild Dionaea, Heralding 2020-01-02 17:37:08 +00:00
f7a6a30c90 update.sh should be executed as root only
Fixes #508
2020-01-02 10:16:55 +01:00
ec46dc9ab0 Fix typo, Fixes #504 2020-01-02 09:40:55 +01:00
7c5fc000c0 rebuild fatt 2019-12-27 20:52:23 +00:00
64628c1293 rebuild rdpy 2019-12-27 20:09:15 +00:00
29d223865f tweaking, rebuild honeypy 2019-12-27 19:58:22 +00:00
0ed60329b8 tweak installer
fixes #389
2019-12-27 19:45:38 +00:00
1442a257e5 conpot tweaking 2019-12-27 18:34:13 +00:00
a1d903db01 bump conpot to latest master 2019-12-27 16:21:12 +00:00
756215519c add sAN to selfsigned cert
fixes #478
2019-12-27 14:53:07 +00:00
659831cf99 Update CHANGELOG.md 2019-12-24 12:14:44 +01:00
a370e2b414 introduce pigz to logrotate
pigz will now handle compression of t-pot logfiles
logrotate will only rotate archives instead of packing them again
should improve #501 #494 #489 #482 and others with regard to a volume of logs
2019-12-24 10:55:39 +00:00
f4a078c443 introduce pigz for clean.sh
See #501 and thanks to @workandresearchgithub
2019-12-24 10:31:54 +00:00
02bdc8194a bump adbhoney to latest master with py3 support 2019-11-21 13:56:38 +00:00
878538e3df Update README.md
fixes #485
2019-11-20 10:23:03 +01:00
ca01bfd82f Merge pull request #484 from shaderecker/debian10
Switch to Debian 10 image for Open Telekom Cloud
2019-11-13 19:55:11 +01:00
71dc3227c4 Update README.md 2019-11-13 17:17:14 +01:00
fd39b3a94d Switch to Debian 10 image for Open Telekom Cloud 2019-11-13 14:50:56 +01:00
3b43c55c04 Merge pull request #480 from shaderecker/ansible-updates
Ansible updates
2019-11-04 09:20:18 +01:00
d15005195d Increase ServerAliveInterval 2019-11-03 22:15:52 +00:00
c5ddfd0a72 Add SSH ServerAliveInterval
Fixes occasional hangup of long running tasks
2019-11-03 19:58:32 +00:00
e9520eefb5 Final touches for #477 2019-10-28 17:01:44 +01:00
72709bc186 Test #477 2019-10-28 16:40:46 +01:00
59757f87f0 test for #477 2019-10-28 15:39:10 +01:00
60ef4eeeea Test for #477 2019-10-28 15:37:10 +01:00
68a10a2f1f Fire and forget: Move reboot task to background
Execute the reboot command asynchronously, so Ansible doesn't report an error.
2019-10-28 11:59:39 +00:00
170439d977 Tweak hpfeeds setup
- Fix owner and file permissions for proper comparison
- Only execute the hpfeeds script when the config file has changed
2019-10-28 11:49:57 +00:00
9c7c6ac4a3 Update README.md 2019-10-28 10:23:03 +00:00
6224146cde Update README:md: Agent Forwarding 2019-10-28 10:22:51 +00:00
8314a7d34a Fix wrong order of variables
- Align with all example configs
- This is important for Ansible to check wether the file has changed
2019-10-28 10:22:20 +00:00
145856960c Use copy module 2019-10-28 10:22:03 +00:00
71523cf7ef I love double quotes 2019-10-28 10:21:49 +00:00
cbb2b66a72 Hide secrets from log output 2019-10-28 10:21:40 +00:00
2076cea40f Shorten task name 2019-10-28 10:21:30 +00:00
34f335c7e6 Don't print user password in taskname 2019-10-28 10:21:13 +00:00
602ebfc952 Remove waiting delay 2019-10-28 10:19:50 +00:00
78f9a83b04 Remove unneeded become declarations 2019-10-28 10:19:19 +00:00
4c9ff2c006 Simplify and consolidate tasks 2019-10-28 10:15:32 +00:00
7d56264a8d removing cockpit, pcp for now since these overflow swap for some reason 2019-10-26 10:40:09 +00:00
78135df9e7 Bump Suricata to 5.0.0 2019-10-22 15:20:23 +00:00
3d85ca94f1 bump cowrie to v2.0.0 2019-10-21 20:59:36 +00:00
4d7ee46cd5 update changelog 2019-10-16 15:01:04 +00:00
6921857573 bump heralding to latest master 2019-10-16 14:46:58 +00:00
5ee19e3e30 move installer to pip3 2019-10-16 11:02:59 +00:00
4fa66a2747 move to pip3 2019-10-16 10:50:13 +00:00
a1e81b57c9 Update CHANGELOG.md 2019-10-16 12:32:47 +02:00
1813b78ff0 update changelog 2019-10-16 10:30:27 +00:00
6cff8e390d tweaking cockpit, pcp 2019-10-16 10:01:41 +00:00
5079b57f94 add option to unlock ES for r/w 2019-10-15 15:41:21 +00:00
42c19e4d81 bump glutton, tune down noisy log 2019-10-15 14:50:39 +00:00
b9fb3d4695 tune down noisy log 2019-10-15 07:49:30 +00:00
544def9481 Merge pull request #461 from piffey/455
Fix AWS Terraform Deploy by switching to Debian Buster pre-release AMIs.
2019-10-04 17:15:42 +02:00
dca06918c0 Merge pull request #454 from Oogy/shell-enhancement
small change to handle non-interactive shells
2019-10-04 17:12:33 +02:00
9137440d3c Fix AWS Terraform Deploy by switching to Debian Buster pre-release AMIs. 2019-10-02 12:34:47 -07:00
d75a612416 testing change in user login 2019-09-24 10:00:31 -04:00
487ce4bed5 bump ewsposter to latest master 2019-09-21 12:09:17 +00:00
ba8564b348 small change to handle non-interactive shells 2019-09-19 15:32:15 -04:00
e914643882 Some wallpaper tweaking 2019-09-07 19:52:43 +02:00
1c8d3451ef Some logo tweaking 2019-09-07 19:50:09 +02:00
e7fe917738 Add T-Pot QR Code 2019-09-07 19:44:18 +02:00
0ed394db6a Delete t-pot_qr.png 2019-09-07 19:43:53 +02:00
99cc91d671 Add T-Pot QR Code 2019-09-07 19:42:30 +02:00
357f40d573 Update CHANGELOG.md 2019-08-29 10:17:13 +02:00
24ac6d203f bump medpot to latest master 2019-08-28 14:52:25 +00:00
08ff1377fd prep mailoney rebuild 2019-08-28 14:41:35 +00:00
42c57636b9 prep honeytrap rebuild 2019-08-28 14:34:20 +00:00
c86d6f15af prep rebuild for elasticpot 2019-08-28 14:12:52 +00:00
670dddfea0 bump nginx to 1.16.1 2019-08-28 14:09:16 +00:00
2132f80988 prep rebuild for ciscoasa 2019-08-28 13:59:41 +00:00
cae95ebe20 bump adbhoney to latest master 2019-08-28 12:46:19 +00:00
221f75be33 bump elk stack to 6.8.2 2019-08-28 13:53:43 +02:00
66bb9443f9 bump elk stack to 6.8.2 2019-08-28 11:49:03 +00:00
29c6be5571 wallpaper res 1920 1080 2019-08-27 20:02:45 +02:00
16868a7532 just some swag ... t-pot 4k wallpaper 2019-08-24 20:49:31 +02:00
4620666d4e add logo 2019-08-24 20:31:17 +02:00
9a5dd587b3 Add files via upload 2019-08-24 20:29:25 +02:00
cca1d0f727 Workaround for #442 2019-08-23 19:12:31 +02:00
bc6e94d329 spiderfoot, head bump to latest master 2019-08-16 17:29:41 +00:00
78d9d1f7c7 bump cyberchef to latest master 2019-08-16 17:14:58 +00:00
f1275e5b07 fix 2019-08-16 16:55:36 +00:00
4164b75bea Fixed
DockerHub already uses 3.7
2019-08-16 17:59:05 +02:00
c2afdc0f1f Fix for DockerHub
Works just fine on local build.
2019-08-16 17:46:17 +02:00
e0427cfc21 bump tanner to latest master 2019-08-16 14:43:10 +00:00
786ab5c082 adjust dionaea, fixes #435 2019-08-16 12:18:28 +00:00
a59fc19133 bump elastic stack to 6.7.2 2019-08-15 17:40:01 +02:00
bf39c0f5b2 bump elastic stack to 6.7.2 2019-08-15 15:38:12 +00:00
364831ae58 fix cd 2019-08-15 08:32:04 +00:00
31d7707d19 download instead of git pull
download translation maps rather than running a git pull
translation maps will now be bzip2 compressed to reduce traffic to a minimum
fixes #432
2019-08-14 14:43:47 +00:00
a053be50f3 Merge pull request #436 from TheHADILP/native-os
Create Security Group / network / subnet / router with Ansible
2019-08-13 15:11:38 +02:00
ade81e2dc2 Update documentation 2019-08-13 12:59:05 +00:00
3f15373e7b Create Network/Subnet/Router with Ansible 2019-08-13 12:00:19 +00:00
3186b88641 Update readme: remove security group from example 2019-08-13 10:42:08 +00:00
fc4c4e8675 Update readme 2019-08-13 10:40:24 +00:00
f80e693d8b Add rules to security group and adapt server creation 2019-08-13 10:31:46 +00:00
bf9a14081d Create Security Group with Ansible 2019-08-13 09:16:02 +00:00
a906633cfd Merge pull request #433 from TheHADILP/ansible-updates
Update Ansible README: System updates
2019-08-13 10:43:53 +02:00
7fcf406781 Update README: System updates 2019-08-08 05:48:40 +00:00
eb22f8e99b final prep for buster 2019-08-03 00:20:46 +02:00
0cff5f4be4 Update install.sh 2019-08-02 23:33:25 +02:00
579aaaa577 adjust makeiso for buster 2019-08-02 19:35:56 +02:00
37c9507354 prep for buster iso 2019-08-02 18:57:22 +02:00
08d2665f66 Merge pull request #408 from TheHADILP/fix-sudo
Install sudo before apt-fast
@TheHADILP Nice catch :bowtie:
2019-08-02 17:35:42 +02:00
472edc5ac2 Merge pull request #403 from TheHADILP/all-ansible
Updated Ansible Deployment

@TheHADILP Thank you 😃
2019-08-02 17:33:38 +02:00
0baff7340d Check for sudo 2019-07-04 10:59:03 +00:00
d9f7360daf Install sudo before apt-fast script
sudo is not installed in all debian variants
2019-07-04 10:50:12 +00:00
15ebffa58f Generic random name 2019-07-02 08:44:58 +00:00
c8bd84316f Update README.md 2019-07-01 10:21:31 +02:00
413fe4704a Update CHANGELOG.md 2019-07-01 10:21:05 +02:00
0dac77036b Update task naming 2019-07-01 06:52:29 +00:00
8815d13903 Update README.md 2019-07-01 08:29:50 +02:00
5e926a092f Update CHANGELOG.md 2019-07-01 08:28:45 +02:00
43376d94b0 Update README.md 2019-07-01 08:20:58 +02:00
b7769df794 Update README.md 2019-07-01 08:16:08 +02:00
a5856082c8 Update README.md 2019-07-01 02:26:55 +02:00
76ec8ae20e Update README.md 2019-07-01 02:24:32 +02:00
640d74a851 Update README.md 2019-07-01 02:15:14 +02:00
54ed268041 Use generic package module 2019-07-01 00:01:11 +00:00
c5f1c94674 Update README.md 2019-07-01 01:44:43 +02:00
c613c48c75 Update README.md 2019-07-01 01:38:16 +02:00
b6f18cf5f1 Update README.md 2019-07-01 01:37:34 +02:00
f70f1a7f70 Update README.md 2019-07-01 01:33:13 +02:00
16179b3ed9 Update README.md 2019-07-01 01:27:48 +02:00
d8378e73d4 Update README.md 2019-07-01 00:57:42 +02:00
d29a30d79d Generic password var name 2019-06-30 14:35:02 +00:00
399d0e1e6e Generic remote user name
set_fact: user_name is needed to display the var value in the task name
2019-06-30 14:25:24 +00:00
ec7c6a4ba4 Update README.md 2019-06-30 15:18:44 +02:00
d25bbd0032 Update README.md 2019-06-30 14:36:59 +02:00
fe7f6ad510 Useful output for login options 2019-06-29 22:36:34 +00:00
e7f577200b Update README.md 2019-06-29 23:42:24 +02:00
d63e9356ba Update README.md 2019-06-29 23:38:15 +02:00
f2dd83840f Update README.md 2019-06-29 23:26:34 +02:00
7a5a732ece Update folder naming 2019-06-29 21:04:45 +00:00
2a4128d77c Remove legacy option 2019-06-29 18:34:47 +02:00
06407e42d7 Fx typo 2019-06-29 16:32:45 +00:00
0392517fa2 Added new playbook and roles 2019-06-29 16:21:47 +00:00
bcb6c7e616 Added ansible config 2019-06-29 15:57:26 +00:00
1fab2a690a Remove old playbooks 2019-06-29 15:55:44 +00:00
9b67c9e66c Update gitignore 2019-06-29 15:46:22 +00:00
f501d440c8 Delete old stuff 2019-06-29 15:46:03 +00:00
504e3f2734 added ews.cfg change script
script changes the ews authentication information and reconfigures
T-Pot to deliver data to the trusted/authenticated domain.
2019-06-27 10:36:46 +02:00
93417ddefd Merge pull request #397 from prateepb/terraform
Add Terraform Support
2019-06-27 07:51:26 +02:00
9db5c92f4d Removed LEGACY installation option 2019-06-26 14:38:29 +01:00
0c1257b863 Rename ec2 to aws 2019-06-26 14:19:04 +01:00
cca0a065c7 Update README.md to include Terraform 2019-06-26 14:15:14 +01:00
fc752b10c2 Update tpot.conf.dist 2019-06-26 15:09:18 +02:00
f4daa17f41 Merge pull request #398 from TheHADILP/hpfeeds-cmd
Missed another typo
2019-06-26 12:50:35 +02:00
d02bac1ea1 Missed another typo 2019-06-26 10:17:59 +00:00
d85ad5c475 Merge pull request #371 from TheHADILP/hpfeeds-cmd
HPFEEDS cmdline option
2019-06-26 11:33:45 +02:00
b505d560e7 Merge branch 'master' into hpfeeds-cmd 2019-06-26 11:17:49 +02:00
1113c9c0c9 Minor typo 2019-06-26 09:15:29 +00:00
a5236d518f Add udp access to security group 2019-06-25 16:42:54 +01:00
4d8149846b Fix tcp access in security group 2019-06-25 16:42:04 +01:00
658b71d6d8 Add terraform configuration 2019-06-25 16:33:56 +01:00
74b8f6656f add fatt 2019-06-13 13:55:43 +02:00
ab65c20b5c Delete architecture.png 2019-06-13 13:55:27 +02:00
2b0cff97a9 add fatt 2019-06-13 13:53:17 +02:00
28f5491977 bump suricata to 4.1.4 2019-06-07 13:00:20 +00:00
3acb52ce63 Update readme
use sudo su -
fixes #384
2019-06-04 19:52:58 +02:00
1a9a284930 Include Fatt 2019-06-04 16:33:02 +02:00
5e22afd10b finalize fatt support 2019-06-04 14:21:35 +00:00
a87af2ce6a update objects 2019-06-04 16:10:33 +02:00
a8b7cc4e9a update some objects 2019-06-03 23:02:10 +02:00
f18c5586bf update some objects 2019-06-03 20:57:03 +00:00
6b2d9e5401 update changelog 2019-06-03 20:25:29 +00:00
8b03fb8f28 remove glastopf 2019-06-03 20:04:50 +00:00
bbf226aeda remove glastopf 2019-06-03 19:57:50 +00:00
0f8eaef8f5 tweaking 2019-06-03 19:53:52 +00:00
a7e553efe9 still working on fatt 2019-06-03 16:13:58 +00:00
f870c8e885 continue working on fatt 2019-06-03 10:22:07 +00:00
4e902b6560 add fatt to nextgen 2019-06-01 17:47:14 +00:00
d3239b78c4 start working on fatt 2019-05-31 17:52:39 +00:00
867bda6ad7 increase number of fields limit
#382
2019-05-31 15:34:29 +00:00
9edb84e3b4 increase total number of fields for logstash template
The number of 1000 should not exceed, however as a precaution the limit on future versions of T-Pot will be pushed to 2000.

Also see #382
2019-05-28 15:30:49 +02:00
b658a01637 fixes #381 2019-05-26 09:47:20 +00:00
efdd2fc11d optimize build 2019-05-25 19:35:03 +02:00
018630aabe Adjust permissions 2019-05-20 19:08:05 +02:00
52c64f57d1 Update README.md 2019-05-16 18:29:48 +02:00
262e22155e Fix whitespace 2019-05-16 15:03:19 +00:00
965170ff21 Moved to hpfeeds cmdline option 2019-05-16 15:02:32 +00:00
190fba654a Merge branch 'master' into hpfeeds-cmd 2019-05-16 11:53:41 +02:00
d71532678b Update README.md 2019-05-16 11:50:25 +02:00
8163cf8b2d Update README.md 2019-05-16 11:28:03 +02:00
bc658a0575 Update README.md 2019-05-16 11:22:13 +02:00
f3214b935c Update CHANGELOG.md 2019-05-16 11:19:03 +02:00
c874e9d080 Update README.md 2019-05-16 11:11:40 +02:00
4efc62b529 Revert "Adapt testing paths"
This reverts commit 8b2898bd4e.
2019-05-16 08:14:05 +00:00
9815f17b16 Imrove console output 2019-05-16 07:59:52 +00:00
12cf4ecd89 Update comments 2019-05-16 07:52:17 +00:00
ad7f3a6485 Add Spacing 2019-05-16 07:26:42 +00:00
4b3337de48 Move reboot message to the end 2019-05-16 07:19:50 +00:00
8b2898bd4e Adapt testing paths 2019-05-16 06:51:48 +00:00
c5585f2652 Update: Restore HPFEEDS 2019-05-16 01:20:50 +00:00
6b40c1ca7f HPFEEDS: Command line option
- OptIn script accepts config file as argument (--conf=hpfeeds.cfg)
- Current config is written to /data/ews/conf/hpfeeds.cfg
2019-05-16 01:09:50 +00:00
72cdf68a60 Merge pull request #369 from TheHADILP/auth-error
Print error message on wrong API credentials
2019-05-14 16:09:20 +02:00
6710d6e698 Print error message on wrong API credentials 2019-05-14 14:04:15 +00:00
3ab7de8d09 Merge pull request #367 from TheHADILP/patch-1
Fixed changelog order
2019-05-14 08:12:17 +02:00
687299ba60 Fixed changelog order 2019-05-13 22:46:10 +02:00
28da547e75 Merge pull request #356 from TheHADILP/ansible-otc
Added Ansible T-Pot Deployment on Open Telekom Cloud
2019-05-13 17:28:57 +02:00
17073c3a15 Prevent cloud-init from overwriting our hostname 2019-05-12 01:14:52 +00:00
3fef0fd6da add hptest script 2019-05-11 11:29:00 +00:00
3b1e4e8402 Update README.md 2019-05-10 00:58:41 +02:00
4cd18c3764 Update README.md 2019-05-10 00:48:07 +02:00
006a7c322c Update README.md 2019-05-10 00:42:30 +02:00
3d55d16f8d Move to subfolder & adapt paths 2019-05-09 21:40:32 +00:00
65ba32c056 Merge pull request #360 from breinkober/patch-2
Update README.md
2019-05-09 16:04:51 +02:00
c09547e3a4 adjust group and permissions for /data 2019-05-08 11:16:48 +00:00
ce89e44474 tweaking 2019-05-02 18:59:36 +02:00
72c98ac811 Fix for KVP name changes in Cowrie 2019-05-02 13:25:22 +00:00
44385fb9b7 Fix for KVP name changes in Cowrie 2019-05-02 15:14:38 +02:00
9ec1992929 Remove mirror selection
Some Debian mirrors have not been synced correctly, disable automatic mirror selection for now.
2019-04-28 13:06:19 +02:00
03d1449b3c Update README.md 2019-04-25 13:18:02 +02:00
0dcd0b6dc5 Check for volume mount before reapplying it 2019-04-23 20:58:57 +00:00
581f06e2e8 Restore custom ews.cfg volume after update
- restore ews.cfg volume mount in tpot.yml
2019-04-23 19:37:51 +00:00
886f08f7e2 Update README.md 2019-04-21 13:29:44 +02:00
ecd47346e5 Update CHANGELOG.md 2019-04-21 13:21:53 +02:00
df617e9d7b Shrink those GIFs 2019-04-19 10:35:48 +00:00
f0a4990bb8 Update README.md 2019-04-19 01:54:35 +02:00
3037e6f5fb Update README.md 2019-04-19 01:46:50 +02:00
f9c85f08e0 Update README.md 2019-04-19 01:39:58 +02:00
c7a795c6d4 Add files via upload
- Open Telekom Cloud screenshots
- Animated with GIMP and https://ezgif.com
2019-04-19 01:27:06 +02:00
8ba91add41 Update README.md 2019-04-19 00:35:07 +02:00
1e5682480b Update README.md 2019-04-18 11:27:12 +02:00
c23934a5bb Update README.md 2019-04-18 07:28:46 +02:00
9cd6ccc2c2 Update README.md 2019-04-17 23:49:36 +02:00
452ccfc3d1 Update README.md 2019-04-17 23:45:19 +02:00
b3b6bdef98 Update README.md 2019-04-17 22:57:00 +02:00
73d82c513d Update README.md 2019-04-17 22:52:40 +02:00
4d9756c26e Update README.md 2019-04-17 21:51:37 +02:00
28449417d0 Create README.md 2019-04-17 17:09:52 +02:00
919eaabfb2 otc_env: Added example project 2019-04-17 15:02:50 +00:00
2587435f96 Update Putty image 2019-04-17 10:41:29 +00:00
eda9fe0ee0 Added Image for Putty Agent Forwarding 2019-04-17 10:36:36 +00:00
c15e94cf26 Output formatting 2019-04-16 09:15:00 +00:00
a5f0b912a1 Minor formatting 2019-04-16 09:01:17 +00:00
b66d18540a Remove empty line 2019-04-16 08:57:47 +00:00
9132cb963c Properly handle ECS creation errors 2019-04-16 08:55:41 +00:00
ef9fd95e61 Redirect otc-tools stderr in file
Needed later for error handling
2019-04-16 08:52:27 +00:00
1a12f6c881 Don't print Agent Forwarding env 2019-04-16 08:50:14 +00:00
280953b456 Ignore logfiles 2019-04-16 08:46:13 +00:00
a2a4d130d2 Use command module for t-pot installation 2019-04-15 19:58:35 +00:00
f1edd4fc2e Use Ansible lineinfile for ews.cfg in tpot.yml
... instead of sed
2019-04-15 18:43:27 +00:00
d4b7cc15e9 Update ISSUE_TEMPLATE.md 2019-04-15 09:23:16 +02:00
ad9634386e Update ISSUE_TEMPLATE.md 2019-04-15 09:22:34 +02:00
4c5447658d Removed SSH wait 2019-04-14 15:38:26 +00:00
949a8854c6 Moved reboot role to task in playbook 2019-04-14 15:11:01 +00:00
c05b602497 Removed quotes 2019-04-13 00:52:14 +00:00
98d55f77c9 Check if Agent Forwarding is enabled 2019-04-13 00:32:12 +00:00
0415827f08 Check if required packages are installed
- Check for ansible, pwgen and jq
2019-04-13 00:20:26 +00:00
de6735e309 HPFEEDS: Switched to environment variables
- Define Settings in .hpfeeds_settings.sh
- Settings get exported as env vars
- Ansible looks them up and updates the values in the tpot.yml file
- ews.cfg: Switched to env vars
2019-04-12 23:45:25 +00:00
5860fcd736 Delete CONTRIBUTING.MD 2019-04-12 15:45:29 +02:00
e454d63e27 Update ISSUE_TEMPLATE.md 2019-04-12 10:32:21 +02:00
bf51829dca Update CONTRIBUTING.MD 2019-04-12 10:28:47 +02:00
c1434c0fb0 Update CONTRIBUTING.MD 2019-04-12 10:17:53 +02:00
fbf4ca00a3 Added custom ews.cfg Playbook 2019-04-10 10:52:57 +00:00
00e4043bca Added Reboot Playbook 2019-04-10 10:47:07 +00:00
b4ed9952bf Added Playbook commands for Custom EWS and Reboot
- Custom ews.cfg Playbook is only executed if option for it is set
- Added separate Reboot Playbook command
2019-04-10 10:39:55 +00:00
2976bf7102 Remove Reboot task
Reboot task moved to separate Playbook
2019-04-10 10:30:36 +00:00
8d91874c9e Remove space 2019-04-10 10:28:41 +00:00
19c30f9709 Fix permissions 2019-04-10 12:21:57 +02:00
7d8a5b9dc6 Add custom EWS variable 2019-04-10 06:16:33 +00:00
c3d2f74d4e Fix indents 2019-04-09 06:27:36 +00:00
e99b851624 Only proceed on ECS build success
Wrap the Ansible Playbook command in a condition.
Only execute it when the ECS build process was sucessful.
Otherwise display an error message and abort.
2019-04-09 06:14:57 +00:00
83e6c5309b Update CHANGELOG.md 2019-04-06 12:17:53 +02:00
8649a1a2e1 tweaking
not all caps
2019-04-06 09:51:18 +00:00
9f7f5068c0 tweaking
deps for apt-fast
add newline when changing ssh default port to 64295, thanks for @dpisano for noticing
2019-04-06 09:31:23 +00:00
871fa91616 Update install.sh 2019-04-05 17:13:17 +02:00
baa7294024 Moved imagename to ecs settings 2019-04-05 06:38:15 +00:00
d099b90b98 Remove debugging 2019-04-05 06:22:40 +00:00
7ada64e16c Reorganized ECS settings
- Reordered settings to match API call
- Moved disksize to .ecs_settings.sh
2019-04-05 06:15:31 +00:00
1df1662140 Switched to existing tpot.conf template 2019-04-05 06:04:47 +00:00
e3034da106 Comply with minimum password requirements
- Added special character
2019-04-04 21:00:02 +00:00
f0d9fa90a8 Initial commit for Open Telekom Cloud Showcase
- ECS creation via Open Telekom Cloud API
- T-Pot deployment with Ansible playbook
2019-04-04 20:27:49 +00:00
a6d75002cd Merge pull request #336 from dtag-dev-sec/fast
fix #332, apt-fast
2019-04-04 10:37:28 +02:00
ea93cd1db7 fix typo 2019-04-04 10:36:35 +02:00
b59485eea2 credits apt-fast 2019-04-04 08:31:41 +00:00
3edc0a7218 tweaking 2019-04-04 08:26:33 +00:00
dfa7320380 tweaking 2019-04-04 06:55:59 +00:00
2c7c5b656d apt-fast, fix netselect-apt 2019-04-03 13:39:40 +00:00
52918767f6 Document ICMP requirement for #332 2019-04-01 18:22:45 +02:00
e55c1b9189 Merge pull request #331 from TheHADILP/patch-1
Fix typo
2019-04-01 17:24:04 +02:00
1cffd95bf3 Fix typo 2019-04-01 17:22:07 +02:00
5482fa6748 fix #330 2019-04-01 14:34:50 +00:00
ecb2b4a587 Merge pull request #329 from dtag-dev-sec/debian
Prepare for T-Pot 19.03 release
2019-04-01 14:54:22 +02:00
3f324f0fb1 Merge branch 'master' into debian 2019-04-01 14:53:32 +02:00
7e9cc240e3 prepare for merge to master 2019-04-01 12:49:07 +00:00
da134adbc8 Mirror selection 2019-04-01 12:43:24 +00:00
8c6aacf1f5 mirror needs to dynamic according to geo location 2019-04-01 12:19:06 +00:00
ade98060d8 avoid breaking of symlink for tpot.yml 2019-04-01 09:59:27 +00:00
33e98822e3 Add HPFEEDS opt-in 2019-04-01 07:56:06 +00:00
d4654f2bbc prepare for hpfeeds opt in 2019-04-01 07:42:24 +00:00
16bed23afb Add files via upload 2019-03-28 15:00:10 +01:00
e6fb310bef Delete architecture.png 2019-03-28 14:59:55 +01:00
e21bcf54de Add files via upload 2019-03-28 14:59:18 +01:00
c2006f0a34 Add files via upload 2019-03-28 14:56:46 +01:00
5833b69e72 Delete architecture.png 2019-03-28 14:56:22 +01:00
e8d7b8b3aa Add files via upload 2019-03-28 14:55:38 +01:00
dee314dfb0 Add files via upload 2019-03-28 14:50:10 +01:00
0d1b7d56a2 tweaking 2019-03-28 11:27:50 +00:00
e9f19a33d9 Add files via upload 2019-03-28 09:21:42 +01:00
f94c00eba1 include kibana objects export 2019-03-27 15:49:40 +01:00
a452b9bd9d update dashboards
Cowrie - Add HASSH visulization
Suricata - Add JA3 visualization
Account for HASSH, JA3 in Cowrie / Suricata overview
Thanks for chatting about JA3/HASSH @0x4d31-sfdc
2019-03-27 14:46:27 +00:00
c0d0e016e6 tweaking
Update Heralding to support SOCKS5
Correct Readme
Resize tped.sh
2019-03-27 13:39:23 +00:00
20711cb633 clean up 2019-03-26 16:30:14 +00:00
d93d0662ee Merge branch 'debian' of https://github.com/dtag-dev-sec/tpotce into debian 2019-03-26 16:27:59 +00:00
c7e9015a5a Bump Suricata to 4.1.3
Build with Rust
Enable JA3
Enable more protocols
Improve payload logging
... and more.
2019-03-26 16:26:47 +00:00
a95ab7ed3e Merge pull request #324 from breinkober/patch-2
Small Update README.md
2019-03-21 09:09:52 +01:00
5e32e42439 Update README.md
Updated Credits Link for elasticpot
2019-03-21 08:56:42 +01:00
b5d45bc539 tweaking 2019-03-20 16:00:35 +00:00
5b6bb5ea47 Update README.md 2019-03-20 16:50:46 +01:00
04877b6999 tweaking 2019-03-20 15:33:13 +00:00
249b9318b6 dashboard adjustments 2019-03-20 15:53:36 +01:00
58ce021c27 dashboard adjustments 2019-03-20 14:48:52 +00:00
349982baf7 update ewsposter 2019-03-20 14:43:21 +00:00
da6299e6a1 tweaking 2019-03-20 10:09:07 +00:00
96d1c16958 Merge pull request #322 from breinkober/patch-2
Update README.md
2019-03-19 13:58:11 +01:00
60021763de Update README.md 2019-03-19 13:55:14 +01:00
712b88227a Update README.md
new links for cowrie and elasticpot
2019-03-19 12:54:51 +01:00
e8d8773863 tweaking 2019-03-19 11:08:23 +00:00
5b710d5b28 add honeypy dashboard, viz and search 2019-03-15 22:31:21 +00:00
573ceb98a1 bump elk stack to 6.6.2, replace wget with aria2 to speed up d/l 2019-03-15 22:23:30 +00:00
5dae44b5e9 prepare for sissden opt-in 2019-03-15 15:59:02 +00:00
86715ccf7c hpfeeds ca cert sissden 2019-03-15 13:38:19 +01:00
2b7d8ee01e update ewsposter 2019-03-13 22:04:07 +00:00
0b92b56c55 store data as ascii, adjust config 2019-03-13 21:13:36 +00:00
7ed3530130 remove volume 2019-03-10 18:22:31 +00:00
522da73710 add honeypy to nextgen flavor 2019-03-10 18:20:12 +00:00
6f30322ad5 prepare for honeypy 2019-03-10 18:15:59 +00:00
d9e5331a84 fix #313 2019-03-09 21:25:58 +00:00
bfa54853ab add honeypy docker 2019-03-08 21:32:09 +00:00
35e89b1e20 Fix for #311
Thanks to @ChessSpider for reporting!
2019-03-06 10:20:17 +01:00
2cc8c9eba1 account for .kibana alias 2019-03-01 21:27:53 +00:00
869f05ca8b cleanup 2019-03-01 21:08:36 +00:00
85e5f8d7aa add objects, fix for #298 2019-03-01 20:29:47 +00:00
89b249d228 add new elkbase, prevent mailutils from installation 2019-03-01 14:27:42 +00:00
8d59602a75 tweaking 2019-03-01 13:57:21 +00:00
e1fe025dd7 remove fallback 2019-02-28 21:03:07 +00:00
6467a03d19 fix suricata ref location 2019-02-28 20:59:20 +00:00
12e9a2aaeb tweaking, mark hold exim4-base 2019-02-28 19:22:30 +00:00
65f242d322 cleanup 2019-02-28 15:01:12 +00:00
728607a2da bump elk stack to 6.6.1 2019-02-28 14:52:42 +00:00
06ccf17c5f add openssl 2019-02-26 13:25:06 +00:00
32043158bf bump cowrie to 1.5.3 2019-02-26 13:07:07 +00:00
00f068980e pin nginx to tls v1.3 2019-02-26 07:55:42 +00:00
2b8a82d0f5 move to 1903 images 2019-02-25 18:59:40 +00:00
caf8573bcd tweaking 2019-02-25 15:58:20 +00:00
9664d7b6c3 kibana pin to alpine 3.8 2019-02-25 15:49:26 +00:00
4e34e5c77d cyberchef pin to alpine 3.8 2019-02-25 15:28:54 +00:00
28d6487ff5 rdpy fix dockerfile alpine 3.9 2019-02-25 15:12:48 +00:00
238fc05854 glastopf fix dockerfile alpine 3.9 2019-02-25 14:48:43 +00:00
fd150699f2 heralding fix dockerfile alpine 3.9 2019-02-25 13:55:46 +00:00
ca454f663e tweaking 2019-02-25 10:52:24 +00:00
1f07f3c045 add testimonial 2019-02-22 16:35:10 +01:00
3e91da3e08 Merge pull request #304 from TheHADILP/patch-1
Minor typo fixes
2019-02-22 14:07:09 +01:00
094f3b2726 Minor typo fixes 2019-02-20 23:21:47 +01:00
05c15cc533 fix iptables for glutton 2019-02-20 11:00:36 +00:00
364a6c6d9c Merge pull request #302 from TheHADILP/patch-1
Minor link formatting
2019-02-19 22:49:04 +01:00
469591c083 Minor link formatting 2019-02-19 22:32:12 +01:00
c67e4593d7 Update Dockerfile 2019-02-06 16:43:09 +01:00
565f156173 Fix name for Suricata daemons 2019-02-06 16:13:03 +01:00
369 changed files with 14552 additions and 12699 deletions

View File

@ -1,31 +0,0 @@
# Contribution
Thank you for your decision to contribute to T-Pot.
## Issues
Please feel free to post your problems, ideas and issues [here](https://github.com/dtag-dev-sec/tpotce/issues). We will try to answer ASAP, but to speed things up we encourage you to ...
- [ ] Use the [search function](https://github.com/dtag-dev-sec/tpotce/issues?utf8=%E2%9C%93&q=) first
- [ ] Check the FAQs in our [WIKI](https://github.com/dtag-dev-sec/tpotce/wiki)
- [ ] Provide [basic support information](#info) with regard to your issue
Thank you :smiley:
-
<a name="info"></a>
### Basic support information
- What T-Pot version are you currently using?
- Are you running on a Intel NUC or a VM?
- How long has your installation been running?
- Did you install any upgrades or packages?
- Did you modify any scripts?
- Have you turned persistence on/off?
- How much RAM is available (login via ssh and run `htop`)?
- How much stress are the CPUs under (login via ssh and run `htop`)?
- How much swap space is being used (login via ssh and run `htop`)?
- How much free disk space is available (login via ssh and run `sudo df -h`)?
- What is the current container status (login via ssh and run `sudo dps.sh`)?

View File

@ -0,0 +1,37 @@
---
name: Bug report for T-Pot
about: Bug report for T-Pot
title: ''
labels: ''
assignees: ''
---
Before you post your issue make sure it has not been answered yet and provide `basic support information` if you come to the conclusion it is a new issue.
- 🔍 Use the [search function](https://github.com/dtag-dev-sec/tpotce/issues?utf8=%E2%9C%93&q=) first
- 🧐 Check our [WIKI](https://github.com/dtag-dev-sec/tpotce/wiki)
- 📚 Consult the documentation of 💻 [Debian](https://www.debian.org/doc/), 🐳 [Docker](https://docs.docker.com/), the 🦌 [ELK stack](https://www.elastic.co/guide/index.html) and the 🍯 [T-Pot Readme](https://github.com/dtag-dev-sec/tpotce/blob/master/README.md).
- **⚠️ Provide [basic support information](#info) or similiar information with regard to your issue or we can not help you and will close the issue without further notice**
<br>
<br>
<br>
<a name="info"></a>
## ⚠️ Basic support information (commands are expected to run as `root`)
- What version of the OS are you currently using `lsb_release -a` and `uname -a`?
- What T-Pot version are you currently using?
- What edition (Standard, Nextgen, etc.) of T-Pot are you running?
- What architecture are you running on (i.e. hardware, cloud, VM, etc.)?
- Did you have any problems during the install? If yes, please attach `/install.log` `/install.err`.
- How long has your installation been running?
- Did you install upgrades, packages or use the update script?
- Did you modify any scripts or configs? If yes, please attach the changes.
- Please provide a screenshot of `glances` and `htop`.
- How much free disk space is available (`df -h`)?
- What is the current container status (`dps.sh`)?
- What is the status of the T-Pot service (`systemctl status tpot`)?
- What ports are being occupied? Stop T-Pot `systemctl stop tpot` and run `netstat -tulpen`
- If a single container shows as `DOWN` you can run `docker logs <container-name>` for the latest log entries

View File

@ -0,0 +1,20 @@
---
name: Feature request for T-Pot
about: Suggest an idea for T-Pot
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@ -0,0 +1,39 @@
---
name: General issue for T-Pot
about: General issue for T-Pot
title: ''
labels: ''
assignees: ''
---
🗨️ Please post your questions in [Discussions](https://github.com/telekom-security/tpotce/discussions) and keep the issues for **issues**. Thank you 😁.<br>
Before you post your issue make sure it has not been answered yet and provide `basic support information` if you come to the conclusion it is a new issue.
- 🔍 Use the [search function](https://github.com/dtag-dev-sec/tpotce/issues?utf8=%E2%9C%93&q=) first
- 🧐 Check our [WIKI](https://github.com/dtag-dev-sec/tpotce/wiki)
- 📚 Consult the documentation of 💻 [Debian](https://www.debian.org/doc/), 🐳 [Docker](https://docs.docker.com/), the 🦌 [ELK stack](https://www.elastic.co/guide/index.html) and the 🍯 [T-Pot Readme](https://github.com/dtag-dev-sec/tpotce/blob/master/README.md).
- **⚠️ Provide [basic support information](#info) or similiar information with regard to your issue or we can not help you and will close the issue without further notice**
<br>
<br>
<br>
<a name="info"></a>
## ⚠️ Basic support information (commands are expected to run as `root`)
- What version of the OS are you currently using `lsb_release -a` and `uname -a`?
- What T-Pot version are you currently using?
- What edition (Standard, Nextgen, etc.) of T-Pot are you running?
- What architecture are you running on (i.e. hardware, cloud, VM, etc.)?
- Did you have any problems during the install? If yes, please attach `/install.log` `/install.err`.
- How long has your installation been running?
- Did you install upgrades, packages or use the update script?
- Did you modify any scripts or configs? If yes, please attach the changes.
- Please provide a screenshot of `glances` and `htop`.
- How much free disk space is available (`df -h`)?
- What is the current container status (`dps.sh`)?
- What is the status of the T-Pot service (`systemctl status tpot`)?
- What ports are being occupied? Stop T-Pot `systemctl stop tpot` and run `netstat -tulpen`
- If a single container shows as `DOWN` you can run `docker logs <container-name>` for the latest log entries

45
CHANGELOG.md Normal file
View File

@ -0,0 +1,45 @@
# Release Notes / Changelog
T-Pot 22.04.0 is probably the most feature rich release ever provided with long awaited (wanted!) features readily available after installation.
## New Features
* **Distributed** Installation with **HIVE** and **HIVE_SENSOR**
* **ARM64** support for all provided Docker images
* **GeoIP Attack Map** visualizing Live Attacks on a dedicated webpage
* **Kibana Live Attack Map** visualizing Live Attacks from different **HIVE_SENSORS**
* **Blackhole** is a script trying to avoid mass scanner detection
* **Elasticvue** a web front end for browsing and interacting with an Elastic Search cluster
* **Ddospot** a honeypot for tracking and monitoring UDP-based Distributed Denial of Service (DDoS) attacks
* **Endlessh** is a SSH tarpit that very slowly sends an endless, random SSH banner
* **HellPot** is an endless honeypot based on Heffalump that sends unruly HTTP bots to hell
* **qHoneypots** 25 honeypots in a single container for monitoring network traffic, bots activities, and username \ password credentials
* **Redishoneypot** is a honeypot mimicking some of the Redis' functions
* **SentryPeer** a dedicated SIP honeypot
* **Index Lifecycle Management** for Elasticseach indices is now being used
## Upgrades
* **Debian 11.x** is now being used for the T-Pot ISO images and required for post installs
* **Elastic Stack 8.x** is now provided as Docker images
## Updates
* **Honeypots** and **tools** were updated to their latest masters and releases
* Updates will be provided continuously through Docker Images updates
## Breaking Changes
* For security reasons all Py2.x honeypots with the need of PyPi packages have been removed: **HoneyPy**, **HoneySAP** and **RDPY**
* If you are upgrading from a previous version of T-Pot (20.06.x) you need to import the new Kibana objects or some of the functionality will be broken or will be unavailabe
* **Cyberchef** is now part of the Nginx Docker image, no longer as individual image
* **ElasticSearch Head** is superseded by **Elasticvue** and part the Nginx Docker image
* **Heimdall** is no longer supported and superseded with a new Bento based landing page
* **Elasticsearch Curator** is no longer supprted and superseded with **Index Lifecycle Policies** available through Kibana.
# Thanks & Credits
* @ghenry, for some fun late night debugging and of course SentryPeer!
* @giga-a, for adding much appreciated features (i.e. JSON logging,
X-Forwarded-For, etc.) and of course qHoneypots!
* @sp3t3rs, @trixam, for their backend and ews support!
* @tadashi-oya, for spotting some errors and propose fixes!
* @tmariuss, @shaderecker for their cloud contributions!
* @vorband, for much appreciated and helpful insights regarding the GeoIP Attack Map!
* @yunginnanet, on not giving up on squashing a bug and of course Hellpot!
... and many others from the T-Pot community by opening valued issues and discussions, suggesting ideas and thus helping to improve T-Pot!

View File

@ -1,31 +0,0 @@
# Contribution
Thank you for your decision to contribute to T-Pot.
## Issues
Please feel free to post your problems, ideas and issues [here](https://github.com/dtag-dev-sec/tpotce/issues). We will try to answer ASAP, but to speed things up we encourage you to ...
- [ ] Use the [search function](https://github.com/dtag-dev-sec/tpotce/issues?utf8=%E2%9C%93&q=) first
- [ ] Check the FAQs in our [WIKI](https://github.com/dtag-dev-sec/tpotce/wiki)
- [ ] Provide [basic support information](#info) with regard to your issue
Thank you :smiley:
-
<a name="info"></a>
### Basic support information
- What T-Pot version are you currently using?
- Are you running on a Intel NUC or a VM?
- How long has your installation been running?
- Did you install any upgrades or packages?
- Did you modify any scripts?
- Have you turned persistence on/off?
- How much RAM is available (login via ssh and run `htop`)?
- How much stress are the CPUs under (login via ssh and run `htop`)?
- How much swap space is being used (login via ssh and run `htop`)?
- How much free disk space is available (login via ssh and run `sudo df -h`)?
- What is the current container status (login via ssh and run `sudo dps.sh`)?

1068
README.md

File diff suppressed because it is too large Load Diff

77
bin/2fa.sh Executable file
View File

@ -0,0 +1,77 @@
#!/bin/bash
# Make sure script is started as non-root.
myWHOAMI=$(whoami)
if [ "$myWHOAMI" = "root" ]
then
echo "Need to run as non-root ..."
echo ""
exit
fi
# set vars, check deps
myPAM_COCKPIT_FILE="/etc/pam.d/cockpit"
if ! [ -s "$myPAM_COCKPIT_FILE" ];
then
echo "### Cockpit PAM module config does not exist. Something went wrong."
echo ""
exit 1
fi
myPAM_COCKPIT_GA="
# google authenticator for two-factor
auth required pam_google_authenticator.so
"
myAUTHENTICATOR=$(which google-authenticator)
if [ "$myAUTHENTICATOR" == "" ];
then
echo "### Could not locate google-authenticator, trying to install (if asked provide root password)."
echo ""
sudo apt-get update
sudo apt-get install -y libpam-google-authenticator
exec "$1" "$2"
exit 1
fi
# write PAM changes
function fuWRITE_PAM_CHANGES {
myCHECK=$(cat $myPAM_COCKPIT_FILE | grep -c "google")
if ! [ "$myCHECK" == "0" ];
then
echo "### PAM config already enabled. Skipped."
echo ""
else
echo "### Updating PAM config for Cockpit (if asked provide root password)."
echo "$myPAM_COCKPIT_GA" | sudo tee -a $myPAM_COCKPIT_FILE
sudo systemctl restart cockpit
fi
}
# create 2fa
function fuGEN_TOKEN {
echo "### Now generating token for Google Authenticator."
echo ""
google-authenticator -t -d -r 3 -R 30 -w 17
}
# main
echo "### This script will enable Two Factor Authentication for Cockpit."
echo ""
echo "### Please download one of the many authenticator apps from the appstore of your choice."
echo ""
while true;
do
read -p "### Ready to start (y/n)? " myANSWER
case $myANSWER in
[Yy]* ) echo "### OK. Starting ..."; break;;
[Nn]* ) echo "### Exiting."; exit;;
esac
done
fuWRITE_PAM_CHANGES
fuGEN_TOKEN
echo "Done. Re-run this script by every user who needs Cockpit access."
echo ""

View File

@ -1,4 +1,21 @@
#!/bin/bash #!/bin/bash
# Run as root only.
myWHOAMI=$(whoami)
if [ "$myWHOAMI" != "root" ];
then
echo "Need to run as root ..."
exit
fi
if [ "$1" == "" ] || [ "$1" != "all" ] && [ "$1" != "base" ];
then
echo "Usage: backup_es_folders [all, base]"
echo " all = backup all ES folder"
echo " base = backup only Kibana index".
echo
exit
fi
# Backup all ES relevant folders # Backup all ES relevant folders
# Make sure ES is available # Make sure ES is available
myES="http://127.0.0.1:64298/" myES="http://127.0.0.1:64298/"
@ -16,8 +33,8 @@ fi
myCOUNT=1 myCOUNT=1
myDATE=$(date +%Y%m%d%H%M) myDATE=$(date +%Y%m%d%H%M)
myELKPATH="/data/elk/data" myELKPATH="/data/elk/data"
myKIBANAINDEXNAME=$(curl -s -XGET ''$myES'_cat/indices/' | grep -w ".kibana_1" | awk '{ print $4 }') myKIBANAINDEXNAME=$(curl -s -XGET ''$myES'_cat/indices/.kibana' | awk '{ print $4 }')
myKIBANAINDEXPATH=$myELKPATH/nodes/0/indices/$myKIBANAINDEXNAME myKIBANAINDEXPATH=$myELKPATH/indices/$myKIBANAINDEXNAME
# Let's ensure normal operation on exit or if interrupted ... # Let's ensure normal operation on exit or if interrupted ...
function fuCLEANUP { function fuCLEANUP {
@ -34,5 +51,11 @@ sleep 2
# Backup DB in 2 flavors # Backup DB in 2 flavors
echo "### Now backing up Elasticsearch folders ..." echo "### Now backing up Elasticsearch folders ..."
tar cvfz "elkall_"$myDATE".tgz" $myELKPATH if [ "$1" == "all" ];
tar cvfz "elkbase_"$myDATE".tgz" $myKIBANAINDEXPATH then
tar cvfz "elkall_"$myDATE".tgz" $myELKPATH
elif [ "$1" == "base" ];
then
tar cvfz "elkbase_"$myDATE".tgz" $myKIBANAINDEXPATH
fi

109
bin/blackhole.sh Executable file
View File

@ -0,0 +1,109 @@
#!/bin/bash
# Run as root only.
myWHOAMI=$(whoami)
if [ "$myWHOAMI" != "root" ]
then
echo "### Need to run as root ..."
echo
exit
fi
# Disclaimer
if [ "$1" == "" ];
then
echo "### Warning!"
echo "### This script will download and add blackhole routes for known mass scanners in an attempt to decrease the chance of detection."
echo "### IPs are neither curated or verified, use at your own risk!"
echo "###"
echo "### As long as <blackhole.sh del> is not executed the routes will be re-added on T-Pot start through </opt/tpot/bin/updateip.sh>."
echo "### Check with <ip r> or <dps.sh> if blackhole is enabled."
echo
echo "Usage: blackhole.sh add (add blackhole routes)"
echo " blackhole.sh del (delete blackhole routes)"
echo
exit
fi
# QnD paths, files
mkdir -p /etc/blackhole
cd /etc/blackhole
myFILE="mass_scanner.txt"
myURL="https://raw.githubusercontent.com/stamparm/maltrail/master/trails/static/mass_scanner.txt"
myBASELINE="500"
# Alternatively, using less routes, but blocking complete /24 networks
#myFILE="mass_scanner_cidr.txt"
#myURL="https://raw.githubusercontent.com/stamparm/maltrail/master/trails/static/mass_scanner_cidr.txt"
# Calculate age of downloaded list, read IPs
if [ -f "$myFILE" ];
then
myNOW=$(date +%s)
myOLD=$(date +%s -r "$myFILE")
myDAYS=$(( ($myNOW-$myOLD) / (60*60*24) ))
echo "### Downloaded $myFILE list is $myDAYS days old."
myBLACKHOLE_IPS=$(grep -o -P "\b(?:\d{1,3}\.){3}\d{1,3}\b" "$myFILE" | sort -u)
fi
# Let's load ip list
if [[ ! -f "$myFILE" && "$1" == "add" || "$myDAYS" -gt 30 ]];
then
echo "### Downloading $myFILE list."
aria2c --allow-overwrite -s16 -x 16 "$myURL" && \
myBLACKHOLE_IPS=$(grep -o -P "\b(?:\d{1,3}\.){3}\d{1,3}\b" "$myFILE" | sort -u)
fi
myCOUNT=$(echo $myBLACKHOLE_IPS | wc -w)
# Let's extract mass scanner IPs
if [ "$myCOUNT" -lt "$myBASELINE" ] && [ "$1" == "add" ];
then
echo "### Something went wrong. Please check contents of /etc/blackhole/$myFILE."
echo "### Aborting."
echo
exit
elif [ "$(ip r | grep 'blackhole' -c)" -gt "$myBASELINE" ] && [ "$1" == "add" ];
then
echo "### Blackhole already enabled."
echo "### Aborting."
echo
exit
fi
# Let's add blackhole routes for all mass scanner IPs
if [ "$1" == "add" ];
then
echo
echo -n "Now adding $myCOUNT IPs to blackhole."
for i in $myBLACKHOLE_IPS;
do
ip route add blackhole "$i"
echo -n "."
done
echo
echo "Added $(ip r | grep "blackhole" -c) IPs to blackhole."
echo
echo "### Remember!"
echo "### As long as <blackhole.sh del> is not executed the routes will be re-added on T-Pot start through </opt/tpot/bin/updateip.sh>."
echo "### Check with <ip r> or <dps.sh> if blackhole is enabled."
echo
exit
fi
# Let's delete blackhole routes for all mass scanner IPs
if [ "$1" == "del" ] && [ "$myCOUNT" -gt "$myBASELINE" ];
then
echo
echo -n "Now deleting $myCOUNT IPs from blackhole."
for i in $myBLACKHOLE_IPS;
do
ip route del blackhole "$i"
echo -n "."
done
echo
echo "$(ip r | grep 'blackhole' -c) IPs remaining in blackhole."
echo
rm "$myFILE"
else
echo "### Blackhole already disabled."
echo
fi

89
bin/change_ews_config.sh Executable file
View File

@ -0,0 +1,89 @@
#!/bin/bash
echo """
##############################
# T-POT DTAG Data Submission #
# Contact: #
# cert@telekom.de #
##############################
"""
# Got root?
myWHOAMI=$(whoami)
if [ "$myWHOAMI" != "root" ]
then
echo "Need to run as root ..."
sudo ./$0
exit
fi
printf "[*] Enter your API UserID: "
read apiUser
printf "[*] Enter your API Token: "
read apiToken
printf "[*] If you have multiple T-Pots running, give them each a unique NUMBER, e.g. '2' for your second T-Pot installation. Enter unique number for THIS T-Pot: "
read indexNumber
if ! [[ "$indexNumber" =~ ^[0-9]+$ ]]
then
echo "Sorry integers only. You have to start over..."
exit 1
fi
apiURL="https://community.sicherheitstacho.eu/ews-0.1/alert/postSimpleMessage"
printf "[*] Currently, your honeypot is configured to transmit data the default backend at 'https://community.sicherheitstacho.eu/ews-0.1/alert/postSimpleMessage'. Do you want to change this API endpoint? Only do this if you run your own PEBA backend instance? (N/y): "
read replyAPI
if [[ $replyAPI =~ ^[Yy]$ ]]
then
printf "[*] Enter your API endpoint URL and make sure it contains the full path, e.g. 'https://myDomain.local:9922/ews-0.1/alert/postSimpleMessage': "
read apiURL
fi
echo ""
echo "[*] Recap! You defined: "
echo "############################"
echo "API User: " $apiUser
echo "API Token: " $apiToken
echo "API URL: " $apiURL
echo "Unique numeric ID for your T-Pot Installation: " $indexNumber
echo "Specific honeypot-IDs will look like : <honeypotType>-"$apiUser"-"$indexNumber
echo "############################"
echo ""
printf "[*] Is the above correct (y/N)? "
read reply
if [[ ! $reply =~ ^[Yy]$ ]]
then
echo "OK, then run this again..."
exit 1
fi
echo ""
echo "[+] Creating config file with API UserID '$apiUser' and API Token '$apiToken'."
echo "[+] Fetching config file from github. Outgoing https requests must be enabled!"
wget -q https://raw.githubusercontent.com/telekom-security/tpotce/master/docker/ews/dist/ews.cfg -O ews.cfg.dist
if [[ -f "ews.cfg.dist" ]]; then
echo "[+] Successfully downloaded ews.cfg from github."
else
echo "[+] Could not download ews.cfg from github."
exit 1
fi
echo "[+] Patching ews.cfg API Credentials."
sed 's/community-01-user/'$apiUser'/' ews.cfg.dist > ews.cfg
sed -i 's/foth{a5maiCee8fineu7/'$apiToken'/' ews.cfg
echo "[+] Patching ews.cfg API Url."
apiURL=${apiURL////\\/};
sed -i 's/https:\/\/community.sicherheitstacho.eu\/ews-0.1\/alert\/postSimpleMessage/'$apiURL'/' ews.cfg
echo "[+] Patching ews.cfg honeypot IDs."
sed -i 's/community-01/'$apiUser'-'$indexNumber'/' ews.cfg
rm ews.cfg.dist
echo "[+] Changing tpot.yml to include new ews.cfg."
cp ews.cfg /data/ews/conf/ews.cfg
cp /opt/tpot/etc/tpot.yml /opt/tpot/etc/tpot.yml.bak
sed -i '/- \/data\/ews\/conf\/ews.ip:\/opt\/ewsposter\/ews.ip/a\ \ \ - \/data\/ews\/conf\/ews.cfg:\/opt\/ewsposter\/ews.cfg' /opt/tpot/etc/tpot.yml
echo "[+] Restarting T-Pot."
systemctl restart tpot
echo "[+] Done."

View File

@ -1,11 +1,13 @@
#!/bin/bash #!/bin/bash
# T-Pot Container Data Cleaner & Log Rotator # T-Pot Container Data Cleaner & Log Rotator
# Set colors # Set colors
myRED="" myRED=""
myGREEN="" myGREEN=""
myWHITE="" myWHITE=""
# Set pigz
myPIGZ=$(which pigz)
# Set persistence # Set persistence
myPERSISTENCE=$1 myPERSISTENCE=$1
@ -38,7 +40,7 @@ fuLOGROTATE () {
local myTANNERFTGZ="/data/tanner/files.tgz" local myTANNERFTGZ="/data/tanner/files.tgz"
# Ensure correct permissions and ownerships for logrotate to run without issues # Ensure correct permissions and ownerships for logrotate to run without issues
chmod 760 /data/ -R chmod 770 /data/ -R
chown tpot:tpot /data -R chown tpot:tpot /data -R
chmod 644 /data/nginx/conf -R chmod 644 /data/nginx/conf -R
chmod 644 /data/nginx/cert -R chmod 644 /data/nginx/cert -R
@ -47,17 +49,17 @@ chmod 644 /data/nginx/cert -R
logrotate -f -s $mySTATUS $myCONF logrotate -f -s $mySTATUS $myCONF
# Compressing some folders first and rotate them later # Compressing some folders first and rotate them later
if [ "$(fuEMPTY $myADBHONEYDL)" != "0" ]; then tar cvfz $myADBHONEYTGZ $myADBHONEYDL; fi if [ "$(fuEMPTY $myADBHONEYDL)" != "0" ]; then tar -I $myPIGZ -cvf $myADBHONEYTGZ $myADBHONEYDL; fi
if [ "$(fuEMPTY $myCOWRIETTYLOGS)" != "0" ]; then tar cvfz $myCOWRIETTYTGZ $myCOWRIETTYLOGS; fi if [ "$(fuEMPTY $myCOWRIETTYLOGS)" != "0" ]; then tar -I $myPIGZ -cvf $myCOWRIETTYTGZ $myCOWRIETTYLOGS; fi
if [ "$(fuEMPTY $myCOWRIEDL)" != "0" ]; then tar cvfz $myCOWRIEDLTGZ $myCOWRIEDL; fi if [ "$(fuEMPTY $myCOWRIEDL)" != "0" ]; then tar -I $myPIGZ -cvf $myCOWRIEDLTGZ $myCOWRIEDL; fi
if [ "$(fuEMPTY $myDIONAEABI)" != "0" ]; then tar cvfz $myDIONAEABITGZ $myDIONAEABI; fi if [ "$(fuEMPTY $myDIONAEABI)" != "0" ]; then tar -I $myPIGZ -cvf $myDIONAEABITGZ $myDIONAEABI; fi
if [ "$(fuEMPTY $myDIONAEABIN)" != "0" ]; then tar cvfz $myDIONAEABINTGZ $myDIONAEABIN; fi if [ "$(fuEMPTY $myDIONAEABIN)" != "0" ]; then tar -I $myPIGZ -cvf $myDIONAEABINTGZ $myDIONAEABIN; fi
if [ "$(fuEMPTY $myHONEYTRAPATTACKS)" != "0" ]; then tar cvfz $myHONEYTRAPATTACKSTGZ $myHONEYTRAPATTACKS; fi if [ "$(fuEMPTY $myHONEYTRAPATTACKS)" != "0" ]; then tar -I $myPIGZ -cvf $myHONEYTRAPATTACKSTGZ $myHONEYTRAPATTACKS; fi
if [ "$(fuEMPTY $myHONEYTRAPDL)" != "0" ]; then tar cvfz $myHONEYTRAPDLTGZ $myHONEYTRAPDL; fi if [ "$(fuEMPTY $myHONEYTRAPDL)" != "0" ]; then tar -I $myPIGZ -cvf $myHONEYTRAPDLTGZ $myHONEYTRAPDL; fi
if [ "$(fuEMPTY $myTANNERF)" != "0" ]; then tar cvfz $myTANNERFTGZ $myTANNERF; fi if [ "$(fuEMPTY $myTANNERF)" != "0" ]; then tar -I $myPIGZ -cvf $myTANNERFTGZ $myTANNERF; fi
# Ensure correct permissions and ownership for previously created archives # Ensure correct permissions and ownership for previously created archives
chmod 760 $myADBHONEYTGZ $myCOWRIETTYTGZ $myCOWRIEDLTGZ $myDIONAEABITGZ $myDIONAEABINTGZ $myHONEYTRAPATTACKSTGZ $myHONEYTRAPDLTGZ $myTANNERFTGZ chmod 770 $myADBHONEYTGZ $myCOWRIETTYTGZ $myCOWRIEDLTGZ $myDIONAEABITGZ $myDIONAEABINTGZ $myHONEYTRAPATTACKSTGZ $myHONEYTRAPDLTGZ $myTANNERFTGZ
chown tpot:tpot $myADBHONEYTGZ $myCOWRIETTYTGZ $myCOWRIEDLTGZ $myDIONAEABITGZ $myDIONAEABINTGZ $myHONEYTRAPATTACKSTGZ $myHONEYTRAPDLTGZ $myTANNERFTGZ chown tpot:tpot $myADBHONEYTGZ $myCOWRIETTYTGZ $myCOWRIEDLTGZ $myDIONAEABITGZ $myDIONAEABINTGZ $myHONEYTRAPATTACKSTGZ $myHONEYTRAPDLTGZ $myTANNERFTGZ
# Need to remove subfolders since too many files cause rm to exit with errors # Need to remove subfolders since too many files cause rm to exit with errors
@ -65,7 +67,7 @@ rm -rf $myADBHONEYDL $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $my
# Recreate subfolders with correct permissions and ownership # Recreate subfolders with correct permissions and ownership
mkdir -p $myADBHONEYDL $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL $myTANNERF mkdir -p $myADBHONEYDL $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL $myTANNERF
chmod 760 $myADBHONEYDL $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL $myTANNERF chmod 770 $myADBHONEYDL $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL $myTANNERF
chown tpot:tpot $myADBHONEYDL $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL $myTANNERF chown tpot:tpot $myADBHONEYDL $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL $myTANNERF
# Run logrotate again to account for previously created archives - DO NOT FORCE HERE! # Run logrotate again to account for previously created archives - DO NOT FORCE HERE!
@ -76,7 +78,7 @@ logrotate -s $mySTATUS $myCONF
fuADBHONEY () { fuADBHONEY () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/adbhoney/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/adbhoney/*; fi
mkdir -p /data/adbhoney/log/ /data/adbhoney/downloads/ mkdir -p /data/adbhoney/log/ /data/adbhoney/downloads/
chmod 760 /data/adbhoney/ -R chmod 770 /data/adbhoney/ -R
chown tpot:tpot /data/adbhoney/ -R chown tpot:tpot /data/adbhoney/ -R
} }
@ -84,15 +86,23 @@ fuADBHONEY () {
fuCISCOASA () { fuCISCOASA () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/ciscoasa/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/ciscoasa/*; fi
mkdir -p /data/ciscoasa/log mkdir -p /data/ciscoasa/log
chmod 760 /data/ciscoasa -R chmod 770 /data/ciscoasa -R
chown tpot:tpot /data/ciscoasa -R chown tpot:tpot /data/ciscoasa -R
} }
# Let's create a function to clean up and prepare citrixhoneypot data
fuCITRIXHONEYPOT () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/citrixhoneypot/*; fi
mkdir -p /data/citrixhoneypot/logs/
chmod 770 /data/citrixhoneypot/ -R
chown tpot:tpot /data/citrixhoneypot/ -R
}
# Let's create a function to clean up and prepare conpot data # Let's create a function to clean up and prepare conpot data
fuCONPOT () { fuCONPOT () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/conpot/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/conpot/*; fi
mkdir -p /data/conpot/log mkdir -p /data/conpot/log
chmod 760 /data/conpot -R chmod 770 /data/conpot -R
chown tpot:tpot /data/conpot -R chown tpot:tpot /data/conpot -R
} }
@ -100,15 +110,32 @@ fuCONPOT () {
fuCOWRIE () { fuCOWRIE () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/cowrie/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/cowrie/*; fi
mkdir -p /data/cowrie/log/tty/ /data/cowrie/downloads/ /data/cowrie/keys/ /data/cowrie/misc/ mkdir -p /data/cowrie/log/tty/ /data/cowrie/downloads/ /data/cowrie/keys/ /data/cowrie/misc/
chmod 760 /data/cowrie -R chmod 770 /data/cowrie -R
chown tpot:tpot /data/cowrie -R chown tpot:tpot /data/cowrie -R
} }
# Let's create a function to clean up and prepare ddospot data
fuDDOSPOT () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/ddospot/log; fi
mkdir -p /data/ddospot/log
chmod 770 /data/ddospot -R
chown tpot:tpot /data/ddospot -R
}
# Let's create a function to clean up and prepare dicompot data
fuDICOMPOT () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/dicompot/log; fi
mkdir -p /data/dicompot/log
mkdir -p /data/dicompot/images
chmod 770 /data/dicompot -R
chown tpot:tpot /data/dicompot -R
}
# Let's create a function to clean up and prepare dionaea data # Let's create a function to clean up and prepare dionaea data
fuDIONAEA () { fuDIONAEA () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/dionaea/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/dionaea/*; fi
mkdir -p /data/dionaea/log /data/dionaea/bistreams /data/dionaea/binaries /data/dionaea/rtp /data/dionaea/roots/ftp /data/dionaea/roots/tftp /data/dionaea/roots/www /data/dionaea/roots/upnp mkdir -p /data/dionaea/log /data/dionaea/bistreams /data/dionaea/binaries /data/dionaea/rtp /data/dionaea/roots/ftp /data/dionaea/roots/tftp /data/dionaea/roots/www /data/dionaea/roots/upnp
chmod 760 /data/dionaea -R chmod 770 /data/dionaea -R
chown tpot:tpot /data/dionaea -R chown tpot:tpot /data/dionaea -R
} }
@ -116,7 +143,7 @@ fuDIONAEA () {
fuELASTICPOT () { fuELASTICPOT () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/elasticpot/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/elasticpot/*; fi
mkdir -p /data/elasticpot/log mkdir -p /data/elasticpot/log
chmod 760 /data/elasticpot -R chmod 770 /data/elasticpot -R
chown tpot:tpot /data/elasticpot -R chown tpot:tpot /data/elasticpot -R
} }
@ -126,47 +153,95 @@ fuELK () {
# ELK daemon log files will be removed # ELK daemon log files will be removed
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/elk/log/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/elk/log/*; fi
mkdir -p /data/elk mkdir -p /data/elk
chmod 760 /data/elk -R chmod 770 /data/elk -R
chown tpot:tpot /data/elk -R chown tpot:tpot /data/elk -R
} }
# Let's create a function to clean up and prepare glastopf data # Let's create a function to clean up and prepare endlessh data
fuGLASTOPF () { fuENDLESSH () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/glastopf/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/endlessh/log; fi
mkdir -p /data/glastopf/db /data/glastopf/log mkdir -p /data/endlessh/log
chmod 760 /data/glastopf -R chmod 770 /data/endlessh -R
chown tpot:tpot /data/glastopf -R chown tpot:tpot /data/endlessh -R
}
# Let's create a function to clean up and prepare fatt data
fuFATT () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/fatt/*; fi
mkdir -p /data/fatt/log
chmod 770 -R /data/fatt
chown tpot:tpot -R /data/fatt
} }
# Let's create a function to clean up and prepare glastopf data # Let's create a function to clean up and prepare glastopf data
fuGLUTTON () { fuGLUTTON () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/glutton/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/glutton/*; fi
mkdir -p /data/glutton/log mkdir -p /data/glutton/log
chmod 760 /data/glutton -R chmod 770 /data/glutton -R
chown tpot:tpot /data/glutton -R chown tpot:tpot /data/glutton -R
} }
# Let's create a function to clean up and prepare hellpot data
fuHELLPOT () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/hellpot/log; fi
mkdir -p /data/hellpot/log
chmod 770 /data/hellpot -R
chown tpot:tpot /data/hellpot -R
}
# Let's create a function to clean up and prepare heralding data # Let's create a function to clean up and prepare heralding data
fuHERALDING () { fuHERALDING () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/heralding/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/heralding/*; fi
mkdir -p /data/heralding/log mkdir -p /data/heralding/log
chmod 760 /data/heralding -R chmod 770 /data/heralding -R
chown tpot:tpot /data/heralding -R chown tpot:tpot /data/heralding -R
} }
# Let's create a function to clean up and prepare honeypots data
fuHONEYPOTS () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/honeypots/*; fi
mkdir -p /data/honeypots/log
chmod 770 /data/honeypots -R
chown tpot:tpot /data/honeypots -R
}
# Let's create a function to clean up and prepare honeysap data
fuHONEYSAP () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/honeysap/*; fi
mkdir -p /data/honeysap/log
chmod 770 /data/honeysap -R
chown tpot:tpot /data/honeysap -R
}
# Let's create a function to clean up and prepare honeytrap data # Let's create a function to clean up and prepare honeytrap data
fuHONEYTRAP () { fuHONEYTRAP () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/honeytrap/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/honeytrap/*; fi
mkdir -p /data/honeytrap/log/ /data/honeytrap/attacks/ /data/honeytrap/downloads/ mkdir -p /data/honeytrap/log/ /data/honeytrap/attacks/ /data/honeytrap/downloads/
chmod 760 /data/honeytrap/ -R chmod 770 /data/honeytrap/ -R
chown tpot:tpot /data/honeytrap/ -R chown tpot:tpot /data/honeytrap/ -R
} }
# Let's create a function to clean up and prepare ipphoney data
fuIPPHONEY () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/ipphoney/*; fi
mkdir -p /data/ipphoney/log
chmod 770 /data/ipphoney -R
chown tpot:tpot /data/ipphoney -R
}
# Let's create a function to clean up and prepare log4pot data
fuLOG4POT () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/log4pot/*; fi
mkdir -p /data/log4pot/log
chmod 770 /data/log4pot -R
chown tpot:tpot /data/log4pot -R
}
# Let's create a function to clean up and prepare mailoney data # Let's create a function to clean up and prepare mailoney data
fuMAILONEY () { fuMAILONEY () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/mailoney/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/mailoney/*; fi
mkdir -p /data/mailoney/log/ mkdir -p /data/mailoney/log/
chmod 760 /data/mailoney/ -R chmod 770 /data/mailoney/ -R
chown tpot:tpot /data/mailoney/ -R chown tpot:tpot /data/mailoney/ -R
} }
@ -174,7 +249,7 @@ fuMAILONEY () {
fuMEDPOT () { fuMEDPOT () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/medpot/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/medpot/*; fi
mkdir -p /data/medpot/log/ mkdir -p /data/medpot/log/
chmod 760 /data/medpot/ -R chmod 770 /data/medpot/ -R
chown tpot:tpot /data/medpot/ -R chown tpot:tpot /data/medpot/ -R
} }
@ -190,15 +265,31 @@ fuNGINX () {
fuRDPY () { fuRDPY () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/rdpy/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/rdpy/*; fi
mkdir -p /data/rdpy/log/ mkdir -p /data/rdpy/log/
chmod 760 /data/rdpy/ -R chmod 770 /data/rdpy/ -R
chown tpot:tpot /data/rdpy/ -R chown tpot:tpot /data/rdpy/ -R
} }
# Let's create a function to clean up and prepare redishoneypot data
fuREDISHONEYPOT () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/redishoneypot/log; fi
mkdir -p /data/redishoneypot/log
chmod 770 /data/redishoneypot -R
chown tpot:tpot /data/redishoneypot -R
}
# Let's create a function to clean up and prepare sentrypeer data
fuSENTRYPEER () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/sentrypeer/log; fi
mkdir -p /data/sentrypeer/log
chmod 770 /data/sentrypeer -R
chown tpot:tpot /data/sentrypeer -R
}
# Let's create a function to prepare spiderfoot db # Let's create a function to prepare spiderfoot db
fuSPIDERFOOT () { fuSPIDERFOOT () {
mkdir -p /data/spiderfoot mkdir -p /data/spiderfoot
touch /data/spiderfoot/spiderfoot.db touch /data/spiderfoot/spiderfoot.db
chmod 760 -R /data/spiderfoot chmod 770 -R /data/spiderfoot
chown tpot:tpot -R /data/spiderfoot chown tpot:tpot -R /data/spiderfoot
} }
@ -206,7 +297,7 @@ fuSPIDERFOOT () {
fuSURICATA () { fuSURICATA () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/suricata/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/suricata/*; fi
mkdir -p /data/suricata/log mkdir -p /data/suricata/log
chmod 760 -R /data/suricata chmod 770 -R /data/suricata
chown tpot:tpot -R /data/suricata chown tpot:tpot -R /data/suricata
} }
@ -214,7 +305,7 @@ fuSURICATA () {
fuP0F () { fuP0F () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/p0f/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/p0f/*; fi
mkdir -p /data/p0f/log mkdir -p /data/p0f/log
chmod 760 -R /data/p0f chmod 770 -R /data/p0f
chown tpot:tpot -R /data/p0f chown tpot:tpot -R /data/p0f
} }
@ -222,7 +313,7 @@ fuP0F () {
fuTANNER () { fuTANNER () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/tanner/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/tanner/*; fi
mkdir -p /data/tanner/log /data/tanner/files mkdir -p /data/tanner/log /data/tanner/files
chmod 760 -R /data/tanner chmod 770 -R /data/tanner
chown tpot:tpot -R /data/tanner chown tpot:tpot -R /data/tanner
} }
@ -250,19 +341,30 @@ if [ "$myPERSISTENCE" = "on" ];
echo "Cleaning up and preparing data folders." echo "Cleaning up and preparing data folders."
fuADBHONEY fuADBHONEY
fuCISCOASA fuCISCOASA
fuCITRIXHONEYPOT
fuCONPOT fuCONPOT
fuCOWRIE fuCOWRIE
fuDDOSPOT
fuDICOMPOT
fuDIONAEA fuDIONAEA
fuELASTICPOT fuELASTICPOT
fuELK fuELK
fuGLASTOPF fuENDLESSH
fuFATT
fuGLUTTON fuGLUTTON
fuHERALDING fuHERALDING
fuHELLPOT
fuHONEYSAP
fuHONEYPOTS
fuHONEYTRAP fuHONEYTRAP
fuIPPHONEY
fuLOG4POT
fuMAILONEY fuMAILONEY
fuMEDPOT fuMEDPOT
fuNGINX fuNGINX
fuREDISHONEYPOT
fuRDPY fuRDPY
fuSENTRYPEER
fuSPIDERFOOT fuSPIDERFOOT
fuSURICATA fuSURICATA
fuP0F fuP0F

182
bin/deploy.sh Executable file
View File

@ -0,0 +1,182 @@
#!/bin/bash
# Do we have root?
function fuGOT_ROOT {
echo
echo -n "### Checking for root: "
if [ "$(whoami)" != "root" ];
then
echo "[ NOT OK ]"
echo "### Please run as root."
echo "### Example: sudo $0"
exit
else
echo "[ OK ]"
fi
}
function fuDEPLOY_SENSOR () {
echo
echo "###############################"
echo "# Deploying to T-Pot Hive ... #"
echo "###############################"
echo
sshpass -e ssh -4 -t -T -l "$MY_TPOT_USERNAME" -p 64295 "$MY_HIVE_IP" << EOF
echo "$SSHPASS" | sudo -S bash -c 'useradd -m -s /sbin/nologin -G tpotlogs "$MY_HIVE_USERNAME";
mkdir -p /home/"$MY_HIVE_USERNAME"/.ssh;
echo "$MY_SENSOR_PUBLICKEY" >> /home/"$MY_HIVE_USERNAME"/.ssh/authorized_keys;
chmod 600 /home/"$MY_HIVE_USERNAME"/.ssh/authorized_keys;
chmod 755 /home/"$MY_HIVE_USERNAME"/.ssh;
chown "$MY_HIVE_USERNAME":"$MY_HIVE_USERNAME" -R /home/"$MY_HIVE_USERNAME"/.ssh'
EOF
echo
echo "###########################"
echo "# Done. Please reboot ... #"
echo "###########################"
echo
exit 0
}
# Check Hive availability
function fuCHECK_HIVE () {
echo
echo "############################################"
echo "# Checking for T-Pot Hive availability ... #"
echo "############################################"
echo
sshpass -e ssh -4 -t -l "$MY_TPOT_USERNAME" -p 64295 -f -N -L64305:127.0.0.1:64305 "$MY_HIVE_IP" -o "StrictHostKeyChecking=no"
if [ $? -eq 0 ];
then
echo
echo "#########################"
echo "# T-Pot Hive available! #"
echo "#########################"
echo
myHIVE_OK=$(curl -s http://127.0.0.1:64305)
if [ "$myHIVE_OK" == "ok" ];
then
echo
echo "##############################"
echo "# T-Pot Hive tunnel test OK! #"
echo "##############################"
echo
kill -9 $(pidof ssh)
else
echo
echo "######################################################"
echo "# T-Pot Hive tunnel test FAILED! #"
echo "# Tunneled port tcp/64305 unreachable on T-Pot Hive. #"
echo "# Aborting. #"
echo "######################################################"
echo
kill -9 $(pidof ssh)
rm $MY_SENSOR_PUBLICKEYFILE
rm $MY_SENSOR_PRIVATEKEYFILE
rm $MY_LS_ENVCONFIGFILE
exit 1
fi;
else
echo
echo "#################################################################"
echo "# Something went wrong, most likely T-Pot Hive was unreachable! #"
echo "# Aborting. #"
echo "#################################################################"
echo
rm $MY_SENSOR_PUBLICKEYFILE
rm $MY_SENSOR_PRIVATEKEYFILE
rm $MY_LS_ENVCONFIGFILE
exit 1
fi;
}
function fuGET_DEPLOY_DATA () {
echo
echo "### Please provide data from your T-Pot Hive installation."
echo "### This usually is the one running the 'T-Pot Hive' type."
echo "### You will be needing the OS user (typically 'tsec'), the users' password and the IP / FQDN."
echo "### Do not worry, the password will not be persisted!"
echo
read -p "Username: " MY_TPOT_USERNAME
read -s -p "Password: " SSHPASS
echo
export SSHPASS
read -p "IP / FQDN: " MY_HIVE_IP
MY_HIVE_USERNAME="$(hostname)"
MY_TPOT_TYPE="SENSOR"
MY_LS_ENVCONFIGFILE="/data/elk/logstash/ls_environment"
MY_SENSOR_PUBLICKEYFILE="/data/elk/logstash/$MY_HIVE_USERNAME.pub"
MY_SENSOR_PRIVATEKEYFILE="/data/elk/logstash/$MY_HIVE_USERNAME"
if ! [ -s "$MY_SENSOR_PRIVATEKEYFILE" ] && ! [ -s "$MY_SENSOR_PUBLICKEYFILE" ];
then
echo
echo "##############################"
echo "# Generating ssh keyfile ... #"
echo "##############################"
echo
mkdir -p /data/elk/logstash
ssh-keygen -f "$MY_SENSOR_PRIVATEKEYFILE" -N "" -C "$MY_HIVE_USERNAME"
MY_SENSOR_PUBLICKEY="$(cat "$MY_SENSOR_PUBLICKEYFILE")"
else
echo
echo "#############################################"
echo "# There is already a ssh keyfile. Aborting. #"
echo "#############################################"
echo
exit 1
fi
echo
echo "###########################################################"
echo "# Writing config to /data/elk/logstash/ls_environment. #"
echo "# If you make changes to this file, you need to reboot or #"
echo "# run /opt/tpot/bin/updateip.sh. #"
echo "###########################################################"
echo
tee $MY_LS_ENVCONFIGFILE << EOF
MY_TPOT_TYPE=$MY_TPOT_TYPE
MY_SENSOR_PRIVATEKEYFILE=$MY_SENSOR_PRIVATEKEYFILE
MY_HIVE_USERNAME=$MY_HIVE_USERNAME
MY_HIVE_IP=$MY_HIVE_IP
EOF
}
# Deploy Pot to Hive
fuGOT_ROOT
echo
echo "#################################"
echo "# Ship T-Pot Logs to T-Pot Hive #"
echo "#################################"
echo
echo "If you already have a T-Pot Hive installation running and"
echo "this T-Pot installation is running the type \"Pot\" the"
echo "script will automagically setup this T-Pot to ship and"
echo "prepare the Hive to receive logs from this T-Pot."
echo
echo
echo "###################################"
echo "# Deploy T-Pot Logs to T-Pot Hive #"
echo "###################################"
echo
echo "[c] - Continue deplyoment"
echo "[q] - Abort and exit"
echo
while [ 1 != 2 ]
do
read -s -n 1 -p "Your choice: " mySELECT
echo $mySELECT
case "$mySELECT" in
[c,C])
fuGET_DEPLOY_DATA
fuCHECK_HIVE
fuDEPLOY_SENSOR
break
;;
[q,Q])
echo "Aborted."
exit 0
;;
esac
done

View File

@ -6,7 +6,7 @@ myKIBANA="http://127.0.0.1:64296/"
myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c green) myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c green)
if ! [ "$myESSTATUS" = "1" ] if ! [ "$myESSTATUS" = "1" ]
then then
echo "### Elasticsearch is not available, try starting via 'systemctl start elk'." echo "### Elasticsearch is not available, try starting via 'systemctl start tpot'."
exit exit
else else
echo "### Elasticsearch is available, now continuing." echo "### Elasticsearch is available, now continuing."
@ -15,24 +15,25 @@ fi
# Set vars # Set vars
myDATE=$(date +%Y%m%d%H%M) myDATE=$(date +%Y%m%d%H%M)
myINDEXCOUNT=$(curl -s -XGET ''$myKIBANA'api/saved_objects/_find?type=index-pattern' | jq '.saved_objects[].attributes' | tr '\\' '\n' | grep "scripted" | wc -w) myINDEXCOUNT=$(curl -s -XGET ''$myKIBANA'api/saved_objects/_find?type=index-pattern' | jq '.saved_objects[].attributes' | tr '\\' '\n' | grep -E "scripted|url" | wc -w)
myINDEXID=$(curl -s -XGET ''$myKIBANA'api/saved_objects/_find?type=index-pattern' | jq '.saved_objects[].id' | tr -d '"') myINDEXID=$(curl -s -XGET ''$myKIBANA'api/saved_objects/_find?type=index-pattern' | jq '.saved_objects[].id' | tr -d '"')
myDASHBOARDS=$(curl -s -XGET ''$myKIBANA'api/saved_objects/_find?type=dashboard&per_page=300' | jq '.saved_objects[].id' | tr -d '"') myDASHBOARDS=$(curl -s -XGET ''$myKIBANA'api/saved_objects/_find?type=dashboard&per_page=500' | jq '.saved_objects[].id' | tr -d '"')
myVISUALIZATIONS=$(curl -s -XGET ''$myKIBANA'api/saved_objects/_find?type=visualization&per_page=300' | jq '.saved_objects[].id' | tr -d '"') myVISUALIZATIONS=$(curl -s -XGET ''$myKIBANA'api/saved_objects/_find?type=visualization&per_page=500' | jq '.saved_objects[].id' | tr -d '"')
mySEARCHES=$(curl -s -XGET ''$myKIBANA'api/saved_objects/_find?type=search&per_page=300' | jq '.saved_objects[].id' | tr -d '"') mySEARCHES=$(curl -s -XGET ''$myKIBANA'api/saved_objects/_find?type=search&per_page=500' | jq '.saved_objects[].id' | tr -d '"')
myCONFIGS=$(curl -s -XGET ''$myKIBANA'api/saved_objects/_find?type=config&per_page=500' | jq '.saved_objects[].id' | tr -d '"')
myCOL1="" myCOL1=""
myCOL0="" myCOL0=""
# Let's ensure normal operation on exit or if interrupted ... # Let's ensure normal operation on exit or if interrupted ...
function fuCLEANUP { function fuCLEANUP {
rm -rf patterns/ dashboards/ visualizations/ searches/ rm -rf patterns/ dashboards/ visualizations/ searches/ configs/
} }
trap fuCLEANUP EXIT trap fuCLEANUP EXIT
# Export index patterns # Export index patterns
mkdir -p patterns mkdir -p patterns
echo $myCOL1"### Now exporting"$myCOL0 $myINDEXCOUNT $myCOL1"index pattern fields." $myCOL0 echo $myCOL1"### Now exporting"$myCOL0 $myINDEXCOUNT $myCOL1"index pattern fields." $myCOL0
curl -s -XGET ''$myKIBANA'api/saved_objects/index-pattern/'$myINDEXID'' | jq '. | {attributes}' > patterns/$myINDEXID.json & curl -s -XGET ''$myKIBANA'api/saved_objects/index-pattern/'$myINDEXID'' | jq '. | {attributes, references}' > patterns/$myINDEXID.json &
echo echo
# Export dashboards # Export dashboards
@ -41,7 +42,7 @@ echo $myCOL1"### Now exporting"$myCOL0 $(echo $myDASHBOARDS | wc -w) $myCOL1"das
for i in $myDASHBOARDS; for i in $myDASHBOARDS;
do do
echo $myCOL1"###### "$i $myCOL0 echo $myCOL1"###### "$i $myCOL0
curl -s -XGET ''$myKIBANA'api/saved_objects/dashboard/'$i'' | jq '. | {attributes}' > dashboards/$i.json & curl -s -XGET ''$myKIBANA'api/saved_objects/dashboard/'$i'' | jq '. | {attributes, references}' > dashboards/$i.json &
done; done;
echo echo
@ -51,7 +52,7 @@ echo $myCOL1"### Now exporting"$myCOL0 $(echo $myVISUALIZATIONS | wc -w) $myCOL1
for i in $myVISUALIZATIONS; for i in $myVISUALIZATIONS;
do do
echo $myCOL1"###### "$i $myCOL0 echo $myCOL1"###### "$i $myCOL0
curl -s -XGET ''$myKIBANA'api/saved_objects/visualization/'$i'' | jq '. | {attributes}' > visualizations/$i.json & curl -s -XGET ''$myKIBANA'api/saved_objects/visualization/'$i'' | jq '. | {attributes, references}' > visualizations/$i.json &
done; done;
echo echo
@ -61,7 +62,17 @@ echo $myCOL1"### Now exporting"$myCOL0 $(echo $mySEARCHES | wc -w) $myCOL1"searc
for i in $mySEARCHES; for i in $mySEARCHES;
do do
echo $myCOL1"###### "$i $myCOL0 echo $myCOL1"###### "$i $myCOL0
curl -s -XGET ''$myKIBANA'api/saved_objects/search/'$i'' | jq '. | {attributes}' > searches/$i.json & curl -s -XGET ''$myKIBANA'api/saved_objects/search/'$i'' | jq '. | {attributes, references}' > searches/$i.json &
done;
echo
# Export configs
mkdir -p configs
echo $myCOL1"### Now exporting"$myCOL0 $(echo $myCONFIGS | wc -w) $myCOL1"configs." $myCOL0
for i in $myCONFIGS;
do
echo $myCOL1"###### "$i $myCOL0
curl -s -XGET ''$myKIBANA'api/saved_objects/config/'$i'' | jq '. | {attributes, references}' > configs/$i.json &
done; done;
echo echo
@ -70,7 +81,7 @@ wait
# Building tar archive # Building tar archive
echo $myCOL1"### Now building archive"$myCOL0 "kibana-objects_"$myDATE".tgz" echo $myCOL1"### Now building archive"$myCOL0 "kibana-objects_"$myDATE".tgz"
tar cvfz kibana-objects_$myDATE.tgz patterns dashboards visualizations searches > /dev/null tar cvfz kibana-objects_$myDATE.tgz patterns dashboards visualizations searches configs > /dev/null
# Stats # Stats
echo echo
@ -79,4 +90,5 @@ echo $myCOL1"###### Exported"$myCOL0 $myINDEXCOUNT $myCOL1"index patterns." $myC
echo $myCOL1"###### Exported"$myCOL0 $(echo $myDASHBOARDS | wc -w) $myCOL1"dashboards." $myCOL0 echo $myCOL1"###### Exported"$myCOL0 $(echo $myDASHBOARDS | wc -w) $myCOL1"dashboards." $myCOL0
echo $myCOL1"###### Exported"$myCOL0 $(echo $myVISUALIZATIONS | wc -w) $myCOL1"visualizations." $myCOL0 echo $myCOL1"###### Exported"$myCOL0 $(echo $myVISUALIZATIONS | wc -w) $myCOL1"visualizations." $myCOL0
echo $myCOL1"###### Exported"$myCOL0 $(echo $mySEARCHES | wc -w) $myCOL1"searches." $myCOL0 echo $myCOL1"###### Exported"$myCOL0 $(echo $mySEARCHES | wc -w) $myCOL1"searches." $myCOL0
echo $myCOL1"###### Exported"$myCOL0 $(echo $myCONFIGS | wc -w) $myCOL1"configs." $myCOL0
echo echo

122
bin/deprecated/hptest.sh Executable file
View File

@ -0,0 +1,122 @@
#!/bin/bash
myHOST="$1"
myPACKAGES="dcmtk netcat nmap"
myMEDPOTPACKET="
MSH|^~\&|ADT1|MCM|LABADT|MCM|198808181126|SECURITY|ADT^A01|MSG00001-|P|2.6
EVN|A01|198808181123
PID|||PATID1234^5^M11^^AN||JONES^WILLIAM^A^III||19610615|M||2106-3|677 DELAWARE AVENUE^^EVERETT^MA^02149|GL|(919)379-1212|(919)271-3434~(919)277-3114||S||PATID12345001^2^M10^^ACSN|123456789|9-87654^NC
NK1|1|JONES^BARBARA^K|SPO|||||20011105
NK1|1|JONES^MICHAEL^A|FTH
PV1|1|I|2000^2012^01||||004777^LEBAUER^SIDNEY^J.|||SUR||-||ADM|A0
AL1|1||^PENICILLIN||CODE16~CODE17~CODE18
AL1|2||^CAT DANDER||CODE257
DG1|001|I9|1550|MAL NEO LIVER, PRIMARY|19880501103005|F
PR1|2234|M11|111^CODE151|COMMON PROCEDURES|198809081123
ROL|45^RECORDER^ROLE MASTER LIST|AD|RO|KATE^SMITH^ELLEN|199505011201
GT1|1122|1519|BILL^GATES^A
IN1|001|A357|1234|BCMD|||||132987
IN2|ID1551001|SSN12345678
ROL|45^RECORDER^ROLE MASTER LIST|AD|RO|KATE^ELLEN|199505011201"
function fuGOTROOT {
myWHOAMI=$(whoami)
if [ "$myWHOAMI" != "root" ]
then
echo "Need to run as root ..."
exit
fi
}
function fuCHECKDEPS {
myINST=""
for myDEPS in $myPACKAGES;
do
myOK=$(dpkg -s $myDEPS | grep ok | awk '{ print $3 }');
if [ "$myOK" != "ok" ]
then
myINST=$(echo $myINST $myDEPS)
fi
done
if [ "$myINST" != "" ]
then
apt-get update -y
for myDEPS in $myINST;
do
apt-get install $myDEPS -y
done
fi
}
function fuCHECKFORARGS {
if [ "$myHOST" != "" ];
then
echo "All arguments met. Continuing."
else
echo "Usage: hp_test.sh <[host or ip]>"
exit
fi
}
function fuGETPORTS {
myDOCKERCOMPOSEPORTS=$(cat $myDOCKERCOMPOSEYML | yq -r '.services[].ports' | grep ':' | sed -e s/127.0.0.1// | tr -d '", ' | sed -e s/^:// | cut -f1 -d ':' | grep -v "6429\|6430" | sort -gu)
myPORTS=$(for i in $myDOCKERCOMPOSEPORTS; do echo "$i"; done)
echo "Found these ports enabled:"
echo "$myPORTS"
exit
}
function fuSCAN {
local myTIMEOUT="$1"
local mySCANPORT="$2"
local mySCANIP="$3"
local mySCANOPTS="$4"
timeout --foreground ${myTIMEOUT} nmap ${mySCANOPTS} -T4 -v -p ${mySCANPORT} ${mySCANIP} &
}
# Main
fuGOTROOT
fuCHECKDEPS
fuCHECKFORARGS
echo "Starting scans ..."
echo "$myMEDPOTPACKET" | nc "$myHOST" 2575 &
curl -XGET "http://$myHOST:9200/logstash-*/_search" &
curl -XPOST -H "Content-Type: application/json" -d '{"name":"test","email":"test@test.com"}' "http://$myHOST:9200/test" &
echo "I20100" | timeout --foreground 3 nc "$myHOST" 10001 &
findscu -P -k PatientName="*" $myHOST 11112 &
getscu -P -k PatientName="*" $myHOST 11112 &
telnet $myHOST 3299 &
fuSCAN "180" "7,8,102,135,161,1025,1080,5000,9200" "$myHOST" "-sC -sS -sU -sV"
fuSCAN "180" "2048,4096,5432" "$myHOST" "-sC -sS -sU -sV --version-light"
fuSCAN "120" "20,21" "$myHOST" "--script=ftp* -sC -sS -sV"
fuSCAN "120" "22" "$myHOST" "--script=ssh2-enum-algos,ssh-auth-methods,ssh-hostkey,ssh-publickey-acceptance,sshv1 -sC -sS -sV"
fuSCAN "30" "22" "$myHOST" "--script=ssh-brute"
fuSCAN "120" "23,2323,2324" "$myHOST" "--script=telnet-encryption,telnet-ntlm-info -sC -sS -sV --version-light"
fuSCAN "120" "25" "$myHOST" "--script=smtp* -sC -sS -sV"
fuSCAN "180" "42" "$myHOST" "-sC -sS -sV"
fuSCAN "120" "69" "$myHOST" "--script=tftp-enum -sU"
fuSCAN "120" "80,81,8080,8443" "$myHOST" "-sC -sS -sV"
fuSCAN "120" "110,995" "$myHOST" "--script=pop3-capabilities,pop3-ntlm-info -sC -sS -sV --version-light"
fuSCAN "30" "110,995" "$myHOST" "--script=pop3-brute -sS"
fuSCAN "120" "143,993" "$myHOST" "--script=imap-capabilities,imap-ntlm-info -sC -sS -sV --version-light"
fuSCAN "30" "143,993" "$myHOST" "--script=imap-brute -sS"
fuSCAN "240" "445" "$myHOST" "--script=smb-vuln* -sS -sU"
fuSCAN "120" "502" "$myHOST" "--script=modbus-discover -sS -sU"
fuSCAN "120" "623" "$myHOST" "--script=ipmi-cipher-zero,ipmi-version,supermicro-ipmi -sS -sU"
fuSCAN "30" "623" "$myHOST" "--script=ipmi-brute -sS -sU"
fuSCAN "120" "1433" "$myHOST" "--script=ms-sql* -sS"
fuSCAN "120" "1723" "$myHOST" "--script=pptp-version -sS"
fuSCAN "120" "1883" "$myHOST" "--script=mqtt-subscribe -sS"
fuSCAN "120" "2404" "$myHOST" "--script=iec-identify -sS"
fuSCAN "120" "3306" "$myHOST" "--script=mysql-vuln* -sC -sS -sV"
fuSCAN "120" "3389" "$myHOST" "--script=rdp* -sC -sS -sV"
fuSCAN "120" "5000" "$myHOST" "--script=*upnp* -sS -sU"
fuSCAN "120" "5060,5061" "$myHOST" "--script=sip-call-spoof,sip-enum-users,sip-methods -sS -sU"
fuSCAN "120" "5900" "$myHOST" "--script=vnc-info,vnc-title,realvnc-auth-bypass -sS"
fuSCAN "120" "27017" "$myHOST" "--script=mongo* -sS"
fuSCAN "120" "47808" "$myHOST" "--script=bacnet* -sS"
wait
reset
echo "Done."

View File

@ -6,7 +6,7 @@ myKIBANA="http://127.0.0.1:64296/"
myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c green) myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c green)
if ! [ "$myESSTATUS" = "1" ] if ! [ "$myESSTATUS" = "1" ]
then then
echo "### Elasticsearch is not available, try starting via 'systemctl start elk'." echo "### Elasticsearch is not available, try starting via 'systemctl start tpot'."
exit exit
else else
echo "### Elasticsearch is available, now continuing." echo "### Elasticsearch is available, now continuing."
@ -20,7 +20,7 @@ myCOL0=""
# Let's ensure normal operation on exit or if interrupted ... # Let's ensure normal operation on exit or if interrupted ...
function fuCLEANUP { function fuCLEANUP {
rm -rf patterns/ dashboards/ visualizations/ searches/ rm -rf patterns/ dashboards/ visualizations/ searches/ configs/
} }
trap fuCLEANUP EXIT trap fuCLEANUP EXIT
@ -43,7 +43,7 @@ tar xvfz $myDUMP > /dev/null
# Restore index patterns # Restore index patterns
myINDEXID=$(ls patterns/*.json | cut -c 10- | rev | cut -c 6- | rev) myINDEXID=$(ls patterns/*.json | cut -c 10- | rev | cut -c 6- | rev)
myINDEXCOUNT=$(cat patterns/$myINDEXID.json | tr '\\' '\n' | grep "scripted" | wc -w) myINDEXCOUNT=$(cat patterns/$myINDEXID.json | tr '\\' '\n' | grep -E "scripted|url" | wc -w)
echo $myCOL1"### Now importing"$myCOL0 $myINDEXCOUNT $myCOL1"index pattern fields." $myCOL0 echo $myCOL1"### Now importing"$myCOL0 $myINDEXCOUNT $myCOL1"index pattern fields." $myCOL0
curl -s -XDELETE ''$myKIBANA'api/saved_objects/index-pattern/logstash-*' -H "Content-Type: application/json" -H "kbn-xsrf: true" > /dev/null curl -s -XDELETE ''$myKIBANA'api/saved_objects/index-pattern/logstash-*' -H "Content-Type: application/json" -H "kbn-xsrf: true" > /dev/null
curl -s -XDELETE ''$myKIBANA'api/saved_objects/index-pattern/'$myINDEXID'' -H "Content-Type: application/json" -H "kbn-xsrf: true" > /dev/null curl -s -XDELETE ''$myKIBANA'api/saved_objects/index-pattern/'$myINDEXID'' -H "Content-Type: application/json" -H "kbn-xsrf: true" > /dev/null
@ -98,6 +98,22 @@ for i in $mySEARCHES;
echo echo
wait wait
# Restore configs
myCONFIGS=$(ls configs/*.json | cut -c 9- | rev | cut -c 6- | rev)
echo $myCOL1"### Now importing "$myCOL0$(echo $myCONFIGS | wc -w)$myCOL1 "configs." $myCOL0
for i in $myCONFIGS;
do
curl -s -XDELETE ''$myKIBANA'api/saved_objects/configs/'$i'' -H "Content-Type: application/json" -H "kbn-xsrf: true" > /dev/null &
done;
wait
for i in $myCONFIGS;
do
echo $myCOL1"###### "$i $myCOL0
curl -s -XPOST ''$myKIBANA'api/saved_objects/configs/'$i'' -H "Content-Type: application/json" -H "kbn-xsrf: true" -d @configs/$i.json > /dev/null &
done;
echo
wait
# Stats # Stats
echo echo
echo $myCOL1"### Statistics" echo $myCOL1"### Statistics"
@ -105,5 +121,6 @@ echo $myCOL1"###### Imported"$myCOL0 $myINDEXCOUNT $myCOL1"index patterns." $myC
echo $myCOL1"###### Imported"$myCOL0 $(echo $myDASHBOARDS | wc -w) $myCOL1"dashboards." $myCOL0 echo $myCOL1"###### Imported"$myCOL0 $(echo $myDASHBOARDS | wc -w) $myCOL1"dashboards." $myCOL0
echo $myCOL1"###### Imported"$myCOL0 $(echo $myVISUALIZATIONS | wc -w) $myCOL1"visualizations." $myCOL0 echo $myCOL1"###### Imported"$myCOL0 $(echo $myVISUALIZATIONS | wc -w) $myCOL1"visualizations." $myCOL0
echo $myCOL1"###### Imported"$myCOL0 $(echo $mySEARCHES | wc -w) $myCOL1"searches." $myCOL0 echo $myCOL1"###### Imported"$myCOL0 $(echo $mySEARCHES | wc -w) $myCOL1"searches." $myCOL0
echo $myCOL1"###### Imported"$myCOL0 $(echo $myCONFIGS | wc -w) $myCOL1"configs." $myCOL0
echo echo

View File

@ -1,6 +1,21 @@
#/bin/bash #!/bin/bash
# Show current status of T-Pot containers
# Run as root only.
myWHOAMI=$(whoami)
if [ "$myWHOAMI" != "root" ]
then
echo "Need to run as root ..."
exit
fi
myPARAM="$1" myPARAM="$1"
if [[ $myPARAM =~ ^([1-9]|[1-9][0-9]|[1-9][0-9][0-9])$ ]];
then
watch --color -n $myPARAM "dps.sh"
exit
fi
# Show current status of T-Pot containers
myCONTAINERS="$(cat /opt/tpot/etc/tpot.yml | grep -v '#' | grep container_name | cut -d: -f2 | sort | tr -d " ")" myCONTAINERS="$(cat /opt/tpot/etc/tpot.yml | grep -v '#' | grep container_name | cut -d: -f2 | sort | tr -d " ")"
myRED="" myRED=""
myGREEN="" myGREEN=""
@ -8,20 +23,39 @@ myBLUE=""
myWHITE="" myWHITE=""
myMAGENTA="" myMAGENTA=""
# Blackhole Status
myBLACKHOLE_STATUS=$(ip r | grep "blackhole" -c)
if [ "$myBLACKHOLE_STATUS" -gt "500" ];
then
myBLACKHOLE_STATUS="${myGREEN}ENABLED"
else
myBLACKHOLE_STATUS="${myRED}DISABLED"
fi
function fuGETTPOT_STATUS {
# T-Pot Status
myTPOT_STATUS=$(systemctl status tpot | grep "Active" | awk '{ print $2 }')
if [ "$myTPOT_STATUS" == "active" ];
then
echo "${myGREEN}ACTIVE"
else
echo "${myRED}INACTIVE"
fi
}
function fuGETSTATUS { function fuGETSTATUS {
grc --colour=on docker ps -f status=running -f status=exited --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" | grep -v "NAME" | sort grc --colour=on docker ps -f status=running -f status=exited --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" | grep -v "NAME" | sort
} }
function fuGETSYS { function fuGETSYS {
printf "========| System |========\n" printf "[ ========| System |======== ]\n"
printf "%+10s %-20s\n" "Date: " "$(date)" printf "${myBLUE}%+11s ${myWHITE}%-20s\n" "DATE: " "$(date)"
printf "%+10s %-20s\n" "Uptime: " "$(uptime | cut -b 2-)" printf "${myBLUE}%+11s ${myWHITE}%-20s\n" "UPTIME: " "$(grc --colour=on uptime)"
printf "%+10s %-20s\n" "CPU temp: " "$(sensors | grep 'Physical' | awk '{ print $4" " }' | tr -d [:cntrl:])" printf "${myMAGENTA}%+11s %-20s\n" "T-POT: " "$(fuGETTPOT_STATUS)"
printf "${myMAGENTA}%+11s %-20s\n" "BLACKHOLE: " "$myBLACKHOLE_STATUS${myWHITE}"
echo echo
} }
while true
do
myDPS=$(fuGETSTATUS) myDPS=$(fuGETSTATUS)
myDPSNAMES=$(echo "$myDPS" | awk '{ print $1 }' | sort) myDPSNAMES=$(echo "$myDPS" | awk '{ print $1 }' | sort)
fuGETSYS fuGETSYS
@ -37,10 +71,3 @@ while true
printf "%-28s %-28s\n" "$myRED$i" "DOWN$myWHITE" printf "%-28s %-28s\n" "$myRED$i" "DOWN$myWHITE"
fi fi
done done
if [[ $myPARAM =~ ^([1-9]|[1-9][0-9]|[1-9][0-9][0-9])$ ]];
then
sleep "$myPARAM"
else
break
fi
done

View File

@ -2,10 +2,10 @@
# Dump all ES data # Dump all ES data
# Make sure ES is available # Make sure ES is available
myES="http://127.0.0.1:64298/" myES="http://127.0.0.1:64298/"
myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c green) myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c "green\|yellow")
if ! [ "$myESSTATUS" = "1" ] if ! [ "$myESSTATUS" = "1" ]
then then
echo "### Elasticsearch is not available, try starting via 'systemctl start elk'." echo "### Elasticsearch is not available, try starting via 'systemctl start tpot'."
exit exit
else else
echo "### Elasticsearch is available, now continuing." echo "### Elasticsearch is available, now continuing."
@ -20,12 +20,12 @@ trap fuCLEANUP EXIT
# Set vars # Set vars
myDATE=$(date +%Y%m%d%H%M) myDATE=$(date +%Y%m%d%H%M)
myINDICES=$(curl -s -XGET ''$myES'_cat/indices/' | awk '{ print $3 }' | sort | grep -v 1970) myINDICES=$(curl -s -XGET ''$myES'_cat/indices/logstash-*' | awk '{ print $3 }' | sort | grep -v 1970)
myES="http://127.0.0.1:64298/" myINDICES+=" .kibana"
myCOL1="" myCOL1=""
myCOL0="" myCOL0=""
# Dumping all ES data # Dumping Kibana and Logstash data
echo $myCOL1"### The following indices will be dumped: "$myCOL0 echo $myCOL1"### The following indices will be dumped: "$myCOL0
echo $myINDICES echo $myINDICES
echo echo

134
bin/hpfeeds_optin.sh Executable file
View File

@ -0,0 +1,134 @@
#!/bin/bash
# Run as root only.
myWHOAMI=$(whoami)
if [ "$myWHOAMI" != "root" ]
then
echo "Need to run as root ..."
exit
fi
myTPOTYMLFILE="/opt/tpot/etc/tpot.yml"
function fuGENERIC () {
echo
echo "You chose generic, please provide all the details of the broker"
echo
myENABLE="true"
read -p "Host URL: " myHOST
read -p "Port: " myPORT
read -p "Channel: " myCHANNEL
echo "For generic providers set this to 'false'"
echo "If you received a CA certficate mount it into the ewsposter container by modifying $myTPOTYMLFILE"
read -p "TLS - 'false' or path to CA in container: " myCERT
read -p "Ident: " myIDENT
read -p "Secret: " mySECRET
read -p "Format ews (xml) or json: " myFORMAT
}
function fuOPTOUT () {
echo
while [ 1 != 2 ]
do
read -s -n 1 -p "You chose to opt out (y/n)? " mySELECT
echo $mySELECT
case "$mySELECT" in
[y,Y])
echo "Opt out."
break
;;
[n,N])
echo "Aborted."
exit
;;
esac
done
myENABLE="false"
myHOST="host"
myPORT="port"
myCHANNEL="channels"
myCERT="false"
myIDENT="user"
mySECRET="secret"
myFORMAT="json"
}
function fuWRITETOFILE () {
if [ -f '/data/ews/conf/hpfeeds.cfg' ]; then
echo "Creating backup of current config in /data/ews/conf/hpfeeds.cfg.old"
mv /data/ews/conf/hpfeeds.cfg /data/ews/conf/hpfeeds.cfg.old
fi
echo "Storing new config in /data/ews/conf/hpfeeds.cfg"
cat >> /data/ews/conf/hpfeeds.cfg <<EOF
myENABLE=$myENABLE
myHOST=$myHOST
myPORT=$myPORT
myCHANNEL=$myCHANNEL
myCERT=$myCERT
myIDENT=$myIDENT
mySECRET=$mySECRET
myFORMAT=$myFORMAT
EOF
}
function fuAPPLY () {
echo "Now stopping T-Pot ..."
systemctl stop tpot
echo "Applying your settings to tpot.yml ... "
sed --follow-symlinks -i "s/EWS_HPFEEDS_ENABLE.*/EWS_HPFEEDS_ENABLE=${myENABLE}/g" "$myTPOTYMLFILE"
sed --follow-symlinks -i "s/EWS_HPFEEDS_HOST.*/EWS_HPFEEDS_HOST=${myHOST}/g" "$myTPOTYMLFILE"
sed --follow-symlinks -i "s/EWS_HPFEEDS_PORT.*/EWS_HPFEEDS_PORT=${myPORT}/g" "$myTPOTYMLFILE"
sed --follow-symlinks -i "s/EWS_HPFEEDS_CHANNELS.*/EWS_HPFEEDS_CHANNELS=${myCHANNEL}/g" "$myTPOTYMLFILE"
sed --follow-symlinks -i "s#EWS_HPFEEDS_TLSCERT.*#EWS_HPFEEDS_TLSCERT=${myCERT}#g" "$myTPOTYMLFILE"
sed --follow-symlinks -i "s/EWS_HPFEEDS_IDENT.*/EWS_HPFEEDS_IDENT=${myIDENT}/g" "$myTPOTYMLFILE"
sed --follow-symlinks -i "s/EWS_HPFEEDS_SECRET.*/EWS_HPFEEDS_SECRET=${mySECRET}/g" "$myTPOTYMLFILE"
sed --follow-symlinks -i "s/EWS_HPFEEDS_FORMAT.*/EWS_HPFEEDS_FORMAT=${myFORMAT}/g" "$myTPOTYMLFILE"
echo "Now starting T-Pot ..."
systemctl start tpot
echo "You can always change or review your settings in /data/ews/conf/hpfeeds.cfg and apply changes by"
echo "running \"./hpfeeds_optin.sh --conf=/data/ews/conf/hpfeeds.cfg\""
echo "Done."
}
# Check for cmdline argument and parse config file
filename=$(echo $@ | cut -d= -f2)
if [ $# == 1 ] && echo $@ | grep '\-\-conf=' > /dev/null && [ ! -z $filename ] && [ -f $filename ]
then
source $filename
else
# Proceed with interactive setup when no config file is found
echo "HPFEEDS Delivery Opt-In for T-Pot"
echo "---------------------------------"
echo "By running this script you agree to share your data with a 3rd party and agree to their corresponding sharing terms."
echo
echo
echo "Please choose your broker"
echo "---------------------------"
echo "[1] - Generic (enter details manually)"
echo "[0] - Opt out of HPFEEDS"
echo "[q] - Do not agree end exit"
echo
while [ 1 != 2 ]
do
read -s -n 1 -p "Your choice: " mySELECT
echo $mySELECT
case "$mySELECT" in
[1])
fuGENERIC
break
;;
[0])
fuOPTOUT
break
;;
[q,Q])
echo "Aborted."
exit
;;
esac
done
fi
fuWRITETOFILE
fuAPPLY

68
bin/hptest.sh Executable file
View File

@ -0,0 +1,68 @@
#!/bin/bash
myHOST="$1"
myPACKAGES="nmap"
myDOCKERCOMPOSEYML="/opt/tpot/etc/tpot.yml"
function fuGOTROOT {
myWHOAMI=$(whoami)
if [ "$myWHOAMI" != "root" ]
then
echo "Need to run as root ..."
exit
fi
}
function fuCHECKDEPS {
myINST=""
for myDEPS in $myPACKAGES;
do
myOK=$(dpkg -s $myDEPS | grep ok | awk '{ print $3 }');
if [ "$myOK" != "ok" ]
then
myINST=$(echo $myINST $myDEPS)
fi
done
if [ "$myINST" != "" ]
then
apt-get update -y
for myDEPS in $myINST;
do
apt-get install $myDEPS -y
done
fi
}
function fuCHECKFORARGS {
if [ "$myHOST" != "" ];
then
echo "All arguments met. Continuing."
echo
else
echo "Usage: hptest.sh <[host or ip]>"
echo
exit
fi
}
function fuGETPORTS {
myDOCKERCOMPOSEUDPPORTS=$(cat $myDOCKERCOMPOSEYML | grep "udp" | tr -d '"\|#\-' | cut -d ":" -f2 | cut -d "/" -f1 | sort -gu)
myDOCKERCOMPOSEPORTS=$(cat $myDOCKERCOMPOSEYML | yq -r '.services[].ports' | grep ':' | sed -e s/127.0.0.1// | tr -d '", ' | sed -e s/^:// | cut -f1 -d ':' | grep -v "6429\|6430" | sort -gu)
myUDPPORTS=$(for i in $myDOCKERCOMPOSEUDPPORTS; do echo -n "U:$i,"; done)
myPORTS=$(for i in $myDOCKERCOMPOSEPORTS; do echo -n "T:$i,"; done)
}
# Main
fuGETPORTS
fuGOTROOT
fuCHECKDEPS
fuCHECKFORARGS
echo
echo "Starting scan on all UDP / TCP ports defined in /opt/tpot/etc/tpot.yml ..."
nmap -sV -sC -v -p $myPORTS $1 &
nmap -sU -sV -sC -v -p $myUDPPORTS $1 &
echo
wait
echo "Done."
echo

27
bin/mytopips.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
# Make sure ES is available
myES="http://127.0.0.1:64298/"
myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c green)
if ! [ "$myESSTATUS" = "1" ]
then
echo "### Elasticsearch is not available, try starting via 'systemctl start elk'."
exit 1
else
echo "### Elasticsearch is available, now continuing."
echo
fi
function fuMYTOPIPS {
curl -s -XGET $myES"_search" -H 'Content-Type: application/json' -d'
{
"aggs": {
"ips": {
"terms": { "field": "src_ip.keyword", "size": 100 }
}
},
"size" : 0
}'
}
echo "### Aggregating top 100 source IPs in ES"
fuMYTOPIPS | jq '.aggregations.ips.buckets[].key' | tr -d '"'

View File

@ -2,10 +2,10 @@
# Restore folder based ES backup # Restore folder based ES backup
# Make sure ES is available # Make sure ES is available
myES="http://127.0.0.1:64298/" myES="http://127.0.0.1:64298/"
myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c green) myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c "green\|yellow")
if ! [ "$myESSTATUS" = "1" ] if ! [ "$myESSTATUS" = "1" ]
then then
echo "### Elasticsearch is not available, try starting via 'systemctl start elk'." echo "### Elasticsearch is not available, try starting via 'systemctl start tpot'."
exit exit
else else
echo "### Elasticsearch is available, now continuing." echo "### Elasticsearch is available, now continuing."
@ -41,17 +41,50 @@ echo $myCOL1"### Now unpacking tar archive: "$myDUMP $myCOL0
tar xvf $myDUMP tar xvf $myDUMP
# Build indices list # Build indices list
myINDICES=$(ls tmp/logstash*.gz | cut -c 5- | rev | cut -c 4- | rev) myINDICES="$(ls tmp/logstash*.gz | cut -c 5- | rev | cut -c 4- | rev)"
myINDICES+=" .kibana" myINDICES+=" .kibana"
echo $myCOL1"### The following indices will be restored: "$myCOL0 echo $myCOL1"### The following indices will be restored: "$myCOL0
echo $myINDICES echo $myINDICES
echo echo
# Force single seat template for everything
echo -n $myCOL1"### Forcing single seat template: "$myCOL0
curl -s XPUT ''$myES'_template/.*' -H 'Content-Type: application/json' -d'
{ "index_patterns": ".*",
"order": 1,
"settings":
{
"number_of_shards": 1,
"number_of_replicas": 0
}
}'
echo
# Set logstash template
echo -n $myCOL1"### Setting up logstash template: "$myCOL0
curl -s XPUT ''$myES'_template/logstash' -H 'Content-Type: application/json' -d'
{
"index_patterns": "logstash-*",
"settings" : {
"index" : {
"number_of_shards": 1,
"number_of_replicas": 0,
"mapping" : {
"total_fields" : {
"limit" : "2000"
}
}
}
}
}'
echo
# Restore indices # Restore indices
curl -s -X DELETE ''$myES'.kibana*' > /dev/null
for i in $myINDICES; for i in $myINDICES;
do do
# Delete index if it already exists # Delete index if it already exists
curl -s -XDELETE $myES$i > /dev/null curl -s -X DELETE $myES$i > /dev/null
echo $myCOL1"### Now uncompressing: tmp/$i.gz" $myCOL0 echo $myCOL1"### Now uncompressing: tmp/$i.gz" $myCOL0
gunzip -f tmp/$i.gz gunzip -f tmp/$i.gz
# Restore index to ES # Restore index to ES

View File

@ -23,10 +23,10 @@ function fuNFQCHECK {
myNFQCHECK=$(grep -e '^\s*honeytrap:\|^\s*glutton:' $myDOCKERCOMPOSEYML | tr -d ': ' | uniq) myNFQCHECK=$(grep -e '^\s*honeytrap:\|^\s*glutton:' $myDOCKERCOMPOSEYML | tr -d ': ' | uniq)
if [ "$myNFQCHECK" == "" ]; if [ "$myNFQCHECK" == "" ];
then then
echo "No NFQ related honeypot detected, no iptables rules needed. Exiting." echo "No NFQ related honeypot detected, no iptables-legacy rules needed. Exiting."
exit exit
else else
echo "Detected $myNFQCHECK as NFQ based honeypot, iptables rules needed. Continuing." echo "Detected $myNFQCHECK as NFQ based honeypot, iptables-legacy rules needed. Continuing."
fi fi
} }
@ -41,54 +41,54 @@ echo "$myRULESPORTS"
} }
function fuSETRULES { function fuSETRULES {
### Setting up iptables rules for honeytrap ### Setting up iptables-legacy rules for honeytrap
if [ "$myNFQCHECK" == "honeytrap" ]; if [ "$myNFQCHECK" == "honeytrap" ];
then then
/sbin/iptables -w -A INPUT -s 127.0.0.1 -j ACCEPT /usr/sbin/iptables-legacy -w -A INPUT -s 127.0.0.1 -j ACCEPT
/sbin/iptables -w -A INPUT -d 127.0.0.1 -j ACCEPT /usr/sbin/iptables-legacy -w -A INPUT -d 127.0.0.1 -j ACCEPT
for myPORT in $myRULESPORTS; do for myPORT in $myRULESPORTS; do
/sbin/iptables -w -A INPUT -p tcp --dport $myPORT -j ACCEPT /usr/sbin/iptables-legacy -w -A INPUT -p tcp --dport $myPORT -j ACCEPT
done done
/sbin/iptables -w -A INPUT -p tcp --syn -m state --state NEW -j NFQUEUE /usr/sbin/iptables-legacy -w -A INPUT -p tcp --syn -m state --state NEW -j NFQUEUE
fi fi
### Setting up iptables rules for glutton ### Setting up iptables-legacy rules for glutton
if [ "$myNFQCHECK" == "glutton" ]; if [ "$myNFQCHECK" == "glutton" ];
then then
/sbin/iptables -w -t raw -A PREROUTING -s 127.0.0.1 -j ACCEPT /usr/sbin/iptables-legacy -w -t raw -A PREROUTING -s 127.0.0.1 -j ACCEPT
/sbin/iptables -w -t raw -A PREROUTING -d 127.0.0.1 -j ACCEPT /usr/sbin/iptables-legacy -w -t raw -A PREROUTING -d 127.0.0.1 -j ACCEPT
for myPORT in $myRULESPORTS; do for myPORT in $myRULESPORTS; do
/sbin/iptables -w -t raw -A PREROUTING -p tcp --dport $myPORT -j ACCEPT /usr/sbin/iptables-legacy -w -t raw -A PREROUTING -p tcp --dport $myPORT -j ACCEPT
done done
# No need for NFQ forwarding, such rules are set up by glutton # No need for NFQ forwarding, such rules are set up by glutton
fi fi
} }
function fuUNSETRULES { function fuUNSETRULES {
### Removing iptables rules for honeytrap ### Removing iptables-legacy rules for honeytrap
if [ "$myNFQCHECK" == "honeytrap" ]; if [ "$myNFQCHECK" == "honeytrap" ];
then then
/sbin/iptables -w -D INPUT -s 127.0.0.1 -j ACCEPT /usr/sbin/iptables-legacy -w -D INPUT -s 127.0.0.1 -j ACCEPT
/sbin/iptables -w -D INPUT -d 127.0.0.1 -j ACCEPT /usr/sbin/iptables-legacy -w -D INPUT -d 127.0.0.1 -j ACCEPT
for myPORT in $myRULESPORTS; do for myPORT in $myRULESPORTS; do
/sbin/iptables -w -D INPUT -p tcp --dport $myPORT -j ACCEPT /usr/sbin/iptables-legacy -w -D INPUT -p tcp --dport $myPORT -j ACCEPT
done done
/sbin/iptables -w -D INPUT -p tcp --syn -m state --state NEW -j NFQUEUE /usr/sbin/iptables-legacy -w -D INPUT -p tcp --syn -m state --state NEW -j NFQUEUE
fi fi
### Removing iptables rules for glutton ### Removing iptables-legacy rules for glutton
if [ "$myNFQCHECK" == "glutton" ]; if [ "$myNFQCHECK" == "glutton" ];
then then
/sbin/iptables -w -t raw -D PREROUTING -s 127.0.0.1 -j ACCEPT /usr/sbin/iptables-legacy -w -t raw -D PREROUTING -s 127.0.0.1 -j ACCEPT
/sbin/iptables -w -t raw -D PREROUTING -d 127.0.0.1 -j ACCEPT /usr/sbin/iptables-legacy -w -t raw -D PREROUTING -d 127.0.0.1 -j ACCEPT
for myPORT in $myRULESPORTS; do for myPORT in $myRULESPORTS; do
/sbin/iptables -w -t raw -D PREROUTING -p tcp --dport $myPORT -j ACCEPT /usr/sbin/iptables-legacy -w -t raw -D PREROUTING -p tcp --dport $myPORT -j ACCEPT
done done
# No need for removing NFQ forwarding, such rules are removed by glutton # No need for removing NFQ forwarding, such rules are removed by glutton
fi fi

45
bin/setup_builder.sh Executable file
View File

@ -0,0 +1,45 @@
#!/bin/bash
# Got root?
myWHOAMI=$(whoami)
if [ "$myWHOAMI" != "root" ]
then
echo "Need to run as root ..."
exit
fi
# Only run with command switch
if [ "$1" != "-y" ]; then
echo "### Setting up docker for Multi Arch Builds."
echo "### Use on x64 only!"
echo "### Run with -y to install!"
echo
exit
fi
# Main
mkdir -p /root/.docker/cli-plugins/
cd /root/.docker/cli-plugins/
wget https://github.com/docker/buildx/releases/download/v0.8.1/buildx-v0.8.1.linux-amd64 -O docker-buildx
chmod +x docker-buildx
docker buildx ls
# We need to create a new builder as the default one cannot handle multi-arch builds
# https://docs.docker.com/desktop/multi-arch/
docker buildx create --name mybuilder
# Set as default
docker buildx use mybuilder
# We need to install emulators, arm64 should be fine for now
# https://github.com/tonistiigi/binfmt/
docker run --privileged --rm tonistiigi/binfmt --install arm64
# Check if everything is setup correctly
docker buildx inspect --bootstrap
echo
echo "### Done."
echo
echo "Example: docker buildx build --platform linux/amd64,linux/arm64 -t username/demo:latest --push ."
echo "Docs: https://docs.docker.com/desktop/multi-arch/"

29
bin/tpdclean.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/bash
# T-Pot Compose and Container Cleaner
# Set colors
myRED=""
myGREEN=""
myWHITE=""
# Only run with command switch
if [ "$1" != "-y" ]; then
echo $myRED"### WARNING"$myWHITE
echo ""
echo $myRED"###### This script is only intended for the tpot.service."$myWHITE
echo $myRED"###### Run <systemctl stop tpot> first and then <tpdclean.sh -y>."$myWHITE
echo $myRED"###### Be aware, all T-Pot container volumes and images will be removed."$myWHITE
echo ""
echo $myRED"### WARNING "$myWHITE
echo
exit
fi
# Remove old containers, images and volumes
docker-compose -f /opt/tpot/etc/tpot.yml down -v >> /dev/null 2>&1
docker-compose -f /opt/tpot/etc/tpot.yml rm -v >> /dev/null 2>&1
docker network rm $(docker network ls -q) >> /dev/null 2>&1
docker volume rm $(docker volume ls -q) >> /dev/null 2>&1
docker rm -v $(docker ps -aq) >> /dev/null 2>&1
docker rmi $(docker images | grep "<none>" | awk '{print $3}') >> /dev/null 2>&1
docker rmi $(docker images | grep "2203" | awk '{print $3}') >> /dev/null 2>&1
exit 0

View File

@ -1,5 +1,13 @@
#!/bin/bash #!/bin/bash
# Run as root only.
myWHOAMI=$(whoami)
if [ "$myWHOAMI" != "root" ]
then
echo "Need to run as root ..."
exit
fi
# set backtitle, get filename # set backtitle, get filename
myBACKTITLE="T-Pot Edition Selection Tool" myBACKTITLE="T-Pot Edition Selection Tool"
myYMLS=$(cd /opt/tpot/etc/compose/ && ls -1 *.yml) myYMLS=$(cd /opt/tpot/etc/compose/ && ls -1 *.yml)
@ -21,7 +29,7 @@ for i in $myYMLS;
do do
myITEMS+="$i $(echo $i | cut -d "." -f1 | tr [:lower:] [:upper:]) " myITEMS+="$i $(echo $i | cut -d "." -f1 | tr [:lower:] [:upper:]) "
done done
myEDITION=$(dialog --backtitle "$myBACKTITLE" --menu "Select T-Pot Edition" 13 50 6 $myITEMS 3>&1 1>&2 2>&3 3>&-) myEDITION=$(dialog --backtitle "$myBACKTITLE" --menu "Select T-Pot Edition" 18 50 1 $myITEMS 3>&1 1>&2 2>&3 3>&-)
if [ "$myEDITION" == "" ]; if [ "$myEDITION" == "" ];
then then
echo "Have a nice day!" echo "Have a nice day!"

19
bin/unlock_es.sh Executable file
View File

@ -0,0 +1,19 @@
#/bin/bash
# Unlock all ES indices for read / write mode
# Useful in cases where ES locked all indices after disk quota has been reached
# Make sure ES is available
myES="http://127.0.0.1:64298/"
myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c "green\|yellow")
if ! [ "$myESSTATUS" = "1" ]
then
echo "### Elasticsearch is not available, try starting via 'systemctl start tpot'."
exit
else
echo "### Elasticsearch is available, now continuing."
echo
fi
echo "### Trying to unlock all ES indices for read / write operation: "
curl -XPUT -H "Content-Type: application/json" ''$myES'_all/_settings' -d '{"index.blocks.read_only_allow_delete": null}'
echo

View File

@ -2,22 +2,62 @@
# Let's add the first local ip to the /etc/issue and external ip to ews.ip file # Let's add the first local ip to the /etc/issue and external ip to ews.ip file
# If the external IP cannot be detected, the internal IP will be inherited. # If the external IP cannot be detected, the internal IP will be inherited.
source /etc/environment source /etc/environment
myCHECKIFSENSOR=$(head -n 1 /opt/tpot/etc/tpot.yml | grep "Sensor" | wc -l)
myUUID=$(lsblk -o MOUNTPOINT,UUID | grep "/" | awk '{ print $2 }')
myLOCALIP=$(hostname -I | awk '{ print $1 }') myLOCALIP=$(hostname -I | awk '{ print $1 }')
myEXTIP=$(/opt/tpot/bin/myip.sh) myEXTIP=$(/opt/tpot/bin/myip.sh)
if [ "$myEXTIP" = "" ]; if [ "$myEXTIP" = "" ];
then then
myEXTIP=$myLOCALIP myEXTIP=$myLOCALIP
myEXTIP_LAT="49.865835022498125"
myEXTIP_LONG="8.62606472775735"
else
myEXTIP_LOC=$(curl -s ipinfo.io/$myEXTIP/loc)
myEXTIP_LAT=$(echo "$myEXTIP_LOC" | cut -f1 -d",")
myEXTIP_LONG=$(echo "$myEXTIP_LOC" | cut -f2 -d",")
fi fi
# Load Blackhole routes if enabled
myBLACKHOLE_FILE1="/etc/blackhole/mass_scanner.txt"
myBLACKHOLE_FILE2="/etc/blackhole/mass_scanner_cidr.txt"
if [ -f "$myBLACKHOLE_FILE1" ] || [ -f "$myBLACKHOLE_FILE2" ];
then
/opt/tpot/bin/blackhole.sh add
fi
myBLACKHOLE_STATUS=$(ip r | grep "blackhole" -c)
if [ "$myBLACKHOLE_STATUS" -gt "500" ];
then
myBLACKHOLE_STATUS="| BLACKHOLE: [ ENABLED ]"
else
myBLACKHOLE_STATUS="| BLACKHOLE: [ DISABLED ]"
fi
mySSHUSER=$(cat /etc/passwd | grep 1000 | cut -d ':' -f1) mySSHUSER=$(cat /etc/passwd | grep 1000 | cut -d ':' -f1)
# Export
export myUUID
export myLOCALIP
export myEXTIP
export myEXTIP_LAT
export myEXTIP_LONG
export myBLACKHOLE_STATUS
export mySSHUSER
# Build issue
echo "" > /etc/issue echo "" > /etc/issue
toilet -f ivrit -F metal --filter border:metal "T-Pot 19.03" | sed 's/\\/\\\\/g' >> /etc/issue toilet -f ivrit -F metal --filter border:metal "T-Pot 22.04" | sed 's/\\/\\\\/g' >> /etc/issue
echo >> /etc/issue echo >> /etc/issue
echo ",---- [ \n ] [ \d ] [ \t ]" >> /etc/issue echo ",---- [ \n ] [ \d ] [ \t ]" >> /etc/issue
echo "|" >> /etc/issue echo "|" >> /etc/issue
echo "| IP: $myLOCALIP ($myEXTIP)" >> /etc/issue echo "| IP: $myLOCALIP ($myEXTIP)" >> /etc/issue
echo "| SSH: ssh -l tsec -p 64295 $myLOCALIP" >> /etc/issue echo "| SSH: ssh -l tsec -p 64295 $myLOCALIP" >> /etc/issue
echo "| WEB: https://$myLOCALIP:64297" >> /etc/issue if [ "$myCHECKIFSENSOR" == "0" ];
then
echo "| WEB: https://$myLOCALIP:64297" >> /etc/issue
fi
echo "| ADMIN: https://$myLOCALIP:64294" >> /etc/issue echo "| ADMIN: https://$myLOCALIP:64294" >> /etc/issue
echo "$myBLACKHOLE_STATUS" >> /etc/issue
echo "|" >> /etc/issue echo "|" >> /etc/issue
echo "\`----" >> /etc/issue echo "\`----" >> /etc/issue
echo >> /etc/issue echo >> /etc/issue
@ -26,9 +66,24 @@ tee /data/ews/conf/ews.ip << EOF
ip = $myEXTIP ip = $myEXTIP
EOF EOF
tee /opt/tpot/etc/compose/elk_environment << EOF tee /opt/tpot/etc/compose/elk_environment << EOF
HONEY_UUID=$myUUID
MY_EXTIP=$myEXTIP MY_EXTIP=$myEXTIP
MY_EXTIP_LAT=$myEXTIP_LAT
MY_EXTIP_LONG=$myEXTIP_LONG
MY_INTIP=$myLOCALIP MY_INTIP=$myLOCALIP
MY_HOSTNAME=$HOSTNAME MY_HOSTNAME=$HOSTNAME
EOF EOF
if [ -s "/data/elk/logstash/ls_environment" ];
then
source /data/elk/logstash/ls_environment
tee -a /opt/tpot/etc/compose/elk_environment << EOF
MY_TPOT_TYPE=$MY_TPOT_TYPE
MY_SENSOR_PRIVATEKEYFILE=$MY_SENSOR_PRIVATEKEYFILE
MY_HIVE_USERNAME=$MY_HIVE_USERNAME
MY_HIVE_IP=$MY_HIVE_IP
EOF
fi
chown tpot:tpot /data/ews/conf/ews.ip chown tpot:tpot /data/ews/conf/ews.ip
chmod 760 /data/ews/conf/ews.ip chmod 770 /data/ews/conf/ews.ip

10
cloud/.gitignore vendored Normal file
View File

@ -0,0 +1,10 @@
# Ansible
*.retry
# Terraform
**/.terraform
**/terraform.*
# OpenStack clouds
**/clouds.yaml
**/secure.yaml

257
cloud/ansible/README.md Normal file
View File

@ -0,0 +1,257 @@
# T-Pot Ansible
Here you can find a ready-to-use solution for your automated T-Pot deployment using [Ansible](https://www.ansible.com/).
It consists of an Ansible Playbook with multiple roles, which is reusable for all [OpenStack](https://www.openstack.org/) based clouds (e.g. Open Telekom Cloud, Orange Cloud, Telefonica Open Cloud, OVH) out of the box.
Apart from that you can easily adapt the deploy role to use other [cloud providers](https://docs.ansible.com/ansible/latest/scenario_guides/cloud_guides.html). Check out [Ansible Galaxy](https://galaxy.ansible.com/search?keywords=&order_by=-relevance&page=1&deprecated=false&type=collection&tags=cloud) for more cloud collections.
The Playbook first creates all resources (security group, network, subnet, router), deploys one (or more) new servers and then installs and configures T-Pot on them.
This example showcases the deployment on our own OpenStack based Public Cloud Offering [Open Telekom Cloud](https://open-telekom-cloud.com/en).
# Table of contents
- [Preparation of Ansible Master](#ansible-master)
- [Ansible Installation](#ansible)
- [OpenStack Collection Installation](#collection)
- [Agent Forwarding](#agent-forwarding)
- [Preparations in Open Telekom Cloud Console](#preparation)
- [Create new project](#project)
- [Create API user](#api-user)
- [Import Key Pair](#key-pair)
- [Clone Git Repository](#clone-git)
- [Settings and recommended values](#settings)
- [clouds.yaml](#clouds-yaml)
- [Ansible remote user](#remote-user)
- [Number of instances to deploy](#number)
- [Instance settings](#instance-settings)
- [User password](#user-password)
- [Configure `tpot.conf.dist`](#tpot-conf)
- [Optional: Custom `ews.cfg`](#ews-cfg)
- [Optional: Custom HPFEEDS](#hpfeeds)
- [Deploying a T-Pot](#deploy)
- [Further documentation](#documentation)
<a name="ansible-master"></a>
# Preparation of Ansible Master
You can either run the Ansible Playbook locally on your Linux or macOS machine or you can use an ECS (Elastic Cloud Server) on Open Telekom Cloud, which I did.
I used Ubuntu 18.04 for my Ansible Master Server, but other OSes are fine too.
Ansible works over the SSH Port, so you don't have to add any special rules to your Security Group.
<a name="ansible"></a>
## Ansible Installation
:warning: Ansible 2.10 or newer is required!
Example for Ubuntu 18.04:
At first we update the system:
`sudo apt update`
`sudo apt dist-upgrade`
Then we need to add the repository and install Ansible:
`sudo apt-add-repository --yes --update ppa:ansible/ansible`
`sudo apt install ansible`
For other OSes and Distros have a look at the official [Ansible Documentation](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html).
If your OS does not offer a recent version of Ansible (>= 2.10) you should consider [installing Ansible with pip](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-with-pip).
In short (if you already have Python3/pip3 installed):
```
pip3 install ansible
```
<a name="collection"></a>
## OpenStack Collection Installation
For interacting with OpenStack resources in Ansible, you need to install the collection from Ansible Galaxy:
`ansible-galaxy collection install openstack.cloud`
<a name="agent-forwarding"></a>
## Agent Forwarding
If you run the Ansible Playbook remotely on your Ansible Master Server, Agent Forwarding must be enabled in order to let Ansible connect to newly created machines.
- On Linux or macOS:
- Create or edit `~/.ssh/config`
```
Host ANSIBLE_MASTER_IP
ForwardAgent yes
```
- On Windows using Putty:
![Putty Agent Forwarding](doc/putty_agent_forwarding.png)
<a name="preparation"></a>
# Preparations in Open Telekom Cloud Console
(You can skip this if you have already set up a project and an API account with key pair)
(Just make sure you know the naming for everything, as you need to configure the Ansible variables.)
Before we can start deploying, we have to prepare the Open Telekom Cloud tenant.
For that, go to the [Web Console](https://auth.otc.t-systems.com/authui/login) and log in with an admin user.
<a name="project"></a>
## Create new project
I strongly advise you to create a separate project for the T-Pots in your tenant.
In my case I named it `tpot`.
![Create new project](doc/otc_1_project.gif)
<a name="api-user"></a>
## Create API user
The next step is to create a new user account, which is restricted to the project.
This ensures that the API access is limited to that project.
![Create API user](doc/otc_2_user.gif)
<a name="key-pair"></a>
## Import Key Pair
:warning: Now log in with the newly created API user account and select your project.
![Login as API user](doc/otc_3_login.gif)
Import your SSH public key.
![Import SSH Public Key](doc/otc_4_import_key.gif)
<a name="clone-git"></a>
# Clone Git Repository
Clone the `tpotce` repository to your Ansible Master:
`git clone https://github.com/telekom-security/tpotce.git`
All Ansible related files are located in the [`cloud/ansible/openstack`](openstack) folder.
<a name="settings"></a>
# Settings and recommended values
You can configure all aspects of your Elastic Cloud Server and T-Pot before using the Playbook:
<a name="clouds-yaml"></a>
## clouds.yaml
Located at [`openstack/clouds.yaml`](openstack/clouds.yaml).
Enter your Open Telekom Cloud API user credentials here (username, password, project name, user domain name):
```
clouds:
open-telekom-cloud:
profile: otc
auth:
project_name: eu-de_your_project
username: your_api_user
password: your_password
user_domain_name: OTC-EU-DE-000000000010000XXXXX
```
You can also perform different authentication methods like sourcing OpenStack OS_* environment variables or providing an inline dictionary.
For more information have a look in the [openstack.cloud.server](https://docs.ansible.com/ansible/latest/collections/openstack/cloud/server_module.html) Ansible module documentation.
If you already have your own `clouds.yaml` file or have multiple clouds in there, you can specify which one to use in the `openstack/my_os_cloud.yaml` file:
```
# Enter the name of your cloud to use from clouds.yaml
cloud: open-telekom-cloud
```
<a name="remote-user"></a>
## Ansible remote user
You may have to adjust the `remote_user` in the Ansible Playbook under [`openstack/deploy_tpot.yaml`](openstack/deploy_tpot.yaml) depending on your Debian base image (e.g. on Open Telekom Cloud the default Debian user is `linux`).
<a name="number"></a>
## Number of instances to deploy
You can adjust the number of VMs/T-Pots that you want to create in [`openstack/deploy_tpot.yaml`](openstack/deploy_tpot.yaml):
```
loop: "{{ range(0, 1) }}"
```
One instance is set as the default, increase to your liking.
<a name="instance-settings"></a>
## Instance settings
Located at [`openstack/roles/create_vm/vars/main.yaml`](openstack/roles/create_vm/vars/main.yaml).
Here you can customize your virtual machine specifications:
- Choose an availability zone. For Open Telekom Cloud reference see [here](https://docs.otc.t-systems.com/en-us/endpoint/index.html).
- Change the OS image (For T-Pot we need Debian)
- (Optional) Change the volume size
- Specify your key pair (:warning: Mandatory)
- (Optional) Change the instance type (flavor)
`s3.medium.8` corresponds to 1 vCPU and 8GB of RAM and is the minimum required flavor.
A full list of Open Telekom Cloud flavors can be found [here](https://docs.otc.t-systems.com/en-us/usermanual/ecs/en-us_topic_0177512565.html).
```
availability_zone: eu-de-03
image: Standard_Debian_10_latest
volume_size: 128
key_name: your-KeyPair
flavor: s3.medium.8
```
<a name="user-password"></a>
## User password
Located at [`openstack/roles/install/vars/main.yaml`](openstack/roles/install/vars/main.yaml).
Here you can set the password for your Debian user (**you should definitely change that**).
```
user_password: LiNuXuSeRPaSs#
```
<a name="tpot-conf"></a>
## Configure `tpot.conf.dist`
The file is located in [`iso/installer/tpot.conf.dist`](/iso/installer/tpot.conf.dist).
Here you can choose:
- between the various T-Pot editions
- a username for the web interface
- a password for the web interface (**you should definitely change that**)
<a name="ews-cfg"></a>
## Optional: Custom `ews.cfg`
Enable this by uncommenting the role in the [deploy_tpot.yaml](openstack/deploy_tpot.yaml) playbook.
```
# - custom_ews
```
You can use a custom config file for `ewsposter`.
e.g. when you have your own credentials for delivering data to our [Sicherheitstacho](https://sicherheitstacho.eu/start/main).
You can find the `ews.cfg` template file here: [`openstack/roles/custom_ews/templates/ews.cfg`](openstack/roles/custom_ews/templates/ews.cfg) and adapt it for your needs.
For setting custom credentials, these settings would be relevant for you (the rest of the file can stay as is):
```
[MAIN]
...
contact = your_email_address
...
[EWS]
...
username = your_username
token = your_token
...
```
<a name="hpfeeds"></a>
## Optional: Custom HPFEEDS
Enable this by uncommenting the role in the [deploy_tpot.yaml](openstack/deploy_tpot.yaml) playbook.
```
# - custom_hpfeeds
```
You can specify custom HPFEEDS in [`openstack/roles/custom_hpfeeds/files/hpfeeds.cfg`](openstack/roles/custom_hpfeeds/files/hpfeeds.cfg).
That file contains the defaults (turned off) and you can adapt it for your needs, e.g. for SISSDEN:
```
myENABLE=true
myHOST=hpfeeds.sissden.eu
myPORT=10000
myCHANNEL=t-pot.events
myCERT=/opt/ewsposter/sissden.pem
myIDENT=your_user
mySECRET=your_secret
myFORMAT=json
```
<a name="deploy"></a>
# Deploying a T-Pot :honey_pot::honeybee:
Now, after configuring everything, we can finally start deploying T-Pots!
Go to the [`openstack`](openstack) folder and run the Ansible Playbook with:
`ansible-playbook deploy_tpot.yaml`
(Yes, it is as easy as that :smile:)
If you are running on a machine which asks for a sudo password, you can use:
`ansible-playbook --ask-become-pass deploy_tpot.yaml`
The Playbook will first install required packages on the Ansible Master and then deploy one (or more) new server instances.
After that, T-Pot gets installed and configured on them, optionally custom configs are applied and finally it reboots.
Once this is done, you can proceed with connecting/logging in to the T-Pot according to the [documentation](https://github.com/telekom-security/tpotce#ssh-and-web-access).
<a name="documentation"></a>
# Further documentation
- [Ansible Documentation](https://docs.ansible.com/ansible/latest/)
- [openstack.cloud.server Create/Delete Compute Instances from OpenStack](https://docs.ansible.com/ansible/latest/collections/openstack/cloud/server_module.html)
- [Open Telekom Cloud Help Center](https://docs.otc.t-systems.com/)

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1,6 @@
[defaults]
host_key_checking = false
[ssh_connection]
scp_if_ssh = true
ssh_args = -o ServerAliveInterval=60

View File

@ -0,0 +1,9 @@
clouds:
open-telekom-cloud:
profile: otc
region_name: eu-de
auth:
project_name: eu-de_your_project
username: your_api_user
password: your_password
user_domain_name: OTC-EU-DE-000000000010000XXXXX

View File

@ -0,0 +1,30 @@
- name: Check host prerequisites
hosts: localhost
become: yes
roles:
- check
- name: Deploy instances
hosts: localhost
vars_files: my_os_cloud.yaml
tasks:
- name: Create security group and network
ansible.builtin.include_role:
name: create_net
- name: Create one or more instances
ansible.builtin.include_role:
name: create_vm
loop: "{{ range(0, 1) }}"
loop_control:
extended: yes
- name: Install T-Pot
hosts: tpot
remote_user: linux
become: yes
gather_facts: no
roles:
- install
# - custom_ews
# - custom_hpfeeds
- reboot

View File

@ -0,0 +1,2 @@
# Enter the name of your cloud to use from clouds.yaml
cloud: open-telekom-cloud

View File

@ -0,0 +1,2 @@
collections:
- name: openstack.cloud

View File

@ -0,0 +1,19 @@
- name: Install dependencies
ansible.builtin.package:
name:
- gcc
- python3-dev
- python3-setuptools
- python3-pip
state: present
- name: Install openstacksdk
ansible.builtin.pip:
name: openstacksdk
executable: pip3
- name: Check if agent forwarding is enabled
ansible.builtin.fail:
msg: Please enable agent forwarding to allow Ansible to connect to the remote host!
ignore_errors: yes
failed_when: lookup('env','SSH_AUTH_SOCK') == ""

View File

@ -0,0 +1,33 @@
- name: Create security group
openstack.cloud.security_group:
cloud: "{{ cloud }}"
name: sg-tpot-ansible
description: Security Group for T-Pot
- name: Add rules to security group
openstack.cloud.security_group_rule:
cloud: "{{ cloud }}"
security_group: sg-tpot-ansible
remote_ip_prefix: 0.0.0.0/0
- name: Create network
openstack.cloud.network:
cloud: "{{ cloud }}"
name: network-tpot-ansible
- name: Create subnet
openstack.cloud.subnet:
cloud: "{{ cloud }}"
network_name: network-tpot-ansible
name: subnet-tpot-ansible
cidr: 192.168.0.0/24
dns_nameservers:
- 100.125.4.25
- 100.125.129.199
- name: Create router
openstack.cloud.router:
cloud: "{{ cloud }}"
name: router-tpot-ansible
interfaces:
- subnet-tpot-ansible

View File

@ -0,0 +1,24 @@
- name: Generate T-Pot name
ansible.builtin.set_fact:
tpot_name: "t-pot-ansible-{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=6') }}"
- name: Create instance {{ ansible_loop.index }} of {{ ansible_loop.length }}
openstack.cloud.server:
cloud: "{{ cloud }}"
name: "{{ tpot_name }}"
availability_zone: "{{ availability_zone }}"
image: "{{ image }}"
boot_from_volume: yes
volume_size: "{{ volume_size }}"
key_name: "{{ key_name }}"
auto_ip: yes
flavor: "{{ flavor }}"
security_groups: sg-tpot-ansible
network: network-tpot-ansible
register: tpot
- name: Add instance to inventory
ansible.builtin.add_host:
hostname: "{{ tpot_name }}"
ansible_host: "{{ tpot.server.public_v4 }}"
groups: tpot

View File

@ -0,0 +1,5 @@
availability_zone: eu-de-03
image: Standard_Debian_10_latest
volume_size: 128
key_name: your-KeyPair
flavor: s3.medium.8

View File

@ -0,0 +1,13 @@
- name: Copy ews configuration file
ansible.builtin.template:
src: ews.cfg
dest: /data/ews/conf
owner: root
group: root
mode: 0644
- name: Patching tpot.yml with custom ews configuration file
ansible.builtin.lineinfile:
path: /opt/tpot/etc/tpot.yml
insertafter: "/opt/ewsposter/ews.ip"
line: " - /data/ews/conf/ews.cfg:/opt/ewsposter/ews.cfg"

View File

@ -3,7 +3,7 @@ homedir = /opt/ewsposter/
spooldir = /opt/ewsposter/spool/ spooldir = /opt/ewsposter/spool/
logdir = /opt/ewsposter/log/ logdir = /opt/ewsposter/log/
del_malware_after_send = false del_malware_after_send = false
send_malware = false send_malware = true
sendlimit = 500 sendlimit = 500
contact = your_email_address contact = your_email_address
proxy = proxy =
@ -11,19 +11,23 @@ ip =
[EWS] [EWS]
ews = true ews = true
username = community-01-user username = your_username
token = foth{a5maiCee8fineu7 token = your_token
rhost_first = https://community.sicherheitstacho.eu/ews-0.1/alert/postSimpleMessage rhost_first = https://community.sicherheitstacho.eu/ews-0.1/alert/postSimpleMessage
rhost_second = https://community.sicherheitstacho.eu/ews-0.1/alert/postSimpleMessage rhost_second = https://community.sicherheitstacho.eu/ews-0.1/alert/postSimpleMessage
ignorecert = false ignorecert = false
[HPFEED] [HPFEED]
hpfeed = false hpfeed = %(EWS_HPFEEDS_ENABLE)s
host = 0.0.0.0 host = %(EWS_HPFEEDS_HOST)s
port = 0 port = %(EWS_HPFEEDS_PORT)s
channels = 0 channels = %(EWS_HPFEEDS_CHANNELS)s
ident = 0 ident = %(EWS_HPFEEDS_IDENT)s
secret= 0 secret= %(EWS_HPFEEDS_SECRET)s
# path/to/certificate for tls broker - or "false" for non-tls broker
tlscert = %(EWS_HPFEEDS_TLSCERT)s
# hpfeeds submission format: "ews" (xml) or "json"
hpfformat = %(EWS_HPFEEDS_FORMAT)s
[EWSJSON] [EWSJSON]
json = false json = false
@ -31,7 +35,7 @@ jsondir = /data/ews/json/
[GLASTOPFV3] [GLASTOPFV3]
glastopfv3 = true glastopfv3 = true
nodeid = glastopfv3-community-01 nodeid = glastopfv3-{{ ansible_hostname }}
sqlitedb = /data/glastopf/db/glastopf.db sqlitedb = /data/glastopf/db/glastopf.db
malwaredir = /data/glastopf/data/files/ malwaredir = /data/glastopf/data/files/
@ -55,18 +59,18 @@ malwaredir =
[COWRIE] [COWRIE]
cowrie = true cowrie = true
nodeid = cowrie-community-01 nodeid = cowrie-{{ ansible_hostname }}
logfile = /data/cowrie/log/cowrie.json logfile = /data/cowrie/log/cowrie.json
[DIONAEA] [DIONAEA]
dionaea = true dionaea = true
nodeid = dionaea-community-01 nodeid = dionaea-{{ ansible_hostname }}
malwaredir = /data/dionaea/binaries/ malwaredir = /data/dionaea/binaries/
sqlitedb = /data/dionaea/log/dionaea.sqlite sqlitedb = /data/dionaea/log/dionaea.sqlite
[HONEYTRAP] [HONEYTRAP]
honeytrap = true honeytrap = true
nodeid = honeytrap-community-01 nodeid = honeytrap-{{ ansible_hostname }}
newversion = true newversion = true
payloaddir = /data/honeytrap/attacks/ payloaddir = /data/honeytrap/attacks/
attackerfile = /data/honeytrap/log/attacker.log attackerfile = /data/honeytrap/log/attacker.log
@ -79,50 +83,55 @@ targetip =
[EMOBILITY] [EMOBILITY]
eMobility = false eMobility = false
nodeid = emobility-community-01 nodeid = emobility-{{ ansible_hostname }}
logfile = /data/emobility/log/centralsystemEWS.log logfile = /data/emobility/log/centralsystemEWS.log
[CONPOT] [CONPOT]
conpot = true conpot = true
nodeid = conpot-community-01 nodeid = conpot-{{ ansible_hostname }}
logfile = /data/conpot/log/conpot*.json logfile = /data/conpot/log/conpot*.json
[ELASTICPOT] [ELASTICPOT]
elasticpot = true elasticpot = true
nodeid = elasticpot-community-01 nodeid = elasticpot-{{ ansible_hostname }}
logfile = /data/elasticpot/log/elasticpot.log logfile = /data/elasticpot/log/elasticpot.log
[SURICATA] [SURICATA]
suricata = true suricata = true
nodeid = suricata-community-01 nodeid = suricata-{{ ansible_hostname }}
logfile = /data/suricata/log/suricata_ews.log logfile = /data/suricata/log/eve.json
[MAILONEY] [MAILONEY]
mailoney = true mailoney = true
nodeid = mailoney-community-01 nodeid = mailoney-{{ ansible_hostname }}
logfile = /data/mailoney/log/commands.log logfile = /data/mailoney/log/commands.log
[RDPY] [RDPY]
rdpy = true rdpy = true
nodeid = rdpy-community-01 nodeid = rdpy-{{ ansible_hostname }}
logfile = /data/rdpy/log/rdpy.log logfile = /data/rdpy/log/rdpy.log
[VNCLOWPOT] [VNCLOWPOT]
vnclowpot = true vnclowpot = true
nodeid = vnclowpot-community-01 nodeid = vnclowpot-{{ ansible_hostname }}
logfile = /data/vnclowpot/log/vnclowpot.log logfile = /data/vnclowpot/log/vnclowpot.log
[HERALDING] [HERALDING]
heralding = true heralding = true
nodeid = heralding-community-01 nodeid = heralding-{{ ansible_hostname }}
logfile = /data/heralding/log/auth.csv logfile = /data/heralding/log/auth.csv
[CISCOASA] [CISCOASA]
ciscoasa = true ciscoasa = true
nodeid = ciscoasa-community-01 nodeid = ciscoasa-{{ ansible_hostname }}
logfile = /data/ciscoasa/log/ciscoasa.log logfile = /data/ciscoasa/log/ciscoasa.log
[TANNER] [TANNER]
tanner = true tanner = true
nodeid = tanner-community-01 nodeid = tanner-{{ ansible_hostname }}
logfile = /data/tanner/log/tanner_report.json logfile = /data/tanner/log/tanner_report.json
[GLUTTON]
glutton = true
nodeid = glutton-{{ ansible_hostname }}
logfile = /data/glutton/log/glutton.log

View File

@ -0,0 +1,8 @@
myENABLE=false
myHOST=host
myPORT=port
myCHANNEL=channels
myCERT=false
myIDENT=user
mySECRET=secret
myFORMAT=json

View File

@ -0,0 +1,12 @@
- name: Copy hpfeeds configuration file
ansible.builtin.copy:
src: hpfeeds.cfg
dest: /data/ews/conf
owner: tpot
group: tpot
mode: 0770
register: config
- name: Applying hpfeeds settings
ansible.builtin.command: /opt/tpot/bin/hpfeeds_optin.sh --conf=/data/ews/conf/hpfeeds.cfg
when: config.changed == true

View File

@ -0,0 +1,48 @@
- name: Waiting for SSH connection
ansible.builtin.wait_for_connection:
- name: Gathering facts
ansible.builtin.setup:
- name: Cloning T-Pot install directory
ansible.builtin.git:
repo: "https://github.com/telekom-security/tpotce.git"
dest: /root/tpot
- name: Prepare to set user password
ansible.builtin.set_fact:
user_name: "{{ ansible_user }}"
user_salt: "s0mew1ck3dTpoT"
no_log: true
- name: Changing password for user {{ user_name }}
ansible.builtin.user:
name: "{{ ansible_user }}"
password: "{{ user_password | password_hash('sha512', user_salt) }}"
state: present
shell: /bin/bash
- name: Copy T-Pot configuration file
ansible.builtin.copy:
src: ../../../../../../iso/installer/tpot.conf.dist
dest: /root/tpot.conf
owner: root
group: root
mode: 0644
- name: Install T-Pot on instance - be patient, this might take 15 to 30 minutes depending on the connection speed.
ansible.builtin.command: /root/tpot/iso/installer/install.sh --type=auto --conf=/root/tpot.conf
- name: Delete T-Pot configuration file
ansible.builtin.file:
path: /root/tpot.conf
state: absent
- name: Change unattended-upgrades to take default action
ansible.builtin.blockinfile:
dest: /etc/apt/apt.conf.d/50unattended-upgrades
block: |
Dpkg::Options {
"--force-confdef";
"--force-confold";
}

View File

@ -0,0 +1 @@
user_password: LiNuXuSeRPaSs#

View File

@ -0,0 +1,16 @@
- name: Finally rebooting T-Pot
ansible.builtin.command: shutdown -r now
async: 1
poll: 0
- name: Next login options
ansible.builtin.debug:
msg:
- "***** SSH Access:"
- "***** ssh {{ ansible_user }}@{{ ansible_host }} -p 64295"
- ""
- "***** Web UI:"
- "***** https://{{ ansible_host }}:64297"
- ""
- "***** Admin UI:"
- "***** https://{{ ansible_host }}:64294"

129
cloud/terraform/README.md Normal file
View File

@ -0,0 +1,129 @@
# T-Pot Terraform
This [Terraform](https://www.terraform.io/) configuration can be used to launch a virtual machine, bootstrap any dependencies and install T-Pot in a single step.
Configuration for Amazon Web Services (AWS) and Open Telekom Cloud (OTC) is currently included.
This can easily be extended to support other [Terraform providers](https://registry.terraform.io/browse/providers?category=public-cloud%2Ccloud-automation%2Cinfrastructure).
[Cloud-init](https://cloudinit.readthedocs.io/en/latest/) is used to bootstrap the instance and install T-Pot on startup.
# Table of Contents
- [What get's created](#what-created)
- [Amazon Web Services (AWS)](#what-created-aws)
- [Open Telekom Cloud (OTC)](#what-created-otc)
- [Prerequisites](#pre)
- [Amazon Web Services (AWS)](#pre-aws)
- [Open Telekom Cloud (OTC)](#pre-otc)
- [Terraform Variables](#variables)
- [Common configuration items](#variables-common)
- [Amazon Web Services (AWS)](#variables-aws)
- [Open Telekom Cloud (OTC)](#variables-otc)
- [Initialising](#initialising)
- [Applying the Configuration](#applying)
- [Connecting to the Instance](#connecting)
<a name="what-created"></a>
## What get's created
<a name="what-created-aws"></a>
### Amazon Web Services (AWS)
* EC2 instance:
* t3.large (2 vCPUs, 8 GB RAM)
* 128 GB disk
* Debian 10
* Public IP
* Security Group:
* TCP/UDP ports <= 64000 open to the Internet
* TCP ports 64294, 64295 and 64297 open to a chosen administrative IP
<a name="what-created-otc"></a>
### Open Telekom Cloud (OTC)
* ECS instance:
* s3.medium.8 (1 vCPU, 8 GB RAM)
* 128 GB disk
* Debian 10
* Public EIP
* Security Group
* All TCP/UDP ports are open to the Internet
* Virtual Private Cloud (VPC) and Subnet
<a name="pre"></a>
## Prerequisites
* [Terraform](https://www.terraform.io/) 0.13
<a name="pre-aws"></a>
### Amazon Web Services (AWS)
* AWS Account
* Existing VPC: VPC ID needs to be specified in `aws/variables.tf`
* Existing subnet: Subnet ID needs to be specified in `aws/variables.tf`
* Existing SSH key pair: Key name needs to be specified in `aws/variables.tf`
* AWS Authentication credentials should be [set using environment variables](https://www.terraform.io/docs/providers/aws/index.html#environment-variables)
<a name="pre-otc"></a>
### Open Telekom Cloud (OTC)
* OTC Account
* Existing SSH key pair: Key name needs to be specified in `otc/variables.tf`
* OTC Authentication credentials (Username, Password, Project Name, User Domain Name) can be set in the `otc/clouds.yaml` file
<a name="variables"></a>
## Terraform Variables
<a name="variables-common"></a>
### Common configuration items
These variables exist in `aws/variables.tf` and `otc/variables.tf` respectively.
Settings for cloud-init:
* `timezone` - Set the Server's timezone
* `linux_password`- Set a password for the Linux Operating System user (which is also used on the Admin UI)
Settings for T-Pot:
* `tpot_flavor` - Set the flavor of the T-Pot (Available flavors are listed in the variable's description)
* `web_user` - Set a username for the T-Pot Kibana Dasboard
* `web_password` - Set a password for the T-Pot Kibana Dashboard
<a name="variables-aws"></a>
### Amazon Web Services (AWS)
In `aws/variables.tf`, you can change the additional variables:
* `admin_ip` - source IP address(es) that you will use to administer the system. Connections to TCP ports 64294, 64295 and 64297 will be allowed from this IP only. Multiple IPs or CIDR blocks can be specified in the format: `["127.0.0.1/32", "192.168.0.0/24"]`
* `ec2_vpc_id` - Specify an existing VPC ID
* `ec2_subnet_id` - Specify an existing Subnet ID
* `ec2_region`
* `ec2_ssh_key_name` - Specify an existing SSH key pair
* `ec2_instance_type`
<a name="variables-otc"></a>
### Open Telekom Cloud (OTC)
In `otc/variables.tf`, you can change the additional variables:
* `ecs_flavor`
* `ecs_disk_size`
* `availability_zone`
* `key_pair` - Specify an existing SSH key pair
* `eip_size`
... and some more, but these are the most relevant.
<a name="initialising"></a>
## Initialising
The [`terraform init`](https://www.terraform.io/docs/commands/init.html) command is used to initialize a working directory containing Terraform configuration files.
```
$ cd aws
$ terraform init
```
OR
```
$ cd otc
$ terraform init
```
<a name="applying"></a>
## Applying the Configuration
The [`terraform apply`](https://www.terraform.io/docs/commands/apply.html) command is used to apply the changes required to reach the desired state of the configuration, or the pre-determined set of actions generated by a [`terraform plan`](https://www.terraform.io/docs/commands/plan.html) execution plan.
```
$ terraform apply
```
This will create your infrastructure and start a Cloud Server. On startup, the Server gets bootstrapped with cloud-init and will install T-Pot. Once this is done, the server will reboot.
If you want the remove the built infrastructure, you can run [`terraform destroy`](https://www.terraform.io/docs/commands/destroy.html) to delete it.
<a name="connecting"></a>
## Connecting to the Instance
When the installation is completed, you can proceed with connecting/logging in to the T-Pot according to the [documentation](https://github.com/telekom-security/tpotce#ssh-and-web-access).

20
cloud/terraform/aws/.terraform.lock.hcl generated Normal file
View File

@ -0,0 +1,20 @@
# This file is maintained automatically by "terraform init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/aws" {
version = "3.26.0"
constraints = "3.26.0"
hashes = [
"h1:0i78FItlPeiomd+4ThZrtm56P5K33k7/6dnEe4ZePI0=",
"zh:26043eed36d070ca032cf04bc980c654a25821a8abc0c85e1e570e3935bbfcbb",
"zh:2fe68f3f78d23830a04d7fac3eda550eef1f627dfc130486f70a65dc5c254300",
"zh:3d66484c608c64678e639db25d63872783ce60363a1246e30317f21c9c23b84b",
"zh:46ffd755cfd4cf94fe66342797b5afdcef010a24e126c67fee141b357d393535",
"zh:5e96f24357e945c9067cf5e032ad1d003609629c956c2f9f642fefe714e74587",
"zh:60c27aca36bb63bf3e865c2193be80ca83b376581d00f9c220af4b013e163c4d",
"zh:896f0f22d19d41e71b22f9240b261714c3915b165ddefeb771e7734d69dc47ea",
"zh:90de9966cb2fd3e2f326df291595e55d2dd2d90e7d6dd085c2c8691dce82bdb4",
"zh:ad05a91a88ceb1d6de5a568f7cc0b0e5bc0a79f3da70bc28c1e7f3750e362d58",
"zh:e8c63f59c6465329e1f3357498face3dd7ef10a033df3c366a33aa9e94b46c01",
]
}

View File

@ -0,0 +1,66 @@
provider "aws" {
region = var.ec2_region
}
resource "aws_security_group" "tpot" {
name = "T-Pot"
description = "T-Pot Honeypot"
vpc_id = var.ec2_vpc_id
ingress {
from_port = 0
to_port = 64000
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 0
to_port = 64000
protocol = "udp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 64294
to_port = 64294
protocol = "tcp"
cidr_blocks = var.admin_ip
}
ingress {
from_port = 64295
to_port = 64295
protocol = "tcp"
cidr_blocks = var.admin_ip
}
ingress {
from_port = 64297
to_port = 64297
protocol = "tcp"
cidr_blocks = var.admin_ip
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
tags = {
Name = "T-Pot"
}
}
resource "aws_instance" "tpot" {
ami = var.ec2_ami[var.ec2_region]
instance_type = var.ec2_instance_type
key_name = var.ec2_ssh_key_name
subnet_id = var.ec2_subnet_id
tags = {
Name = "T-Pot Honeypot"
}
root_block_device {
volume_type = "gp2"
volume_size = 128
delete_on_termination = true
}
user_data = templatefile("../cloud-init.yaml", { timezone = var.timezone, password = var.linux_password, tpot_flavor = var.tpot_flavor, web_user = var.web_user, web_password = var.web_password })
vpc_security_group_ids = [aws_security_group.tpot.id]
associate_public_ip_address = true
}

View File

@ -0,0 +1,12 @@
output "Admin_UI" {
value = "https://${aws_instance.tpot.public_dns}:64294/"
}
output "SSH_Access" {
value = "ssh -i {private_key_file} -p 64295 admin@${aws_instance.tpot.public_dns}"
}
output "Web_UI" {
value = "https://${aws_instance.tpot.public_dns}:64297/"
}

View File

@ -0,0 +1,93 @@
variable "admin_ip" {
default = ["127.0.0.1/32"]
description = "admin IP addresses in CIDR format"
}
variable "ec2_vpc_id" {
description = "ID of AWS VPC"
default = "vpc-XXX"
}
variable "ec2_subnet_id" {
description = "ID of AWS VPC subnet"
default = "subnet-YYY"
}
variable "ec2_region" {
description = "AWS region to launch servers"
default = "eu-west-1"
}
variable "ec2_ssh_key_name" {
default = "default"
}
# https://aws.amazon.com/ec2/instance-types/
# t3.large = 2 vCPU, 8 GiB RAM
variable "ec2_instance_type" {
default = "t3.large"
}
# Refer to https://wiki.debian.org/Cloud/AmazonEC2Image/Bullseye
variable "ec2_ami" {
type = map(string)
default = {
"af-south-1" = "ami-0c372f041acae6d49"
"ap-east-1" = "ami-079b8d011d4655385"
"ap-northeast-1" = "ami-08dbbf1c0485a4aa8"
"ap-northeast-2" = "ami-0269fe7d013b8e2dd"
"ap-northeast-3" = "ami-0848d1e5fb6e3e3da"
"ap-south-1" = "ami-020d429f17c9f1d0a"
"ap-southeast-1" = "ami-09625a221230d9fe6"
"ap-southeast-2" = "ami-03cbc6cddb06af2c2"
"ca-central-1" = "ami-09125623b02302014"
"eu-central-1" = "ami-00c36c60f07e21791"
"eu-north-1" = "ami-052bea934e2d9dbfe"
"eu-south-1" = "ami-04e2bb16d37324719"
"eu-west-1" = "ami-0f87948fe2cf1b2a4"
"eu-west-2" = "ami-02ed1bc837487d535"
"eu-west-3" = "ami-080efd2add7e29430"
"me-south-1" = "ami-0dbde382c834c4a72"
"sa-east-1" = "ami-0a0792814cb068077"
"us-east-1" = "ami-05dd1b6e7ef6f8378"
"us-east-2" = "ami-04dd0542609808c50"
"us-west-1" = "ami-07af5f877b3db9f73"
"us-west-2" = "ami-0d0d8694ba492c02b"
}
}
## cloud-init configuration ##
variable "timezone" {
default = "UTC"
}
variable "linux_password" {
#default = "LiNuXuSeRPaSs#"
description = "Set a password for the default user"
validation {
condition = length(var.linux_password) > 0
error_message = "Please specify a password for the default user."
}
}
## These will go in the generated tpot.conf file ##
variable "tpot_flavor" {
default = "STANDARD"
description = "Specify your tpot flavor [STANDARD, HIVE, HIVE_SENSOR, INDUSTRIAL, LOG4J, MEDICAL, MINI, SENSOR]"
}
variable "web_user" {
default = "webuser"
description = "Set a username for the web user"
}
variable "web_password" {
#default = "w3b$ecret"
description = "Set a password for the web user"
validation {
condition = length(var.web_password) > 0
error_message = "Please specify a password for the web user."
}
}

View File

@ -0,0 +1,9 @@
terraform {
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
version = "3.26.0"
}
}
}

View File

@ -0,0 +1,9 @@
provider "aws" {
alias = "eu-west-2"
region = "eu-west-2"
}
provider "aws" {
alias = "us-west-1"
region = "us-west-1"
}

View File

@ -0,0 +1,27 @@
module "eu-west-2" {
source = "./modules/multi-region"
ec2_vpc_id = "vpc-xxxxxxxx"
ec2_subnet_id = "subnet-xxxxxxxx"
ec2_region = "eu-west-2"
tpot_name = "T-Pot Honeypot"
linux_password = var.linux_password
web_password = var.web_password
providers = {
aws = aws.eu-west-2
}
}
module "us-west-1" {
source = "./modules/multi-region"
ec2_vpc_id = "vpc-xxxxxxxx"
ec2_subnet_id = "subnet-xxxxxxxx"
ec2_region = "us-west-1"
tpot_name = "T-Pot Honeypot"
linux_password = var.linux_password
web_password = var.web_password
providers = {
aws = aws.us-west-1
}
}

View File

@ -0,0 +1,69 @@
variable "ec2_vpc_id" {}
variable "ec2_subnet_id" {}
variable "ec2_region" {}
variable "linux_password" {}
variable "web_password" {}
variable "tpot_name" {}
resource "aws_security_group" "tpot" {
name = "T-Pot"
description = "T-Pot Honeypot"
vpc_id = var.ec2_vpc_id
ingress {
from_port = 0
to_port = 64000
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 0
to_port = 64000
protocol = "udp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 64294
to_port = 64294
protocol = "tcp"
cidr_blocks = var.admin_ip
}
ingress {
from_port = 64295
to_port = 64295
protocol = "tcp"
cidr_blocks = var.admin_ip
}
ingress {
from_port = 64297
to_port = 64297
protocol = "tcp"
cidr_blocks = var.admin_ip
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
tags = {
Name = "T-Pot"
}
}
resource "aws_instance" "tpot" {
ami = var.ec2_ami[var.ec2_region]
instance_type = var.ec2_instance_type
key_name = var.ec2_ssh_key_name
subnet_id = var.ec2_subnet_id
tags = {
Name = var.tpot_name
}
root_block_device {
volume_type = "gp2"
volume_size = 128
delete_on_termination = true
}
user_data = templatefile("../cloud-init.yaml", { timezone = var.timezone, password = var.linux_password, tpot_flavor = var.tpot_flavor, web_user = var.web_user, web_password = var.web_password })
vpc_security_group_ids = [aws_security_group.tpot.id]
associate_public_ip_address = true
}

View File

@ -0,0 +1,12 @@
output "Admin_UI" {
value = "https://${aws_instance.tpot.public_dns}:64294/"
}
output "SSH_Access" {
value = "ssh -i {private_key_file} -p 64295 admin@${aws_instance.tpot.public_dns}"
}
output "Web_UI" {
value = "https://${aws_instance.tpot.public_dns}:64297/"
}

View File

@ -0,0 +1,57 @@
variable "admin_ip" {
default = ["127.0.0.1/32"]
description = "admin IP addresses in CIDR format"
}
variable "ec2_ssh_key_name" {
default = "default"
}
# https://aws.amazon.com/ec2/instance-types/
variable "ec2_instance_type" {
default = "t3.xlarge"
}
# Refer to https://wiki.debian.org/Cloud/AmazonEC2Image/Bullseye
variable "ec2_ami" {
type = map(string)
default = {
"af-south-1" = "ami-0c372f041acae6d49"
"ap-east-1" = "ami-079b8d011d4655385"
"ap-northeast-1" = "ami-08dbbf1c0485a4aa8"
"ap-northeast-2" = "ami-0269fe7d013b8e2dd"
"ap-northeast-3" = "ami-0848d1e5fb6e3e3da"
"ap-south-1" = "ami-020d429f17c9f1d0a"
"ap-southeast-1" = "ami-09625a221230d9fe6"
"ap-southeast-2" = "ami-03cbc6cddb06af2c2"
"ca-central-1" = "ami-09125623b02302014"
"eu-central-1" = "ami-00c36c60f07e21791"
"eu-north-1" = "ami-052bea934e2d9dbfe"
"eu-south-1" = "ami-04e2bb16d37324719"
"eu-west-1" = "ami-0f87948fe2cf1b2a4"
"eu-west-2" = "ami-02ed1bc837487d535"
"eu-west-3" = "ami-080efd2add7e29430"
"me-south-1" = "ami-0dbde382c834c4a72"
"sa-east-1" = "ami-0a0792814cb068077"
"us-east-1" = "ami-05dd1b6e7ef6f8378"
"us-east-2" = "ami-04dd0542609808c50"
"us-west-1" = "ami-07af5f877b3db9f73"
"us-west-2" = "ami-0d0d8694ba492c02b"
}
}
## cloud-init configuration ##
variable "timezone" {
default = "UTC"
}
## These will go in the generated tpot.conf file ##
variable "tpot_flavor" {
default = "STANDARD"
description = "Specify your tpot flavor [STANDARD, HIVE, HIVE_SENSOR, INDUSTRIAL, LOG4J, MEDICAL, MINI, SENSOR]"
}
variable "web_user" {
default = "webuser"
description = "Set a username for the web user"
}

View File

@ -0,0 +1,9 @@
terraform {
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
version = "3.72.0"
}
}
}

View File

@ -0,0 +1,7 @@
output "eu-west-2_Web_UI" {
value = module.eu-west-2.Web_UI
}
output "us-west-1_Web_UI" {
value = module.us-west-1.Web_UI
}

View File

@ -0,0 +1,19 @@
variable "linux_password" {
#default = "LiNuXuSeRP4Ss!"
description = "Set a password for the default user"
validation {
condition = length(var.linux_password) > 0
error_message = "Please specify a password for the default user."
}
}
variable "web_password" {
#default = "w3b$ecret20"
description = "Set a password for the web user"
validation {
condition = length(var.web_password) > 0
error_message = "Please specify a password for the web user."
}
}

View File

@ -0,0 +1,26 @@
#cloud-config
timezone: ${timezone}
packages:
- git
runcmd:
- curl -sS --retry 5 https://github.com
- git clone https://github.com/telekom-security/tpotce /root/tpot
- /root/tpot/iso/installer/install.sh --type=auto --conf=/root/tpot.conf
- rm /root/tpot.conf
- /sbin/shutdown -r now
password: ${password}
chpasswd:
expire: false
write_files:
- content: |
# tpot configuration file
myCONF_TPOT_FLAVOR='${tpot_flavor}'
myCONF_WEB_USER='${web_user}'
myCONF_WEB_PW='${web_password}'
owner: root:root
path: /root/tpot.conf
permissions: '0600'

38
cloud/terraform/otc/.terraform.lock.hcl generated Normal file
View File

@ -0,0 +1,38 @@
# This file is maintained automatically by "terraform init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/random" {
version = "3.1.0"
constraints = "~> 3.1.0"
hashes = [
"h1:BZMEPucF+pbu9gsPk0G0BHx7YP04+tKdq2MrRDF1EDM=",
"zh:2bbb3339f0643b5daa07480ef4397bd23a79963cc364cdfbb4e86354cb7725bc",
"zh:3cd456047805bf639fbf2c761b1848880ea703a054f76db51852008b11008626",
"zh:4f251b0eda5bb5e3dc26ea4400dba200018213654b69b4a5f96abee815b4f5ff",
"zh:7011332745ea061e517fe1319bd6c75054a314155cb2c1199a5b01fe1889a7e2",
"zh:738ed82858317ccc246691c8b85995bc125ac3b4143043219bd0437adc56c992",
"zh:7dbe52fac7bb21227acd7529b487511c91f4107db9cc4414f50d04ffc3cab427",
"zh:a3a9251fb15f93e4cfc1789800fc2d7414bbc18944ad4c5c98f466e6477c42bc",
"zh:a543ec1a3a8c20635cf374110bd2f87c07374cf2c50617eee2c669b3ceeeaa9f",
"zh:d9ab41d556a48bd7059f0810cf020500635bfc696c9fc3adab5ea8915c1d886b",
"zh:d9e13427a7d011dbd654e591b0337e6074eef8c3b9bb11b2e39eaaf257044fd7",
"zh:f7605bd1437752114baf601bdf6931debe6dc6bfe3006eb7e9bb9080931dca8a",
]
}
provider "registry.terraform.io/opentelekomcloud/opentelekomcloud" {
version = "1.23.6"
constraints = "~> 1.23.4"
hashes = [
"h1:B/1Md957jWaDgFqsJDzmJc75KwL0eC/PCVuZ8HV5xSc=",
"zh:1aa79010869d082157fb44fc83c3bff4e40938ec0ca916f704d974c7f7ca39e4",
"zh:3155b8366828ce50231f69962b55df1e2261ed63c44bb64e2c950dd68769df1b",
"zh:4a909617aa96a6d8aead14f56996ad94e0a1cae9d28e8df1ddae19c2095ed337",
"zh:4f71046719632b4b90f88d29d8ba88915ee6ad66cd9d7ebe84a7459013e5003a",
"zh:67e4d10b2db79ad78ae2ec8d9dfac53c4721028f97f4436a7aa45e80b1beefd3",
"zh:7f12541fc5a3513e5522ff2bd5fee17d1e67bfe64f9ef59d03863fc7389e12ce",
"zh:86fadabfc8307cf6084a412ffc9c797ec94932d08bc663a3fcebf98101e951f6",
"zh:98744b39c2bfe3e8e6f929f750a689971071b257f3f066f669f93c8e0b76d179",
"zh:c363d41debb060804e2c6bd9cb50b4e8daa37362299e3ea74e187265cd85f2ca",
]
}

View File

@ -0,0 +1,9 @@
clouds:
open-telekom-cloud:
region_name: eu-de
auth:
project_name: eu-de_your_project
username: your_api_user
password: your_password
user_domain_name: OTC-EU-DE-000000000010000XXXXX
auth_url: https://iam.eu-de.otc.t-systems.com/v3

View File

@ -0,0 +1,68 @@
data "opentelekomcloud_images_image_v2" "debian" {
name = "Standard_Debian_10_latest"
}
resource "opentelekomcloud_networking_secgroup_v2" "secgroup_1" {
name = var.secgroup_name
description = var.secgroup_desc
}
resource "opentelekomcloud_networking_secgroup_rule_v2" "secgroup_rule_1" {
direction = "ingress"
ethertype = "IPv4"
remote_ip_prefix = "0.0.0.0/0"
security_group_id = opentelekomcloud_networking_secgroup_v2.secgroup_1.id
}
resource "opentelekomcloud_vpc_v1" "vpc_1" {
name = var.vpc_name
cidr = var.vpc_cidr
}
resource "opentelekomcloud_vpc_subnet_v1" "subnet_1" {
name = var.subnet_name
cidr = var.subnet_cidr
vpc_id = opentelekomcloud_vpc_v1.vpc_1.id
gateway_ip = var.subnet_gateway_ip
dns_list = ["100.125.4.25", "100.125.129.199"]
}
resource "random_id" "tpot" {
byte_length = 6
prefix = var.ecs_prefix
}
resource "opentelekomcloud_ecs_instance_v1" "ecs_1" {
name = random_id.tpot.b64_url
image_id = data.opentelekomcloud_images_image_v2.debian.id
flavor = var.ecs_flavor
vpc_id = opentelekomcloud_vpc_v1.vpc_1.id
nics {
network_id = opentelekomcloud_vpc_subnet_v1.subnet_1.id
}
system_disk_size = var.ecs_disk_size
system_disk_type = "SAS"
security_groups = [opentelekomcloud_networking_secgroup_v2.secgroup_1.id]
availability_zone = var.availability_zone
key_name = var.key_pair
user_data = templatefile("../cloud-init.yaml", { timezone = var.timezone, password = var.linux_password, tpot_flavor = var.tpot_flavor, web_user = var.web_user, web_password = var.web_password })
}
resource "opentelekomcloud_vpc_eip_v1" "eip_1" {
publicip {
type = "5_bgp"
}
bandwidth {
name = "bandwidth-${random_id.tpot.b64_url}"
size = var.eip_size
share_type = "PER"
}
}
resource "opentelekomcloud_compute_floatingip_associate_v2" "fip_1" {
floating_ip = opentelekomcloud_vpc_eip_v1.eip_1.publicip.0.ip_address
instance_id = opentelekomcloud_ecs_instance_v1.ecs_1.id
}

View File

@ -0,0 +1,11 @@
output "Admin_UI" {
value = "https://${opentelekomcloud_vpc_eip_v1.eip_1.publicip.0.ip_address}:64294"
}
output "SSH_Access" {
value = "ssh -p 64295 linux@${opentelekomcloud_vpc_eip_v1.eip_1.publicip.0.ip_address}"
}
output "Web_UI" {
value = "https://${opentelekomcloud_vpc_eip_v1.eip_1.publicip.0.ip_address}:64297"
}

View File

@ -0,0 +1,3 @@
provider "opentelekomcloud" {
cloud = "open-telekom-cloud"
}

View File

@ -0,0 +1,98 @@
## cloud-init configuration ##
variable "timezone" {
default = "UTC"
}
variable "linux_password" {
#default = "LiNuXuSeRPaSs#"
description = "Set a password for the default user"
validation {
condition = length(var.linux_password) > 0
error_message = "Please specify a password for the default user."
}
}
## Security Group ##
variable "secgroup_name" {
default = "sg-tpot"
}
variable "secgroup_desc" {
default = "Security Group for T-Pot"
}
## Virtual Private Cloud ##
variable "vpc_name" {
default = "vpc-tpot"
}
variable "vpc_cidr" {
default = "192.168.0.0/16"
}
## Subnet ##
variable "subnet_name" {
default = "subnet-tpot"
}
variable "subnet_cidr" {
default = "192.168.0.0/24"
}
variable "subnet_gateway_ip" {
default = "192.168.0.1"
}
## Elastic Cloud Server ##
variable "ecs_prefix" {
default = "tpot-"
}
variable "ecs_flavor" {
default = "s3.medium.8"
}
variable "ecs_disk_size" {
default = "128"
}
variable "availability_zone" {
default = "eu-de-03"
}
variable "key_pair" {
#default = ""
description = "Specify your SSH key pair"
validation {
condition = length(var.key_pair) > 0
error_message = "Please specify a Key Pair."
}
}
## Elastic IP ##
variable "eip_size" {
default = "100"
}
## These will go in the generated tpot.conf file ##
variable "tpot_flavor" {
default = "STANDARD"
description = "Specify your tpot flavor [STANDARD, HIVE, HIVE_SENSOR, INDUSTRIAL, LOG4J, MEDICAL, MINI, SENSOR]"
}
variable "web_user" {
default = "webuser"
description = "Set a username for the web user"
}
variable "web_password" {
#default = "w3b$ecret"
description = "Set a password for the web user"
validation {
condition = length(var.web_password) > 0
error_message = "Please specify a password for the web user."
}
}

View File

@ -0,0 +1,13 @@
terraform {
required_version = ">= 0.13"
required_providers {
opentelekomcloud = {
source = "opentelekomcloud/opentelekomcloud"
version = "~> 1.23.4"
}
random = {
source = "hashicorp/random"
version = "~> 3.1.0"
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 KiB

After

Width:  |  Height:  |  Size: 432 KiB

BIN
doc/attackmap.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

BIN
doc/cockpit_a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

BIN
doc/cockpit_b.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 594 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

BIN
doc/elasticvue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 885 KiB

BIN
doc/kibana_a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 KiB

BIN
doc/kibana_b.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

BIN
doc/kibana_c.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 162 KiB

BIN
doc/t-pot_qr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

BIN
doc/t-pot_wallpaper_4k.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 KiB

BIN
doc/tpotsocial.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

BIN
doc/tpotwebui.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

View File

@ -1,31 +1,36 @@
FROM alpine FROM alpine:3.15
#
# Include dist
COPY dist/ /root/dist/
#
# Install packages # Install packages
RUN apk -U --no-cache add \ RUN apk --no-cache -U add \
git \ git \
libcap \ procps \
python \ python3 && \
python-dev && \ #
# Install adbhoney from git # Install adbhoney from git
git clone --depth=1 https://github.com/huuck/ADBHoney /opt/adbhoney && \ git clone https://github.com/huuck/ADBHoney /opt/adbhoney && \
sed -i 's/dst_ip/dest_ip/' /opt/adbhoney/main.py && \ cd /opt/adbhoney && \
sed -i 's/dst_port/dest_port/' /opt/adbhoney/main.py && \ # git checkout ad7c17e78d01f6860d58ba826a4b6a4e4f83acbd && \
git checkout 2417a7a982f4fd527b3a048048df9a23178767ad && \
cp /root/dist/adbhoney.cfg /opt/adbhoney && \
sed -i 's/dst_ip/dest_ip/' /opt/adbhoney/adbhoney/core.py && \
sed -i 's/dst_port/dest_port/' /opt/adbhoney/adbhoney/core.py && \
#
# Setup user, groups and configs # Setup user, groups and configs
addgroup -g 2000 adbhoney && \ addgroup -g 2000 adbhoney && \
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 adbhoney && \ adduser -S -H -s /bin/ash -u 2000 -D -g 2000 adbhoney && \
chown -R adbhoney:adbhoney /opt/adbhoney && \ chown -R adbhoney:adbhoney /opt/adbhoney && \
setcap cap_net_bind_service=+ep /usr/bin/python2.7 && \ #
# Clean up # Clean up
apk del --purge git \ apk del --purge git && \
python-dev && \ rm -rf /root/* /opt/adbhoney/.git /var/cache/apk/*
rm -rf /root/* && \ #
rm -rf /var/cache/apk/*
# Set workdir and start adbhoney # Set workdir and start adbhoney
STOPSIGNAL SIGINT STOPSIGNAL SIGINT
# Adbhoney sometimes hangs at 100% CPU usage, if detected process will be killed and container restarts per docker-compose settings
HEALTHCHECK CMD if [ $(ps -C mpv -p 1 -o %cpu | tail -n 1 | cut -f 1 -d ".") -gt 75 ]; then kill -2 1; else exit 0; fi
USER adbhoney:adbhoney USER adbhoney:adbhoney
WORKDIR /opt/adbhoney/ WORKDIR /opt/adbhoney/
CMD nohup /usr/bin/python main.py -l log/adbhoney.log -j log/adbhoney.json -d dl/ CMD /usr/bin/python3 run.py

19
docker/adbhoney/dist/adbhoney.cfg vendored Normal file
View File

@ -0,0 +1,19 @@
[honeypot]
hostname = honeypot01
address = 0.0.0.0
port = 5555
download_dir = dl/
log_dir = log/
device_id = device::http://ro.product.name =starltexx;ro.product.model=SM-G960F;ro.product.device=starlte;features=cmd,stat_v2,shell_v2
[output_log]
enabled = true
log_file = adbhoney.log
log_level = info
[output_json]
enabled = true
log_file = adbhoney.json

View File

@ -10,11 +10,13 @@ services:
build: . build: .
container_name: adbhoney container_name: adbhoney
restart: always restart: always
# cpu_count: 1
# cpus: 0.25
networks: networks:
- adbhoney_local - adbhoney_local
ports: ports:
- "5555:5555" - "5555:5555"
image: "dtagdevsec/adbhoney:1811" image: "dtagdevsec/adbhoney:2204"
read_only: true read_only: true
volumes: volumes:
- /data/adbhoney/log:/opt/adbhoney/log - /data/adbhoney/log:/opt/adbhoney/log

Some files were not shown because too many files have changed in this diff Show More