Skip to content

Prepare T-Pot 18.11 Release #262

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 266 commits into from
Nov 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
266 commits
Select commit Hold shift + click to select a range
fc0f3ad
update conpot, pull from master
t3chn0m4g3 Feb 27, 2018
565ecdd
generate iptables rules dynamically from docker-compose.yml
t3chn0m4g3 Mar 15, 2018
eddd9c9
check for glutton
t3chn0m4g3 Mar 15, 2018
56a2075
tweaking for ubuntu 18.04 compatability
t3chn0m4g3 Mar 15, 2018
60cb42b
Update rules.sh
t3chn0m4g3 Mar 15, 2018
c9a3387
prep for 18.04
t3chn0m4g3 Mar 25, 2018
8257ae0
tweaking
t3chn0m4g3 Mar 25, 2018
136e741
tweaking
t3chn0m4g3 Mar 29, 2018
640f8e8
prepare some fixes, tweaking
t3chn0m4g3 Mar 29, 2018
a525289
modify installation types, tweaking
t3chn0m4g3 Mar 29, 2018
201aa85
rdpy add shuffle
t3chn0m4g3 Mar 29, 2018
df6e4dc
update logrotating, cleanup.sh, add Suricata ET Pro support, tweaking
t3chn0m4g3 Mar 30, 2018
594361a
tweaking
t3chn0m4g3 Mar 30, 2018
5c403a5
tweaking, hardening
t3chn0m4g3 Mar 30, 2018
4ee334a
tweaking
t3chn0m4g3 Mar 30, 2018
2f6a801
tweaking, hardening
t3chn0m4g3 Mar 31, 2018
13c56c6
tweaking, hardening
t3chn0m4g3 Mar 31, 2018
83fbc3e
start working on glutton
t3chn0m4g3 Apr 13, 2018
edfd5ea
tweaking glutton, automatic iptables rules
t3chn0m4g3 Apr 16, 2018
446880d
tweaking
t3chn0m4g3 Apr 16, 2018
d1756fa
playing with signals
t3chn0m4g3 Apr 16, 2018
004af6d
tweaking glutton, signals
t3chn0m4g3 Apr 17, 2018
06c7454
tweaking standard installation
t3chn0m4g3 Apr 17, 2018
6e07298
start on elk6.x
t3chn0m4g3 Apr 18, 2018
fd40fc9
elk 6.x
t3chn0m4g3 Apr 19, 2018
89d31ff
finalize elk6.x docker images
t3chn0m4g3 Apr 20, 2018
5e57233
add kibana visualization fixes
t3chn0m4g3 Apr 23, 2018
4bac26b
set magenta color
t3chn0m4g3 Apr 23, 2018
5d7afc8
include .kibana index in elasticdump backup
t3chn0m4g3 Apr 23, 2018
dbd7892
ci colors
t3chn0m4g3 Apr 24, 2018
063463b
heralding viz, dash finished
t3chn0m4g3 Apr 25, 2018
a944925
tweaking
t3chn0m4g3 Apr 26, 2018
40244d3
ciscoasa, tweaking, hardening, logging, logstash
t3chn0m4g3 Apr 27, 2018
915d3f1
ciscoasa tweaking, viz and dashboard finished
t3chn0m4g3 Apr 28, 2018
b1fbcd9
tweaking, hardening
t3chn0m4g3 May 4, 2018
85aa874
tweaking
t3chn0m4g3 May 4, 2018
a5745cb
tweaking
t3chn0m4g3 May 7, 2018
3b85238
tweaking
t3chn0m4g3 May 7, 2018
94af949
heralding tweaking
t3chn0m4g3 May 7, 2018
731e18d
tweaking
t3chn0m4g3 May 9, 2018
3bea740
tweaking
t3chn0m4g3 May 9, 2018
aa5751a
reduce ciscoasa image size
t3chn0m4g3 May 15, 2018
6119c3a
tweaking
t3chn0m4g3 May 15, 2018
4e1340a
reduce image size
t3chn0m4g3 May 15, 2018
213c3c8
tweaking
t3chn0m4g3 May 15, 2018
842bec2
tweaking
t3chn0m4g3 May 15, 2018
5447978
finetuning, tweaking
t3chn0m4g3 May 16, 2018
e72ef5c
finetuning, tweaking
t3chn0m4g3 May 16, 2018
3e4985d
tweaking
t3chn0m4g3 May 16, 2018
b151397
fix some compile errors, tweaking
t3chn0m4g3 May 17, 2018
4fde6ac
tweaking, hardening
t3chn0m4g3 May 18, 2018
913cccf
tweaking
t3chn0m4g3 May 18, 2018
1149973
tweaking, hardening
t3chn0m4g3 May 18, 2018
77cd9df
hardening
t3chn0m4g3 May 18, 2018
0e64b48
turn logging noiselevel down
t3chn0m4g3 May 18, 2018
779dc7f
cleanup
t3chn0m4g3 May 18, 2018
48b8915
hardening
t3chn0m4g3 May 19, 2018
eb55ad5
tweaking
t3chn0m4g3 May 19, 2018
84c51af
tweaking, hardening
t3chn0m4g3 May 19, 2018
7638fb8
tweaking
t3chn0m4g3 May 19, 2018
52cf2a6
tweaking
t3chn0m4g3 May 19, 2018
551a3c2
tweaking
t3chn0m4g3 May 19, 2018
a07776d
tweaking
t3chn0m4g3 May 19, 2018
4e8d629
tweaking, fix build error
t3chn0m4g3 May 19, 2018
fbe1fff
let mailoney run on tcp/25 within container
t3chn0m4g3 May 23, 2018
38fce34
tweaking
t3chn0m4g3 May 23, 2018
2128c6a
tweaking
t3chn0m4g3 May 23, 2018
e1c806e
tweaking
t3chn0m4g3 May 23, 2018
2f8cbcb
tweaking
t3chn0m4g3 May 23, 2018
35221f5
tweaking
t3chn0m4g3 May 23, 2018
b406c9b
include hpfeeds support
t3chn0m4g3 May 25, 2018
1b5e39e
tweaking
t3chn0m4g3 May 25, 2018
88e252f
tanner, snare, deps
t3chn0m4g3 May 26, 2018
4bbc63f
begin with hardening, tweaking
t3chn0m4g3 May 28, 2018
1b0d111
prepare for snare, tanner
t3chn0m4g3 May 28, 2018
5b11952
cleanup
t3chn0m4g3 May 28, 2018
a4bfa08
tweaking
t3chn0m4g3 May 28, 2018
cabd5a3
cleanup
t3chn0m4g3 May 28, 2018
428ee43
prepare for tanner
t3chn0m4g3 May 28, 2018
72313a6
include tanner patterns, tweaking
t3chn0m4g3 May 29, 2018
37424eb
cleanup
t3chn0m4g3 May 29, 2018
62b02a7
add hpfeeds support
t3chn0m4g3 May 30, 2018
fbc11fa
add hpfeeds broker for testing
t3chn0m4g3 May 30, 2018
e211a19
change ports, add emu_scripts.yaml, tweaking
t3chn0m4g3 Jun 4, 2018
e8621fb
tweaking
t3chn0m4g3 Jun 4, 2018
650b4a9
clean up
t3chn0m4g3 Jun 4, 2018
1a1231d
fix paths, permissions
t3chn0m4g3 Jun 4, 2018
52ecc76
performance tweak template
t3chn0m4g3 Jun 4, 2018
d3aab28
fix busybox ps command truncate
t3chn0m4g3 Jun 4, 2018
9acd877
add tanner, snare, dashboards, viz, searches
t3chn0m4g3 Jun 4, 2018
bf6fd94
merge hpfeeds changes from vorband
t3chn0m4g3 Jun 5, 2018
e901334
change repo
t3chn0m4g3 Jun 5, 2018
09ad194
just a push
t3chn0m4g3 Jun 7, 2018
42577b6
Editions
t3chn0m4g3 Jun 7, 2018
b008c84
docker, remove unused networks on startup
t3chn0m4g3 Jun 7, 2018
4cbd5e1
Add NG edition or ...
t3chn0m4g3 Jun 7, 2018
e623dbe
Continue work on editions.
t3chn0m4g3 Jun 11, 2018
c2baf27
speed up dps.sh
t3chn0m4g3 Jun 11, 2018
0d40ec4
Prepare install.sh for new editions. Needs testing.
t3chn0m4g3 Jun 11, 2018
a1f42bc
Update Architecture
t3chn0m4g3 Jun 11, 2018
97a4c2c
update link
t3chn0m4g3 Jun 13, 2018
eb6e877
Clone Dionaea 0.7.0 instead master
t3chn0m4g3 Jun 13, 2018
d047d1e
disable 3rd party plugins
t3chn0m4g3 Jun 13, 2018
d919d06
fix unresolved docker deps with package "pass"
t3chn0m4g3 Jun 13, 2018
6b0d07c
tweaking
t3chn0m4g3 Jun 14, 2018
95fdaeb
add config file for makeiso
t3chn0m4g3 Jun 15, 2018
cc187bf
fix
t3chn0m4g3 Jun 17, 2018
d0b22aa
some fixes
t3chn0m4g3 Jun 17, 2018
b9fd390
Include multitail
t3chn0m4g3 Jun 18, 2018
aaf3859
start work on universal installer
Jun 19, 2018
ab5d2bd
... continue working on installer
t3chn0m4g3 Jun 20, 2018
b500c8a
continue working on installer
t3chn0m4g3 Jun 21, 2018
1705f3d
Continue working on installer
t3chn0m4g3 Jun 22, 2018
96e02ee
add fail2ban to installer
t3chn0m4g3 Jun 22, 2018
d607779
continue working on installer
t3chn0m4g3 Jun 23, 2018
a6fa6f2
prepare for testing, remove breakpoints, clean up
t3chn0m4g3 Jun 23, 2018
cad11c4
Merge pull request #223 from dtag-dev-sec/installer
t3chn0m4g3 Jun 23, 2018
d07a128
tweaking
t3chn0m4g3 Jun 23, 2018
a13f06f
update ews for tanner
t3chn0m4g3 Jun 23, 2018
081397b
Update txt.cfg
t3chn0m4g3 Jun 23, 2018
9d9af24
tweaking and fixes
t3chn0m4g3 Jun 23, 2018
b9245ae
fix typo
t3chn0m4g3 Jun 24, 2018
7e66378
tweaking
t3chn0m4g3 Jun 24, 2018
0862fdf
tweaking
t3chn0m4g3 Jun 24, 2018
1dd57d8
NGINX logs are in /data/nginx/log/
t3chn0m4g3 Jun 24, 2018
9002447
clean up
t3chn0m4g3 Jun 24, 2018
e5f5396
cleanup, fix hostname
t3chn0m4g3 Jun 24, 2018
cd55b3c
update logfile for tanner in ews
t3chn0m4g3 Jun 24, 2018
51a2b65
bump versions
t3chn0m4g3 Jun 25, 2018
b19aa6d
update favicon
t3chn0m4g3 Jun 26, 2018
804f47f
Fix IPv6 error
t3chn0m4g3 Jun 26, 2018
b8a6500
Update favicon
t3chn0m4g3 Jun 26, 2018
b40acd5
Fix a systemd error
t3chn0m4g3 Jun 26, 2018
00482df
Bump ELK Stack to 6.3.0
t3chn0m4g3 Jun 26, 2018
3811275
Fix ci logo
t3chn0m4g3 Jun 28, 2018
ac47c7b
static link to compose.ymls
t3chn0m4g3 Jun 28, 2018
7e15e1b
tweaking
t3chn0m4g3 Jun 29, 2018
992f2a0
continue tweaking installer
t3chn0m4g3 Jun 30, 2018
3516520
Merge pull request #226 from dtag-dev-sec/tweaking
t3chn0m4g3 Jun 30, 2018
d91714c
add cyberchef as tool
listbot Jul 12, 2018
0373d71
Update Dionaea to version 0.8.0
t3chn0m4g3 Jul 31, 2018
1978414
Add cyberchef to docker-compose configs / T-Pot flavors
t3chn0m4g3 Jul 31, 2018
7945961
Bump ELK to 6.3.2
t3chn0m4g3 Jul 31, 2018
67d5c5a
get FQDN for ES head from open window
t3chn0m4g3 Aug 1, 2018
a5f027e
update glutton
t3chn0m4g3 Aug 2, 2018
a6d996d
fix kibana ci color for highlighted elements
t3chn0m4g3 Aug 2, 2018
78adc5a
bump snare to 0.3.0
t3chn0m4g3 Aug 2, 2018
00e909e
bump tanner to 0.6.0
t3chn0m4g3 Aug 7, 2018
3d259bb
tanner finetuning
t3chn0m4g3 Aug 8, 2018
f6a30dd
update ews.cfg
t3chn0m4g3 Aug 8, 2018
a75cf7e
begin working on update feature
t3chn0m4g3 Aug 8, 2018
2e944a9
update
t3chn0m4g3 Aug 8, 2018
06a6954
Begin updating README
t3chn0m4g3 Aug 9, 2018
02bf508
Update README.md
t3chn0m4g3 Aug 10, 2018
13a991f
Add files via upload
t3chn0m4g3 Aug 13, 2018
0463dee
Update README.md
t3chn0m4g3 Aug 13, 2018
a4635d2
Add files via upload
t3chn0m4g3 Aug 13, 2018
bd52a53
Update README.md
t3chn0m4g3 Aug 13, 2018
ff1a857
Add files via upload
t3chn0m4g3 Aug 13, 2018
e2613e7
add 10 personas for snare
t3chn0m4g3 Aug 14, 2018
6b77e64
tweaking updater, conpot
listbot Aug 20, 2018
8a689c9
tweaking
t3chn0m4g3 Aug 21, 2018
9a1a732
update
t3chn0m4g3 Aug 21, 2018
ae71319
update
t3chn0m4g3 Aug 21, 2018
f417872
Update update.sh
t3chn0m4g3 Aug 21, 2018
a8a5c8c
tweaking
t3chn0m4g3 Aug 21, 2018
8473f1f
tweaking
t3chn0m4g3 Aug 21, 2018
5ce77c6
snare tweaking, change ports
t3chn0m4g3 Aug 21, 2018
a2afdcd
add daemon reload to avoid error if user wants to start tpot without …
t3chn0m4g3 Aug 21, 2018
bce7118
ensure update functionality if update.sh was not changed.
t3chn0m4g3 Aug 21, 2018
25ec9be
test
t3chn0m4g3 Aug 21, 2018
ee49273
test2
t3chn0m4g3 Aug 21, 2018
d02e347
bump conpot to 0.6.x
listbot Aug 22, 2018
ec1f666
add ftp, ftfp to industrial compose file
listbot Aug 22, 2018
ea1bf60
tweaking conpot
listbot Aug 24, 2018
59c8c5b
bump ELK to 6.4.0
listbot Aug 24, 2018
7255a3d
tweak update.sh
listbot Aug 24, 2018
d19d382
prevent status field from being indexed as string
t3chn0m4g3 Aug 28, 2018
79bb324
rename conpot fields to match index pattern
t3chn0m4g3 Aug 28, 2018
775c7ae
conpot cleanup
listbot Aug 28, 2018
b2883b5
fix glastopf folder permissions on install
t3chn0m4g3 Aug 29, 2018
64fed3d
tweaking
t3chn0m4g3 Aug 29, 2018
5fcb7ed
glutton structured json logging
t3chn0m4g3 Aug 30, 2018
a4ead73
cleanup
t3chn0m4g3 Aug 30, 2018
28fd853
upstream changes
t3chn0m4g3 Aug 30, 2018
7c66579
fix port
t3chn0m4g3 Sep 3, 2018
0abb518
update glutton
t3chn0m4g3 Sep 3, 2018
660a046
tweaking
t3chn0m4g3 Sep 3, 2018
cac981f
Update README.md
t3chn0m4g3 Sep 3, 2018
47ab206
clean up dockerfile, prepare for s
t3chn0m4g3 Sep 4, 2018
6869ceb
Update Dockerfile
t3chn0m4g3 Sep 4, 2018
39fb972
add medpot
t3chn0m4g3 Sep 9, 2018
8b4a233
prepare installer for medpot
t3chn0m4g3 Sep 9, 2018
f0f6981
add medpot to ELK
t3chn0m4g3 Sep 10, 2018
992d453
medpot tweaking
t3chn0m4g3 Sep 11, 2018
0c86bd9
tweaking
t3chn0m4g3 Sep 11, 2018
7591b34
remove vnclowpot from 18.10 editions
t3chn0m4g3 Sep 11, 2018
14c9585
cleaning up
t3chn0m4g3 Sep 11, 2018
0ba2258
fix bugs
t3chn0m4g3 Sep 12, 2018
5c89e16
fix bugs, get rid of confusing docker error message
t3chn0m4g3 Sep 12, 2018
4de81cf
fix bugs, get rid of confusing docker error message
t3chn0m4g3 Sep 12, 2018
c46d3e4
bump elk to 6.4.2
t3chn0m4g3 Oct 12, 2018
fb012ae
tls v1.3 testing
t3chn0m4g3 Oct 29, 2018
8b63eaf
fix bugs
t3chn0m4g3 Oct 29, 2018
546dad3
prevent interaction for dist-upgrade
t3chn0m4g3 Oct 29, 2018
acb9aa4
no reboot in auto or user mode
t3chn0m4g3 Oct 29, 2018
89a1553
add trailing slash
t3chn0m4g3 Oct 30, 2018
ccfedf5
do not break looks of UI
t3chn0m4g3 Oct 30, 2018
618b94e
tweaking
t3chn0m4g3 Oct 30, 2018
2f67e97
link installer
t3chn0m4g3 Oct 30, 2018
13e86a0
tweaking, fixes
t3chn0m4g3 Oct 30, 2018
5890fa4
fix PS1 for non tsec user
t3chn0m4g3 Nov 1, 2018
eefa093
fix reboot issue
t3chn0m4g3 Nov 8, 2018
106193f
fix for CVE-2018-17244
t3chn0m4g3 Nov 9, 2018
5754c79
clean up log sources
t3chn0m4g3 Nov 13, 2018
7d7bdd2
open links in new window or tab
listbot Nov 15, 2018
3cca47b
tweaking
listbot Nov 15, 2018
373c64e
remove interactions from update
t3chn0m4g3 Nov 15, 2018
4fa6ed7
tweaking
t3chn0m4g3 Nov 15, 2018
53383f7
rename fields
t3chn0m4g3 Nov 19, 2018
ed921d3
cleaning up
t3chn0m4g3 Nov 19, 2018
bf1bfcd
Add files via upload
t3chn0m4g3 Nov 19, 2018
4cda722
Add files via upload
t3chn0m4g3 Nov 19, 2018
870c640
tweaking
t3chn0m4g3 Nov 19, 2018
4c1649d
fix deps, tweaking
t3chn0m4g3 Nov 19, 2018
16b3dcb
testing
t3chn0m4g3 Nov 19, 2018
4ca50f5
Add files via upload
t3chn0m4g3 Nov 20, 2018
2620b94
tweaking
t3chn0m4g3 Nov 20, 2018
ece169d
update docker-compose files
t3chn0m4g3 Nov 21, 2018
9a834c5
avoid error on docker hub
t3chn0m4g3 Nov 21, 2018
b978065
fix ewsposter deps
t3chn0m4g3 Nov 21, 2018
d6a700d
fix conpot
t3chn0m4g3 Nov 21, 2018
ca9b569
update script need to take care of prev. version images
t3chn0m4g3 Nov 21, 2018
d0aae74
tweaking
t3chn0m4g3 Nov 21, 2018
2562533
Add files via upload
t3chn0m4g3 Nov 21, 2018
fc73d38
update logo
t3chn0m4g3 Nov 21, 2018
32a03cb
fix typo
t3chn0m4g3 Nov 21, 2018
b1ee78b
change boot label
t3chn0m4g3 Nov 21, 2018
5e83456
bump elk stack to 6.5.1
t3chn0m4g3 Nov 22, 2018
d14205b
dashboard tuning after bump to elk 6.5.1
t3chn0m4g3 Nov 23, 2018
c85f921
tweaking
t3chn0m4g3 Nov 23, 2018
bc7f9ad
Update docs, installer, tweaking
t3chn0m4g3 Nov 23, 2018
aa17604
change defaults for kibana.yml
t3chn0m4g3 Nov 23, 2018
1c8074b
update docs, screenshots
t3chn0m4g3 Nov 24, 2018
e939bb3
Update README.md
t3chn0m4g3 Nov 24, 2018
afbe22d
tweaking
t3chn0m4g3 Nov 26, 2018
a4e63de
Update docs
t3chn0m4g3 Nov 27, 2018
bb22388
fix typo
t3chn0m4g3 Nov 27, 2018
5801c2a
point installer to master
t3chn0m4g3 Nov 27, 2018
6613244
Merge branch 'master' into 18.04
t3chn0m4g3 Nov 27, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .DS_Store
Binary file not shown.
13 changes: 3 additions & 10 deletions CONTRIBUTING.MD
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,25 @@ Thank you for your decision to contribute to T-Pot.

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 [FAQ](#faq)
- [ ] 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="faq"></a>
### FAQ

##### Where can I find the honeypot logs?
###### The honeypot logs are located in `/data/`. You have to login via ssh and run `sudo su -` and then `cd /data/`. Do not change any permissions here or T-Pot will fail to work.

-


<a name="info"></a>
### Basic support information

- What T-Pot version are you currtently using?
- 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 available (login via ssh and run `htop`)?
- 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`)?
Expand Down
432 changes: 242 additions & 190 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions bin/backup_es_folders.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ myES="http://127.0.0.1:64298/"
myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c green)
if ! [ "$myESSTATUS" = "1" ]
then
echo "### Elasticsearch is not available, try starting via 'systemctl start elk'."
echo "### Elasticsearch is not available, try starting via 'systemctl start tpot'."
exit
else
echo "### Elasticsearch is available, now continuing."
Expand All @@ -16,7 +16,7 @@ fi
myCOUNT=1
myDATE=$(date +%Y%m%d%H%M)
myELKPATH="/data/elk/data"
myKIBANAINDEXNAME=$(curl -s -XGET ''$myES'_cat/indices/' | grep .kibana | awk '{ print $4 }')
myKIBANAINDEXNAME=$(curl -s -XGET ''$myES'_cat/indices/' | grep -w ".kibana_1" | awk '{ print $4 }')
myKIBANAINDEXPATH=$myELKPATH/nodes/0/indices/$myKIBANAINDEXNAME

# Let's ensure normal operation on exit or if interrupted ...
Expand Down
91 changes: 65 additions & 26 deletions bin/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@ fuLOGROTATE () {
local myHONEYTRAPATTACKSTGZ="/data/honeytrap/attacks.tgz"
local myHONEYTRAPDL="/data/honeytrap/downloads/"
local myHONEYTRAPDLTGZ="/data/honeytrap/downloads.tgz"
local myTANNERF="/data/tanner/files/"
local myTANNERFTGZ="/data/tanner/files.tgz"

# Ensure correct permissions and ownerships for logrotate to run without issues
chmod 760 /data/ -R
chown tpot:tpot /data -R
chmod 644 /data/nginx/conf -R
chmod 644 /data/nginx/cert -R

# Run logrotate with force (-f) first, so the status file can be written and race conditions (with tar) be avoided
logrotate -f -s $mySTATUS $myCONF
Expand All @@ -47,23 +51,32 @@ if [ "$(fuEMPTY $myDIONAEABI)" != "0" ]; then tar cvfz $myDIONAEABITGZ $myDIONAE
if [ "$(fuEMPTY $myDIONAEABIN)" != "0" ]; then tar cvfz $myDIONAEABINTGZ $myDIONAEABIN; fi
if [ "$(fuEMPTY $myHONEYTRAPATTACKS)" != "0" ]; then tar cvfz $myHONEYTRAPATTACKSTGZ $myHONEYTRAPATTACKS; fi
if [ "$(fuEMPTY $myHONEYTRAPDL)" != "0" ]; then tar cvfz $myHONEYTRAPDLTGZ $myHONEYTRAPDL; fi
if [ "$(fuEMPTY $myTANNERF)" != "0" ]; then tar cvfz $myTANNERFTGZ $myTANNERF; fi

# Ensure correct permissions and ownership for previously created archives
chmod 760 $myCOWRIETTYTGZ $myCOWRIEDLTGZ $myDIONAEABITGZ $myDIONAEABINTGZ $myHONEYTRAPATTACKSTGZ $myHONEYTRAPDLTGZ
chown tpot:tpot $myCOWRIETTYTGZ $myCOWRIEDLTGZ $myDIONAEABITGZ $myDIONAEABINTGZ $myHONEYTRAPATTACKSTGZ $myHONEYTRAPDLTGZ
chmod 760 $myCOWRIETTYTGZ $myCOWRIEDLTGZ $myDIONAEABITGZ $myDIONAEABINTGZ $myHONEYTRAPATTACKSTGZ $myHONEYTRAPDLTGZ $myTANNERFTGZ
chown tpot:tpot $myCOWRIETTYTGZ $myCOWRIEDLTGZ $myDIONAEABITGZ $myDIONAEABINTGZ $myHONEYTRAPATTACKSTGZ $myHONEYTRAPDLTGZ $myTANNERFTGZ

# Need to remove subfolders since too many files cause rm to exit with errors
rm -rf $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL
rm -rf $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL $myTANNERF

# Recreate subfolders with correct permissions and ownership
mkdir -p $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL
chmod 760 $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL
chown tpot:tpot $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL
mkdir -p $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL $myTANNERF
chmod 760 $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL $myTANNERF
chown tpot:tpot $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL $myTANNERF

# Run logrotate again to account for previously created archives - DO NOT FORCE HERE!
logrotate -s $mySTATUS $myCONF
}

# Let's create a function to clean up and prepare ciscoasa data
fuCISCOASA () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/ciscoasa/*; fi
mkdir -p /data/ciscoasa/log
chmod 760 /data/ciscoasa -R
chown tpot:tpot /data/ciscoasa -R
}

# Let's create a function to clean up and prepare conpot data
fuCONPOT () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/conpot/*; fi
Expand Down Expand Up @@ -101,27 +114,35 @@ fuELK () {
# ELK data will be kept for <= 90 days, check /etc/crontab for curator modification
# ELK daemon log files will be removed
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/elk/log/*; fi
mkdir -p /data/elk
mkdir -p /data/elk
chmod 760 /data/elk -R
chown tpot:tpot /data/elk -R
}

# Let's create a function to clean up and prepare emobility data
fuEMOBILITY () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/emobility/*; fi
mkdir -p /data/emobility/log
chmod 760 /data/emobility -R
chown tpot:tpot /data/emobility -R
}

# Let's create a function to clean up and prepare glastopf data
fuGLASTOPF () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/glastopf/*; fi
mkdir -p /data/glastopf
mkdir -p /data/glastopf/db /data/glastopf/log
chmod 760 /data/glastopf -R
chown tpot:tpot /data/glastopf -R
}

# Let's create a function to clean up and prepare glastopf data
fuGLUTTON () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/glutton/*; fi
mkdir -p /data/glutton/log
chmod 760 /data/glutton -R
chown tpot:tpot /data/glutton -R
}

# Let's create a function to clean up and prepare heralding data
fuHERALDING () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/heralding/*; fi
mkdir -p /data/heralding/log
chmod 760 /data/heralding -R
chown tpot:tpot /data/heralding -R
}

# Let's create a function to clean up and prepare honeytrap data
fuHONEYTRAP () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/honeytrap/*; fi
Expand All @@ -138,6 +159,22 @@ fuMAILONEY () {
chown tpot:tpot /data/mailoney/ -R
}

# Let's create a function to clean up and prepare mailoney data
fuMEDPOT () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/medpot/*; fi
mkdir -p /data/medpot/log/
chmod 760 /data/medpot/ -R
chown tpot:tpot /data/medpot/ -R
}

# Let's create a function to clean up nginx logs
fuNGINX () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/nginx/log/*; fi
touch /data/nginx/log/error.log
chmod 644 /data/nginx/conf -R
chmod 644 /data/nginx/cert -R
}

# Let's create a function to clean up and prepare rdpy data
fuRDPY () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/rdpy/*; fi
Expand Down Expand Up @@ -170,15 +207,14 @@ fuP0F () {
chown tpot:tpot -R /data/p0f
}

# Let's create a function to clean up and prepare vnclowpot data
fuVNCLOWPOT () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/vnclowpot/*; fi
mkdir -p /data/vnclowpot/log/
chmod 760 /data/vnclowpot/ -R
chown tpot:tpot /data/vnclowpot/ -R
# Let's create a function to clean up and prepare p0f data
fuTANNER () {
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/tanner/*; fi
mkdir -p /data/tanner/log /data/tanner/files
chmod 760 -R /data/tanner
chown tpot:tpot -R /data/tanner
}


# Avoid unwanted cleaning
if [ "$myPERSISTENCE" = "" ];
then
Expand All @@ -201,19 +237,22 @@ if [ "$myPERSISTENCE" = "on" ];
fuLOGROTATE
else
echo "Cleaning up and preparing data folders."
fuCISCOASA
fuCONPOT
fuCOWRIE
fuDIONAEA
fuELASTICPOT
fuELK
fuEMOBILITY
fuGLASTOPF
fuGLUTTON
fuHERALDING
fuHONEYTRAP
fuMAILONEY
fuMEDPOT
fuNGINX
fuRDPY
fuSPIDERFOOT
fuSURICATA
fuP0F
fuVNCLOWPOT
fuTANNER
fi

59 changes: 17 additions & 42 deletions bin/dps.sh
Original file line number Diff line number Diff line change
@@ -1,44 +1,15 @@
#/bin/bash
# Show current status of all running containers
# Show current status of T-Pot containers
myPARAM="$1"
myIMAGES="$(cat /opt/tpot/etc/tpot.yml | grep -v '#' | grep container_name | cut -d: -f2)"
myCONTAINERS="$(cat /opt/tpot/etc/tpot.yml | grep -v '#' | grep container_name | cut -d: -f2 | sort | tr -d " ")"
myRED=""
myGREEN=""
myBLUE=""
myWHITE=""
myMAGENTA=""

function fuCONTAINERSTATUS {
local myNAME="$1"
local mySTATUS="$(/usr/bin/docker ps -f name=$myNAME --format "table {{.Status}}" -f status=running -f status=exited | tail -n 1)"
myDOWN="$(echo "$mySTATUS" | grep -o -E "(STATUS|NAMES|Exited)")"

case "$myDOWN" in
STATUS)
mySTATUS="$myRED"DOWN"$myWHITE"
;;
NAMES)
mySTATUS="$myRED"DOWN"$myWHITE"
;;
Exited)
mySTATUS="$myRED$mySTATUS$myWHITE"
;;
*)
mySTATUS="$myGREEN$mySTATUS$myWHITE"
;;
esac

printf "$mySTATUS"
}

function fuCONTAINERPORTS {
local myNAME="$1"
local myPORTS="$(/usr/bin/docker ps -f name=$myNAME --format "table {{.Ports}}" -f status=running -f status=exited | tail -n 1 | sed s/","/",\n\t\t\t\t\t\t\t"/g)"

if [ "$myPORTS" != "PORTS" ];
then
printf "$myBLUE$myPORTS$myWHITE"
fi
function fuGETSTATUS {
grc docker ps -f status=running -f status=exited --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" | grep -v "NAME" | sort
}

function fuGETSYS {
Expand All @@ -51,16 +22,20 @@ echo

while true
do
myDPS=$(fuGETSTATUS)
myDPSNAMES=$(echo "$myDPS" | awk '{ print $1 }' | sort)
fuGETSYS
printf "%-19s %-36s %s\n" "NAME" "STATUS" "PORTS"
for i in $myIMAGES; do
myNAME="$myMAGENTA$i$myWHITE"
printf "%-32s %-49s %s" "$myNAME" "$(fuCONTAINERSTATUS $i)" "$(fuCONTAINERPORTS $i)"
echo
if [ "$myPARAM" = "vv" ];
then
/usr/bin/docker exec -t "$i" /bin/ps awfuwfxwf | egrep -v -E "awfuwfxwf|/bin/ps"
fi
printf "%-21s %-28s %s\n" "NAME" "STATUS" "PORTS"
if [ "$myDPS" != "" ];
then
echo "$myDPS"
fi
for i in $myCONTAINERS; do
myAVAIL=$(echo "$myDPSNAMES" | grep -o "$i" | uniq | wc -l)
if [ "$myAVAIL" = "0" ];
then
printf "%-28s %-28s\n" "$myRED$i" "DOWN$myWHITE"
fi
done
if [[ $myPARAM =~ ^([1-9]|[1-9][0-9]|[1-9][0-9][0-9])$ ]];
then
Expand Down
4 changes: 2 additions & 2 deletions bin/dump_es.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ trap fuCLEANUP EXIT

# Set vars
myDATE=$(date +%Y%m%d%H%M)
myINDICES=$(curl -s -XGET ''$myES'_cat/indices/' | grep logstash | awk '{ print $3 }' | sort | grep -v 1970)
myINDICES=$(curl -s -XGET ''$myES'_cat/indices/' | awk '{ print $3 }' | sort | grep -v 1970)
myES="http://127.0.0.1:64298/"
myCOL1=""
myCOL0=""
Expand All @@ -41,5 +41,5 @@ for i in $myINDICES;

# Build tar archive
echo $myCOL1"### Now building tar archive: es_dump_"$myDATE".tgz" $myCOL0
tar cvf es_dump_$myDATE.tar tmp/*
tar cvf es_dump_$myDATE.tar tmp/.
echo $myCOL1"### Done."$myCOL0
25 changes: 15 additions & 10 deletions bin/export_kibana-objects.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
# Export all Kibana objects
# Export all Kibana objects through Kibana Saved Objects API
# Make sure ES is available
myES="http://127.0.0.1:64298/"
myKIBANA="http://127.0.0.1:64296/"
myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c green)
if ! [ "$myESSTATUS" = "1" ]
then
Expand All @@ -14,10 +15,11 @@ fi

# Set vars
myDATE=$(date +%Y%m%d%H%M)
myINDEXCOUNT=$(curl -s -XGET ''$myES'.kibana/index-pattern/logstash-*' | tr '\\' '\n' | grep "scripted" | wc -w)
myDASHBOARDS=$(curl -s -XGET ''$myES'.kibana/dashboard/_search?filter_path=hits.hits._id&pretty&size=10000' | jq '.hits.hits[] | {_id}' | jq -r '._id')
myVISUALIZATIONS=$(curl -s -XGET ''$myES'.kibana/visualization/_search?filter_path=hits.hits._id&pretty&size=10000' | jq '.hits.hits[] | {_id}' | jq -r '._id')
mySEARCHES=$(curl -s -XGET ''$myES'.kibana/search/_search?filter_path=hits.hits._id&pretty&size=10000' | jq '.hits.hits[] | {_id}' | jq -r '._id')
myINDEXCOUNT=$(curl -s -XGET ''$myKIBANA'api/saved_objects/_find?type=index-pattern' | jq '.saved_objects[].attributes' | tr '\\' '\n' | grep "scripted" | wc -w)
myINDEXID=$(curl -s -XGET ''$myKIBANA'api/saved_objects/_find?type=index-pattern' | jq '.saved_objects[].id' | tr -d '"')
myDASHBOARDS=$(curl -s -XGET ''$myKIBANA'api/saved_objects/_find?type=dashboard&per_page=300' | jq '.saved_objects[].id' | tr -d '"')
myVISUALIZATIONS=$(curl -s -XGET ''$myKIBANA'api/saved_objects/_find?type=visualization&per_page=300' | jq '.saved_objects[].id' | tr -d '"')
mySEARCHES=$(curl -s -XGET ''$myKIBANA'api/saved_objects/_find?type=search&per_page=300' | jq '.saved_objects[].id' | tr -d '"')
myCOL1=""
myCOL0=""

Expand All @@ -29,8 +31,8 @@ trap fuCLEANUP EXIT

# Export index patterns
mkdir -p patterns
echo $myCOL1"### Now exporting"$myCOL0 $myINDEXCOUNT $myCOL1"index patterns." $myCOL0
curl -s -XGET ''$myES'.kibana/index-pattern/logstash-*?' | jq '._source' > patterns/index-patterns.json
echo $myCOL1"### Now exporting"$myCOL0 $myINDEXCOUNT $myCOL1"index pattern fields." $myCOL0
curl -s -XGET ''$myKIBANA'api/saved_objects/index-pattern/'$myINDEXID'' | jq '. | {attributes}' > patterns/$myINDEXID.json &
echo

# Export dashboards
Expand All @@ -39,7 +41,7 @@ echo $myCOL1"### Now exporting"$myCOL0 $(echo $myDASHBOARDS | wc -w) $myCOL1"das
for i in $myDASHBOARDS;
do
echo $myCOL1"###### "$i $myCOL0
curl -s -XGET ''$myES'.kibana/dashboard/'$i'' | jq '._source' > dashboards/$i.json
curl -s -XGET ''$myKIBANA'api/saved_objects/dashboard/'$i'' | jq '. | {attributes}' > dashboards/$i.json &
done;
echo

Expand All @@ -49,7 +51,7 @@ echo $myCOL1"### Now exporting"$myCOL0 $(echo $myVISUALIZATIONS | wc -w) $myCOL1
for i in $myVISUALIZATIONS;
do
echo $myCOL1"###### "$i $myCOL0
curl -s -XGET ''$myES'.kibana/visualization/'$i'' | jq '._source' > visualizations/$i.json
curl -s -XGET ''$myKIBANA'api/saved_objects/visualization/'$i'' | jq '. | {attributes}' > visualizations/$i.json &
done;
echo

Expand All @@ -59,10 +61,13 @@ echo $myCOL1"### Now exporting"$myCOL0 $(echo $mySEARCHES | wc -w) $myCOL1"searc
for i in $mySEARCHES;
do
echo $myCOL1"###### "$i $myCOL0
curl -s -XGET ''$myES'.kibana/search/'$i'' | jq '._source' > searches/$i.json
curl -s -XGET ''$myKIBANA'api/saved_objects/search/'$i'' | jq '. | {attributes}' > searches/$i.json &
done;
echo

# Wait for background exports to finish
wait

# Building tar archive
echo $myCOL1"### Now building archive"$myCOL0 "kibana-objects_"$myDATE".tgz"
tar cvfz kibana-objects_$myDATE.tgz patterns dashboards visualizations searches > /dev/null
Expand Down
Loading