450 Commits

Author SHA1 Message Date
198305fc57 listbot integration 2020-05-12 10:41:32 +00:00
c50d147926 Update capture-filter.bpf 2020-04-22 17:58:36 +02:00
0405a20402 Update update.sh 2020-04-22 17:47:57 +02:00
775ea76b98 Update Dockerfile 2020-04-22 17:46:55 +02:00
b98d9d352e Load listbot data from OTC 2020-04-22 17:11:54 +02:00
c277f313dc Update Dockerfile 2020-04-02 17:21:00 +02:00
b12cf0e418 offload listbot data from netlify CDN 2020-04-02 17:15:35 +02: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
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
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
66eca440b2 update docs 2019-02-19 14:00:41 +01:00
a64ac72fce prepare docs for release 2019-02-19 12:52:43 +01:00
9564954825 tweaking 2019-02-19 11:22:09 +01:00
0d58dff171 tweaking 2019-02-19 10:51:21 +01:00
8fc5f4a418 prevent cockpit root login 2019-02-19 10:01:38 +01:00
39ac35935b tweaking 2019-02-19 09:14:13 +01:00
bb1cc6bd04 tweaking 2019-02-18 18:20:23 +01:00
b5e12f9dae tweaking 2019-02-18 18:16:29 +01:00
fccb78c8e5 tweaking 2019-02-18 18:14:38 +01:00
1e4d4d2b04 tweaking 2019-02-18 18:06:14 +01:00
d1850e34c7 tweaking 2019-02-18 17:59:12 +01:00
0e3afd9642 tweaking 2019-02-18 17:45:31 +01:00
3bbb9561db fix typo 2019-02-16 16:09:09 +01:00
0abf7c70a8 tweaking 2019-02-16 16:04:04 +01:00
e99ebf59e3 begin rework installer 2019-02-16 15:46:16 +01:00
f3bfbf2926 improve installer 2019-02-16 14:50:59 +01:00
ab4b21acb4 fix race condition 2019-02-16 13:49:04 +01:00
7b3d157cdc fix typo 2019-02-15 21:50:43 +01:00
e100937007 tweaking 2019-02-15 16:13:15 +01:00
ba6ef72bfd tweaking 2019-02-15 15:10:18 +01:00
d6536fda3d twaeking 2019-02-15 14:57:41 +01:00
bb3f99c058 tweaking 2019-02-15 14:11:45 +01:00
1edd768a4b tweaking 2019-02-15 13:19:42 +01:00
b692ebd822 tweaking 2019-02-15 11:29:39 +01:00
010da57392 fix errors 2019-02-15 10:27:42 +01:00
f7a65719bf tweaking 2019-02-13 17:09:23 +01:00
8fc4f07f9f tweaking 2019-02-13 15:55:00 +01:00
097e1d4684 tweak installer 2019-02-13 13:33:53 +01:00
08d6d443af tweaking 2019-02-12 20:55:36 +01:00
93d2ebabda tweaking 2019-02-12 20:29:13 +01:00
8a6b7bc53e tweaking 2019-02-12 19:59:06 +01:00
8314170438 cleanup 2019-02-12 19:05:02 +01:00
f716c1fba8 tweaking
Committer: t3chn0m4g3 <t3chn0m4g3@gmail.com>
2019-02-12 17:56:22 +00:00
06f6e99299 tweaking 2019-02-12 17:10:40 +01:00
6364454849 tweaking 2019-02-12 16:56:43 +01:00
c215910d06 debian unstable 2019-02-12 12:24:42 +01:00
5474e380df tweaking, re-add NUC support 2019-02-10 22:10:16 +01:00
fe6e0bd189 download mini.iso from daily images 2019-02-08 18:28:16 +01:00
ec30cf89b9 Update Dockerfile 2019-02-06 17:11:08 +01:00
c67e4593d7 Update Dockerfile 2019-02-06 16:43:09 +01:00
a0fcc62bf1 Fix names for Suricata daemons 2019-02-06 16:15:51 +01:00
565f156173 Fix name for Suricata daemons 2019-02-06 16:13:03 +01:00
abb84e2a9b tweaking 2019-02-04 17:24:21 +01:00
c1f48c6197 tweaking for otc 2019-02-02 16:10:47 +00:00
86251b7215 tweaking 2019-01-30 17:32:30 +01:00
568f11c003 tweaking 2019-01-30 16:10:04 +01:00
139a497071 tweaking 2019-01-30 15:18:25 +01:00
b32bd3aa0e tweaking 2019-01-30 13:22:18 +01:00
0f9df3f388 tweaking 2019-01-30 11:44:17 +01:00
ddbb9cd02c tweaking 2019-01-29 00:54:34 +01:00
0cab79cd35 tweaking 2019-01-28 21:52:55 +01:00
193 changed files with 5176 additions and 7232 deletions

View File

@ -1,31 +1,29 @@
# Contribution # Issues
Thank you for your decision to contribute to T-Pot. 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
## Issues - 🧐 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).
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 ... - **⚠️ 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**
- [ ] 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:
-
<br>
<br>
<br>
<a name="info"></a> <a name="info"></a>
### Basic support information ## ⚠️ 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 T-Pot version are you currently using?
- Are you running on a Intel NUC or a VM? - 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? - How long has your installation been running?
- Did you install any upgrades or packages? - Did you install upgrades, packages or use the update script?
- Did you modify any scripts? - Did you modify any scripts or configs? If yes, please attach the changes.
- Have you turned persistence on/off? - Please provide a screenshot of `glances` and `htop`.
- How much RAM is available (login via ssh and run `htop`)? - How much free disk space is available (`df -h`)?
- How much stress are the CPUs under (login via ssh and run `htop`)? - What is the current container status (`dps.sh`)?
- How much swap space is being used (login via ssh and run `htop`)? - What is the status of the T-Pot service (`systemctl status tpot`)?
- How much free disk space is available (login via ssh and run `sudo df -h`)? - What ports are being occupied? Stop T-Pot `systemctl stop tpot` and run `netstat -tulpen`
- What is the current container status (login via ssh and run `sudo dps.sh`)? - If a single container shows as `DOWN` you can run `docker logs <container-name>` for the latest log entries

188
CHANGELOG.md Normal file
View File

@ -0,0 +1,188 @@
# Changelog
## 20200116
- **Bump ELK to latest 6.8.6**
- **Update ISO image to fix upstream bug of missing kernel modules**
- **Include dashboards for CitrixHoneypot**
- Please run `/opt/tpot/update.sh` for the necessary modifications, omit the reboot and run `/opt/tpot/bin/tped.sh` to (re-)select the NextGen installation type.
- This update requires the latest Kibana objects as well. Download the latest from https://raw.githubusercontent.com/dtag-dev-sec/tpotce/master/etc/objects/kibana_export.json.zip, unzip and import the objects within Kibana WebUI > Management > Saved Objects > Export / Import". All objects will be overwritten upon import, make sure to run an export first.
## 20200115
- **Prepare integration of CitrixHoneypot**
- Prepare integration of [CitrixHoneypot](https://github.com/MalwareTech/CitrixHoneypot) by MalwareTech
- Integration into ELK is still open
- Please run `/opt/tpot/update.sh` for the necessary modifications, omit the reboot and run `/opt/tpot/bin/tped.sh` to (re-)select the NextGen installation type.
## 20191224
- **Use pigz, optimize logrotate.conf**
- Use `pigz` for faster archiving, especially with regard to high volumes of logs - Thanks to @workandresearchgithub!
- Optimize `logrotate.conf` to improve archiving speed and get rid of multiple compression, also introduce `pigz`.
## 20191121
- **Bump ADBHoney to latest master**
- Use latest version of ADBHoney, which now fully support Python 3.x - Thanks to @huuck!
## 20191113, 20191104, 20191103, 20191028
- **Switch to Debian 10 on OTC, Ansible Improvements**
- OTC now supporting Debian 10 - Thanks to @shaderecker!
## 20191028
- **Fix an issue with pip3, yq**
- `yq` needs rehashing.
## 20191026
- **Remove cockpit-pcp**
- `cockpit-pcp` floods swap for some reason - removing for now.
## 20191022
- **Bump Suricata to 5.0.0**
## 20191021
- **Bump Cowrie to 2.0.0**
## 20191016
- **Tweak installer, pip3, Heralding**
- Install `cockpit-pcp` right from the start for machine monitoring in cockpit.
- Move installer and update script to use pip3.
- Bump heralding to latest master (1.0.6) - Thanks @johnnykv!
## 20191015
- **Tweaking, Bump glutton, unlock ES script**
- Add `unlock.sh` to unlock ES indices in case of lockdown after disk quota has been reached.
- Prevent too much terminal logging from p0f and glutton since `daemon.log` was filled up.
- Bump glutton to latest master now supporting payload_hex. Thanks to @glaslos.
## 20191002
- **Merge**
- Support Debian Buster images for AWS #454
- Thank you @piffey
## 20190924
- **Bump EWSPoster**
- Supports Python 3.x
- Thank you @Trixam
## 20190919
- **Merge**
- Handle non-interactive shells #454
- Thank you @Oogy
## 20190907
- **Logo tweaking**
- Add QR logo
## 20190828
- **Upgrades and rebuilds**
- Bump Medpot, Nginx and Adbhoney to latest master
- Bump ELK stack to 6.8.2
- Rebuild Mailoney, Honeytrap, Elasticpot and Ciscoasa
- Add 1080p T-Pot wallpaper for download
## 20190824
- **Add some logo work**
- Thanks to @thehadilps's suggestion adjusted social preview
- Added 4k T-Pot wallpaper for download
## 20190823
- **Fix for broken Fuse package**
- Fuse package in upstream is broken
- Adjust installer as workaround, fixes #442
## 20190816
- **Upgrades and rebuilds**
- Adjust Dionaea to avoid nmap detection, fixes #435 (thanks @iukea1)
- Bump Tanner, Cyberchef, Spiderfoot and ES Head to latest master
## 20190815
- **Bump ELK stack to 6.7.2**
- Transition to 7.x must iterate slowly through previous versions to prevent changes breaking T-Pots
## 20190814
- **Logstash Translation Maps improvement**
- Download translation maps rather than running a git pull
- Translation maps will now be bzip2 compressed to reduce traffic to a minimum
- Fixes #432
## 20190802
- **Add support for Buster as base image**
- Install ISO is now based on Debian Buster
- Installation upon Debian Buster is now supported
## 20190701
- **Reworked Ansible T-Pot Deployment**
- Transitioned from bash script to all Ansible
- Reusable Ansible Playbook for OpenStack clouds
- Example Showcase with our Open Telekom Cloud
- Adaptable for other cloud providers
## 20190626
- **HPFEEDS Opt-In commandline option**
- Pass a hpfeeds config file as a commandline argument
- hpfeeds config is saved in `/data/ews/conf/hpfeeds.cfg`
- Update script restores hpfeeds config
## 20190604
- **Finalize Fatt support**
- Build visualizations, searches, dashboards
- Rebuild index patterns
- Some finishing touches
## 20190601
- **Start supporting Fatt, remove Glastopf**
- Build Dockerfile, Adjust logstash, installer, update and such.
- Glastopf is no longer supported within T-Pot
## 20190528+20190531
- **Increase total number of fields**
- Adjust total number of fileds for logstash templae from 1000 to 2000.
## 20190526
- **Fix build for Cowrie**
- Upstream changes required a new package `py-bcrypt`.
## 20190525
- **Fix build for RDPY**
- Building was prevented due to cache error which occurs lately on Alpine if `apk` is using `--no-ache' as options.
## 20190520
- **Adjust permissions for /data folder**
- Now it is possible to download files from `/data` using SCP, WINSCP or CyberDuck.
## 20190513
- **Added Ansible T-Pot Deployment on Open Telekom Cloud**
- Reusable Ansible Playbooks for all cloud providers
- Example Showcase with our Open Telekom Cloud
## 20190511
- **Add hptest script**
- Quickly test if the honeypots are working with `hptest.sh <[ip,host]>` based on nmap.
## 20190508
- **Add tsec / install user to tpot group**
- For users being able to easily download logs from the /data folder the installer now adds the `tpot` or the logged in user (`who am i`) via `usermod -a -G tpot <user>` to the tpot group. Also /data permissions will now be enforced to `770`, which is necessary for directory listings.
## 20190502
- **Fix KVPs**
- Some KVPs for Cowrie changed and the tagcloud was not showing any values in the Cowrie dashboard.
- New installations are not affected, however existing installations need to import the objects from /opt/tpot/etc/objects/kibana-objects.json.zip.
- **Makeiso**
- Move to Xorriso for building the ISO image.
- This allows to support most of the Debian based distros, i.e. Debian, MxLinux and Ubuntu.
## 20190428
- **Rebuild ISO**
- The install ISO needed a rebuilt after some changes in the Debian mirrors.
- **Disable Netselect**
- After some reports in the issues that some Debian mirrors were not fully synced and thus some packages were unavailable the netselect-apt feature was disabled.
## 20190406
- **Fix for SSH**
- In some situations the SSH Port was not written to a new line (thanks to @dpisano for reporting).
- **Fix race condition for apt-fast**
- Curl and wget need to be installed before apt-fast installation.
## 20190404
- **Fix #332**
- If T-Pot, opposed to the requirements, does not have full internet access netselect-apt fails to determine the fastest mirror as it needs ICMP and UDP outgoing. Should netselect-apt fail the default mirrors will be used.
- **Improve install speed with apt-fast**
- Migrating from a stable base install to Debian (Sid) requires downloading lots of packages. Depending on your geo location the download speed was already improved by introducing netselect-apt to determine the fastest mirror. With apt-fast the downloads will be even faster by downloading packages not only in parallel but also with multiple connections per package.

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`)?

244
README.md
View File

@ -1,6 +1,6 @@
# T-Pot 18.11 ![T-Pot](doc/tpotsocial.png)
T-Pot 18.11 runs on the latest 18.04.x LTS Ubuntu Server Network Installer image, is based on T-Pot 19.03 runs on Debian (Sid), is based heavily on
[docker](https://www.docker.com/), [docker-compose](https://docs.docker.com/compose/) [docker](https://www.docker.com/), [docker-compose](https://docs.docker.com/compose/)
@ -8,13 +8,14 @@ and includes dockerized versions of the following honeypots
* [adbhoney](https://github.com/huuck/ADBHoney), * [adbhoney](https://github.com/huuck/ADBHoney),
* [ciscoasa](https://github.com/Cymmetria/ciscoasa_honeypot), * [ciscoasa](https://github.com/Cymmetria/ciscoasa_honeypot),
* [citrixhoneypot](https://github.com/MalwareTech/CitrixHoneypot),
* [conpot](http://conpot.org/), * [conpot](http://conpot.org/),
* [cowrie](http://www.micheloosterhof.com/cowrie/), * [cowrie](https://github.com/cowrie/cowrie),
* [dionaea](https://github.com/DinoTools/dionaea), * [dionaea](https://github.com/DinoTools/dionaea),
* [elasticpot](https://github.com/schmalle/ElasticPot), * [elasticpot](https://github.com/schmalle/ElasticpotPY),
* [glastopf](http://mushmush.org/),
* [glutton](https://github.com/mushorg/glutton), * [glutton](https://github.com/mushorg/glutton),
* [heralding](https://github.com/johnnykv/heralding), * [heralding](https://github.com/johnnykv/heralding),
* [honeypy](https://github.com/foospidy/HoneyPy),
* [honeytrap](https://github.com/armedpot/honeytrap/), * [honeytrap](https://github.com/armedpot/honeytrap/),
* [mailoney](https://github.com/awhitehatter/mailoney), * [mailoney](https://github.com/awhitehatter/mailoney),
* [medpot](https://github.com/schmalle/medpot), * [medpot](https://github.com/schmalle/medpot),
@ -29,6 +30,7 @@ Furthermore we use the following tools
* [Cyberchef](https://gchq.github.io/CyberChef/) a web app for encryption, encoding, compression and data analysis. * [Cyberchef](https://gchq.github.io/CyberChef/) a web app for encryption, encoding, compression and data analysis.
* [ELK stack](https://www.elastic.co/videos) to beautifully visualize all the events captured by T-Pot. * [ELK stack](https://www.elastic.co/videos) to beautifully visualize all the events captured by T-Pot.
* [Elasticsearch Head](https://mobz.github.io/elasticsearch-head/) a web front end for browsing and interacting with an Elastic Search cluster. * [Elasticsearch Head](https://mobz.github.io/elasticsearch-head/) a web front end for browsing and interacting with an Elastic Search cluster.
* [Fatt](https://github.com/0x4D31/fatt) a pyshark based script for extracting network metadata and fingerprints from pcap files and live network traffic.
* [Spiderfoot](https://github.com/smicallef/spiderfoot) a open source intelligence automation tool. * [Spiderfoot](https://github.com/smicallef/spiderfoot) a open source intelligence automation tool.
* [Suricata](http://suricata-ids.org/) a Network Security Monitoring engine. * [Suricata](http://suricata-ids.org/) a Network Security Monitoring engine.
@ -51,6 +53,9 @@ Furthermore we use the following tools
- [Running on Hardware](#hardware) - [Running on Hardware](#hardware)
- [Post Install User](#postinstall) - [Post Install User](#postinstall)
- [Post Install Auto](#postinstallauto) - [Post Install Auto](#postinstallauto)
- [Cloud Deployments](#cloud)
- [Ansible](#ansible)
- [Terraform](#terraform)
- [First Run](#firstrun) - [First Run](#firstrun)
- [System Placement](#placement) - [System Placement](#placement)
- [Updates](#updates) - [Updates](#updates)
@ -60,6 +65,7 @@ Furthermore we use the following tools
- [Tools](#tools) - [Tools](#tools)
- [Maintenance](#maintenance) - [Maintenance](#maintenance)
- [Community Data Submission](#submission) - [Community Data Submission](#submission)
- [Opt-In HPFEEDS Data Submission](#hpfeeds-optin)
- [Roadmap](#roadmap) - [Roadmap](#roadmap)
- [Disclaimer](#disclaimer) - [Disclaimer](#disclaimer)
- [FAQ](#faq) - [FAQ](#faq)
@ -67,71 +73,81 @@ Furthermore we use the following tools
- [Licenses](#licenses) - [Licenses](#licenses)
- [Credits](#credits) - [Credits](#credits)
- [Stay tuned](#staytuned) - [Stay tuned](#staytuned)
- [Testimonial](#testimonial)
- [Fun Fact](#funfact) - [Fun Fact](#funfact)
<a name="changelog"></a> <a name="changelog"></a>
# Changelog # Release Notes
- **New honeypots** - **Move from Ubuntu 18.04 to Debian (Sid)**
- *Adbhoney* Low interaction honeypot designed for Android Debug Bridge over TCP/IP. - For almost 5 years Ubuntu LTS versions were our distributions of choice. Last year we made a design choice for T-Pot to be closer to a rolling release model and thus allowing us to issue smaller changes and releases in a more timely manner. The distribution of choice is Debian (Sid / unstable) which will provide us with the latest advancements in a Debian based distribution.
- *Ciscoasa* a low interaction honeypot for the Cisco ASA component capable of detecting CVE-2018-0101, a DoS and remote code execution vulnerability. - **Include HoneyPy honeypot**
- *Glutton* (NextGen) is the all eating honeypot - *HoneyPy* is now included in the NEXTGEN installation type
- *Heralding* a credentials catching honeypot. - **Include Suricata 4.1.3**
- *Medpot* is a HL7 / FHIR honeypot. - Building *Suricata 4.1.3* from scratch to enable JA3 and overall better protocol support.
- *Snare* is a web application honeypot sensor, is the successor of Glastopf. SNARE has feature parity with Glastopf and allows to convert existing web pages into attack surfaces. - **Update tools to the latest versions**
- *Tanner* is SNARES' "brain". Every event is send from SNARE to TANNER, gets evaluated and TANNER decides how SNARE should respond to the client. This allows us to change the behaviour of many sensors on the fly. We are providing a TANNER instance for your use, but there is nothing stopping you from setting up your own instance. - ELK Stack 6.6.2
- **New tools** - CyberChef 8.27.0
- *Cockpit* is an interactive server admin interface. It is easy to use and very lightweight. Cockpit interacts directly with the operating system from a real Linux session in a browser. - SpiderFoot v3.0
- *Cyberchef* is the Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis. - Cockpit 188
- *grc* (commandline) is yet another colouriser (written in python) for beautifying your logfiles or output of commands. - NGINX is now built to enforce TLS 1.3 on the T-Pot WebUI
- *multitail* (commandline) allows you to monitor logfiles and command output in multiple windows in a terminal, colorize, filter and merge. - **Update honeypots**
- *tped.sh* (commandline) allows you to switch between T-Pot Editions after installation. - Where possible / feasible the honeypots have been updated to their latest versions.
- **Deprecated tools** - *Cowrie* now supports *HASSH* generated hashes which allows for an easier identification of an attacker accross IP adresses.
- *Netdata*, *Portainer* and *WeTTY* were superseded by *Cockpit* which is much more lightweight, perfectly well integrated into Ubuntu 18.04 LTS and of course comes with the same but a more basic feature set. - *Heralding* now supports *SOCKS5* emulation.
- **New Standard Installation** - **Update Dashboards & Visualizations**
- The new standard installation is now running a whopping *14* honeypot instances. - *Offset Dashboard* added to easily spot changes in attacks on a single dashboard in 24h time window.
- **T-Pot Universal Installer** - *Cowrie Dashboard* modified to integrate *HASSH* support / visualizations.
- The T-Pot installer now also includes the option to install on a existing machine, the T-Pot-Autoinstaller is no longer necessary. - *HoneyPy Dashboard* added to support latest honeypot addition.
- **Tighten Security** - *Suricata Dashboard* modified to integrate *JA3* support / visualizations.
- The docker containers are now running mostly with a read-only file system - **Debian mirror selection**
- If possible using `setcap` to start daemons without root or dropping privileges - During base install you now have to manually select a mirror.
- Introducing `fail2ban` to ease up on `authorized_keys` requirement which is no longer necessary for `SSH`. Also to further prevent brute-force attacks on `Cockpit` and `NGINX` allowing for faster load times of the WebUI. - Upon T-Pot install the mirror closest to you will be determined automatically, `netselect-apt` requires you to allow ICMP outbound.
- **Iptables exceptions for NFQ based honeypots** - This solves peering problems for most of the users speeding up installation and updates.
- In previous versions `iptables`had manually be maintained, now a a script parses `/opt/tpot/etc/tpot.yml` and extracts port information to automatically generate exceptions for ports that should not be forwarded to NFQ. - **Bugs**
- **CI** - Fixed issue #298 where the import and export of objects on the shell did not work.
- The Kibana UI now uses a magenta theme. - Fixed issue #313 where Spiderfoot raised a KeyError, which was previously fixed in upstream.
- **ES HEAD** - Fixed error in Suricata where path for reference.config changed.
- A Java Script now automatically enters the correct FQDN / IP. A manual step is no longer required. - **Release Cycle**
- **ELK STACK** - As far as possible we will integrate changes now faster into the master branch, eliminating the need for monolithic releases. The update feature will be continuously improved on that behalf. However this might not account for all feature changes.
- The ELK Stack was updated to the latest 6.x versions. - **HPFEEDS Opt-In**
- This also means you can now expect the availability of basic *X-Pack-Feaures*, the full feature set however is only available to users with a valid license. - If you want to share your T-Pot data with a 3rd party HPFEEDS broker such as [SISSDEN](https://sissden.eu) you can do so by creating an account at the SISSDEN portal and run `hpfeeds_optin.sh` on T-Pot.
- **Dashboards Makeover**
- Because Kibana 6.x introduced so much whitespace the dashboards and some of the visualizations needed some overhaul. While it probably needs some getting used to the key was to focus on displaying as much information while not compromising on clarity.
- Because of the new honeypots we now more than **200 Visualizations** pre-configured and compiled to 16 individual **Kibana Dashboards**. Monitor all *honeypot events* locally on your T-Pot installation. Aside from *honeypot events* you can also view *Suricata NSM and NGINX* events for a quick overview of wire events.
- **Honeypot updates and improvements**
- All honeypots were updated to their latest stable versions.
- Docker images were mostly overhauled to tighten security even further
- Some of the honeypot configurations were modified to keep things fresh
- **Update Feature** - **Update Feature**
- For the ones who like to live on the bleeding edge of T-Pot development there is now a update script available in `/opt/tpot/update.sh`. - For the ones who like to live on the bleeding edge of T-Pot development there is now an update script available in `/opt/tpot/update.sh`.
- This feature is now in beta and is mostly intended to provide you with the latest development advances without the need of reinstalling T-Pot. - This feature is beta and is mostly intended to provide you with the latest development advances without the need of reinstalling T-Pot.
- **Deprecated tools**
- *ctop* will no longer be part of T-Pot.
- **Fix #332**
- If T-Pot, opposed to the requirements, does not have full internet access netselect-apt fails to determine the fastest mirror as it needs ICMP and UDP outgoing. Should netselect-apt fail the default mirrors will be used.
- **Improve install speed with apt-fast**
- Migrating from a stable base install to Debian (Sid) requires downloading lots of packages. Depending on your geo location the download speed was already improved by introducing netselect-apt to determine the fastest mirror. With apt-fast the downloads will be even faster by downloading packages not only in parallel but also with multiple connections per package.
- **HPFEEDS Opt-In commandline option**
- Pass a hpfeeds config file as a commandline argument
- hpfeeds config is saved in `/data/ews/conf/hpfeeds.cfg`
- Update script restores hpfeeds config
- **Ansible T-Pot Deployment**
- Transitioned from bash script to all Ansible
- Reusable Ansible Playbook for OpenStack clouds
- Example Showcase with our Open Telekom Cloud
- Adaptable for other cloud providers
<a name="concept"></a> <a name="concept"></a>
# Technical Concept # Technical Concept
T-Pot is based on the network installer of Ubuntu Server 18.04.x LTS. T-Pot is based on the network installer Debian (Stretch). During installation the whole system will be updated to Debian (Sid).
The honeypot daemons as well as other support components being used have been containerized using [docker](http://docker.io). The honeypot daemons as well as other support components being used have been containerized using [docker](http://docker.io).
This allows us to run multiple honeypot daemons on the same network interface while maintaining a small footprint and constrain each honeypot within its own environment. This allows us to run multiple honeypot daemons on the same network interface while maintaining a small footprint and constrain each honeypot within its own environment.
In T-Pot we combine the dockerized honeypots ... In T-Pot we combine the dockerized honeypots ...
* [adbhoney](https://github.com/huuck/ADBHoney), * [adbhoney](https://github.com/huuck/ADBHoney),
* [ciscoasa](https://github.com/Cymmetria/ciscoasa_honeypot), * [ciscoasa](https://github.com/Cymmetria/ciscoasa_honeypot),
* [citrixhoneypot](https://github.com/MalwareTech/CitrixHoneypot),
* [conpot](http://conpot.org/), * [conpot](http://conpot.org/),
* [cowrie](http://www.micheloosterhof.com/cowrie/), * [cowrie](http://www.micheloosterhof.com/cowrie/),
* [dionaea](https://github.com/DinoTools/dionaea), * [dionaea](https://github.com/DinoTools/dionaea),
* [elasticpot](https://github.com/schmalle/ElasticPot), * [elasticpot](https://github.com/schmalle/ElasticpotPY),
* [glastopf](http://mushmush.org/),
* [glutton](https://github.com/mushorg/glutton), * [glutton](https://github.com/mushorg/glutton),
* [heralding](https://github.com/johnnykv/heralding), * [heralding](https://github.com/johnnykv/heralding),
* [honeypy](https://github.com/foospidy/HoneyPy),
* [honeytrap](https://github.com/armedpot/honeytrap/), * [honeytrap](https://github.com/armedpot/honeytrap/),
* [mailoney](https://github.com/awhitehatter/mailoney), * [mailoney](https://github.com/awhitehatter/mailoney),
* [medpot](https://github.com/schmalle/medpot), * [medpot](https://github.com/schmalle/medpot),
@ -144,14 +160,15 @@ In T-Pot we combine the dockerized honeypots ...
* [Cyberchef](https://gchq.github.io/CyberChef/) a web app for encryption, encoding, compression and data analysis. * [Cyberchef](https://gchq.github.io/CyberChef/) a web app for encryption, encoding, compression and data analysis.
* [ELK stack](https://www.elastic.co/videos) to beautifully visualize all the events captured by T-Pot. * [ELK stack](https://www.elastic.co/videos) to beautifully visualize all the events captured by T-Pot.
* [Elasticsearch Head](https://mobz.github.io/elasticsearch-head/) a web front end for browsing and interacting with an Elastic Search cluster. * [Elasticsearch Head](https://mobz.github.io/elasticsearch-head/) a web front end for browsing and interacting with an Elastic Search cluster.
* [Fatt](https://github.com/0x4D31/fatt) a pyshark based script for extracting network metadata and fingerprints from pcap files and live network traffic.
* [Spiderfoot](https://github.com/smicallef/spiderfoot) a open source intelligence automation tool. * [Spiderfoot](https://github.com/smicallef/spiderfoot) a open source intelligence automation tool.
* [Suricata](http://suricata-ids.org/) a Network Security Monitoring engine. * [Suricata](http://suricata-ids.org/) a Network Security Monitoring engine.
... to give you the best out-of-the-box experience possible and a easy-to-use multi-honeypot appliance. ... to give you the best out-of-the-box experience possible and an easy-to-use multi-honeypot appliance.
![Architecture](doc/architecture.png) ![Architecture](doc/architecture.png)
While data within docker containers is volatile we do now ensure a default 30 day persistence of all relevant honeypot and tool data in the well known `/data` folder and sub-folders. The persistence configuration may be adjusted in `/opt/tpot/etc/logrotate/logrotate.conf`. Once a docker container crashes, all other data produced within its environment is erased and a fresh instance is started from the corresponding docker image.<br> While data within docker containers is volatile we do ensure a default 30 day persistence of all relevant honeypot and tool data in the well known `/data` folder and sub-folders. The persistence configuration may be adjusted in `/opt/tpot/etc/logrotate/logrotate.conf`. Once a docker container crashes, all other data produced within its environment is erased and a fresh instance is started from the corresponding docker image.<br>
Basically, what happens when the system is booted up is the following: Basically, what happens when the system is booted up is the following:
@ -170,7 +187,7 @@ The individual docker configurations are located in the [docker folder](https://
Depending on your installation type, whether you install on [real hardware](#hardware) or in a [virtual machine](#vm), make sure your designated T-Pot system meets the following requirements: Depending on your installation type, whether you install on [real hardware](#hardware) or in a [virtual machine](#vm), make sure your designated T-Pot system meets the following requirements:
##### Standard Installation ##### Standard Installation
- Honeypots: adbhoney, ciscoasa, conpot, cowrie, dionaea, elasticpot, heralding, honeytrap, mailoney, rdpy, snare, tanner and vnclowpot - Honeypots: adbhoney, ciscoasa, conpot, cowrie, dionaea, elasticpot, heralding, honeytrap, mailoney, medpot, rdpy, snare & tanner
- Tools: cockpit, cyberchef, ELK, elasticsearch head, ewsposter, NGINX, spiderfoot, p0f and suricata - Tools: cockpit, cyberchef, ELK, elasticsearch head, ewsposter, NGINX, spiderfoot, p0f and suricata
- 6-8 GB RAM (less RAM is possible but might introduce swapping) - 6-8 GB RAM (less RAM is possible but might introduce swapping)
@ -179,7 +196,7 @@ Depending on your installation type, whether you install on [real hardware](#har
- A working, non-proxied, internet connection - A working, non-proxied, internet connection
##### Sensor Installation ##### Sensor Installation
- Honeypots: adbhoney, ciscoasa, conpot, cowrie, dionaea, elasticpot, heralding, honeytrap, mailoney, rdpy, snare, tanner and vnclowpot - Honeypots: adbhoney, ciscoasa, conpot, cowrie, dionaea, elasticpot, heralding, honeytrap, mailoney, medpot, rdpy, snare & tanner
- Tools: cockpit - Tools: cockpit
- 6-8 GB RAM (less RAM is possible but might introduce swapping) - 6-8 GB RAM (less RAM is possible but might introduce swapping)
@ -188,7 +205,7 @@ Depending on your installation type, whether you install on [real hardware](#har
- A working, non-proxied, internet connection - A working, non-proxied, internet connection
##### Industrial Installation ##### Industrial Installation
- Honeypots: conpot, rdpy, vnclowpot - Honeypots: conpot, cowrie, heralding, medpot, rdpy
- Tools: cockpit, cyberchef, ELK, elasticsearch head, ewsposter, NGINX, spiderfoot, p0f and suricata - Tools: cockpit, cyberchef, ELK, elasticsearch head, ewsposter, NGINX, spiderfoot, p0f and suricata
- 6-8 GB RAM (less RAM is possible but might introduce swapping) - 6-8 GB RAM (less RAM is possible but might introduce swapping)
@ -205,18 +222,9 @@ Depending on your installation type, whether you install on [real hardware](#har
- Network via DHCP - Network via DHCP
- A working, non-proxied, internet connection - A working, non-proxied, internet connection
##### NextGen Installation (Glutton instead of Honeytrap) ##### NextGen Installation (Glutton replacing Honeytrap, HoneyPy replacing Elasticpot)
- Honeypots: adbhoney, ciscoasa, conpot, cowrie, dionaea, elasticpot, glutton, heralding, mailoney, rdpy, snare, tanner and vnclowpot - Honeypots: adbhoney, ciscoasa, citrixhoneypot, conpot, cowrie, dionaea, glutton, heralding, honeypy, mailoney, rdpy, snare & tanner
- Tools: cockpit, cyberchef, ELK, elasticsearch head, ewsposter, NGINX, spiderfoot, p0f and suricata - Tools: cockpit, cyberchef, ELK, elasticsearch head, ewsposter, fatt, NGINX, spiderfoot, p0f and suricata
- 6-8 GB RAM (less RAM is possible but might introduce swapping)
- 128 GB SSD (smaller is possible but limits the capacity of storing events)
- Network via DHCP
- A working, non-proxied, internet connection
##### Legacy Installation (honeypots based on Standard Installation of T-Pot 17.10)
- Honeypots: cowrie, dionaea, elasticpot, glastopf, honeytrap, mailoney, rdpy and vnclowpot
- Tools: cockpit, cyberchef, ELK, elasticsearch head, ewsposter, NGINX, spiderfoot, p0f and suricata
- 6-8 GB RAM (less RAM is possible but might introduce swapping) - 6-8 GB RAM (less RAM is possible but might introduce swapping)
- 128 GB SSD (smaller is possible but limits the capacity of storing events) - 128 GB SSD (smaller is possible but limits the capacity of storing events)
@ -227,7 +235,7 @@ Depending on your installation type, whether you install on [real hardware](#har
# Installation # Installation
The installation of T-Pot is straight forward and heavily depends on a working, transparent and non-proxied up and running internet connection. Otherwise the installation **will fail!** The installation of T-Pot is straight forward and heavily depends on a working, transparent and non-proxied up and running internet connection. Otherwise the installation **will fail!**
Firstly, decide if you want to download our prebuilt installation ISO image from [GitHub](https://github.com/dtag-dev-sec/tpotce/releases), [create it yourself](#createiso) ***or*** [post-install on a existing Ubuntu Server 18.04 LTS](#postinstall). Firstly, decide if you want to download our prebuilt installation ISO image from [GitHub](https://github.com/dtag-dev-sec/tpotce/releases), [create it yourself](#createiso) ***or*** [post-install on an existing Debian 9.7 (Stretch)](#postinstall).
Secondly, decide where you want to let the system run: [real hardware](#hardware) or in a [virtual machine](#vm)? Secondly, decide where you want to let the system run: [real hardware](#hardware) or in a [virtual machine](#vm)?
@ -241,7 +249,7 @@ You can download the prebuilt installation image from [GitHub](https://github.co
For transparency reasons and to give you the ability to customize your install, we provide you the [ISO Creator](https://github.com/dtag-dev-sec/tpotce) that enables you to create your own ISO installation image. For transparency reasons and to give you the ability to customize your install, we provide you the [ISO Creator](https://github.com/dtag-dev-sec/tpotce) that enables you to create your own ISO installation image.
**Requirements to create the ISO image:** **Requirements to create the ISO image:**
- Ubuntu 18.04 LTS or newer as host system (others *may* work, but *remain* untested) - Debian 9.7 or newer as host system (others *may* work, but *remain* untested)
- 4GB of free memory - 4GB of free memory
- 32GB of free storage - 32GB of free storage
- A working internet connection - A working internet connection
@ -284,17 +292,17 @@ If you decide to run T-Pot on dedicated hardware, just follow these steps:
Whereas most CD burning tools allow you to burn from ISO images, the procedure to create a bootable USB stick from an ISO image depends on your system. There are various Windows GUI tools available, e.g. [this tip](http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows) might help you.<br> On [Linux](http://askubuntu.com/questions/59551/how-to-burn-a-iso-to-a-usb-device) or [MacOS](http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx) you can use the tool *dd* or create the USB stick with T-Pot's [ISO Creator](https://github.com/dtag-dev-sec). Whereas most CD burning tools allow you to burn from ISO images, the procedure to create a bootable USB stick from an ISO image depends on your system. There are various Windows GUI tools available, e.g. [this tip](http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows) might help you.<br> On [Linux](http://askubuntu.com/questions/59551/how-to-burn-a-iso-to-a-usb-device) or [MacOS](http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx) you can use the tool *dd* or create the USB stick with T-Pot's [ISO Creator](https://github.com/dtag-dev-sec).
2. Boot from the USB stick and install. 2. Boot from the USB stick and install.
*Please note*: We will ensure the compatibility with the Intel NUC platform, as we really like the form factor, looks and build quality. Other platforms **remain untested**. *Please note*: While we are performing limited tests with the Intel NUC platform other hardware platforms **remain untested**. We can not provide hardware support of any kind.
<a name="postinstall"></a> <a name="postinstall"></a>
## Post-Install User ## Post-Install User
In some cases it is necessary to install Ubuntu Server 18.04 LTS on your own: In some cases it is necessary to install Debian 9.7 (Stretch) on your own:
- Cloud provider does not offer mounting ISO images. - Cloud provider does not offer mounting ISO images.
- Hardware setup needs special drivers and / or kernels. - Hardware setup needs special drivers and / or kernels.
- Within your company you have to setup special policies, software etc. - Within your company you have to setup special policies, software etc.
- You just like to stay on top of things. - You just like to stay on top of things.
While the T-Pot-Autoinstaller served us perfectly well in the past we decided to include the feature directly into T-Pot and its Universal Installer. The T-Pot Universal Installer will upgrade the system to Debian (Sid) and install all required T-Pot dependencies.
Just follow these steps: Just follow these steps:
@ -308,7 +316,7 @@ The installer will now start and guide you through the install process.
<a name="postinstallauto"></a> <a name="postinstallauto"></a>
## Post-Install Auto ## Post-Install Auto
You can also let the installer run automatically if you provide your own `tpot.conf`. A example is available in `tpotce/iso/installer/tpot.conf.dist`. This should make things easier in case you want to automate the installation i.e. with **Ansible**. You can also let the installer run automatically if you provide your own `tpot.conf`. An example is available in `tpotce/iso/installer/tpot.conf.dist`. This should make things easier in case you want to automate the installation i.e. with **Ansible**.
Just follow these steps while adjusting `tpot.conf` to your needs: Just follow these steps while adjusting `tpot.conf` to your needs:
@ -321,6 +329,30 @@ cp tpot.conf.dist tpot.conf
The installer will start automatically and guide you through the install process. The installer will start automatically and guide you through the install process.
<a name="cloud"></a>
## Cloud Deployments
Located in the [`cloud`](cloud) folder.
Currently there are examples with Ansible & Terraform.
If you would like to contribute, you can add other cloud deployments like Chef or Puppet or extend current methods with other cloud providers.
<a name="ansible"></a>
### Ansible Deployment
You can find an [Ansible](https://www.ansible.com/) based T-Pot deployment in the [`cloud/ansible`](cloud/ansible) folder.
The Playbook in the [`cloud/ansible/openstack`](cloud/ansible/openstack) folder is reusable for all OpenStack clouds out of the box.
It first creates all resources (security group, network, subnet, router), deploys a new server and then installs and configures T-Pot.
You can have a look at the Playbook and easily adapt the deploy role for other [cloud providers](https://docs.ansible.com/ansible/latest/modules/list_of_cloud_modules.html).
<a name="terraform"></a>
### Terraform Configuration
You can find [Terraform](https://www.terraform.io/) configuration in the [`cloud/terraform`](cloud/terraform) folder.
This 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) is currently included and this can easily be extended to support other [Terraform providers](https://www.terraform.io/docs/providers/index.html).
<a name="firstrun"></a> <a name="firstrun"></a>
## First Run ## First Run
The installation requires very little interaction, only a locale and keyboard setting have to be answered for the basic linux installation. The system will reboot and please maintain the active internet connection. The T-Pot installer will start and ask you for an installation type, password for the **tsec** user and credentials for a **web user**. Everything else will be configured automatically. All docker images and other componenents will be downloaded. Depending on your network connection and the chosen installation type, the installation may take some time. During our tests (250Mbit down, 40Mbit up), the installation was usually finished within a 15-30 minute timeframe. The installation requires very little interaction, only a locale and keyboard setting have to be answered for the basic linux installation. The system will reboot and please maintain the active internet connection. The T-Pot installer will start and ask you for an installation type, password for the **tsec** user and credentials for a **web user**. Everything else will be configured automatically. All docker images and other componenents will be downloaded. Depending on your network connection and the chosen installation type, the installation may take some time. During our tests (250Mbit down, 40Mbit up), the installation was usually finished within a 15-30 minute timeframe.
@ -344,7 +376,7 @@ You can also login from your browser and access the Web UI: `https://<your.ip>:6
<a name="placement"></a> <a name="placement"></a>
# System Placement # System Placement
Make sure your system is reachable through the internet. Otherwise it will not capture any attacks, other than the ones from your internal network! We recommend you put it in an unfiltered zone, where all TCP and UDP traffic is forwarded to T-Pot's network interface. However to avoid fingerprinting you can put T-Pot behind a firewall and forward all TCP / UDP traffic in the port range of 1-64000 to T-Pot while allowing access to ports > 64000 only from trusted IPs. Make sure your system is reachable through a network you suspect intruders in / from (i.e. the internet). Otherwise T-Pot will most likely not capture any attacks, other than the ones from your internal network! We recommend you put it in an unfiltered zone, where all TCP and UDP traffic is forwarded to T-Pot's network interface. However to avoid fingerprinting you can put T-Pot behind a firewall and forward all TCP / UDP traffic in the port range of 1-64000 to T-Pot while allowing access to ports > 64000 only from trusted IPs.
A list of all relevant ports is available as part of the [Technical Concept](#concept) A list of all relevant ports is available as part of the [Technical Concept](#concept)
<br> <br>
@ -355,21 +387,23 @@ In case you need external Admin UI access, forward TCP port 64294 to T-Pot, see
In case you need external SSH access, forward TCP port 64295 to T-Pot, see below. In case you need external SSH access, forward TCP port 64295 to T-Pot, see below.
In case you need external Web UI access, forward TCP port 64297 to T-Pot, see below. In case you need external Web UI access, forward TCP port 64297 to T-Pot, see below.
T-Pot requires outgoing git, http, https connections for updates (Ubuntu, Docker, GitHub, PyPi) and attack submission (ewsposter, hpfeeds). Ports and availability may vary based on your geographical location. T-Pot requires outgoing git, http, https connections for updates (Debian, Docker, GitHub, PyPi) and attack submission (ewsposter, hpfeeds). Ports and availability may vary based on your geographical location.
<a name="updates"></a> <a name="updates"></a>
# Updates # Updates
For the ones of you who want to live on the bleeding edge of T-Pot development we introduced an update feature which will allow you to update all T-Pot relevant files to be up to date with the T-Pot master branch. For the ones of you who want to live on the bleeding edge of T-Pot development we introduced an update feature which will allow you to update all T-Pot relevant files to be up to date with the T-Pot master branch.
**If you made any relevant changes to the T-Pot relevant config files make sure to create a backup first.** **If you made any relevant changes to the T-Pot relevant config files make sure to create a backup first.**
- The Update script will
- **merciless** overwrite local changes to be in sync with the T-Pot master branch The Update script will:
- upgrade the system to the latest kernel within Ubuntu 18.04.x LTS - **mercilessly** overwrite local changes to be in sync with the T-Pot master branch
- upgrade the system to the latest packages available within Ubuntu 18.04.x LTS - upgrade the system to the packages available in Debian (Sid)
- update all resources to be en par with the T-Pot master branch - update all resources to be in-sync with the T-Pot master branch
- ensure all T-Pot relevant system files will be patched / copied into original T-Pot state - ensure all T-Pot relevant system files will be patched / copied into the original T-Pot state
- restore your custom ews.cfg and HPFEED settings from `/data/ews/conf`
You simply run the update script: You simply run the update script:
``` ```
sudo su -
cd /opt/tpot/ cd /opt/tpot/
./update.sh -y ./update.sh -y
``` ```
@ -428,7 +462,7 @@ If new versions of the components involved appear, we will test them and build n
<a name="submission"></a> <a name="submission"></a>
## Community Data Submission ## Community Data Submission
We provide T-Pot in order to make it accessible to all parties interested in honeypot deployment. By default, the captured data is submitted to a community backend. This community backend uses the data to feed [Sicherheitstacho](https://sicherheitstacho.eu. We provide T-Pot in order to make it accessible to all parties interested in honeypot deployment. By default, the captured data is submitted to a community backend. This community backend uses the data to feed [Sicherheitstacho](https://sicherheitstacho.eu).
You may opt out of the submission by removing the `# Ewsposter service` from `/opt/tpot/etc/tpot.yml`: You may opt out of the submission by removing the `# Ewsposter service` from `/opt/tpot/etc/tpot.yml`:
1. Stop T-Pot services: `systemctl stop tpot` 1. Stop T-Pot services: `systemctl stop tpot`
2. Remove Ewsposter service: `vi /opt/tpot/etc/tpot.yml` 2. Remove Ewsposter service: `vi /opt/tpot/etc/tpot.yml`
@ -440,7 +474,7 @@ You may opt out of the submission by removing the `# Ewsposter service` from `/o
restart: always restart: always
networks: networks:
- ewsposter_local - ewsposter_local
image: "dtagdevsec/ewsposter:1810" image: "dtagdevsec/ewsposter:1903"
volumes: volumes:
- /data:/data - /data:/data
- /data/ews/conf/ews.ip:/opt/ewsposter/ews.ip - /data/ews/conf/ews.ip:/opt/ewsposter/ews.ip
@ -451,6 +485,20 @@ Data is submitted in a structured ews-format, a XML stucture. Hence, you can par
We encourage you not to disable the data submission as it is the main purpose of the community approach - as you all know **sharing is caring** 😍 We encourage you not to disable the data submission as it is the main purpose of the community approach - as you all know **sharing is caring** 😍
<a name="hpfeeds-optin"></a>
## Opt-In HPFEEDS Data Submission
As an Opt-In it is now possible to also share T-Pot data with 3rd party HPFEEDS brokers, such as [SISSDEN](https://sissden.eu).
If you want to share your T-Pot data you simply have to register an account with a 3rd party broker with its own benefits towards the community. Once registered you will receive your credentials to share events with the broker. In T-Pot you simply run `hpfeeds_optin.sh` which will ask for your credentials, in case of SISSDEN this is just `Ident` and `Secret`, everything else is pre-configured.
It will automatically update `/opt/tpot/etc/tpot.yml` to deliver events to your desired broker.
The script can accept a config file as an argument, e.g. `./hpfeeds_optin.sh --conf=hpfeeds.cfg`
Your current config will also be stored in `/data/ews/conf/hpfeeds.cfg` where you can review or change it.
Be sure to apply any changes by running `./hpfeeds_optin.sh --conf=/data/ews/conf/hpfeeds.cfg`.
No worries: Your old config gets backed up in `/data/ews/conf/hpfeeds.cfg.old`
Of course you can also rerun the `hpfeeds_optin.sh` script to change and apply your settings interactively.
<a name="roadmap"></a> <a name="roadmap"></a>
# Roadmap # Roadmap
As with every development there is always room for improvements ... As with every development there is always room for improvements ...
@ -479,32 +527,36 @@ We hope you understand that we cannot provide support on an individual basis. We
<a name="licenses"></a> <a name="licenses"></a>
# Licenses # Licenses
The software that T-Pot is built on uses the following licenses. The software that T-Pot is built on uses the following licenses.
<br>GPLv2: [conpot)](https://github.com/mushorg/conpot/blob/master/LICENSE.txt), [dionaea](https://github.com/DinoTools/dionaea/blob/master/LICENSE), [honeytrap](https://github.com/armedpot/honeytrap/blob/master/LICENSE), [suricata](http://suricata-ids.org/about/open-source/) <br>GPLv2: [conpot](https://github.com/mushorg/conpot/blob/master/LICENSE.txt), [dionaea](https://github.com/DinoTools/dionaea/blob/master/LICENSE), [honeypy](https://github.com/foospidy/HoneyPy/blob/master/LICENSE), [honeytrap](https://github.com/armedpot/honeytrap/blob/master/LICENSE), [suricata](http://suricata-ids.org/about/open-source/)
<br>GPLv3: [adbhoney](https://github.com/huuck/ADBHoney), [elasticpot](https://github.com/schmalle/ElasticPot), [ewsposter](https://github.com/dtag-dev-sec/ews/), [glastopf](https://github.com/glastopf/glastopf/blob/master/GPL), [rdpy](https://github.com/citronneur/rdpy/blob/master/LICENSE), [heralding](https://github.com/johnnykv/heralding/blob/master/LICENSE.txt), [snare](https://github.com/mushorg/snare/blob/master/LICENSE), [tanner](https://github.com/mushorg/snare/blob/master/LICENSE) <br>GPLv3: [adbhoney](https://github.com/huuck/ADBHoney), [elasticpot](https://github.com/schmalle/ElasticpotPY), [ewsposter](https://github.com/dtag-dev-sec/ews/), [fatt](https://github.com/0x4D31/fatt/blob/master/LICENSE), [rdpy](https://github.com/citronneur/rdpy/blob/master/LICENSE), [heralding](https://github.com/johnnykv/heralding/blob/master/LICENSE.txt), [snare](https://github.com/mushorg/snare/blob/master/LICENSE), [tanner](https://github.com/mushorg/snare/blob/master/LICENSE)
<br>Apache 2 License: [cyberchef](https://github.com/gchq/CyberChef/blob/master/LICENSE), [elasticsearch](https://github.com/elasticsearch/elasticsearch/blob/master/LICENSE.txt), [logstash](https://github.com/elasticsearch/logstash/blob/master/LICENSE), [kibana](https://github.com/elasticsearch/kibana/blob/master/LICENSE.md), [docker](https://github.com/docker/docker/blob/master/LICENSE), [elasticsearch-head](https://github.com/mobz/elasticsearch-head/blob/master/LICENCE) <br>Apache 2 License: [cyberchef](https://github.com/gchq/CyberChef/blob/master/LICENSE), [elasticsearch](https://github.com/elasticsearch/elasticsearch/blob/master/LICENSE.txt), [logstash](https://github.com/elasticsearch/logstash/blob/master/LICENSE), [kibana](https://github.com/elasticsearch/kibana/blob/master/LICENSE.md), [docker](https://github.com/docker/docker/blob/master/LICENSE), [elasticsearch-head](https://github.com/mobz/elasticsearch-head/blob/master/LICENCE)
<br>MIT license: [ciscoasa](https://github.com/Cymmetria/ciscoasa_honeypot/blob/master/LICENSE), [ctop](https://github.com/bcicen/ctop/blob/master/LICENSE), [glutton](https://github.com/mushorg/glutton/blob/master/LICENSE) <br>MIT license: [ciscoasa](https://github.com/Cymmetria/ciscoasa_honeypot/blob/master/LICENSE), [glutton](https://github.com/mushorg/glutton/blob/master/LICENSE)
<br> Other: [cowrie](https://github.com/micheloosterhof/cowrie/blob/master/LICENSE.md), [mailoney](https://github.com/awhitehatter/mailoney), [Ubuntu licensing](http://www.ubuntu.com/about/about-ubuntu/licensing) <br> Other: [citrixhoneypot](https://github.com/MalwareTech/CitrixHoneypot#licencing-agreement-malwaretech-public-licence), [cowrie](https://github.com/micheloosterhof/cowrie/blob/master/LICENSE.md), [mailoney](https://github.com/awhitehatter/mailoney), [Debian licensing](https://www.debian.org/legal/licenses/)
<a name="credits"></a> <a name="credits"></a>
# Credits # Credits
Without open source and the fruitful development community we are proud to be a part of, T-Pot would not have been possible! Our thanks are extended but not limited to the following people and organizations: Without open source and the fruitful development community (we are proud to be a part of), T-Pot would not have been possible! Our thanks are extended but not limited to the following people and organizations:
### The developers and development communities of ### The developers and development communities of
* [adbhoney](https://github.com/huuck/ADBHoney/graphs/contributors) * [adbhoney](https://github.com/huuck/ADBHoney/graphs/contributors)
* [apt-fast](https://github.com/ilikenwf/apt-fast/graphs/contributors)
* [ciscoasa](https://github.com/Cymmetria/ciscoasa_honeypot/graphs/contributors) * [ciscoasa](https://github.com/Cymmetria/ciscoasa_honeypot/graphs/contributors)
* [citrixhoneypot](https://github.com/MalwareTech/CitrixHoneypot/graphs/contributors)
* [cockpit](https://github.com/cockpit-project/cockpit/graphs/contributors) * [cockpit](https://github.com/cockpit-project/cockpit/graphs/contributors)
* [conpot](https://github.com/mushorg/conpot/graphs/contributors) * [conpot](https://github.com/mushorg/conpot/graphs/contributors)
* [cowrie](https://github.com/micheloosterhof/cowrie/graphs/contributors) * [cowrie](https://github.com/micheloosterhof/cowrie/graphs/contributors)
* [debian](http://www.debian.org/)
* [dionaea](https://github.com/DinoTools/dionaea/graphs/contributors) * [dionaea](https://github.com/DinoTools/dionaea/graphs/contributors)
* [docker](https://github.com/docker/docker/graphs/contributors) * [docker](https://github.com/docker/docker/graphs/contributors)
* [elasticpot](https://github.com/schmalle/ElasticPot/graphs/contributors) * [elasticpot](https://github.com/schmalle/ElasticpotPY/graphs/contributors)
* [elasticsearch](https://github.com/elastic/elasticsearch/graphs/contributors) * [elasticsearch](https://github.com/elastic/elasticsearch/graphs/contributors)
* [elasticsearch-head](https://github.com/mobz/elasticsearch-head/graphs/contributors) * [elasticsearch-head](https://github.com/mobz/elasticsearch-head/graphs/contributors)
* [ewsposter](https://github.com/armedpot/ewsposter/graphs/contributors) * [ewsposter](https://github.com/armedpot/ewsposter/graphs/contributors)
* [glastopf](https://github.com/mushorg/glastopf/graphs/contributors) * [fatt](https://github.com/0x4D31/fatt/graphs/contributors)
* [glutton](https://github.com/mushorg/glutton/graphs/contributors) * [glutton](https://github.com/mushorg/glutton/graphs/contributors)
* [heralding](https://github.com/johnnykv/heralding/graphs/contributors) * [heralding](https://github.com/johnnykv/heralding/graphs/contributors)
* [honeypy](https://github.com/foospidy/HoneyPy/graphs/contributors)
* [honeytrap](https://github.com/armedpot/honeytrap/graphs/contributors) * [honeytrap](https://github.com/armedpot/honeytrap/graphs/contributors)
* [kibana](https://github.com/elastic/kibana/graphs/contributors) * [kibana](https://github.com/elastic/kibana/graphs/contributors)
* [logstash](https://github.com/elastic/logstash/graphs/contributors) * [logstash](https://github.com/elastic/logstash/graphs/contributors)
@ -516,10 +568,9 @@ Without open source and the fruitful development community we are proud to be a
* [snare](https://github.com/mushorg/snare/graphs/contributors) * [snare](https://github.com/mushorg/snare/graphs/contributors)
* [tanner](https://github.com/mushorg/tanner/graphs/contributors) * [tanner](https://github.com/mushorg/tanner/graphs/contributors)
* [suricata](https://github.com/inliniac/suricata/graphs/contributors) * [suricata](https://github.com/inliniac/suricata/graphs/contributors)
* [ubuntu](http://www.ubuntu.com/)
### The following companies and organizations ### The following companies and organizations
* [canonical](http://www.canonical.com/) * [debian](https://www.debian.org/)
* [docker](https://www.docker.com/) * [docker](https://www.docker.com/)
* [elastic.io](https://www.elastic.co/) * [elastic.io](https://www.elastic.co/)
* [honeynet project](https://www.honeynet.org/) * [honeynet project](https://www.honeynet.org/)
@ -531,7 +582,12 @@ Without open source and the fruitful development community we are proud to be a
# Stay tuned ... # Stay tuned ...
We will be releasing a new version of T-Pot about every 6-12 months. We will be releasing a new version of T-Pot about every 6-12 months.
<a name="testimonial"></a>
# Testimonial
One of the greatest feedback we have gotten so far is by one of the Conpot developers:<br>
***"[...] I highly recommend T-Pot which is ... it's not exactly a swiss army knife .. it's more like a swiss army soldier, equipped with a swiss army knife. Inside a tank. A swiss tank. [...]"***
<a name="funfact"></a> <a name="funfact"></a>
# Fun Fact # Fun Fact
In an effort of saving the environment we are now brewing our own Mate Ice Tea and consumed 241 liters so far for the T-Pot 18.11 development 😇 In an effort of saving the environment we are now brewing our own Mate Ice Tea and consumed 73 liters so far for the T-Pot 19.03 development 😇

View File

@ -1,4 +1,12 @@
#!/bin/bash #!/bin/bash
# Run as root only.
myWHOAMI=$(whoami)
if [ "$myWHOAMI" != "root" ]
then
echo "Need to run as root ..."
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,7 +24,7 @@ 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/nodes/0/indices/$myKIBANAINDEXNAME
# Let's ensure normal operation on exit or if interrupted ... # Let's ensure normal operation on exit or if interrupted ...

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/dtag-dev-sec/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,7 +110,7 @@ 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
} }
@ -108,7 +118,7 @@ fuCOWRIE () {
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 +126,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,23 +136,23 @@ 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 fatt data
fuGLASTOPF () { fuFATT () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/glastopf/*; fi if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/fatt/*; fi
mkdir -p /data/glastopf/db /data/glastopf/log mkdir -p /data/fatt/log
chmod 760 /data/glastopf -R chmod 770 -R /data/fatt
chown tpot:tpot /data/glastopf -R 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
} }
@ -150,15 +160,23 @@ fuGLUTTON () {
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 honeypy data
fuHONEYPY () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/honeypy/*; fi
mkdir -p /data/honeypy/log
chmod 770 /data/honeypy -R
chown tpot:tpot /data/honeypy -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
} }
@ -166,7 +184,7 @@ fuHONEYTRAP () {
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 +192,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,7 +208,7 @@ 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
} }
@ -198,7 +216,7 @@ fuRDPY () {
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 +224,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 +232,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 +240,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,14 +268,16 @@ 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
fuDIONAEA fuDIONAEA
fuELASTICPOT fuELASTICPOT
fuELK fuELK
fuGLASTOPF fuFATT
fuGLUTTON fuGLUTTON
fuHERALDING fuHERALDING
fuHONEYPY
fuHONEYTRAP fuHONEYTRAP
fuMAILONEY fuMAILONEY
fuMEDPOT fuMEDPOT

View File

@ -1,4 +1,13 @@
#/bin/bash #!/bin/bash
# Run as root only.
myWHOAMI=$(whoami)
if [ "$myWHOAMI" != "root" ]
then
echo "Need to run as root ..."
exit
fi
# Show current status of T-Pot containers # Show current status of T-Pot containers
myPARAM="$1" myPARAM="$1"
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 " ")"
@ -9,14 +18,13 @@ myWHITE=""
myMAGENTA="" myMAGENTA=""
function fuGETSTATUS { function fuGETSTATUS {
grc 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 "%+10s %-20s\n" "Date: " "$(date)"
printf "%+10s %-20s\n" "Uptime: " "$(uptime | cut -b 2-)" printf "%+10s %-20s\n" "Uptime: " "$(uptime | cut -b 2-)"
printf "%+10s %-20s\n" "CPU temp: " "$(sensors | grep 'Physical' | awk '{ print $4" " }' | tr -d [:cntrl:])"
echo echo
} }

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

153
bin/hpfeeds_optin.sh Executable file
View File

@ -0,0 +1,153 @@
#!/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 fuSISSDEN () {
echo
echo "You chose SISSDEN, you just need to provide ident and secret"
echo
myENABLE="true"
myHOST="hpfeeds.sissden.eu"
myPORT="10000"
myCHANNEL="t-pot.events"
myCERT="/opt/ewsposter/sissden.pem"
read -p "Ident: " myIDENT
read -p "Secret: " mySECRET
myFORMAT="json"
}
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] - SISSDEN"
echo "[2] - 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])
fuSISSDEN
break
;;
[2])
fuGENERIC
break
;;
[0])
fuOPTOUT
break
;;
[q,Q])
echo "Aborted."
exit
;;
esac
done
fi
fuWRITETOFILE
fuAPPLY

118
bin/hptest.sh Executable file
View File

@ -0,0 +1,118 @@
#!/bin/bash
myHOST="$1"
myPACKAGES="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" &
echo "I20100" | timeout --foreground 3 nc "$myHOST" 10001 &
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

@ -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

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" 12 50 5 $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

@ -9,10 +9,18 @@ if [ "$myEXTIP" = "" ];
myEXTIP=$myLOCALIP myEXTIP=$myLOCALIP
fi fi
mySSHUSER=$(cat /etc/passwd | grep 1000 | cut -d ':' -f1) mySSHUSER=$(cat /etc/passwd | grep 1000 | cut -d ':' -f1)
sed -i "s#IP:.*#IP: $myLOCALIP ($myEXTIP)#" /etc/issue echo "" > /etc/issue
sed -i "s#SSH:.*#SSH: ssh -l tsec -p 64295 $myLOCALIP#" /etc/issue toilet -f ivrit -F metal --filter border:metal "T-Pot 19.03" | sed 's/\\/\\\\/g' >> /etc/issue
sed -i "s#WEB:.*#WEB: https://$myLOCALIP:64297#" /etc/issue echo >> /etc/issue
sed -i "s#ADMIN:.*#ADMIN: https://$myLOCALIP:64294#" /etc/issue echo ",---- [ \n ] [ \d ] [ \t ]" >> /etc/issue
echo "|" >> /etc/issue
echo "| IP: $myLOCALIP ($myEXTIP)" >> /etc/issue
echo "| SSH: ssh -l tsec -p 64295 $myLOCALIP" >> /etc/issue
echo "| WEB: https://$myLOCALIP:64297" >> /etc/issue
echo "| ADMIN: https://$myLOCALIP:64294" >> /etc/issue
echo "|" >> /etc/issue
echo "\`----" >> /etc/issue
echo >> /etc/issue
tee /data/ews/conf/ews.ip << EOF tee /data/ews/conf/ews.ip << EOF
[MAIN] [MAIN]
ip = $myEXTIP ip = $myEXTIP
@ -23,4 +31,4 @@ MY_INTIP=$myLOCALIP
MY_HOSTNAME=$HOSTNAME MY_HOSTNAME=$HOSTNAME
EOF EOF
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

2
cloud/ansible/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# Ansible
*.retry

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

@ -0,0 +1,235 @@
# 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/modules/list_of_cloud_modules.html) (e.g. AWS, Azure, Digital Ocean, Google).
The Playbook first creates all resources (security group, network, subnet, router), deploys a new server and then installs and configures T-Pot.
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)
- [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)
- [OpenStack authentication variables](#os-auth)
- [Ansible remote user](#remote-user)
- [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
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).
<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/dtag-dev-sec/tpotce.git`
All Ansible related files are located in the [`cloud/ansible/openstack`](../../cloud/ansible/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.
The settings are located in the following Ansible vars files:
<a name="os-auth"></a>
## OpenStack authentication variables
Located at [`openstack/roles/deploy/vars/os_auth.yaml`](openstack/roles/deploy/vars/os_auth.yaml).
Enter your Open Telekom Cloud API user credentials here (username, password, project name, user domain name):
```
auth_url: https://iam.eu-de.otc.t-systems.com/v3
username: your_api_user
password: your_password
project_name: eu-de_your_project
os_user_domain_name: OTC-EU-DE-000000000010000XXXXX
```
You can also perform different authentication methods like sourcing your `.ostackrc` file or using the OpenStack `clouds.yaml` file.
For more information have a look in the [os_server](https://docs.ansible.com/ansible/latest/modules/os_server_module.html) Ansible module documentation.
<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="instance-settings"></a>
## Instance settings
Located at [`openstack/roles/deploy/vars/main.yaml`](openstack/roles/deploy/vars/main.yaml).
Here you can customize your virtual machine specifications:
- Specify the region name
- 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)
`s2.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_0035470096.html).
```
region_name: eu-de
availability_zone: eu-de-03
image: Standard_Debian_10_latest
volume_size: 128
key_name: your-KeyPair
flavor: s2.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**)
```
# tpot configuration file
# myCONF_TPOT_FLAVOR=[STANDARD, SENSOR, INDUSTRIAL, COLLECTOR, NEXTGEN]
myCONF_TPOT_FLAVOR='STANDARD'
myCONF_WEB_USER='webuser'
myCONF_WEB_PW='w3b$ecret'
```
<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/templates/hpfeeds.cfg`](openstack/roles/custom_hpfeeds/templates/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 a new server instance.
After that, T-Pot gets installed and configured on the newly created host, optionally custom configs are applied and finally it reboots.
<a name="documentation"></a>
# Further documentation
- [Ansible Documentation](https://docs.ansible.com/ansible/latest/)
- [Cloud modules — Ansible Documentation](https://docs.ansible.com/ansible/latest/modules/list_of_cloud_modules.html)
- [os_server Create/Delete Compute Instances from OpenStack — Ansible Documentation](https://docs.ansible.com/ansible/latest/modules/os_server_module.html)
- [Open Telekom Cloud Help Center](https://docs.otc.t-systems.com/)
- [Open Telekom Cloud API Overview](https://docs.otc.t-systems.com/en-us/api/wp/en-us_topic_0052070394.html)

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,21 @@
- name: Check host prerequisites
hosts: localhost
become: yes
roles:
- check
- name: Deploy instance
hosts: localhost
roles:
- deploy
- name: Install T-Pot on new instance
hosts: TPOT
remote_user: linux
become: yes
gather_facts: no
roles:
- install
# - custom_ews
# - custom_hpfeeds
- reboot

View File

@ -0,0 +1,17 @@
- name: Install dependencies
package:
name:
- pwgen
- python-setuptools
- python-pip
state: present
- name: Install openstacksdk
pip:
name: openstacksdk
- name: Check if agent forwarding is enabled
fail:
msg: Please enable agent forwarding to allow Ansible to connect to the remote host!
ignore_errors: yes
when: lookup('env','SSH_AUTH_SOCK') == ""

View File

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

View File

@ -0,0 +1,137 @@
[MAIN]
homedir = /opt/ewsposter/
spooldir = /opt/ewsposter/spool/
logdir = /opt/ewsposter/log/
del_malware_after_send = false
send_malware = true
sendlimit = 500
contact = your_email_address
proxy =
ip =
[EWS]
ews = true
username = your_username
token = your_token
rhost_first = https://community.sicherheitstacho.eu/ews-0.1/alert/postSimpleMessage
rhost_second = https://community.sicherheitstacho.eu/ews-0.1/alert/postSimpleMessage
ignorecert = false
[HPFEED]
hpfeed = %(EWS_HPFEEDS_ENABLE)s
host = %(EWS_HPFEEDS_HOST)s
port = %(EWS_HPFEEDS_PORT)s
channels = %(EWS_HPFEEDS_CHANNELS)s
ident = %(EWS_HPFEEDS_IDENT)s
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]
json = false
jsondir = /data/ews/json/
[GLASTOPFV3]
glastopfv3 = true
nodeid = glastopfv3-{{ ansible_hostname }}
sqlitedb = /data/glastopf/db/glastopf.db
malwaredir = /data/glastopf/data/files/
[GLASTOPFV2]
glastopfv2 = false
nodeid =
mysqlhost =
mysqldb =
mysqluser =
mysqlpw =
malwaredir =
[KIPPO]
kippo = false
nodeid =
mysqlhost =
mysqldb =
mysqluser =
mysqlpw =
malwaredir =
[COWRIE]
cowrie = true
nodeid = cowrie-{{ ansible_hostname }}
logfile = /data/cowrie/log/cowrie.json
[DIONAEA]
dionaea = true
nodeid = dionaea-{{ ansible_hostname }}
malwaredir = /data/dionaea/binaries/
sqlitedb = /data/dionaea/log/dionaea.sqlite
[HONEYTRAP]
honeytrap = true
nodeid = honeytrap-{{ ansible_hostname }}
newversion = true
payloaddir = /data/honeytrap/attacks/
attackerfile = /data/honeytrap/log/attacker.log
[RDPDETECT]
rdpdetect = false
nodeid =
iptableslog =
targetip =
[EMOBILITY]
eMobility = false
nodeid = emobility-{{ ansible_hostname }}
logfile = /data/emobility/log/centralsystemEWS.log
[CONPOT]
conpot = true
nodeid = conpot-{{ ansible_hostname }}
logfile = /data/conpot/log/conpot*.json
[ELASTICPOT]
elasticpot = true
nodeid = elasticpot-{{ ansible_hostname }}
logfile = /data/elasticpot/log/elasticpot.log
[SURICATA]
suricata = true
nodeid = suricata-{{ ansible_hostname }}
logfile = /data/suricata/log/eve.json
[MAILONEY]
mailoney = true
nodeid = mailoney-{{ ansible_hostname }}
logfile = /data/mailoney/log/commands.log
[RDPY]
rdpy = true
nodeid = rdpy-{{ ansible_hostname }}
logfile = /data/rdpy/log/rdpy.log
[VNCLOWPOT]
vnclowpot = true
nodeid = vnclowpot-{{ ansible_hostname }}
logfile = /data/vnclowpot/log/vnclowpot.log
[HERALDING]
heralding = true
nodeid = heralding-{{ ansible_hostname }}
logfile = /data/heralding/log/auth.csv
[CISCOASA]
ciscoasa = true
nodeid = ciscoasa-{{ ansible_hostname }}
logfile = /data/ciscoasa/log/ciscoasa.log
[TANNER]
tanner = true
nodeid = tanner-{{ ansible_hostname }}
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
copy:
src: ../files/hpfeeds.cfg
dest: /data/ews/conf
owner: tpot
group: tpot
mode: 0770
register: config
- name: Applying hpfeeds settings
command: /opt/tpot/bin/hpfeeds_optin.sh --conf=/data/ews/conf/hpfeeds.cfg
when: config.changed == true

View File

@ -0,0 +1,94 @@
- name: Create T-Pot name
shell: echo t-pot-ansible-$(pwgen -ns 6 -1)
register: tpot_name
- name: Import OpenStack authentication variables
include_vars:
file: roles/deploy/vars/os_auth.yaml
no_log: true
- name: Create security group
os_security_group:
auth:
auth_url: "{{ auth_url }}"
username: "{{ username }}"
password: "{{ password }}"
project_name: "{{ project_name }}"
os_user_domain_name: "{{ os_user_domain_name }}"
name: sg-tpot-any
description: tpot any-any
- name: Add rules to security group
os_security_group_rule:
auth:
auth_url: "{{ auth_url }}"
username: "{{ username }}"
password: "{{ password }}"
project_name: "{{ project_name }}"
os_user_domain_name: "{{ os_user_domain_name }}"
security_group: sg-tpot-any
remote_ip_prefix: 0.0.0.0/0
- name: Create network
os_network:
auth:
auth_url: "{{ auth_url }}"
username: "{{ username }}"
password: "{{ password }}"
project_name: "{{ project_name }}"
os_user_domain_name: "{{ os_user_domain_name }}"
name: network-tpot
- name: Create subnet
os_subnet:
auth:
auth_url: "{{ auth_url }}"
username: "{{ username }}"
password: "{{ password }}"
project_name: "{{ project_name }}"
os_user_domain_name: "{{ os_user_domain_name }}"
network_name: network-tpot
name: subnet-tpot
cidr: 192.168.0.0/24
dns_nameservers:
- 1.1.1.1
- 8.8.8.8
- name: Create router
os_router:
auth:
auth_url: "{{ auth_url }}"
username: "{{ username }}"
password: "{{ password }}"
project_name: "{{ project_name }}"
os_user_domain_name: "{{ os_user_domain_name }}"
name: router-tpot
interfaces:
- subnet-tpot
- name: Launch an instance
os_server:
auth:
auth_url: "{{ auth_url }}"
username: "{{ username }}"
password: "{{ password }}"
project_name: "{{ project_name }}"
os_user_domain_name: "{{ os_user_domain_name }}"
name: "{{ tpot_name.stdout }}"
region_name: "{{ region_name }}"
availability_zone: "{{ availability_zone }}"
image: "{{ image }}"
boot_from_volume: yes
volume_size: "{{ volume_size }}"
key_name: "{{ key_name }}"
timeout: 200
flavor: "{{ flavor }}"
security_groups: sg-tpot-any
network: network-tpot
register: tpot
- name: Add instance to inventory
add_host:
hostname: "{{ tpot_name.stdout }}"
ansible_host: "{{ tpot.server.public_v4 }}"
groups: TPOT

View File

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

View File

@ -0,0 +1,5 @@
auth_url: https://iam.eu-de.otc.t-systems.com/v3
username: your_api_user
password: your_password
project_name: eu-de_your_project
os_user_domain_name: OTC-EU-DE-000000000010000XXXXX

View File

@ -0,0 +1,48 @@
- name: Waiting for SSH connection
wait_for_connection:
- name: Gathering facts
setup:
- name: Cloning T-Pot install directory
git:
repo: "https://github.com/dtag-dev-sec/tpotce.git"
dest: /root/tpot
- name: Prepare to set user password
set_fact:
user_name: "{{ ansible_user }}"
user_salt: "s0mew1ck3dTpoT"
no_log: true
- name: Changing password for user {{ user_name }}
user:
name: "{{ ansible_user }}"
password: "{{ user_password | password_hash('sha512', user_salt) }}"
state: present
shell: /bin/bash
- name: Copy T-Pot configuration file
template:
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.
command: /root/tpot/iso/installer/install.sh --type=auto --conf=/root/tpot.conf
- name: Delete T-Pot configuration file
file:
path: /root/tpot.conf
state: absent
- name: Change unattended-upgrades to take default action
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
command: shutdown -r now
async: 1
poll: 0
- name: Next login options
debug:
msg:
- "***** SSH Access:"
- "***** ssh {{ ansible_user }}@{{ ansible_host }} -p 64295"
- ""
- "***** Web UI:"
- "***** https://{{ ansible_host }}:64297"
- ""
- "***** Admin UI:"
- "***** https://{{ ansible_host }}:64294"

2
cloud/terraform/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
**/.terraform
**/terraform.*

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

@ -0,0 +1,131 @@
# T-Pot Terraform
This [Terraform](https://www.terraform.io/) configuration can be used to provision a T-Pot instance in AWS in addition to all of the necessary pre-requisites. Specifically, the following resources will be created:
* EC2 instance:
* t3.large (2 vCPU, 8 GiB RAM)
* 128GB disk
* [Debian Stretch](https://wiki.debian.org/Cloud/AmazonEC2Image/Stretch) (The T-Pot installation script will then upgrade this to Debian Sid)
* AWS Security Group:
* TCP/UDP ports <= 64000 open to the Internet
* TCP ports 64294, 64295 and 64297 open to a chosen administrative IP
[Cloud-init](https://cloudinit.readthedocs.io/en/latest/) is used to bootstrap the instance and install T-Pot on startup. Additional provisioning using Ansible etc. is not required.
The following resources are NOT automatically created and need to be specified in the configuration below:
* VPC
* Subnet
## Pre-Requisites
* [Terraform](https://www.terraform.io/) 0.12
* AWS Account
* Existing VPC. VPC ID should be specified in configuration below
* Existing subnet. Subnet ID should be specified in configuration below
* AWS Authentication credentials should be [set using environment variables](https://www.terraform.io/docs/providers/aws/index.html#environment-variables)
## Required Configuration Changes
### Terraform Variables
In `aws/variables.tf`, change the following variables to correspond to your existing EC2 infrastructure:
* `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`
* `ec2_subnet_id`
* `ec2_region`
### Admin Credentials
In `tpot.conf`, change the following variables:
```
myCONF_WEB_USER='webuser'
myCONF_WEB_PW='w3b$ecret'
```
This will be used to configure credentials for the T-Pot Kibana interface. Refer to [Options](https://github.com/dtag-dev-sec/tpotce#options) for more information.
## 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
Initializing the backend...
Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (terraform-providers/aws) 2.16.0...
The following providers do not have any version constraints in configuration,
so the latest version was installed.
To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.
* provider.aws: version = "~> 2.16"
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
```
## 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
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# aws_instance.tpot will be created
...
# aws_security_group.tpot will be created
...
Plan: 2 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value:
```
This will perform the following actions:
1. Create EC2 security group
2. Start a Debian EC2 instance
3. Update all packages and reboot if necessary
4. Install T-Pot and required dependencies
5. Reboot
## Connecting to the Instance
### SSH
Prior to the final reboot, you will temporarily be able to SSH to port 22 as per standard. Following the reboot, port 22 is used for the honeypot. The *real* SSH server is listening on port **64295**
### Browser
https://www.example.com:64297/
Replace with the FQDN of your EC2 instance. Refer to the [T-POT documentation](https://github.com/dtag-dev-sec/tpotce#ssh-and-web-access) for further details.

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 = "${file("../cloud-init.yaml")} content: ${base64encode(file("../tpot.conf"))}"
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,54 @@
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/Buster
variable "ec2_ami" {
type = map(string)
default = {
"ap-east-1" = "ami-b7d0abc6"
"ap-northeast-1" = "ami-01f4f0c9374675b99"
"ap-northeast-2" = "ami-0855cb0c55370c38c"
"ap-south-1" = "ami-00d7d1cbdcb087cf3"
"ap-southeast-1" = "ami-03779b1b2fbb3a9d4"
"ap-southeast-2" = "ami-0ce3a7c68c6b1678d"
"ca-central-1" = "ami-037099906a22f210f"
"eu-central-1" = "ami-0845c3902a6f2af32"
"eu-north-1" = "ami-e634bf98"
"eu-west-1" = "ami-06a53bf81914447b5"
"eu-west-2" = "ami-053d9f0770cd2e34c"
"eu-west-3" = "ami-060bf1f444f742af9"
"me-south-1" = "ami-04a9a536105c72d30"
"sa-east-1" = "ami-0a5fd18ed0b9c7f35"
"us-east-1" = "ami-01db78123b2b99496"
"us-east-2" = "ami-010ffea14ff17ebf5"
"us-west-1" = "ami-0ed1af421f2a3cf40"
"us-west-2" = "ami-030a304a76b181155"
}
}

View File

@ -0,0 +1,3 @@
terraform {
required_version = ">= 0.12"
}

View File

@ -0,0 +1,25 @@
#cloud-config
timezone: UTC
package_update: true
package_upgrade: true
package_reboot_if_required: true
packages:
- git
runcmd:
- git clone https://github.com/dtag-dev-sec/tpotce /root/tpot
- /root/tpot/iso/installer/install.sh --type=auto --conf=/root/tpot.conf
- rm /root/tpot.conf
- /sbin/shutdown -r +5
# The contents of tpot.conf will be base64 encoded and appended to this file
# via the terraform configuration in main.tf
#
# Make sure there are no trailing new lines after "permissions" below
write_files:
- encoding: b64
owner: root:root
path: /root/tpot.conf
permissions: '0600'

View File

@ -0,0 +1,5 @@
# tpot configuration file
# myCONF_TPOT_FLAVOR=[STANDARD, SENSOR, INDUSTRIAL, COLLECTOR, NEXTGEN]
myCONF_TPOT_FLAVOR='STANDARD'
myCONF_WEB_USER='webuser'
myCONF_WEB_PW='w3b$ecret'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 KiB

After

Width:  |  Height:  |  Size: 258 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

View File

@ -1,31 +1,35 @@
FROM alpine FROM alpine
#
# Include dist
ADD dist/ /root/dist/
#
# Install packages # Install packages
RUN apk -U --no-cache add \ RUN apk -U add \
git \ git \
libcap \ libcap \
python \ python3 \
python-dev && \ python3-dev && \
#
# Install adbhoney from git # Install adbhoney from git
git clone --depth=1 https://github.com/huuck/ADBHoney /opt/adbhoney && \ git clone --depth=1 https://github.com/huuck/ADBHoney /opt/adbhoney && \
sed -i 's/dst_ip/dest_ip/' /opt/adbhoney/main.py && \ cp /root/dist/adbhoney.cfg /opt/adbhoney && \
sed -i 's/dst_port/dest_port/' /opt/adbhoney/main.py && \ 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 && \ setcap cap_net_bind_service=+ep /usr/bin/python3.7 && \
#
# Clean up # Clean up
apk del --purge git \ apk del --purge git \
python-dev && \ python3-dev && \
rm -rf /root/* && \ rm -rf /root/* && \
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*
#
# Set workdir and start adbhoney # Set workdir and start adbhoney
STOPSIGNAL SIGINT STOPSIGNAL SIGINT
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 nohup /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

@ -14,7 +14,7 @@ services:
- adbhoney_local - adbhoney_local
ports: ports:
- "5555:5555" - "5555:5555"
image: "dtagdevsec/adbhoney:1811" image: "dtagdevsec/adbhoney:1903"
read_only: true read_only: true
volumes: volumes:
- /data/adbhoney/log:/opt/adbhoney/log - /data/adbhoney/log:/opt/adbhoney/log

View File

@ -1,8 +1,8 @@
FROM alpine FROM alpine
#
# Include dist # Include dist
ADD dist/ /root/dist/ ADD dist/ /root/dist/
#
# Setup env and apt # Setup env and apt
RUN apk -U upgrade && \ RUN apk -U upgrade && \
apk add build-base \ apk add build-base \
@ -13,11 +13,11 @@ RUN apk -U upgrade && \
openssl-dev \ openssl-dev \
python3 \ python3 \
python3-dev && \ python3-dev && \
#
# Setup user # Setup user
addgroup -g 2000 ciscoasa && \ addgroup -g 2000 ciscoasa && \
adduser -S -s /bin/bash -u 2000 -D -g 2000 ciscoasa && \ adduser -S -s /bin/bash -u 2000 -D -g 2000 ciscoasa && \
#
# Get and install packages # Get and install packages
mkdir -p /opt/ && \ mkdir -p /opt/ && \
cd /opt/ && \ cd /opt/ && \
@ -27,7 +27,7 @@ RUN apk -U upgrade && \
pip3 install --no-cache-dir -r requirements.txt && \ pip3 install --no-cache-dir -r requirements.txt && \
cp /root/dist/asa_server.py /opt/ciscoasa_honeypot && \ cp /root/dist/asa_server.py /opt/ciscoasa_honeypot && \
chown -R ciscoasa:ciscoasa /opt/ciscoasa_honeypot && \ chown -R ciscoasa:ciscoasa /opt/ciscoasa_honeypot && \
#
# Clean up # Clean up
apk del --purge build-base \ apk del --purge build-base \
git \ git \
@ -36,7 +36,7 @@ RUN apk -U upgrade && \
python3-dev && \ python3-dev && \
rm -rf /root/* && \ rm -rf /root/* && \
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*
#
# Start ciscoasa # Start ciscoasa
STOPSIGNAL SIGINT STOPSIGNAL SIGINT
WORKDIR /tmp/ciscoasa/ WORKDIR /tmp/ciscoasa/

View File

@ -1,4 +1,4 @@
[![](https://images.microbadger.com/badges/version/dtagdevsec/ciscoasa:1811.svg)](https://microbadger.com/images/dtagdevsec/ciscoasa:1811 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/ciscoasa:1811.svg)](https://microbadger.com/images/dtagdevsec/ciscoasa:1811 "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/dtagdevsec/ciscoasa:1903.svg)](https://microbadger.com/images/dtagdevsec/ciscoasa:1903 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/ciscoasa:1903.svg)](https://microbadger.com/images/dtagdevsec/ciscoasa:1903 "Get your own image badge on microbadger.com")
# ciscoasa # ciscoasa

View File

@ -13,7 +13,7 @@ services:
ports: ports:
- "5000:5000/udp" - "5000:5000/udp"
- "8443:8443" - "8443:8443"
image: "dtagdevsec/ciscoasa:1811" image: "dtagdevsec/ciscoasa:1903"
read_only: true read_only: true
volumes: volumes:
- /data/ciscoasa/log:/var/log/ciscoasa - /data/ciscoasa/log:/var/log/ciscoasa

View File

@ -0,0 +1,44 @@
FROM alpine
#
# Install packages
RUN apk -U add \
git \
libcap \
openssl \
python3 \
python3-dev && \
#
pip3 install --no-cache-dir python-json-logger && \
#
# Install CitrixHoneypot from GitHub
# git clone --depth=1 https://github.com/malwaretech/citrixhoneypot /opt/citrixhoneypot && \
# git clone --depth=1 https://github.com/vorband/CitrixHoneypot /opt/citrixhoneypot && \
git clone --depth=1 https://github.com/t3chn0m4g3/CitrixHoneypot /opt/citrixhoneypot && \
#
# Setup user, groups and configs
mkdir -p /opt/citrixhoneypot/logs /opt/citrixhoneypot/ssl && \
openssl req \
-nodes \
-x509 \
-newkey rsa:2048 \
-keyout "/opt/citrixhoneypot/ssl/key.pem" \
-out "/opt/citrixhoneypot/ssl/cert.pem" \
-days 365 \
-subj '/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd' && \
addgroup -g 2000 citrixhoneypot && \
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 citrixhoneypot && \
chown -R citrixhoneypot:citrixhoneypot /opt/citrixhoneypot && \
setcap cap_net_bind_service=+ep /usr/bin/python3.8 && \
#
# Clean up
apk del --purge git \
openssl \
python3-dev && \
rm -rf /root/* && \
rm -rf /var/cache/apk/*
#
# Set workdir and start citrixhoneypot
STOPSIGNAL SIGINT
USER citrixhoneypot:citrixhoneypot
WORKDIR /opt/citrixhoneypot/
CMD nohup /usr/bin/python3 CitrixHoneypot.py

View File

@ -0,0 +1,20 @@
version: '2.3'
networks:
citrixhoneypot_local:
services:
# CitrixHoneypot service
citrixhoneypot:
build: .
container_name: citrixhoneypot
restart: always
networks:
- citrixhoneypot_local
ports:
- "443:443"
image: "dtagdevsec/citrixhoneypot:1903"
read_only: true
volumes:
- /data/citrixhoneypot/logs:/opt/citrixhoneypot/logs

View File

@ -1,10 +1,11 @@
FROM alpine FROM alpine:3.10
#
# Include dist # Include dist
ADD dist/ /root/dist/ ADD dist/ /root/dist/
#
# Setup apt # Setup apt
RUN apk -U add \ RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
apk -U add \
build-base \ build-base \
file \ file \
git \ git \
@ -21,7 +22,7 @@ RUN apk -U add \
py-cryptography \ py-cryptography \
tcpdump \ tcpdump \
wget && \ wget && \
#
# Setup ConPot # Setup ConPot
git clone --depth=1 https://github.com/mushorg/conpot /opt/conpot && \ git clone --depth=1 https://github.com/mushorg/conpot /opt/conpot && \
cd /opt/conpot/ && \ cd /opt/conpot/ && \
@ -37,20 +38,20 @@ RUN apk -U add \
sed -i 's/port="6969"/port="69"/' /opt/conpot/conpot/templates/default/tftp/tftp.xml && \ sed -i 's/port="6969"/port="69"/' /opt/conpot/conpot/templates/default/tftp/tftp.xml && \
sed -i 's/port="16100"/port="161"/' /opt/conpot/conpot/templates/IEC104/snmp/snmp.xml && \ sed -i 's/port="16100"/port="161"/' /opt/conpot/conpot/templates/IEC104/snmp/snmp.xml && \
sed -i 's/port="6230"/port="623"/' /opt/conpot/conpot/templates/ipmi/ipmi/ipmi.xml && \ sed -i 's/port="6230"/port="623"/' /opt/conpot/conpot/templates/ipmi/ipmi/ipmi.xml && \
pip3 install --no-cache-dir -U pip setuptools && \ pip3 install --no-cache-dir -U setuptools && \
pip3 install --no-cache-dir . && \ pip3 install --no-cache-dir . && \
cd / && \ cd / && \
rm -rf /opt/conpot /tmp/* /var/tmp/* && \ rm -rf /opt/conpot /tmp/* /var/tmp/* && \
setcap cap_net_bind_service=+ep /usr/bin/python3.6 && \ setcap cap_net_bind_service=+ep /usr/bin/python3.7 && \
#
# Get wireshark manuf db for scapy, setup configs, user, groups # Get wireshark manuf db for scapy, setup configs, user, groups
mkdir -p /etc/conpot /var/log/conpot /usr/share/wireshark && \ mkdir -p /etc/conpot /var/log/conpot /usr/share/wireshark && \
wget https://github.com/wireshark/wireshark/raw/master/manuf -o /usr/share/wireshark/manuf && \ wget https://github.com/wireshark/wireshark/raw/master/manuf -o /usr/share/wireshark/manuf && \
cp /root/dist/conpot.cfg /etc/conpot/conpot.cfg && \ cp /root/dist/conpot.cfg /etc/conpot/conpot.cfg && \
cp -R /root/dist/templates /usr/lib/python3.6/site-packages/conpot/ && \ cp -R /root/dist/templates /usr/lib/python3.7/site-packages/conpot/ && \
addgroup -g 2000 conpot && \ addgroup -g 2000 conpot && \
adduser -S -s /bin/ash -u 2000 -D -g 2000 conpot && \ adduser -S -s /bin/ash -u 2000 -D -g 2000 conpot && \
#
# Clean up # Clean up
apk del --purge \ apk del --purge \
build-base \ build-base \
@ -68,7 +69,7 @@ RUN apk -U add \
rm -rf /root/* && \ rm -rf /root/* && \
rm -rf /tmp/* && \ rm -rf /tmp/* && \
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*
#
# Start conpot # Start conpot
STOPSIGNAL SIGINT STOPSIGNAL SIGINT
USER conpot:conpot USER conpot:conpot

View File

@ -1,4 +1,4 @@
[![](https://images.microbadger.com/badges/version/dtagdevsec/conpot:1811.svg)](https://microbadger.com/images/dtagdevsec/conpot:1811 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/conpot:1811.svg)](https://microbadger.com/images/dtagdevsec/conpot:1811 "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/dtagdevsec/conpot:1903.svg)](https://microbadger.com/images/dtagdevsec/conpot:1903 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/conpot:1903.svg)](https://microbadger.com/images/dtagdevsec/conpot:1903 "Get your own image badge on microbadger.com")
# conpot # conpot

View File

@ -3,7 +3,7 @@ sensorid = conpot
[virtual_file_system] [virtual_file_system]
data_fs_url = %(CONPOT_TMP)s data_fs_url = %(CONPOT_TMP)s
fs_url = tar:///usr/lib/python3.6/site-packages/conpot/data.tar fs_url = tar:///usr/lib/python3.7/site-packages/conpot/data.tar
[session] [session]
timeout = 30 timeout = 30

View File

@ -35,7 +35,7 @@ services:
- "2121:21" - "2121:21"
- "44818:44818" - "44818:44818"
- "47808:47808" - "47808:47808"
image: "dtagdevsec/conpot:1811" image: "dtagdevsec/conpot:1903"
read_only: true read_only: true
volumes: volumes:
- /data/conpot/log:/var/log/conpot - /data/conpot/log:/var/log/conpot
@ -58,7 +58,7 @@ services:
ports: ports:
# - "161:161" # - "161:161"
- "2404:2404" - "2404:2404"
image: "dtagdevsec/conpot:1811" image: "dtagdevsec/conpot:1903"
read_only: true read_only: true
volumes: volumes:
- /data/conpot/log:/var/log/conpot - /data/conpot/log:/var/log/conpot
@ -80,7 +80,7 @@ services:
- conpot_local_guardian_ast - conpot_local_guardian_ast
ports: ports:
- "10001:10001" - "10001:10001"
image: "dtagdevsec/conpot:1811" image: "dtagdevsec/conpot:1903"
read_only: true read_only: true
volumes: volumes:
- /data/conpot/log:/var/log/conpot - /data/conpot/log:/var/log/conpot
@ -102,7 +102,7 @@ services:
- conpot_local_ipmi - conpot_local_ipmi
ports: ports:
- "623:623" - "623:623"
image: "dtagdevsec/conpot:1811" image: "dtagdevsec/conpot:1903"
read_only: true read_only: true
volumes: volumes:
- /data/conpot/log:/var/log/conpot - /data/conpot/log:/var/log/conpot
@ -125,7 +125,7 @@ services:
ports: ports:
- "1025:1025" - "1025:1025"
- "50100:50100" - "50100:50100"
image: "dtagdevsec/conpot:1811" image: "dtagdevsec/conpot:1903"
read_only: true read_only: true
volumes: volumes:
- /data/conpot/log:/var/log/conpot - /data/conpot/log:/var/log/conpot

View File

@ -1,10 +1,11 @@
FROM alpine FROM alpine
#
# Include dist # Include dist
ADD dist/ /root/dist/ ADD dist/ /root/dist/
#
# Get and install dependencies & packages # Get and install dependencies & packages
RUN apk -U --no-cache add \ RUN apk -U add \
bash \
build-base \ build-base \
git \ git \
gmp-dev \ gmp-dev \
@ -12,35 +13,40 @@ RUN apk -U --no-cache add \
libffi-dev \ libffi-dev \
mpc1-dev \ mpc1-dev \
mpfr-dev \ mpfr-dev \
openssl \
openssl-dev \ openssl-dev \
python \ python3 \
python-dev \ python3-dev \
py-mysqldb \ py3-bcrypt \
py-pip \ py3-mysqlclient \
py-requests \ py3-requests \
py-setuptools && \ py3-setuptools && \
#
# Setup user # Setup user
addgroup -g 2000 cowrie && \ addgroup -g 2000 cowrie && \
adduser -S -s /bin/ash -u 2000 -D -g 2000 cowrie && \ adduser -S -s /bin/ash -u 2000 -D -g 2000 cowrie && \
#
# Install cowrie from git # Install cowrie
git clone --depth=1 https://github.com/micheloosterhof/cowrie /home/cowrie/cowrie/ -b v1.3.0 && \ mkdir -p /home/cowrie && \
cd /home/cowrie/cowrie && \ cd /home/cowrie && \
pip install --no-cache-dir --upgrade cffi pip && \ git clone --depth=1 https://github.com/micheloosterhof/cowrie -b v2.0.0 && \
pip install --no-cache-dir --upgrade -r requirements.txt && \ cd cowrie && \
mkdir -p log && \
pip3 install --upgrade pip && \
pip3 install --upgrade -r requirements.txt && \
#
# Setup configs # Setup configs
setcap cap_net_bind_service=+ep /usr/bin/python2.7 && \ export PYTHON_DIR=$(python3 --version | tr '[A-Z]' '[a-z]' | tr -d ' ' | cut -d '.' -f 1,2 ) && \
setcap cap_net_bind_service=+ep /usr/bin/$PYTHON_DIR && \
cp /root/dist/cowrie.cfg /home/cowrie/cowrie/cowrie.cfg && \ cp /root/dist/cowrie.cfg /home/cowrie/cowrie/cowrie.cfg && \
chown cowrie:cowrie -R /home/cowrie/* /usr/lib/python2.7/site-packages/twisted/plugins && \ chown cowrie:cowrie -R /home/cowrie/* /usr/lib/$PYTHON_DIR/site-packages/twisted/plugins && \
#
# Start Cowrie once to prevent dropin.cache errors upon container start caused by read-only filesystem # Start Cowrie once to prevent dropin.cache errors upon container start caused by read-only filesystem
su - cowrie -c "export PYTHONPATH=/home/cowrie/cowrie && \ su - cowrie -c "export PYTHONPATH=/home/cowrie/cowrie:/home/cowrie/cowrie/src && \
cd /home/cowrie/cowrie && \ cd /home/cowrie/cowrie && \
/usr/bin/twistd --uid=2000 --gid=2000 -y cowrie.tac --pidfile cowrie.pid cowrie &" && \ /usr/bin/twistd --uid=2000 --gid=2000 -y cowrie.tac --pidfile cowrie.pid cowrie &" && \
sleep 10 && \ sleep 10 && \
#
# Clean up # Clean up
apk del --purge build-base \ apk del --purge build-base \
git \ git \
@ -49,15 +55,16 @@ RUN apk -U --no-cache add \
libffi-dev \ libffi-dev \
mpc1-dev \ mpc1-dev \
mpfr-dev \ mpfr-dev \
python-dev \ openssl-dev \
py-mysqldb \ python3-dev \
py-pip && \ py3-mysqlclient && \
rm -rf /root/* && \ rm -rf /root/* /tmp/* && \
rm -rf /var/cache/apk/* && \ rm -rf /var/cache/apk/* && \
rm -rf /home/cowrie/cowrie/cowrie.pid rm -rf /home/cowrie/cowrie/cowrie.pid && \
unset PYTHON_DIR
#
# Start cowrie # Start cowrie
ENV PYTHONPATH /home/cowrie/cowrie ENV PYTHONPATH /home/cowrie/cowrie:/home/cowrie/cowrie/src
WORKDIR /home/cowrie/cowrie WORKDIR /home/cowrie/cowrie
USER cowrie:cowrie USER cowrie:cowrie
CMD ["/usr/bin/twistd", "--nodaemon", "-y", "cowrie.tac", "--pidfile", "/tmp/cowrie/cowrie.pid", "cowrie"] CMD ["/usr/bin/twistd", "--nodaemon", "-y", "cowrie.tac", "--pidfile", "/tmp/cowrie/cowrie.pid", "cowrie"]

View File

@ -0,0 +1,70 @@
FROM alpine
# Include dist
ADD dist/ /root/dist/
# Get and install dependencies & packages
RUN apk -U --no-cache add \
bash \
build-base \
git \
gmp-dev \
libcap \
libffi-dev \
mpc1-dev \
mpfr-dev \
openssl \
openssl-dev \
python \
python-dev \
py-bcrypt \
py-mysqldb \
py-pip \
py-requests \
py-setuptools && \
# Setup user
addgroup -g 2000 cowrie && \
adduser -S -s /bin/ash -u 2000 -D -g 2000 cowrie && \
# Install cowrie
mkdir -p /home/cowrie && \
cd /home/cowrie && \
git clone --depth=1 https://github.com/micheloosterhof/cowrie -b 1.5.3 && \
cd cowrie && \
mkdir -p log && \
pip install --upgrade pip && \
pip install --upgrade -r requirements.txt && \
# Setup configs
setcap cap_net_bind_service=+ep /usr/bin/python2.7 && \
cp /root/dist/cowrie.cfg /home/cowrie/cowrie/cowrie.cfg && \
chown cowrie:cowrie -R /home/cowrie/* /usr/lib/python2.7/site-packages/twisted/plugins && \
# Start Cowrie once to prevent dropin.cache errors upon container start caused by read-only filesystem
su - cowrie -c "export PYTHONPATH=/home/cowrie/cowrie:/home/cowrie/cowrie/src && \
cd /home/cowrie/cowrie && \
/usr/bin/twistd --uid=2000 --gid=2000 -y cowrie.tac --pidfile cowrie.pid cowrie &" && \
sleep 10 && \
# Clean up
apk del --purge build-base \
git \
gmp-dev \
libcap \
libffi-dev \
mpc1-dev \
mpfr-dev \
openssl-dev \
python-dev \
py-mysqldb \
py-pip && \
rm -rf /root/* && \
rm -rf /var/cache/apk/* && \
rm -rf /home/cowrie/cowrie/cowrie.pid
# Start cowrie
ENV PYTHONPATH /home/cowrie/cowrie:/home/cowrie/cowrie/src
WORKDIR /home/cowrie/cowrie
USER cowrie:cowrie
CMD ["/usr/bin/twistd", "--nodaemon", "-y", "cowrie.tac", "--pidfile", "/tmp/cowrie/cowrie.pid", "cowrie"]

View File

@ -1,4 +1,4 @@
[![](https://images.microbadger.com/badges/version/dtagdevsec/cowrie:1811.svg)](https://microbadger.com/images/dtagdevsec/cowrie:1811 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/cowrie:1811.svg)](https://microbadger.com/images/dtagdevsec/cowrie:1811 "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/dtagdevsec/cowrie:1903.svg)](https://microbadger.com/images/dtagdevsec/cowrie:1903 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/cowrie:1903.svg)](https://microbadger.com/images/dtagdevsec/cowrie:1903 "Get your own image badge on microbadger.com")
# cowrie # cowrie

View File

@ -1,14 +1,53 @@
[honeypot] [honeypot]
hostname = ubuntu hostname = ubuntu
log_path = log
download_path = dl
share_path= share/cowrie
state_path = /tmp/cowrie/data
etc_path = etc
contents_path = honeyfs
txtcmds_path = txtcmds
ttylog = true
ttylog_path = log/tty
interactive_timeout = 180
authentication_timeout = 120
backend = shell
timezone = UTC
report_public_ip = true report_public_ip = true
auth_class = AuthRandom auth_class = AuthRandom
auth_class_parameters = 2, 5, 10 auth_class_parameters = 2, 5, 10
reported_ssh_port = 22 reported_ssh_port = 22
data_path = /tmp/cowrie/data data_path = /tmp/cowrie/data
[shell]
filesystem = share/cowrie/fs.pickle
processes = share/cowrie/cmdoutput.json
#arch = linux-x64-lsb
arch = bsd-aarch64-lsb, bsd-aarch64-msb, bsd-bfin-msb, bsd-mips-lsb, bsd-mips-msb, bsd-mips64-lsb, bsd-mips64-msb, bsd-powepc-msb, bsd-powepc64-lsb, bsd-riscv64-lsb, bsd-sparc-msb, bsd-sparc64-msb, bsd-x32-lsb, bsd-x64-lsb, linux-aarch64-lsb, linux-aarch64-msb, linux-alpha-lsb, linux-am33-lsb, linux-arc-lsb, linux-arc-msb, linux-arm-lsb, linux-arm-msb, linux-avr32-lsb, linux-bfin-lsb, linux-c6x-lsb, linux-c6x-msb, linux-cris-lsb, linux-frv-msb, linux-h8300-msb, linux-hppa-msb, linux-hppa64-msb, linux-ia64-lsb, linux-m32r-msb, linux-m68k-msb, linux-microblaze-msb, linux-mips-lsb, linux-mips-msb, linux-mips64-lsb, linux-mips64-msb, linux-mn10300-lsb, linux-nios-lsb, linux-nios-msb, linux-powerpc-lsb, linux-powerpc-msb, linux-powerpc64-lsb, linux-powerpc64-msb, linux-riscv64-lsb, linux-s390x-msb, linux-sh-lsb, linux-sh-msb, linux-sparc-msb, linux-sparc64-msb, linux-tilegx-lsb, linux-tilegx-msb, linux-tilegx64-lsb, linux-tilegx64-msb, linux-x64-lsb, linux-x86-lsb, linux-xtensa-msb, osx-x32-lsb, osx-x64-lsb
kernel_version = 3.2.0-4-amd64
kernel_build_string = #1 SMP Debian 3.2.68-1+deb7u1
hardware_platform = x86_64
operating_system = GNU/Linux
ssh_version = OpenSSH_7.9p1, OpenSSL 1.1.1a 20 Nov 2018
[ssh] [ssh]
version = SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2 enabled = true
rsa_public_key = etc/ssh_host_rsa_key.pub
rsa_private_key = etc/ssh_host_rsa_key
dsa_public_key = etc/ssh_host_dsa_key.pub
dsa_private_key = etc/ssh_host_dsa_key
#version = SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
version = SSH-2.0-OpenSSH_7.9p1
ciphers = aes128-ctr,aes192-ctr,aes256-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc
macs = hmac-sha2-512,hmac-sha2-384,hmac-sha2-56,hmac-sha1,hmac-md5
compression = zlib@openssh.com,zlib,none
listen_endpoints = tcp:22:interface=0.0.0.0 listen_endpoints = tcp:22:interface=0.0.0.0
sftp_enabled = true
forwarding = true
forward_redirect = false
forward_tunnel = false
auth_none_enabled = false
auth_keyboard_interactive_enabled = true
[telnet] [telnet]
enabled = true enabled = true
@ -18,8 +57,13 @@ reported_port = 23
[output_jsonlog] [output_jsonlog]
enabled = true enabled = true
logfile = log/cowrie.json logfile = log/cowrie.json
epoch_timestamp = false
[output_textlog] [output_textlog]
enabled = false enabled = false
logfile = log/cowrie-textlog.log logfile = log/cowrie-textlog.log
format = text format = text
[output_crashreporter]
enabled = false
debug = false

View File

@ -18,7 +18,7 @@ services:
ports: ports:
- "22:22" - "22:22"
- "23:23" - "23:23"
image: "dtagdevsec/cowrie:1811" image: "dtagdevsec/cowrie:1903"
read_only: true read_only: true
volumes: volumes:
- /data/cowrie/downloads:/home/cowrie/cowrie/dl - /data/cowrie/downloads:/home/cowrie/cowrie/dl

View File

@ -1,7 +1,8 @@
FROM alpine FROM alpine:3.10
#
# Get and install dependencies & packages # Get and install dependencies & packages
RUN apk -U --no-cache add \ RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
apk -U --no-cache add \
curl \ curl \
git \ git \
npm \ npm \
@ -9,10 +10,10 @@ RUN apk -U --no-cache add \
npm install -g grunt-cli && \ npm install -g grunt-cli && \
npm install -g http-server && \ npm install -g http-server && \
npm install npm@latest -g && \ npm install npm@latest -g && \
#
# Install CyberChef # Install CyberChef
cd /root && \ cd /root && \
git clone https://github.com/gchq/cyberchef -b v8.20.0 --depth=1 && \ git clone https://github.com/gchq/cyberchef --depth=1 && \
chown -R nobody:nobody cyberchef && \ chown -R nobody:nobody cyberchef && \
cd cyberchef && \ cd cyberchef && \
npm install && \ npm install && \
@ -20,16 +21,16 @@ RUN apk -U --no-cache add \
mkdir -p /opt/cyberchef && \ mkdir -p /opt/cyberchef && \
mv build/prod/* /opt/cyberchef && \ mv build/prod/* /opt/cyberchef && \
cd / && \ cd / && \
#
# Clean up # Clean up
apk del --purge git \ apk del --purge git \
npm && \ npm && \
rm -rf /root/* && \ rm -rf /root/* && \
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*
#
# Healthcheck # Healthcheck
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:8000' HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:8000'
#
# Set user, workdir and start spiderfoot # Set user, workdir and start spiderfoot
USER nobody:nobody USER nobody:nobody
WORKDIR /opt/cyberchef WORKDIR /opt/cyberchef

View File

@ -1,4 +1,4 @@
[![](https://images.microbadger.com/badges/version/dtagdevsec/cyberchef:1811.svg)](https://microbadger.com/images/dtagdevsec/cyberchef:1811 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/cyberchef:1811.svg)](https://microbadger.com/images/dtagdevsec/cyberchef:1811 "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/dtagdevsec/cyberchef:1903.svg)](https://microbadger.com/images/dtagdevsec/cyberchef:1903 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/cyberchef:1903.svg)](https://microbadger.com/images/dtagdevsec/cyberchef:1903 "Get your own image badge on microbadger.com")
# cyberchef # cyberchef

View File

@ -14,5 +14,5 @@ services:
- cyberchef_local - cyberchef_local
ports: ports:
- "127.0.0.1:64299:8000" - "127.0.0.1:64299:8000"
image: "dtagdevsec/cyberchef:1811" image: "dtagdevsec/cyberchef:1903"
read_only: true read_only: true

View File

@ -1,9 +1,9 @@
FROM debian:stretch-slim FROM debian:stretch-slim
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
#
# Include dist # Include dist
ADD dist/ /root/dist/ ADD dist/ /root/dist/
#
# Install dependencies and packages # Install dependencies and packages
RUN apt-get update -y && \ RUN apt-get update -y && \
apt-get dist-upgrade -y && \ apt-get dist-upgrade -y && \
@ -32,7 +32,7 @@ RUN apt-get update -y && \
python3-bson \ python3-bson \
python3-yaml \ python3-yaml \
ttf-liberation && \ ttf-liberation && \
#
# Get and install dionaea # Get and install dionaea
git clone --depth=1 https://github.com/dinotools/dionaea -b 0.8.0 /root/dionaea/ && \ git clone --depth=1 https://github.com/dinotools/dionaea -b 0.8.0 /root/dionaea/ && \
cd /root/dionaea && \ cd /root/dionaea && \
@ -41,17 +41,17 @@ RUN apt-get update -y && \
cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/dionaea .. && \ cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/dionaea .. && \
make && \ make && \
make install && \ make install && \
#
# Setup user and groups # Setup user and groups
addgroup --gid 2000 dionaea && \ addgroup --gid 2000 dionaea && \
adduser --system --no-create-home --shell /bin/bash --uid 2000 --disabled-password --disabled-login --gid 2000 dionaea && \ adduser --system --no-create-home --shell /bin/bash --uid 2000 --disabled-password --disabled-login --gid 2000 dionaea && \
setcap cap_net_bind_service=+ep /opt/dionaea/bin/dionaea && \ setcap cap_net_bind_service=+ep /opt/dionaea/bin/dionaea && \
#
# Supply configs and set permissions # Supply configs and set permissions
chown -R dionaea:dionaea /opt/dionaea/var && \ chown -R dionaea:dionaea /opt/dionaea/var && \
rm -rf /opt/dionaea/etc/dionaea/* && \ rm -rf /opt/dionaea/etc/dionaea/* && \
mv /root/dist/etc/* /opt/dionaea/etc/dionaea/ && \ mv /root/dist/etc/* /opt/dionaea/etc/dionaea/ && \
#
# Setup runtime and clean up # Setup runtime and clean up
apt-get purge -y \ apt-get purge -y \
build-essential \ build-essential \
@ -75,7 +75,7 @@ RUN apt-get update -y && \
python3-dev \ python3-dev \
python3-bson \ python3-bson \
python3-yaml && \ python3-yaml && \
#
apt-get install -y \ apt-get install -y \
ca-certificates \ ca-certificates \
python3 \ python3 \
@ -90,11 +90,11 @@ RUN apt-get update -y && \
libpcap0.8 \ libpcap0.8 \
libpython3.5 \ libpython3.5 \
libudns0 && \ libudns0 && \
#
apt-get autoremove --purge -y && \ apt-get autoremove --purge -y && \
apt-get clean && \ apt-get clean && \
rm -rf /root/* /var/lib/apt/lists/* /tmp/* /var/tmp/* rm -rf /root/* /var/lib/apt/lists/* /tmp/* /var/tmp/*
#
# Start dionaea # Start dionaea
USER dionaea:dionaea USER dionaea:dionaea
CMD ["/opt/dionaea/bin/dionaea", "-u", "dionaea", "-g", "dionaea", "-c", "/opt/dionaea/etc/dionaea/dionaea.cfg"] CMD ["/opt/dionaea/bin/dionaea", "-u", "dionaea", "-g", "dionaea", "-c", "/opt/dionaea/etc/dionaea/dionaea.cfg"]

View File

@ -1,4 +1,4 @@
[![](https://images.microbadger.com/badges/version/dtagdevsec/dionaea:1811.svg)](https://microbadger.com/images/dtagdevsec/dionaea:1811 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/dionaea:1811.svg)](https://microbadger.com/images/dtagdevsec/dionaea:1811 "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/dtagdevsec/dionaea:1903.svg)](https://microbadger.com/images/dtagdevsec/dionaea:1903 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/dionaea:1903.svg)](https://microbadger.com/images/dtagdevsec/dionaea:1903 "Get your own image badge on microbadger.com")
# dionaea # dionaea

View File

@ -11,9 +11,9 @@
os_type: 4 os_type: 4
# Additional config # Additional config
primary_domain: WORKGROUP primary_domain: DACH
oem_domain_name: WORKGROUP oem_domain_name: DACH
server_name: WIN_SRV server_name: ADFS
## Windows 7 ## ## Windows 7 ##
native_os: Windows 7 Professional 7600 native_os: Windows 7 Professional 7600

View File

@ -27,7 +27,7 @@ services:
- "5060:5060/udp" - "5060:5060/udp"
- "5061:5061" - "5061:5061"
- "27017:27017" - "27017:27017"
image: "dtagdevsec/dionaea:1811" image: "dtagdevsec/dionaea:1903"
read_only: true read_only: true
volumes: volumes:
- /data/dionaea/roots/ftp:/opt/dionaea/var/dionaea/roots/ftp - /data/dionaea/roots/ftp:/opt/dionaea/var/dionaea/roots/ftp

View File

@ -1,8 +1,8 @@
FROM alpine FROM alpine
#
# Include dist # Include dist
ADD dist/ /root/dist/ ADD dist/ /root/dist/
#
# Install packages # Install packages
RUN apk -U --no-cache add \ RUN apk -U --no-cache add \
git \ git \
@ -15,18 +15,18 @@ RUN apk -U --no-cache add \
mkdir -p /opt && \ mkdir -p /opt && \
cd /opt/ && \ cd /opt/ && \
git clone --depth=1 https://github.com/schmalle/ElasticpotPY.git && \ git clone --depth=1 https://github.com/schmalle/ElasticpotPY.git && \
#
# Setup user, groups and configs # Setup user, groups and configs
addgroup -g 2000 elasticpot && \ addgroup -g 2000 elasticpot && \
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 elasticpot && \ adduser -S -H -s /bin/ash -u 2000 -D -g 2000 elasticpot && \
mv /root/dist/elasticpot.cfg /opt/ElasticpotPY/ && \ mv /root/dist/elasticpot.cfg /opt/ElasticpotPY/ && \
mkdir /opt/ElasticpotPY/log && \ mkdir /opt/ElasticpotPY/log && \
#
# Clean up # Clean up
apk del --purge git && \ apk del --purge git && \
rm -rf /root/* && \ rm -rf /root/* && \
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*
#
# Start elasticpot # Start elasticpot
STOPSIGNAL SIGINT STOPSIGNAL SIGINT
USER elasticpot:elasticpot USER elasticpot:elasticpot

View File

@ -1,4 +1,4 @@
[![](https://images.microbadger.com/badges/version/dtagdevsec/elasticpot:1811.svg)](https://microbadger.com/images/dtagdevsec/elasticpot:1811 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/elasticpot:1811.svg)](https://microbadger.com/images/dtagdevsec/elasticpot:1811 "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/dtagdevsec/elasticpot:1903.svg)](https://microbadger.com/images/dtagdevsec/elasticpot:1903 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/elasticpot:1903.svg)](https://microbadger.com/images/dtagdevsec/elasticpot:1903 "Get your own image badge on microbadger.com")
# elasticpot # elasticpot

View File

@ -14,7 +14,7 @@ services:
- elasticpot_local - elasticpot_local
ports: ports:
- "9200:9200" - "9200:9200"
image: "dtagdevsec/elasticpot:1811" image: "dtagdevsec/elasticpot:1903"
read_only: true read_only: true
volumes: volumes:
- /data/elasticpot/log:/opt/ElasticpotPY/log - /data/elasticpot/log:/opt/ElasticpotPY/log

View File

@ -1,11 +1,11 @@
# Elasticsearch # Elasticsearch
[![](https://images.microbadger.com/badges/version/dtagdevsec/elasticsearch:1811.svg)](https://microbadger.com/images/dtagdevsec/elasticsearch:1811 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/elasticsearch:1811.svg)](https://microbadger.com/images/dtagdevsec/elasticsearch:1811 "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/dtagdevsec/elasticsearch:1903.svg)](https://microbadger.com/images/dtagdevsec/elasticsearch:1903 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/elasticsearch:1903.svg)](https://microbadger.com/images/dtagdevsec/elasticsearch:1903 "Get your own image badge on microbadger.com")
# Logstash # Logstash
[![](https://images.microbadger.com/badges/version/dtagdevsec/logstash:1811.svg)](https://microbadger.com/images/dtagdevsec/logstash:1811 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/logstash:1811.svg)](https://microbadger.com/images/dtagdevsec/logstash:1811 "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/dtagdevsec/logstash:1903.svg)](https://microbadger.com/images/dtagdevsec/logstash:1903 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/logstash:1903.svg)](https://microbadger.com/images/dtagdevsec/logstash:1903 "Get your own image badge on microbadger.com")
# Kibana # Kibana
[![](https://images.microbadger.com/badges/version/dtagdevsec/kibana:1811.svg)](https://microbadger.com/images/dtagdevsec/kibana:1811 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/kibana:1811.svg)](https://microbadger.com/images/dtagdevsec/kibana:1811 "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/dtagdevsec/kibana:1903.svg)](https://microbadger.com/images/dtagdevsec/kibana:1903 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/kibana:1903.svg)](https://microbadger.com/images/dtagdevsec/kibana:1903 "Get your own image badge on microbadger.com")
# elk stack # elk stack

View File

@ -24,7 +24,7 @@ services:
mem_limit: 4g mem_limit: 4g
ports: ports:
- "127.0.0.1:64298:9200" - "127.0.0.1:64298:9200"
image: "dtagdevsec/elasticsearch:1811" image: "dtagdevsec/elasticsearch:1903"
volumes: volumes:
- /data:/data - /data:/data
@ -39,7 +39,7 @@ services:
condition: service_healthy condition: service_healthy
ports: ports:
- "127.0.0.1:64296:5601" - "127.0.0.1:64296:5601"
image: "dtagdevsec/kibana:1811" image: "dtagdevsec/kibana:1903"
## Logstash service ## Logstash service
logstash: logstash:
@ -51,7 +51,7 @@ services:
condition: service_healthy condition: service_healthy
env_file: env_file:
- /opt/tpot/etc/compose/elk_environment - /opt/tpot/etc/compose/elk_environment
image: "dtagdevsec/logstash:1811" image: "dtagdevsec/logstash:1903"
volumes: volumes:
- /data:/data - /data:/data
- /root/tpotce/docker/elk/logstash/dist/logstash.conf:/etc/logstash/conf.d/logstash.conf - /root/tpotce/docker/elk/logstash/dist/logstash.conf:/etc/logstash/conf.d/logstash.conf
@ -66,5 +66,5 @@ services:
condition: service_healthy condition: service_healthy
ports: ports:
- "127.0.0.1:64302:9100" - "127.0.0.1:64302:9100"
image: "dtagdevsec/head:1811" image: "dtagdevsec/head:1903"
read_only: true read_only: true

View File

@ -1,41 +1,44 @@
FROM alpine FROM alpine
#
# Include dist # Include dist
ADD dist/ /root/dist/ ADD dist/ /root/dist/
#
# Setup env and apt # Setup env and apt
RUN apk -U add \ RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
apk -U --no-cache add \
aria2 \
bash \ bash \
curl \ curl \
openjdk8-jre \ nss \
wget && \ openjdk8-jre && \
#
# Get and install packages # Get and install packages
cd /root/dist/ && \ cd /root/dist/ && \
mkdir -p /usr/share/elasticsearch/ && \ mkdir -p /usr/share/elasticsearch/ && \
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.5.4.tar.gz && \ aria2c -s 16 -x 16 https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.8.6.tar.gz && \
tar xvfz elasticsearch-6.5.4.tar.gz --strip-components=1 -C /usr/share/elasticsearch/ && \ tar xvfz elasticsearch-6.8.6.tar.gz --strip-components=1 -C /usr/share/elasticsearch/ && \
#
# Add and move files # Add and move files
cd /root/dist/ && \ cd /root/dist/ && \
mkdir -p /usr/share/elasticsearch/config && \ mkdir -p /usr/share/elasticsearch/config && \
cp elasticsearch.yml /usr/share/elasticsearch/config/ && \ cp elasticsearch.yml /usr/share/elasticsearch/config/ && \
#
# Setup user, groups and configs # Setup user, groups and configs
addgroup -g 2000 elasticsearch && \ addgroup -g 2000 elasticsearch && \
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 elasticsearch && \ adduser -S -H -s /bin/ash -u 2000 -D -g 2000 elasticsearch && \
chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/ && \ chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/ && \
rm -rf /usr/share/elasticsearch/modules/x-pack-ml && \ rm -rf /usr/share/elasticsearch/modules/x-pack-ml && \
#
# Clean up # Clean up
apk del --purge wget && \ apk del --purge aria2 && \
rm -rf /root/* && \ rm -rf /root/* && \
rm -rf /tmp/* && \ rm -rf /tmp/* && \
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*
#
# Healthcheck # Healthcheck
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9200/_cat/health' HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9200/_cat/health'
#
# Start ELK # Start ELK
USER elasticsearch:elasticsearch USER elasticsearch:elasticsearch
ENV JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
CMD ["/usr/share/elasticsearch/bin/elasticsearch"] CMD ["/usr/share/elasticsearch/bin/elasticsearch"]

View File

@ -7,3 +7,5 @@ path:
http.host: 0.0.0.0 http.host: 0.0.0.0
http.cors.enabled: true http.cors.enabled: true
http.cors.allow-origin: "*" http.cors.allow-origin: "*"
discovery.zen.ping.unicast.hosts:
- localhost

View File

@ -24,6 +24,6 @@ services:
mem_limit: 2g mem_limit: 2g
ports: ports:
- "127.0.0.1:64298:9200" - "127.0.0.1:64298:9200"
image: "dtagdevsec/elasticsearch:1811" image: "dtagdevsec/elasticsearch:1903"
volumes: volumes:
- /data:/data - /data:/data

View File

@ -1,33 +1,33 @@
FROM alpine FROM alpine
#
# Setup env and apt # Setup env and apt
RUN apk -U add \ RUN apk -U add \
curl \ curl \
git \ git \
nodejs \ nodejs \
nodejs-npm && \ nodejs-npm && \
#
# Get and install packages # Get and install packages
mkdir -p /usr/src/app/ && \ mkdir -p /usr/src/app/ && \
cd /usr/src/app/ && \ cd /usr/src/app/ && \
git clone --depth=1 https://github.com/mobz/elasticsearch-head . && \ git clone --depth=1 https://github.com/mobz/elasticsearch-head . && \
npm install http-server && \ npm install http-server && \
sed -i "s#\"http\:\/\/localhost\:9200\"#window.location.protocol \+ \'\/\/\' \+ window.location.hostname \+ \'\:\' \+ window.location.port \+ \'\/es\/\'#" /usr/src/app/_site/app.js && \ sed -i "s#\"http\:\/\/localhost\:9200\"#window.location.protocol \+ \'\/\/\' \+ window.location.hostname \+ \'\:\' \+ window.location.port \+ \'\/es\/\'#" /usr/src/app/_site/app.js && \
#
# Setup user, groups and configs # Setup user, groups and configs
addgroup -g 2000 head && \ addgroup -g 2000 head && \
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 head && \ adduser -S -H -s /bin/ash -u 2000 -D -g 2000 head && \
chown -R head:head /usr/src/app/ && \ chown -R head:head /usr/src/app/ && \
#
# Clean up # Clean up
apk del --purge git && \ apk del --purge git && \
rm -rf /root/* && \ rm -rf /root/* && \
rm -rf /tmp/* && \ rm -rf /tmp/* && \
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*
#
# Healthcheck # Healthcheck
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9100' HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9100'
#
# Start elasticsearch-head # Start elasticsearch-head
USER head:head USER head:head
WORKDIR /usr/src/app WORKDIR /usr/src/app

View File

@ -12,5 +12,5 @@ services:
# condition: service_healthy # condition: service_healthy
ports: ports:
- "127.0.0.1:64302:9100" - "127.0.0.1:64302:9100"
image: "dtagdevsec/head:1811" image: "dtagdevsec/head:1903"
read_only: true read_only: true

View File

@ -1,24 +1,24 @@
FROM alpine FROM node:10.15.2-alpine
#
# Include dist # Include dist
ADD dist/ /root/dist/ ADD dist/ /root/dist/
#
# Setup env and apt # Setup env and apt
RUN apk -U add \ RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
curl \ apk -U --no-cache add \
nodejs \ aria2 \
wget && \ curl && \
#
# Get and install packages # Get and install packages
cd /root/dist/ && \ cd /root/dist/ && \
mkdir -p /usr/share/kibana/ && \ mkdir -p /usr/share/kibana/ && \
wget https://artifacts.elastic.co/downloads/kibana/kibana-6.5.4-linux-x86_64.tar.gz && \ aria2c -s 16 -x 16 https://artifacts.elastic.co/downloads/kibana/kibana-6.8.6-linux-x86_64.tar.gz && \
tar xvfz kibana-6.5.4-linux-x86_64.tar.gz --strip-components=1 -C /usr/share/kibana/ && \ tar xvfz kibana-6.8.6-linux-x86_64.tar.gz --strip-components=1 -C /usr/share/kibana/ && \
#
# Kibana's bundled node does not work in alpine # Kibana's bundled node does not work in alpine
rm /usr/share/kibana/node/bin/node && \ rm /usr/share/kibana/node/bin/node && \
ln -s /usr/bin/node /usr/share/kibana/node/bin/node && \ ln -s /usr/bin/node /usr/share/kibana/node/bin/node && \
#
# Add and move files # Add and move files
cd /root/dist/ && \ cd /root/dist/ && \
cp kibana.svg /usr/share/kibana/src/ui/public/images/kibana.svg && \ cp kibana.svg /usr/share/kibana/src/ui/public/images/kibana.svg && \
@ -26,45 +26,37 @@ RUN apk -U add \
cp elk.ico /usr/share/kibana/src/ui/public/assets/favicons/favicon.ico && \ cp elk.ico /usr/share/kibana/src/ui/public/assets/favicons/favicon.ico && \
cp elk.ico /usr/share/kibana/src/ui/public/assets/favicons/favicon-16x16.png && \ cp elk.ico /usr/share/kibana/src/ui/public/assets/favicons/favicon-16x16.png && \
cp elk.ico /usr/share/kibana/src/ui/public/assets/favicons/favicon-32x32.png && \ cp elk.ico /usr/share/kibana/src/ui/public/assets/favicons/favicon-32x32.png && \
cp create_kibana_index.js /usr/share/kibana/src/core_plugins/elasticsearch/lib/ && \ #
# Setup plugins, rebuild bundle
#cd /usr/share/kibana/plugins && \
#wget https://github.com/dlumbrer/kbn_radar/releases/download/Kibana-6.X/kbn_radar.tar.gz && \
#wget https://github.com/dlumbrer/kbn_network/releases/download/6.0.X-1/network_vis.tar.gz && \
#tar xvfz kbn_radar.tar.gz && \
#tar xvfz network_vis.tar.gz && \
#rm *.tar.gz && \
rm -rf /usr/share/kibana/optimize/bundles/* && \
# Setup user, groups and configs # Setup user, groups and configs
sed -i 's/#server.basePath: ""/server.basePath: "\/kibana"/' /usr/share/kibana/config/kibana.yml && \ sed -i 's/#server.basePath: ""/server.basePath: "\/kibana"/' /usr/share/kibana/config/kibana.yml && \
sed -i 's/#kibana.defaultAppId: "home"/kibana.defaultAppId: "dashboards"/' /usr/share/kibana/config/kibana.yml && \ sed -i 's/#kibana.defaultAppId: "home"/kibana.defaultAppId: "dashboards"/' /usr/share/kibana/config/kibana.yml && \
sed -i 's/#server.host: "localhost"/server.host: "0.0.0.0"/' /usr/share/kibana/config/kibana.yml && \ sed -i 's/#server.host: "localhost"/server.host: "0.0.0.0"/' /usr/share/kibana/config/kibana.yml && \
sed -i 's/#elasticsearch.url: "http:\/\/localhost:9200"/elasticsearch.url: "http:\/\/elasticsearch:9200"/' /usr/share/kibana/config/kibana.yml && \ sed -i 's/#elasticsearch.hosts: \["http:\/\/localhost:9200"\]/elasticsearch.hosts: \["http:\/\/elasticsearch:9200"\]/' /usr/share/kibana/config/kibana.yml && \
sed -i 's/#server.rewriteBasePath: false/server.rewriteBasePath: false/' /usr/share/kibana/config/kibana.yml && \ sed -i 's/#server.rewriteBasePath: false/server.rewriteBasePath: false/' /usr/share/kibana/config/kibana.yml && \
sed -i "s/#005571/#e20074/g" /usr/share/kibana/src/ui/public/chrome/directives/global_nav/global_nav.less && \ sed -i "s/#005571/#e20074/g" /usr/share/kibana/built_assets/css/plugins/kibana/index.css && \
sed -i "s/globalColorBlue/globalColorMagenta/g" /usr/share/kibana/src/ui/public/chrome/directives/global_nav/global_nav_link/global_nav_link.less && \ sed -i "s/#007ba4/#9e0051/g" /usr/share/kibana/built_assets/css/plugins/kibana/index.css && \
echo "@globalColorMagenta: #9E0051;" >> /usr/share/kibana/src/ui/public/styles/variables/colors.less && \ sed -i "s/#00465d/#4f0028/g" /usr/share/kibana/built_assets/css/plugins/kibana/index.css && \
echo "xpack.infra.enabled: false" >> /usr/share/kibana/config/kibana.yml && \ echo "xpack.infra.enabled: false" >> /usr/share/kibana/config/kibana.yml && \
echo "xpack.logstash.enabled: false" >> /usr/share/kibana/config/kibana.yml && \ echo "xpack.logstash.enabled: false" >> /usr/share/kibana/config/kibana.yml && \
echo "xpack.canvas.enabled: false" >> /usr/share/kibana/config/kibana.yml && \ echo "xpack.canvas.enabled: false" >> /usr/share/kibana/config/kibana.yml && \
echo "xpack.spaces.enabled: false" >> /usr/share/kibana/config/kibana.yml && \ echo "xpack.spaces.enabled: false" >> /usr/share/kibana/config/kibana.yml && \
echo "xpack.apm.enabled: false" >> /usr/share/kibana/config/kibana.yml && \ echo "xpack.apm.enabled: false" >> /usr/share/kibana/config/kibana.yml && \
echo "xpack.uptime.enabled: false" >> /usr/share/kibana/config/kibana.yml && \
rm -rf /usr/share/kibana/optimize/bundles/* && \
/usr/share/kibana/bin/kibana --optimize && \ /usr/share/kibana/bin/kibana --optimize && \
addgroup -g 2000 kibana && \ addgroup -g 2000 kibana && \
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 kibana && \ adduser -S -H -s /bin/ash -u 2000 -D -g 2000 kibana && \
chown -R kibana:kibana /usr/share/kibana/ && \ chown -R kibana:kibana /usr/share/kibana/ && \
#
# Clean up # Clean up
apk del --purge wget && \ apk del --purge aria2 && \
rm -rf /root/* && \ rm -rf /root/* && \
rm -rf /tmp/* && \ rm -rf /tmp/* && \
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*
#
# Healthcheck # Healthcheck
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:5601' HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:5601'
#
# Start kibana # Start kibana
STOPSIGNAL SIGKILL STOPSIGNAL SIGKILL
USER kibana:kibana USER kibana:kibana

View File

@ -1,38 +0,0 @@
'use strict';
var _setup_error = require('./setup_error');
var _setup_error2 = _interopRequireDefault(_setup_error);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
module.exports = function (server, mappings) {
var _server$plugins$elast = server.plugins.elasticsearch.getCluster('admin');
const callWithInternalUser = _server$plugins$elast.callWithInternalUser;
const index = server.config().get('kibana.index');
function handleError(message) {
return function (err) {
throw new _setup_error2.default(server, message, err);
};
}
return callWithInternalUser('indices.create', {
index: index,
body: {
settings: {
number_of_shards: 1,
number_of_replicas: 0,
'index.mapper.dynamic': false
},
mappings
}
}).catch(handleError('Unable to create Kibana index "<%= kibana.index %>"')).then(function () {
return callWithInternalUser('cluster.health', {
waitForStatus: 'yellow',
index: index
}).catch(handleError('Waiting for Kibana index "<%= kibana.index %>" to come online failed.'));
});
};

View File

@ -12,4 +12,4 @@ services:
# condition: service_healthy # condition: service_healthy
ports: ports:
- "127.0.0.1:64296:5601" - "127.0.0.1:64296:5601"
image: "dtagdevsec/kibana:1811" image: "dtagdevsec/kibana:1903"

View File

@ -1,53 +1,56 @@
FROM alpine FROM alpine
#
# Include dist # Include dist
ADD dist/ /root/dist/ ADD dist/ /root/dist/
#
# Setup env and apt # Setup env and apt
RUN apk -U add \ RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
apk -U --no-cache add \
aria2 \
bash \ bash \
curl \ bzip2 \
git \ curl \
libc6-compat \ libc6-compat \
libzmq \ libzmq \
openjdk8-jre \ nss \
wget && \ openjdk8-jre && \
#
# Get and install packages # Get and install packages
git clone --depth=1 https://github.com/dtag-dev-sec/listbot /etc/listbot && \ mkdir -p /etc/listbot && \
cd /etc/listbot && \
aria2c -s16 -x 16 https://listbot.sicherheitstacho.eu/cve.yaml.bz2 && \
aria2c -s16 -x 16 https://listbot.sicherheitstacho.eu/iprep.yaml.bz2 && \
bunzip2 *.bz2 && \
cd /root/dist/ && \ cd /root/dist/ && \
mkdir -p /usr/share/logstash/ && \ mkdir -p /usr/share/logstash/ && \
wget https://artifacts.elastic.co/downloads/logstash/logstash-6.5.4.tar.gz && \ aria2c -s 16 -x 16 https://artifacts.elastic.co/downloads/logstash/logstash-6.8.6.tar.gz && \
wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz && \ tar xvfz logstash-6.8.6.tar.gz --strip-components=1 -C /usr/share/logstash/ && \
tar xvfz logstash-6.5.4.tar.gz --strip-components=1 -C /usr/share/logstash/ && \
/usr/share/logstash/bin/logstash-plugin install logstash-filter-translate && \ /usr/share/logstash/bin/logstash-plugin install logstash-filter-translate && \
/usr/share/logstash/bin/logstash-plugin install logstash-output-syslog && \ /usr/share/logstash/bin/logstash-plugin install logstash-output-syslog && \
tar xvfz GeoLite2-ASN.tar.gz --strip-components=1 -C /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-filter-geoip-5.0.3-java/vendor/ && \ #
# Add and move files # Add and move files
cd /root/dist/ && \ cd /root/dist/ && \
cp update.sh /usr/bin/ && \ cp update.sh /usr/bin/ && \
chmod u+x /usr/bin/update.sh && \ chmod u+x /usr/bin/update.sh && \
mkdir -p /etc/logstash/conf.d && \ mkdir -p /etc/logstash/conf.d && \
cp logstash.conf /etc/logstash/conf.d/ && \ cp logstash.conf /etc/logstash/conf.d/ && \
cp elasticsearch-template-es6x.json /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.2.4-java/lib/logstash/outputs/elasticsearch/ && \ cp elasticsearch-template-es6x.json /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-elasticsearch-9.4.0-java/lib/logstash/outputs/elasticsearch/ && \
#
# Setup user, groups and configs # Setup user, groups and configs
addgroup -g 2000 logstash && \ addgroup -g 2000 logstash && \
adduser -S -H -s /bin/bash -u 2000 -D -g 2000 logstash && \ adduser -S -H -s /bin/bash -u 2000 -D -g 2000 logstash && \
chown -R logstash:logstash /usr/share/logstash && \ chown -R logstash:logstash /usr/share/logstash && \
chown -R logstash:logstash /etc/listbot && \ chown -R logstash:logstash /etc/listbot && \
chmod 755 /usr/bin/update.sh && \ chmod 755 /usr/bin/update.sh && \
#
# Clean up # Clean up
apk del --purge wget && \
rm -rf /root/* && \ rm -rf /root/* && \
rm -rf /tmp/* && \ rm -rf /tmp/* && \
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*
#
# Healthcheck # Healthcheck
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9600' HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9600'
#
# Start logstash # Start logstash
#USER logstash:logstash #USER logstash:logstash
CMD update.sh && exec /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf --java-execution CMD update.sh && exec /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf --config.reload.automatic --java-execution

View File

@ -4,7 +4,12 @@
"settings" : { "settings" : {
"index.refresh_interval" : "5s", "index.refresh_interval" : "5s",
"index.number_of_shards" : "1", "index.number_of_shards" : "1",
"index.number_of_replicas" : "0" "index.number_of_replicas" : "0",
"mapping" : {
"total_fields" : {
"limit" : "2000"
}
}
}, },
"mappings" : { "mappings" : {
"_default_" : { "_default_" : {

View File

@ -4,7 +4,8 @@
"settings" : { "settings" : {
"index.refresh_interval" : "5s", "index.refresh_interval" : "5s",
"index.number_of_shards" : "1", "index.number_of_shards" : "1",
"index.number_of_replicas" : "0" "index.number_of_replicas" : "0",
"index.mapping.total_fields.limit": "2000"
}, },
"mappings" : { "mappings" : {
"_default_" : { "_default_" : {

View File

@ -1,6 +1,13 @@
# Input section # Input section
input { input {
# Fatt
file {
path => ["/data/fatt/log/fatt.log"]
codec => json
type => "Fatt"
}
# Suricata # Suricata
file { file {
path => ["/data/suricata/log/eve.json"] path => ["/data/suricata/log/eve.json"]
@ -29,6 +36,13 @@ input {
type => "Ciscoasa" type => "Ciscoasa"
} }
# CitrixHoneypot
file {
path => ["/data/citrixhoneypot/logs/server.log"]
codec => json
type => "CitrixHoneypot"
}
# Conpot # Conpot
file { file {
path => ["/data/conpot/log/*.json"] path => ["/data/conpot/log/*.json"]
@ -57,12 +71,6 @@ input {
type => "ElasticPot" type => "ElasticPot"
} }
# Glastopf
file {
path => ["/data/glastopf/log/glastopf.log"]
type => "Glastopf"
}
# Glutton # Glutton
file { file {
path => ["/data/glutton/log/glutton.log"] path => ["/data/glutton/log/glutton.log"]
@ -76,6 +84,13 @@ input {
type => "Heralding" type => "Heralding"
} }
# Honeypy
file {
path => ["/data/honeypy/log/json.log"]
codec => json
type => "Honeypy"
}
# Honeytrap # Honeytrap
file { file {
path => ["/data/honeytrap/log/attackers.json"] path => ["/data/honeytrap/log/attackers.json"]
@ -86,6 +101,7 @@ input {
# Mailoney # Mailoney
file { file {
path => ["/data/mailoney/log/commands.log"] path => ["/data/mailoney/log/commands.log"]
codec => json
type => "Mailoney" type => "Mailoney"
} }
@ -121,6 +137,27 @@ input {
# Filter Section # Filter Section
filter { filter {
# Fatt
if [type] == "Fatt" {
date {
match => [ "timestamp", "ISO8601" ]
}
mutate {
rename => {
"sourceIp" => "src_ip"
"destinationIp" => "dest_ip"
"sourcePort" => "src_port"
"destinationPort" => "dest_port"
"gquic" => "fatt_gquic"
"http" => "fatt_http"
"rdp" => "fatt_rdp"
"ssh" => "fatt_ssh"
"tls" => "fatt_tls"
}
}
}
# Suricata # Suricata
if [type] == "Suricata" { if [type] == "Suricata" {
date { date {
@ -131,6 +168,7 @@ filter {
field => "[alert][signature_id]" field => "[alert][signature_id]"
destination => "[alert][cve_id]" destination => "[alert][cve_id]"
dictionary_path => "/etc/listbot/cve.yaml" dictionary_path => "/etc/listbot/cve.yaml"
# fallback => "-"
} }
} }
@ -176,6 +214,31 @@ filter {
} }
} }
# CitrixHoneypot
if [type] == "CitrixHoneypot" {
grok {
match => {
"message" => [ "\A\(%{IPV4:src_ip:string}:%{INT:src_port:integer}\): %{JAVAMETHOD:http.http_method:string}%{SPACE}%{CISCO_REASON:fileinfo.state:string}: %{UNIXPATH:fileinfo.filename:string}",
"\A\(%{IPV4:src_ip:string}:%{INT:src_port:integer}\): %{JAVAMETHOD:http.http_method:string}%{SPACE}%{CISCO_REASON:fileinfo.state:string}: %{GREEDYDATA:payload:string}",
"\A\(%{IPV4:src_ip:string}:%{INT:src_port:integer}\): %{S3_REQUEST_LINE:msg:string} %{CISCO_REASON:fileinfo.state:string}: %{GREEDYDATA:payload:string:string}",
"\A\(%{IPV4:src_ip:string}:%{INT:src_port:integer}\): %{GREEDYDATA:msg:string}" ]
}
}
date {
match => [ "asctime", "ISO8601" ]
remove_field => ["asctime"]
remove_field => ["message"]
}
mutate {
add_field => {
"dest_port" => "443"
}
rename => {
"levelname" => "level"
}
}
}
# Conpot # Conpot
if [type] == "ConPot" { if [type] == "ConPot" {
date { date {
@ -235,17 +298,6 @@ filter {
} }
} }
# Glastopf
if [type] == "Glastopf" {
grok {
match => [ "message", "\A%{TIMESTAMP_ISO8601:timestamp}%{SPACE}%{NOTSPACE}%{SPACE}%{IP:src_ip}%{SPACE}%{WORD}%{SPACE}%{URIPROTO:http_method}%{SPACE}%{NOTSPACE:http_uri}%{SPACE}%{NOTSPACE}%{SPACE}%{HOSTNAME}:%{NUMBER:dest_port:integer}" ]
}
date {
match => [ "timestamp", "yyyy-MM-dd HH:mm:ss,SSS" ]
remove_field => ["timestamp"]
}
}
# Glutton # Glutton
if [type] == "Glutton" { if [type] == "Glutton" {
date { date {
@ -265,6 +317,17 @@ filter {
} }
} }
# Honeypy
if [type] == "Honeypy" {
date {
match => [ "timestamp", "ISO8601" ]
remove_field => ["timestamp"]
remove_field => ["date"]
remove_field => ["time"]
remove_field => ["millisecond"]
}
}
# Honeytrap # Honeytrap
if [type] == "Honeytrap" { if [type] == "Honeytrap" {
date { date {
@ -282,18 +345,14 @@ filter {
# Mailoney # Mailoney
if [type] == "Mailoney" { if [type] == "Mailoney" {
grok { date {
match => [ "message", "\A%{NAGIOSTIME}\[%{IPV4:src_ip}:%{INT:src_port:integer}] %{GREEDYDATA:smtp_input}" ] match => [ "timestamp", "ISO8601" ]
} }
mutate { mutate {
add_field => { add_field => {
"dest_port" => "25" "dest_port" => "25"
} }
} }
date {
match => [ "nagios_epoch", "UNIX" ]
remove_field => ["nagios_epoch"]
}
} }
# Medpot # Medpot
@ -354,12 +413,12 @@ if "_grokparsefailure" in [tags] { drop {} }
geoip { geoip {
cache_size => 10000 cache_size => 10000
source => "src_ip" source => "src_ip"
database => "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-filter-geoip-5.0.3-java/vendor/GeoLite2-City.mmdb" database => "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-filter-geoip-5.0.3-java/vendor/GeoLite2-City.mmdb"
} }
geoip { geoip {
cache_size => 10000 cache_size => 10000
source => "src_ip" source => "src_ip"
database => "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-filter-geoip-5.0.3-java/vendor/GeoLite2-ASN.mmdb" database => "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-filter-geoip-5.0.3-java/vendor/GeoLite2-ASN.mmdb"
} }
translate { translate {
refresh_interval => 86400 refresh_interval => 86400
@ -387,7 +446,7 @@ if "_grokparsefailure" in [tags] { drop {} }
} }
# Add T-Pot hostname and external IP # Add T-Pot hostname and external IP
if [type] == "Adbhoney" or [type] == "Ciscoasa" or [type] == "ConPot" or [type] == "Cowrie" or [type] == "Dionaea" or [type] == "ElasticPot" or [type] == "Glastopf" or [type] == "Glutton" or [type] == "Honeytrap" or [type] == "Heralding" or [type] == "Mailoney" or [type] == "Medpot" or [type] == "P0f" or [type] == "Rdpy" or [type] == "Suricata" or [type] == "Tanner" { if [type] == "Adbhoney" or [type] == "Ciscoasa" or [type] == "CitrixHoneypot" or [type] == "ConPot" or [type] == "Cowrie" or [type] == "Dionaea" or [type] == "ElasticPot" or [type] == "Fatt" or [type] == "Glutton" or [type] == "Honeytrap" or [type] == "Heralding" or [type] == "Honeypy" or [type] == "Mailoney" or [type] == "Medpot" or [type] == "P0f" or [type] == "Rdpy" or [type] == "Suricata" or [type] == "Tanner" {
mutate { mutate {
add_field => { add_field => {
"t-pot_ip_ext" => "${MY_EXTIP}" "t-pot_ip_ext" => "${MY_EXTIP}"
@ -406,14 +465,14 @@ output {
# document_type => "doc" # document_type => "doc"
} }
if [type] == "Suricata" { #if [type] == "Suricata" {
file { # file {
file_mode => 0760 # file_mode => 0770
path => "/data/suricata/log/suricata_ews.log" # path => "/data/suricata/log/suricata_ews.log"
} # }
} #}
# Debug output # Debug output
#if [type] == "XYZ" { #if [type] == "CitrixHoneypot" {
# stdout { # stdout {
# codec => rubydebug # codec => rubydebug
# } # }

View File

@ -6,7 +6,31 @@ function fuCLEANUP {
} }
trap fuCLEANUP EXIT trap fuCLEANUP EXIT
# Download updated translation maps # Check internet availability
cd /etc/listbot function fuCHECKINET () {
git pull --all --depth=1 mySITES=$1
cd / error=0
for i in $mySITES;
do
curl --connect-timeout 5 -Is $i 2>&1 > /dev/null
if [ $? -ne 0 ];
then
let error+=1
fi;
done;
echo $error
}
# Check for connectivity and download latest translation maps
myCHECK=$(fuCHECKINET "listbot.sicherheitstacho.eu")
if [ "$myCHECK" == "0" ];
then
echo "Connection to Listbot looks good, now downloading latest translation maps."
cd /etc/listbot
aria2c -s16 -x 16 https://listbot.sicherheitstacho.eu/cve.yaml.bz2 && \
aria2c -s16 -x 16 https://listbot.sicherheitstacho.eu/iprep.yaml.bz2 && \
bunzip2 -f *.bz2
cd /
else
echo "Cannot reach Listbot, starting Logstash without latest translation maps."
fi

View File

@ -12,7 +12,7 @@ services:
# condition: service_healthy # condition: service_healthy
env_file: env_file:
- /opt/tpot/etc/compose/elk_environment - /opt/tpot/etc/compose/elk_environment
image: "dtagdevsec/logstash:1811" image: "dtagdevsec/logstash:1903"
volumes: volumes:
- /data:/data - /data:/data
- /root/tpotce/docker/elk/logstash/dist/logstash.conf:/etc/logstash/conf.d/logstash.conf - /root/tpotce/docker/elk/logstash/dist/logstash.conf:/etc/logstash/conf.d/logstash.conf

View File

@ -1,53 +1,49 @@
FROM alpine FROM alpine
#
# Include dist # Include dist
ADD dist/ /root/dist/ ADD dist/ /root/dist/
#
# Install packages # Install packages
RUN apk -U --no-cache add \ RUN apk -U --no-cache add \
build-base \ build-base \
git \ git \
libffi-dev \ libffi-dev \
libssl1.0 \ libssl1.1 \
openssl-dev \ openssl-dev \
python-dev \ python3 \
py-cffi \ python3-dev \
py-ipaddress \ py3-cffi \
py-lxml \ py3-ipaddress \
py-mysqldb \ py3-lxml \
py-pip \ py3-mysqlclient \
py-pysqlite \ py3-requests \
py-requests \ py3-setuptools && \
py-setuptools && \ pip3 install --no-cache-dir -U pip && \
pip install --no-cache-dir -U pip && \ pip3 install --no-cache-dir configparser hpfeeds3 pyOpenSSL xmljson && \
pip install --no-cache-dir pyOpenSSL && \ #
# Setup ewsposter # Setup ewsposter
git clone --depth=1 https://github.com/rep/hpfeeds /opt/hpfeeds && \ git clone --depth=1 https://github.com/dtag-dev-sec/ewsposter /opt/ewsposter && \
cd /opt/hpfeeds && \
python setup.py install && \
git clone --depth=1 https://github.com/vorband/ewsposter /opt/ewsposter && \
mkdir -p /opt/ewsposter/spool /opt/ewsposter/log && \ mkdir -p /opt/ewsposter/spool /opt/ewsposter/log && \
#
# Setup user and groups # Setup user and groups
addgroup -g 2000 ews && \ addgroup -g 2000 ews && \
adduser -S -H -u 2000 -D -g 2000 ews && \ adduser -S -H -u 2000 -D -g 2000 ews && \
chown -R ews:ews /opt/ewsposter && \ chown -R ews:ews /opt/ewsposter && \
#
# Supply configs # Supply configs
mv /root/dist/ews.cfg /opt/ewsposter/ && \ mv /root/dist/ews.cfg /opt/ewsposter/ && \
mv /root/dist/*.pem /opt/ewsposter/ && \
#
# Clean up # Clean up
apk del build-base \ apk del build-base \
git \ git \
openssl-dev \ openssl-dev \
python-dev \ python3-dev \
py-pip \
py-setuptools && \ py-setuptools && \
rm -rf /root/* && \ rm -rf /root/* && \
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*
#
# Run ewsposter # Run ewsposter
STOPSIGNAL SIGINT STOPSIGNAL SIGINT
USER ews:ews USER ews:ews
CMD sleep 10 && exec /usr/bin/python -u /opt/ewsposter/ews.py -l 60 CMD sleep 10 && exec /usr/bin/python3 -u /opt/ewsposter/ews.py -l $(shuf -i 10-60 -n 1)

View File

@ -1,4 +1,4 @@
[![](https://images.microbadger.com/badges/version/dtagdevsec/ewsposter:1811.svg)](https://microbadger.com/images/dtagdevsec/ewsposter:1811 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/ewsposter:1811.svg)](https://microbadger.com/images/dtagdevsec/ewsposter:1811 "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/dtagdevsec/ewsposter:1903.svg)](https://microbadger.com/images/dtagdevsec/ewsposter:1903 "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/dtagdevsec/ewsposter:1903.svg)](https://microbadger.com/images/dtagdevsec/ewsposter:1903 "Get your own image badge on microbadger.com")
# ewsposter # ewsposter

View File

@ -18,12 +18,16 @@ rhost_second = https://community.sicherheitstacho.eu/ews-0.1/alert/postSimpleMes
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
@ -95,7 +99,7 @@ logfile = /data/elasticpot/log/elasticpot.log
[SURICATA] [SURICATA]
suricata = true suricata = true
nodeid = suricata-community-01 nodeid = suricata-community-01
logfile = /data/suricata/log/suricata_ews.log logfile = /data/suricata/log/eve.json
[MAILONEY] [MAILONEY]
mailoney = true mailoney = true
@ -126,3 +130,8 @@ logfile = /data/ciscoasa/log/ciscoasa.log
tanner = true tanner = true
nodeid = tanner-community-01 nodeid = tanner-community-01
logfile = /data/tanner/log/tanner_report.json logfile = /data/tanner/log/tanner_report.json
[GLUTTON]
glutton = true
nodeid = glutton-community-01
logfile = /data/glutton/log/glutton.log

70
docker/ews/dist/sissden.pem vendored Normal file
View File

@ -0,0 +1,70 @@
-----BEGIN CERTIFICATE-----
MIIGBDCCA+ygAwIBAgIBATANBgkqhkiG9w0BAQsFADCBnTEYMBYGA1UEAwwPU0lT
U0RFTiBSb290IENBMQswCQYDVQQGEwJQTDERMA8GA1UEBwwIV2Fyc3phd2ExLjAs
BgNVBAoMJU5hdWtvd2EgaSBBa2FkZW1pY2thIFNpZWMgS29tcHV0ZXJvd2ExEDAO
BgNVBAsMB1NJU1NERU4xHzAdBgkqhkiG9w0BCQEWEGFkbWluQHNpc3NkZW4uZXUw
HhcNMTcwNDExMTMxNDE2WhcNMjcwNDA5MTMxNDE2WjCBjTEbMBkGA1UEAwwSU0lT
U0RFTiBTZXJ2aWNlIENBMQswCQYDVQQGEwJQTDEfMB0GCSqGSIb3DQEJARYQYWRt
aW5Ac2lzc2Rlbi5ldTEuMCwGA1UECgwlTmF1a293YSBpIEFrYWRlbWlja2EgU2ll
YyBLb21wdXRlcm93YTEQMA4GA1UECwwHU0lTU0RFTjCCAiIwDQYJKoZIhvcNAQEB
BQADggIPADCCAgoCggIBAPFLjU6cLQoGz1s73QMPiRxYISCMUh3CXFe52Uim9a60
nkBDLfjMFW87MNhFCcE2xmxwdPPTz4+f5+DsEV3eZf0y63NxWx+RFV+UpODuEW5n
tWPFUDxmgKx6iAR/tyeLVNqmgtCnWzSthE0cg71dlil6onWvkMc+Wn5Kv6aXoz4e
5YVVhNsymhhrR0BntospY8EvtPm70hHAzOty957/zixOQ/MM+4SHRsWXTlKqv0K2
udWpkUy1Ihs3bpea2KAvn9bBWejFwy7K4q3LyhSyqwpVCYjNi+s+9z4ipSMfvAlT
FvHrMrODv/Iz/TQOfypYSlpX2gBP9WKLgOQj3wulJnMDQlvG1XNgOAqKfEF52YGF
eUu21UraRgDAguIIhWxRwgXenmRo8ngWjfk9Q8734PzzXt8cwzbxJWiJLMew1SiW
I+Kg8uYNGNT4mdBeUMo92S17ZNMXVnkt1TYfxT0A0ZlTCrhXPiWITtsVZXAdqFtl
j5hASmEcRYNgXEUQHBn13O9IinEmks2PEcqbbbKbs2Je0DS/JvxBkqES51UdsaVQ
zITKw3deCk0pISG8WDWZ97LEeDCvAKA5l/ooKjDwfS5vWw11mTUCOdhCoF0m8Lao
TwE1fzzNbSaqMsT6JF/n0ACabfuvF2aqCmWsZC/Hpw8LQQS62zOouCLdcqizL9+z
AgMBAAGjXTBbMAwGA1UdEwQFMAMBAf8wCwYDVR0PBAQDAgHuMB0GA1UdDgQWBBQ4
nurxBppBA5PTNvFFU/vhDr/NFzAfBgNVHSMEGDAWgBSDpRyQSgaBD5XvyFOA8YHH
tbUAbzANBgkqhkiG9w0BAQsFAAOCAgEAIvA2gkYsIVH7FGuoIo9RIxgwy7G/SHNC
Xllz6hyTx10UwbttJ+o4gdNt8WPuGnkmywFgsjL1//bFw2+fUO5IRvWKSmXzwx9N
faRJAjQT4JNx2uOW0ctw4USngPrLjXr3UrIQQlJFtZnEyT9u5VJXX8zkhfNJudyJ
N88YVrPEf6Gh1Q0P+yCX0rDEb3PlP2jsYyXZtcYA5kDQ6Qq7jpLT/zrjJdaPTmzh
2NUe7jJOBfZxPCoeev7meafY2vVOgqRqMz1+DZRoOgwq+ysczzRaXmd5a2p9Tabc
L1w5FXKNJQ4apszA0cEScI+4mBIIQ7VFT3GO098GOcYsC2MelRkgONAIyamm66AP
tvLQAKoiK/xz3sEHN4zaZvN/YVHaSYZEXUP0QHdyL62P62a92aCNyrHpzKURhEDA
n8cs6icxKrS4xuVa517m53zun0brjrfeltfbO7z1A2TstFYu9BHKzRuhwV9cGRHP
EDcb7PkfA/08sDHsyfsWtzIysNo3hwCmQ6gtOW5xlrGplFfwSsXmPG4SR3ByW379
RA5h3zzrO0g7iCvbLclqHoqLTJTMS+6U43qXjnQ7DJ+mcbhRGcMHcZVKqO3QmLm+
mmkDNzNYfTgY52D5mXJqUK50750mQ8dwMSkD2TufSAPmAPUp90LdQ8u9CIv6gQ+x
A08hDHJ1cdY=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIGHDCCBASgAwIBAgIJAPZqsOOroxaHMA0GCSqGSIb3DQEBCwUAMIGdMRgwFgYD
VQQDDA9TSVNTREVOIFJvb3QgQ0ExCzAJBgNVBAYTAlBMMREwDwYDVQQHDAhXYXJz
emF3YTEuMCwGA1UECgwlTmF1a293YSBpIEFrYWRlbWlja2EgU2llYyBLb21wdXRl
cm93YTEQMA4GA1UECwwHU0lTU0RFTjEfMB0GCSqGSIb3DQEJARYQYWRtaW5Ac2lz
c2Rlbi5ldTAeFw0xNzA0MTExMzA3NTZaFw0yNzA0MDkxMzA3NTZaMIGdMRgwFgYD
VQQDDA9TSVNTREVOIFJvb3QgQ0ExCzAJBgNVBAYTAlBMMREwDwYDVQQHDAhXYXJz
emF3YTEuMCwGA1UECgwlTmF1a293YSBpIEFrYWRlbWlja2EgU2llYyBLb21wdXRl
cm93YTEQMA4GA1UECwwHU0lTU0RFTjEfMB0GCSqGSIb3DQEJARYQYWRtaW5Ac2lz
c2Rlbi5ldTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANKT77EYYEhV
tJUnfnvQtGttfgqIzKIV2W6nPK9aDsKRTX5BVDHF6P5ZAF1u/52ATwdyTK7+LD66
Q/nCzyyA2kqTgdruX6VGucpD2DVVSVF6nZhV9PcISNaMXytoG2HHlqrim53E/rVa
rskColfs7oCxama6lPKZ/rqrJlVjA1Pl5ZtxR0IORjpOyZjSbSzKQwLp/JxHPMCU
2cVirS7aEu5UGj+Q7Ibg0AEyoAu5tnHBKun4hmIoo7LtKWNEe1TdboxOSboGJ5wd
UTEmNH+7izZ5FAogTUINjubkf2zZ65xEnN7DT/zFS30vYU1EclqCTp96EKPANogV
ZeBKntEN6M5azM6Q6+nFI56TV5DWHTIXm85zzeDj5JM7TQlIGTh8A5APHpr0YyUP
AiIUrixV2lqSDrjewey5qQcWV6WbjMS72OFKh/x7+UJICJhoUw+KwnPmWSq1WAlt
n7C+W0raSQzt7puI30LUkInKL6iEQebMoYg0eDRI5vsRIpbo+PzflIuk/Vea/D1Y
twgRc8ujoKI9GpPJyP4yO4nY7BkShLqKJ251lEJZnxq8LiFVi8aN6ZHt//OGEtVs
6L97cPzqFx7qx8vnyLBFk23lb8pilHK1G0nqxCCjakTruT/JgkLXnZcLu/IDSqd3
QLjJL0rmU9q6+RTH8A782pcBUNzeLKnlAgMBAAGjXTBbMAwGA1UdEwQFMAMBAf8w
CwYDVR0PBAQDAgHuMB0GA1UdDgQWBBSDpRyQSgaBD5XvyFOA8YHHtbUAbzAfBgNV
HSMEGDAWgBSDpRyQSgaBD5XvyFOA8YHHtbUAbzANBgkqhkiG9w0BAQsFAAOCAgEA
IA0U6znfPykr5PoQlXb/Wr4L5mY/ZtNAJsvJ8jwNMsj3ZlqLOJfnHHoG5LHkb2b/
xfM1Ee2ojmYBt4VDARqrHLLbup38Ivqt0aEco3Qx/WqbIR4IlvZBF+/qKF/wIUuc
CuBYNIy12PcLzafT+SJosj1BJ+XiUCj/RsVXIT5CxsdXIABWC+5b3T3/PrAtKk+C
sVjA/ck1KAHDd+3VUyRjLAAekYWA9C/hek3YwWQ3OvmyHos5gxifqMMDj6bx5qgv
AuIs4mYJlBlHE19GxRmo2TDwE0eZiUoUdavdRBbl9v7dex+AF2GegmnC1ouYc9kv
9moNBcuPFXuJMCOCU44aTpgEKRm3QTZTvVcUza251T+4kgT2wlFyzPqQ8hcpih4t
knlqHhNc9ibL3/qzWr093AgC9uNaNRqmqu1WAu3vs9g3DVb/RSMrUG/V0YS1GgPq
E+nVJ1AIJoee8YaxHztRfjPsmu1R3pp633lfcRPUKCkz52dZDFRPuQP36DuJzl2M
itTra0MtDUuRCsuJfVGe1op2wFprswLI0qy7O9N21D4Ab8g0ik+lhmpOf5DpYxmx
C2Xpe4d/5Xlg3wIYhEs5MnfeEy4lSMA4cxwJs11gVYHba62L7/5lqzpPmHdRYHu3
Vf0pM/6zniQpy58Pf9+9CNU15I3iWF5K3zmevFArd6s=
-----END CERTIFICATE-----

View File

@ -12,9 +12,19 @@ services:
restart: always restart: always
networks: networks:
- ewsposter_local - ewsposter_local
environment:
- EWS_HPFEEDS_ENABLE=false
- EWS_HPFEEDS_HOST=host
- EWS_HPFEEDS_PORT=port
- EWS_HPFEEDS_CHANNELS=channels
- EWS_HPFEEDS_IDENT=user
- EWS_HPFEEDS_SECRET=secret
- EWS_HPFEEDS_TLSCERT=/opt/ewsposter/ca.pem
- EWS_HPFEEDS_FORMAT=json
env_file: env_file:
- /opt/tpot/etc/compose/elk_environment - /opt/tpot/etc/compose/elk_environment
image: "dtagdevsec/ewsposter:1811" image: "dtagdevsec/ewsposter:1903"
volumes: volumes:
- /data:/data - /data:/data
- /data/ews/conf/ews.ip:/opt/ewsposter/ews.ip - /data/ews/conf/ews.ip:/opt/ewsposter/ews.ip

42
docker/fatt/Dockerfile Normal file
View File

@ -0,0 +1,42 @@
FROM alpine
#
# Include dist
#ADD dist/ /root/dist/
#
# Get and install dependencies & packages
RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
apk -U add \
git \
py3-libxml2 \
py3-lxml \
python3 \
python3-dev && \
apk -U add tshark --repository http://dl-3.alpinelinux.org/alpine/edge/community/ && \
#
# Setup user
addgroup -g 2000 fatt && \
adduser -S -s /bin/ash -u 2000 -D -g 2000 fatt && \
#
# Install fatt
mkdir -p /opt && \
cd /opt && \
git clone --depth=1 https://github.com/0x4D31/fatt && \
cd fatt && \
mkdir -p log && \
pip3 install --upgrade pip && \
pip3 install pyshark==0.4.2.2 && \
#
# Setup configs
chown fatt:fatt -R /opt/fatt/* && \
#
# Clean up
apk del --purge git \
python3-dev && \
rm -rf /root/* && \
rm -rf /var/cache/apk/*
#
# Start fatt
STOPSIGNAL SIGINT
ENV PYTHONPATH /opt/fatt
WORKDIR /opt/fatt
CMD python3 fatt.py -i $(/sbin/ip address | grep '^2: ' | awk '{ print $2 }' | tr -d [:punct:]) --print_output --json_logging -o log/fatt.log

View File

@ -0,0 +1,17 @@
version: '2.3'
services:
# Fatt service
fatt:
build: .
container_name: fatt
restart: always
network_mode: "host"
cap_add:
- NET_ADMIN
- SYS_NICE
- NET_RAW
image: "dtagdevsec/fatt:1903"
volumes:
- /data/fatt/log:/opt/fatt/log

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