Compare commits
456 Commits
19.03.beta
...
19.03.3
Author | SHA1 | Date | |
---|---|---|---|
e588e62815 | |||
20cdb4f454 | |||
9d7b37b126 | |||
62aae45dd6 | |||
21d48ca2bb | |||
80ee3cc5dd | |||
67e70780bf | |||
5bbebd6fc4 | |||
cc70144c41 | |||
140a3d22ac | |||
6a1f4f9aea | |||
4409d9cdac | |||
1452ca4e4c | |||
313df2f644 | |||
f6503cce3c | |||
5badf352be | |||
2201e072f6 | |||
5192ce1dc7 | |||
5319c548ad | |||
c32a150c51 | |||
e77d24db08 | |||
857190ec20 | |||
809d598076 | |||
9a64c88aba | |||
af3242e8d5 | |||
5ddf1fdd07 | |||
020d4e9738 | |||
7081bafb6e | |||
fb06c46793 | |||
f76d8ab161 | |||
a256ecedc8 | |||
fb3777141b | |||
a18304dfdc | |||
6a703544c6 | |||
941a0e1587 | |||
692a21ddb1 | |||
df22adb45d | |||
07c68c85bb | |||
a4227e6a9f | |||
3b8c959c66 | |||
5d7a6f3270 | |||
ee1342ce2a | |||
53e9470d58 | |||
21c68f75e2 | |||
bf7d1299ca | |||
70dca02ce4 | |||
6bfcf8b1c4 | |||
b7b6e9fa0e | |||
d889651d63 | |||
bd0e6936eb | |||
545209dce6 | |||
153f7be9dc | |||
faa5667246 | |||
aa4a93684d | |||
f11ad6b523 | |||
a49d560809 | |||
f2abb1d1bd | |||
b31225b97c | |||
ad861200de | |||
5ce5911ec1 | |||
b9da9f04af | |||
92c0543c55 | |||
984ba958fb | |||
2d249ac6b1 | |||
64729f5064 | |||
5a4724bcba | |||
64907a2eba | |||
fa0fdbb579 | |||
1e47497c30 | |||
a3e0c51493 | |||
33222a92b6 | |||
1167231560 | |||
62b519999e | |||
8b19228d99 | |||
2d16a9c9f6 | |||
95a075e764 | |||
dc75b5567a | |||
d643ca7a01 | |||
f110eb08b0 | |||
a470a7b12f | |||
c7eed86bd7 | |||
20d6c6ab7f | |||
b033d515c6 | |||
1d0aad3b34 | |||
a6ed6613a5 | |||
a953542f8f | |||
be3e998a92 | |||
1bc514a067 | |||
9ad83fae51 | |||
e803d188c9 | |||
8a844e6dd3 | |||
0ef2b083fc | |||
755cbb77db | |||
3498f3e635 | |||
2ed0f939d1 | |||
af3ef271d4 | |||
3713139fc6 | |||
0928e37326 | |||
f7a6a30c90 | |||
ec46dc9ab0 | |||
7c5fc000c0 | |||
64628c1293 | |||
29d223865f | |||
0ed60329b8 | |||
1442a257e5 | |||
a1d903db01 | |||
756215519c | |||
659831cf99 | |||
a370e2b414 | |||
f4a078c443 | |||
02bdc8194a | |||
878538e3df | |||
ca01bfd82f | |||
71dc3227c4 | |||
fd39b3a94d | |||
3b43c55c04 | |||
d15005195d | |||
c5ddfd0a72 | |||
e9520eefb5 | |||
72709bc186 | |||
59757f87f0 | |||
60ef4eeeea | |||
68a10a2f1f | |||
170439d977 | |||
9c7c6ac4a3 | |||
6224146cde | |||
8314a7d34a | |||
145856960c | |||
71523cf7ef | |||
cbb2b66a72 | |||
2076cea40f | |||
34f335c7e6 | |||
602ebfc952 | |||
78f9a83b04 | |||
4c9ff2c006 | |||
7d56264a8d | |||
78135df9e7 | |||
3d85ca94f1 | |||
4d7ee46cd5 | |||
6921857573 | |||
5ee19e3e30 | |||
4fa66a2747 | |||
a1e81b57c9 | |||
1813b78ff0 | |||
6cff8e390d | |||
5079b57f94 | |||
42c19e4d81 | |||
b9fb3d4695 | |||
544def9481 | |||
dca06918c0 | |||
9137440d3c | |||
d75a612416 | |||
487ce4bed5 | |||
ba8564b348 | |||
e914643882 | |||
1c8d3451ef | |||
e7fe917738 | |||
0ed394db6a | |||
99cc91d671 | |||
357f40d573 | |||
24ac6d203f | |||
08ff1377fd | |||
42c57636b9 | |||
c86d6f15af | |||
670dddfea0 | |||
2132f80988 | |||
cae95ebe20 | |||
221f75be33 | |||
66bb9443f9 | |||
29c6be5571 | |||
16868a7532 | |||
4620666d4e | |||
9a5dd587b3 | |||
cca1d0f727 | |||
bc6e94d329 | |||
78d9d1f7c7 | |||
f1275e5b07 | |||
4164b75bea | |||
c2afdc0f1f | |||
e0427cfc21 | |||
786ab5c082 | |||
a59fc19133 | |||
bf39c0f5b2 | |||
364831ae58 | |||
31d7707d19 | |||
a053be50f3 | |||
ade81e2dc2 | |||
3f15373e7b | |||
3186b88641 | |||
fc4c4e8675 | |||
f80e693d8b | |||
bf9a14081d | |||
a906633cfd | |||
7fcf406781 | |||
eb22f8e99b | |||
0cff5f4be4 | |||
579aaaa577 | |||
37c9507354 | |||
08d2665f66 | |||
472edc5ac2 | |||
0baff7340d | |||
d9f7360daf | |||
15ebffa58f | |||
c8bd84316f | |||
413fe4704a | |||
0dac77036b | |||
8815d13903 | |||
5e926a092f | |||
43376d94b0 | |||
b7769df794 | |||
a5856082c8 | |||
76ec8ae20e | |||
640d74a851 | |||
54ed268041 | |||
c5f1c94674 | |||
c613c48c75 | |||
b6f18cf5f1 | |||
f70f1a7f70 | |||
16179b3ed9 | |||
d8378e73d4 | |||
d29a30d79d | |||
399d0e1e6e | |||
ec7c6a4ba4 | |||
d25bbd0032 | |||
fe7f6ad510 | |||
e7f577200b | |||
d63e9356ba | |||
f2dd83840f | |||
7a5a732ece | |||
2a4128d77c | |||
06407e42d7 | |||
0392517fa2 | |||
bcb6c7e616 | |||
1fab2a690a | |||
9b67c9e66c | |||
f501d440c8 | |||
504e3f2734 | |||
93417ddefd | |||
9db5c92f4d | |||
0c1257b863 | |||
cca0a065c7 | |||
fc752b10c2 | |||
f4daa17f41 | |||
d02bac1ea1 | |||
d85ad5c475 | |||
b505d560e7 | |||
1113c9c0c9 | |||
a5236d518f | |||
4d8149846b | |||
658b71d6d8 | |||
74b8f6656f | |||
ab65c20b5c | |||
2b0cff97a9 | |||
28f5491977 | |||
3acb52ce63 | |||
1a9a284930 | |||
5e22afd10b | |||
a87af2ce6a | |||
a8b7cc4e9a | |||
f18c5586bf | |||
6b2d9e5401 | |||
8b03fb8f28 | |||
bbf226aeda | |||
0f8eaef8f5 | |||
a7e553efe9 | |||
f870c8e885 | |||
4e902b6560 | |||
d3239b78c4 | |||
867bda6ad7 | |||
9edb84e3b4 | |||
b658a01637 | |||
efdd2fc11d | |||
018630aabe | |||
52c64f57d1 | |||
262e22155e | |||
965170ff21 | |||
190fba654a | |||
d71532678b | |||
8163cf8b2d | |||
bc658a0575 | |||
f3214b935c | |||
c874e9d080 | |||
4efc62b529 | |||
9815f17b16 | |||
12cf4ecd89 | |||
ad7f3a6485 | |||
4b3337de48 | |||
8b2898bd4e | |||
c5585f2652 | |||
6b40c1ca7f | |||
72cdf68a60 | |||
6710d6e698 | |||
3ab7de8d09 | |||
687299ba60 | |||
28da547e75 | |||
17073c3a15 | |||
3fef0fd6da | |||
3b1e4e8402 | |||
4cd18c3764 | |||
006a7c322c | |||
3d55d16f8d | |||
65ba32c056 | |||
c09547e3a4 | |||
ce89e44474 | |||
72c98ac811 | |||
44385fb9b7 | |||
9ec1992929 | |||
03d1449b3c | |||
0dcd0b6dc5 | |||
581f06e2e8 | |||
886f08f7e2 | |||
ecd47346e5 | |||
df617e9d7b | |||
f0a4990bb8 | |||
3037e6f5fb | |||
f9c85f08e0 | |||
c7a795c6d4 | |||
8ba91add41 | |||
1e5682480b | |||
c23934a5bb | |||
9cd6ccc2c2 | |||
452ccfc3d1 | |||
b3b6bdef98 | |||
73d82c513d | |||
4d9756c26e | |||
28449417d0 | |||
919eaabfb2 | |||
2587435f96 | |||
eda9fe0ee0 | |||
c15e94cf26 | |||
a5f0b912a1 | |||
b66d18540a | |||
9132cb963c | |||
ef9fd95e61 | |||
1a12f6c881 | |||
280953b456 | |||
a2a4d130d2 | |||
f1edd4fc2e | |||
d4b7cc15e9 | |||
ad9634386e | |||
4c5447658d | |||
949a8854c6 | |||
c05b602497 | |||
98d55f77c9 | |||
0415827f08 | |||
de6735e309 | |||
5860fcd736 | |||
e454d63e27 | |||
bf51829dca | |||
c1434c0fb0 | |||
fbf4ca00a3 | |||
00e4043bca | |||
b4ed9952bf | |||
2976bf7102 | |||
8d91874c9e | |||
19c30f9709 | |||
7d8a5b9dc6 | |||
c3d2f74d4e | |||
e99b851624 | |||
83e6c5309b | |||
8649a1a2e1 | |||
9f7f5068c0 | |||
871fa91616 | |||
baa7294024 | |||
d099b90b98 | |||
7ada64e16c | |||
1df1662140 | |||
e3034da106 | |||
f0d9fa90a8 | |||
a6d75002cd | |||
ea93cd1db7 | |||
b59485eea2 | |||
3edc0a7218 | |||
dfa7320380 | |||
2c7c5b656d | |||
52918767f6 | |||
e55c1b9189 | |||
1cffd95bf3 | |||
5482fa6748 | |||
ecb2b4a587 | |||
3f324f0fb1 | |||
7e9cc240e3 | |||
da134adbc8 | |||
8c6aacf1f5 | |||
ade98060d8 | |||
33e98822e3 | |||
d4654f2bbc | |||
16bed23afb | |||
e6fb310bef | |||
e21bcf54de | |||
c2006f0a34 | |||
5833b69e72 | |||
e8d7b8b3aa | |||
dee314dfb0 | |||
0d1b7d56a2 | |||
e9f19a33d9 | |||
f94c00eba1 | |||
a452b9bd9d | |||
c0d0e016e6 | |||
20711cb633 | |||
d93d0662ee | |||
c7e9015a5a | |||
a95ab7ed3e | |||
5e32e42439 | |||
b5d45bc539 | |||
5b6bb5ea47 | |||
04877b6999 | |||
249b9318b6 | |||
58ce021c27 | |||
349982baf7 | |||
da6299e6a1 | |||
96d1c16958 | |||
60021763de | |||
712b88227a | |||
e8d8773863 | |||
5b710d5b28 | |||
573ceb98a1 | |||
5dae44b5e9 | |||
86715ccf7c | |||
2b7d8ee01e | |||
0b92b56c55 | |||
7ed3530130 | |||
522da73710 | |||
6f30322ad5 | |||
d9e5331a84 | |||
bfa54853ab | |||
35e89b1e20 | |||
2cc8c9eba1 | |||
869f05ca8b | |||
85e5f8d7aa | |||
89b249d228 | |||
8d59602a75 | |||
e1fe025dd7 | |||
6467a03d19 | |||
12e9a2aaeb | |||
65f242d322 | |||
728607a2da | |||
06ccf17c5f | |||
32043158bf | |||
00f068980e | |||
2b8a82d0f5 | |||
caf8573bcd | |||
9664d7b6c3 | |||
4e34e5c77d | |||
28d6487ff5 | |||
238fc05854 | |||
fd150699f2 | |||
ca454f663e | |||
1f07f3c045 | |||
3e91da3e08 | |||
094f3b2726 | |||
05c15cc533 | |||
364a6c6d9c | |||
469591c083 | |||
c67e4593d7 | |||
565f156173 |
46
.github/ISSUE_TEMPLATE.md
vendored
@ -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
|
||||||
|
209
CHANGELOG.md
Normal file
@ -0,0 +1,209 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## 20200316
|
||||||
|
- **Move from Sid to Stable**
|
||||||
|
- Debian Stable has now all the packages and versions we need for T-Pot. As a consequence we can now move to the `stable` branch.
|
||||||
|
|
||||||
|
## 20200310
|
||||||
|
- **Add 2FA to Cockpit**
|
||||||
|
- Just run `2fa.sh` to enable two factor authentication in Cockpit.
|
||||||
|
- **Find fastest mirror with netselect-apt**
|
||||||
|
- Netselect-apt will find the fastest mirror close to you (outgoing ICMP required).
|
||||||
|
|
||||||
|
## 20200309
|
||||||
|
- **Bump Nextgen to 20.06**
|
||||||
|
- All NextGen images have been rebuilt to their latest master.
|
||||||
|
- ElasticStack bumped to 7.6.1 (Elasticsearch will need at least 2048MB of RAM now, T-Pot at least 8GB of RAM) and tweak to accomodate changes of 7.x.
|
||||||
|
- Fixed errors in Tanner / Snare which will now handle downloads of malware via SSL and store them correctly (thanks to @afeena).
|
||||||
|
- Fixed errors in Heralding which will now improve on RDP connections (thanks to @johnnykv, @realsdx).
|
||||||
|
- Fixed error in honeytrap which will now build in Debian/Buster (thanks to @tillmannw).
|
||||||
|
- Mailoney is now logging in JSON format (thanks to @monsherko).
|
||||||
|
- Base T-Pot landing page on Heimdall.
|
||||||
|
- Tweaking of tools and some minor bug fixing
|
||||||
|
|
||||||
|
## 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.
|
@ -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`)?
|
|
143
README.md
@ -1,6 +1,6 @@
|
|||||||
# T-Pot 19.03
|

|
||||||
|
|
||||||
T-Pot 19.03 runs on Debian (Sid), is based heavily on
|
T-Pot 19.03 runs on Debian (Stable), 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.
|
||||||
|
|
||||||
@ -41,7 +43,6 @@ Furthermore we use the following tools
|
|||||||
|
|
||||||
|
|
||||||
# Table of Contents
|
# Table of Contents
|
||||||
- [Changelog](#changelog)
|
|
||||||
- [Technical Concept](#concept)
|
- [Technical Concept](#concept)
|
||||||
- [System Requirements](#requirements)
|
- [System Requirements](#requirements)
|
||||||
- [Installation](#installation)
|
- [Installation](#installation)
|
||||||
@ -51,6 +52,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 +64,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,37 +72,26 @@ Furthermore we use the following tools
|
|||||||
- [Licenses](#licenses)
|
- [Licenses](#licenses)
|
||||||
- [Credits](#credits)
|
- [Credits](#credits)
|
||||||
- [Stay tuned](#staytuned)
|
- [Stay tuned](#staytuned)
|
||||||
- [Fun Fact](#funfact)
|
- [Testimonial](#testimonial)
|
||||||
|
|
||||||
<a name="changelog"></a>
|
|
||||||
# Release Notes
|
|
||||||
- **Move from Ubuntu 18.04 to Debian (Sid)**
|
|
||||||
- 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.
|
|
||||||
- **Docker images will keep the 1811 tag**
|
|
||||||
- The docker images will keep the 1811 tag.
|
|
||||||
- **Deprecated tools**
|
|
||||||
- *ctop* will no longer be part of T-Pot.
|
|
||||||
- **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`.
|
|
||||||
- This feature is beta and is mostly intended to provide you with the latest development advances without the need of reinstalling T-Pot.
|
|
||||||
|
|
||||||
<a name="concept"></a>
|
<a name="concept"></a>
|
||||||
# Technical Concept
|
# Technical Concept
|
||||||
|
|
||||||
T-Pot is based on the network installer Debian (Stretch). During installation the whole system will be updated to Debian (Sid).
|
T-Pot is based on the network installer Debian (Stable).
|
||||||
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),
|
||||||
@ -110,10 +104,11 @@ 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.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -136,7 +131,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)
|
||||||
@ -145,7 +140,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)
|
||||||
@ -154,7 +149,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)
|
||||||
@ -171,18 +166,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)
|
||||||
@ -260,7 +246,7 @@ In some cases it is necessary to install Debian 9.7 (Stretch) on your own:
|
|||||||
- 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.
|
||||||
|
|
||||||
The T-Pot Universal Installer will upgrade the system to Debian (Sid) and install all required T-Pot dependencies.
|
The T-Pot Universal Installer will upgrade the system and install all required T-Pot dependencies.
|
||||||
|
|
||||||
Just follow these steps:
|
Just follow these steps:
|
||||||
|
|
||||||
@ -274,7 +260,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:
|
||||||
|
|
||||||
@ -287,6 +273,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.
|
||||||
@ -321,20 +331,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 (Debian, 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. Also during first install outgoing ICMP is required additionally to find the closest and fastest mirror to you.
|
||||||
|
|
||||||
<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 packages available in Debian (Sid)
|
- **mercilessly** overwrite local changes to be in sync with the T-Pot master branch
|
||||||
|
- upgrade the system to the packages available in Debian (Stable)
|
||||||
- update all resources to be in-sync 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 the 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
|
||||||
```
|
```
|
||||||
@ -355,6 +368,8 @@ If you do not have a SSH client at hand and still want to access the machine via
|
|||||||
- user: **[tsec or user]** *you chose during one of the post install methods*
|
- user: **[tsec or user]** *you chose during one of the post install methods*
|
||||||
- pass: **[password]** *you chose during the installation*
|
- pass: **[password]** *you chose during the installation*
|
||||||
|
|
||||||
|
You can also add two factor authentication to Cockpit just by running `2fa.sh` on the command line.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
<a name="kibana"></a>
|
<a name="kibana"></a>
|
||||||
@ -393,7 +408,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`
|
||||||
@ -405,7 +420,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
|
||||||
@ -416,6 +431,19 @@ 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.
|
||||||
|
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. You simply run `hpfeeds_optin.sh` which will ask for your credentials. 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 ...
|
||||||
@ -444,11 +472,11 @@ 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), [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), [Debian licensing](https://www.debian.org/legal/licenses/)
|
<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
|
||||||
@ -457,19 +485,23 @@ Without open source and the fruitful development community (we are proud to be a
|
|||||||
### 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)
|
||||||
@ -481,7 +513,6 @@ 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
|
||||||
* [debian](https://www.debian.org/)
|
* [debian](https://www.debian.org/)
|
||||||
@ -496,7 +527,7 @@ 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="funfact"></a>
|
<a name="testimonial"></a>
|
||||||
# Fun Fact
|
# Testimonial
|
||||||
|
One of the greatest feedback we have gotten so far is by one of the Conpot developers:<br>
|
||||||
In an effort of saving the environment we are now brewing our own Mate Ice Tea and consumed 57 liters so far for the T-Pot 19.03 development 😇
|
***"[...] 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. [...]"***
|
||||||
|
77
bin/2fa.sh
Executable file
@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Make sure script is started as non-root.
|
||||||
|
myWHOAMI=$(whoami)
|
||||||
|
if [ "$myWHOAMI" = "root" ]
|
||||||
|
then
|
||||||
|
echo "Need to run as non-root ..."
|
||||||
|
echo ""
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set vars, check deps
|
||||||
|
myPAM_COCKPIT_FILE="/etc/pam.d/cockpit"
|
||||||
|
if ! [ -s "$myPAM_COCKPIT_FILE" ];
|
||||||
|
then
|
||||||
|
echo "### Cockpit PAM module config does not exist. Something went wrong."
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
myPAM_COCKPIT_GA="
|
||||||
|
|
||||||
|
# google authenticator for two-factor
|
||||||
|
auth required pam_google_authenticator.so
|
||||||
|
"
|
||||||
|
myAUTHENTICATOR=$(which google-authenticator)
|
||||||
|
if [ "$myAUTHENTICATOR" == "" ];
|
||||||
|
then
|
||||||
|
echo "### Could not locate google-authenticator, trying to install (if asked provide root password)."
|
||||||
|
echo ""
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libpam-google-authenticator
|
||||||
|
exec "$1" "$2"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# write PAM changes
|
||||||
|
function fuWRITE_PAM_CHANGES {
|
||||||
|
myCHECK=$(cat $myPAM_COCKPIT_FILE | grep -c "google")
|
||||||
|
if ! [ "$myCHECK" == "0" ];
|
||||||
|
then
|
||||||
|
echo "### PAM config already enabled. Skipped."
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
echo "### Updating PAM config for Cockpit (if asked provide root password)."
|
||||||
|
echo "$myPAM_COCKPIT_GA" | sudo tee -a $myPAM_COCKPIT_FILE
|
||||||
|
sudo systemctl restart cockpit
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# create 2fa
|
||||||
|
function fuGEN_TOKEN {
|
||||||
|
echo "### Now generating token for Google Authenticator."
|
||||||
|
echo ""
|
||||||
|
google-authenticator -t -d -r 3 -R 30 -w 17
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# main
|
||||||
|
echo "### This script will enable Two Factor Authentication for Cockpit."
|
||||||
|
echo ""
|
||||||
|
echo "### Please download one of the many authenticator apps from the appstore of your choice."
|
||||||
|
echo ""
|
||||||
|
while true;
|
||||||
|
do
|
||||||
|
read -p "### Ready to start (y/n)? " myANSWER
|
||||||
|
case $myANSWER in
|
||||||
|
[Yy]* ) echo "### OK. Starting ..."; break;;
|
||||||
|
[Nn]* ) echo "### Exiting."; exit;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
fuWRITE_PAM_CHANGES
|
||||||
|
fuGEN_TOKEN
|
||||||
|
|
||||||
|
echo "Done. Re-run this script by every user who needs Cockpit access."
|
||||||
|
echo ""
|
@ -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
@ -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."
|
92
bin/clean.sh
@ -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="[0;31m"
|
myRED="[0;31m"
|
||||||
myGREEN="[0;32m"
|
myGREEN="[0;32m"
|
||||||
myWHITE="[0;0m"
|
myWHITE="[0;0m"
|
||||||
|
|
||||||
|
# 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
|
||||||
|
12
bin/dps.sh
@ -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 " ")"
|
||||||
@ -16,7 +25,6 @@ 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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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="[0;34m"
|
myCOL1="[0;34m"
|
||||||
myCOL0="[0;0m"
|
myCOL0="[0;0m"
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -32,7 +32,7 @@ trap fuCLEANUP EXIT
|
|||||||
# Export index patterns
|
# Export index patterns
|
||||||
mkdir -p patterns
|
mkdir -p patterns
|
||||||
echo $myCOL1"### Now exporting"$myCOL0 $myINDEXCOUNT $myCOL1"index pattern fields." $myCOL0
|
echo $myCOL1"### Now exporting"$myCOL0 $myINDEXCOUNT $myCOL1"index pattern fields." $myCOL0
|
||||||
curl -s -XGET ''$myKIBANA'api/saved_objects/index-pattern/'$myINDEXID'' | jq '. | {attributes}' > patterns/$myINDEXID.json &
|
curl -s -XGET ''$myKIBANA'api/saved_objects/index-pattern/'$myINDEXID'' | jq '. | {attributes, references}' > patterns/$myINDEXID.json &
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Export dashboards
|
# Export dashboards
|
||||||
@ -41,7 +41,7 @@ echo $myCOL1"### Now exporting"$myCOL0 $(echo $myDASHBOARDS | wc -w) $myCOL1"das
|
|||||||
for i in $myDASHBOARDS;
|
for i in $myDASHBOARDS;
|
||||||
do
|
do
|
||||||
echo $myCOL1"###### "$i $myCOL0
|
echo $myCOL1"###### "$i $myCOL0
|
||||||
curl -s -XGET ''$myKIBANA'api/saved_objects/dashboard/'$i'' | jq '. | {attributes}' > dashboards/$i.json &
|
curl -s -XGET ''$myKIBANA'api/saved_objects/dashboard/'$i'' | jq '. | {attributes, references}' > dashboards/$i.json &
|
||||||
done;
|
done;
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ echo $myCOL1"### Now exporting"$myCOL0 $(echo $myVISUALIZATIONS | wc -w) $myCOL1
|
|||||||
for i in $myVISUALIZATIONS;
|
for i in $myVISUALIZATIONS;
|
||||||
do
|
do
|
||||||
echo $myCOL1"###### "$i $myCOL0
|
echo $myCOL1"###### "$i $myCOL0
|
||||||
curl -s -XGET ''$myKIBANA'api/saved_objects/visualization/'$i'' | jq '. | {attributes}' > visualizations/$i.json &
|
curl -s -XGET ''$myKIBANA'api/saved_objects/visualization/'$i'' | jq '. | {attributes, references}' > visualizations/$i.json &
|
||||||
done;
|
done;
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ echo $myCOL1"### Now exporting"$myCOL0 $(echo $mySEARCHES | wc -w) $myCOL1"searc
|
|||||||
for i in $mySEARCHES;
|
for i in $mySEARCHES;
|
||||||
do
|
do
|
||||||
echo $myCOL1"###### "$i $myCOL0
|
echo $myCOL1"###### "$i $myCOL0
|
||||||
curl -s -XGET ''$myKIBANA'api/saved_objects/search/'$i'' | jq '. | {attributes}' > searches/$i.json &
|
curl -s -XGET ''$myKIBANA'api/saved_objects/search/'$i'' | jq '. | {attributes, references}' > searches/$i.json &
|
||||||
done;
|
done;
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
134
bin/hpfeeds_optin.sh
Executable file
@ -0,0 +1,134 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Run as root only.
|
||||||
|
myWHOAMI=$(whoami)
|
||||||
|
if [ "$myWHOAMI" != "root" ]
|
||||||
|
then
|
||||||
|
echo "Need to run as root ..."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
myTPOTYMLFILE="/opt/tpot/etc/tpot.yml"
|
||||||
|
|
||||||
|
function fuGENERIC () {
|
||||||
|
echo
|
||||||
|
echo "You chose generic, please provide all the details of the broker"
|
||||||
|
echo
|
||||||
|
myENABLE="true"
|
||||||
|
read -p "Host URL: " myHOST
|
||||||
|
read -p "Port: " myPORT
|
||||||
|
read -p "Channel: " myCHANNEL
|
||||||
|
echo "For generic providers set this to 'false'"
|
||||||
|
echo "If you received a CA certficate mount it into the ewsposter container by modifying $myTPOTYMLFILE"
|
||||||
|
read -p "TLS - 'false' or path to CA in container: " myCERT
|
||||||
|
read -p "Ident: " myIDENT
|
||||||
|
read -p "Secret: " mySECRET
|
||||||
|
read -p "Format ews (xml) or json: " myFORMAT
|
||||||
|
}
|
||||||
|
|
||||||
|
function fuOPTOUT () {
|
||||||
|
echo
|
||||||
|
while [ 1 != 2 ]
|
||||||
|
do
|
||||||
|
read -s -n 1 -p "You chose to opt out (y/n)? " mySELECT
|
||||||
|
echo $mySELECT
|
||||||
|
case "$mySELECT" in
|
||||||
|
[y,Y])
|
||||||
|
echo "Opt out."
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
[n,N])
|
||||||
|
echo "Aborted."
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
myENABLE="false"
|
||||||
|
myHOST="host"
|
||||||
|
myPORT="port"
|
||||||
|
myCHANNEL="channels"
|
||||||
|
myCERT="false"
|
||||||
|
myIDENT="user"
|
||||||
|
mySECRET="secret"
|
||||||
|
myFORMAT="json"
|
||||||
|
}
|
||||||
|
|
||||||
|
function fuWRITETOFILE () {
|
||||||
|
if [ -f '/data/ews/conf/hpfeeds.cfg' ]; then
|
||||||
|
echo "Creating backup of current config in /data/ews/conf/hpfeeds.cfg.old"
|
||||||
|
mv /data/ews/conf/hpfeeds.cfg /data/ews/conf/hpfeeds.cfg.old
|
||||||
|
fi
|
||||||
|
echo "Storing new config in /data/ews/conf/hpfeeds.cfg"
|
||||||
|
cat >> /data/ews/conf/hpfeeds.cfg <<EOF
|
||||||
|
myENABLE=$myENABLE
|
||||||
|
myHOST=$myHOST
|
||||||
|
myPORT=$myPORT
|
||||||
|
myCHANNEL=$myCHANNEL
|
||||||
|
myCERT=$myCERT
|
||||||
|
myIDENT=$myIDENT
|
||||||
|
mySECRET=$mySECRET
|
||||||
|
myFORMAT=$myFORMAT
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
function fuAPPLY () {
|
||||||
|
echo "Now stopping T-Pot ..."
|
||||||
|
systemctl stop tpot
|
||||||
|
echo "Applying your settings to tpot.yml ... "
|
||||||
|
sed --follow-symlinks -i "s/EWS_HPFEEDS_ENABLE.*/EWS_HPFEEDS_ENABLE=${myENABLE}/g" "$myTPOTYMLFILE"
|
||||||
|
sed --follow-symlinks -i "s/EWS_HPFEEDS_HOST.*/EWS_HPFEEDS_HOST=${myHOST}/g" "$myTPOTYMLFILE"
|
||||||
|
sed --follow-symlinks -i "s/EWS_HPFEEDS_PORT.*/EWS_HPFEEDS_PORT=${myPORT}/g" "$myTPOTYMLFILE"
|
||||||
|
sed --follow-symlinks -i "s/EWS_HPFEEDS_CHANNELS.*/EWS_HPFEEDS_CHANNELS=${myCHANNEL}/g" "$myTPOTYMLFILE"
|
||||||
|
sed --follow-symlinks -i "s#EWS_HPFEEDS_TLSCERT.*#EWS_HPFEEDS_TLSCERT=${myCERT}#g" "$myTPOTYMLFILE"
|
||||||
|
sed --follow-symlinks -i "s/EWS_HPFEEDS_IDENT.*/EWS_HPFEEDS_IDENT=${myIDENT}/g" "$myTPOTYMLFILE"
|
||||||
|
sed --follow-symlinks -i "s/EWS_HPFEEDS_SECRET.*/EWS_HPFEEDS_SECRET=${mySECRET}/g" "$myTPOTYMLFILE"
|
||||||
|
sed --follow-symlinks -i "s/EWS_HPFEEDS_FORMAT.*/EWS_HPFEEDS_FORMAT=${myFORMAT}/g" "$myTPOTYMLFILE"
|
||||||
|
echo "Now starting T-Pot ..."
|
||||||
|
systemctl start tpot
|
||||||
|
echo "You can always change or review your settings in /data/ews/conf/hpfeeds.cfg and apply changes by"
|
||||||
|
echo "running \"./hpfeeds_optin.sh --conf=/data/ews/conf/hpfeeds.cfg\""
|
||||||
|
echo "Done."
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check for cmdline argument and parse config file
|
||||||
|
filename=$(echo $@ | cut -d= -f2)
|
||||||
|
if [ $# == 1 ] && echo $@ | grep '\-\-conf=' > /dev/null && [ ! -z $filename ] && [ -f $filename ]
|
||||||
|
then
|
||||||
|
source $filename
|
||||||
|
else
|
||||||
|
|
||||||
|
# Proceed with interactive setup when no config file is found
|
||||||
|
echo "HPFEEDS Delivery Opt-In for T-Pot"
|
||||||
|
echo "---------------------------------"
|
||||||
|
echo "By running this script you agree to share your data with a 3rd party and agree to their corresponding sharing terms."
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo "Please choose your broker"
|
||||||
|
echo "---------------------------"
|
||||||
|
echo "[1] - Generic (enter details manually)"
|
||||||
|
echo "[0] - Opt out of HPFEEDS"
|
||||||
|
echo "[q] - Do not agree end exit"
|
||||||
|
echo
|
||||||
|
while [ 1 != 2 ]
|
||||||
|
do
|
||||||
|
read -s -n 1 -p "Your choice: " mySELECT
|
||||||
|
echo $mySELECT
|
||||||
|
case "$mySELECT" in
|
||||||
|
[1])
|
||||||
|
fuGENERIC
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
[0])
|
||||||
|
fuOPTOUT
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
[q,Q])
|
||||||
|
echo "Aborted."
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
fi
|
||||||
|
fuWRITETOFILE
|
||||||
|
fuAPPLY
|
118
bin/hptest.sh
Executable 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."
|
27
bin/mytopips.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Make sure ES is available
|
||||||
|
myES="http://127.0.0.1:64298/"
|
||||||
|
myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c green)
|
||||||
|
if ! [ "$myESSTATUS" = "1" ]
|
||||||
|
then
|
||||||
|
echo "### Elasticsearch is not available, try starting via 'systemctl start elk'."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "### Elasticsearch is available, now continuing."
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
|
function fuMYTOPIPS {
|
||||||
|
curl -s -XGET $myES"_search" -H 'Content-Type: application/json' -d'
|
||||||
|
{
|
||||||
|
"aggs": {
|
||||||
|
"ips": {
|
||||||
|
"terms": { "field": "src_ip.keyword", "size": 100 }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"size" : 0
|
||||||
|
}'
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "### Aggregating top 100 source IPs in ES"
|
||||||
|
fuMYTOPIPS | jq '.aggregations.ips.buckets[].key' | tr -d '"'
|
@ -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
|
||||||
|
40
bin/rules.sh
@ -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
|
||||||
|
10
bin/tped.sh
@ -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
@ -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
|
||||||
|
|
@ -31,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
@ -0,0 +1,2 @@
|
|||||||
|
# Ansible
|
||||||
|
*.retry
|
235
cloud/ansible/README.md
Normal 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:
|
||||||
|

|
||||||
|
|
||||||
|
<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`.
|
||||||
|
|
||||||
|

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

|
||||||
|
|
||||||
|
<a name="key-pair"></a>
|
||||||
|
## Import Key Pair
|
||||||
|
:warning: Now log in with the newly created API user account and select your project.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Import your SSH public key.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
<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)
|
BIN
cloud/ansible/doc/otc_1_project.gif
Normal file
After Width: | Height: | Size: 204 KiB |
BIN
cloud/ansible/doc/otc_2_user.gif
Normal file
After Width: | Height: | Size: 883 KiB |
BIN
cloud/ansible/doc/otc_3_login.gif
Normal file
After Width: | Height: | Size: 148 KiB |
BIN
cloud/ansible/doc/otc_4_import_key.gif
Normal file
After Width: | Height: | Size: 193 KiB |
BIN
cloud/ansible/doc/putty_agent_forwarding.png
Normal file
After Width: | Height: | Size: 23 KiB |
6
cloud/ansible/openstack/ansible.cfg
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[defaults]
|
||||||
|
host_key_checking = false
|
||||||
|
|
||||||
|
[ssh_connection]
|
||||||
|
scp_if_ssh = true
|
||||||
|
ssh_args = -o ServerAliveInterval=60
|
21
cloud/ansible/openstack/deploy_tpot.yaml
Normal 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
|
17
cloud/ansible/openstack/roles/check/tasks/main.yaml
Normal 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') == ""
|
13
cloud/ansible/openstack/roles/custom_ews/tasks/main.yaml
Normal 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"
|
137
cloud/ansible/openstack/roles/custom_ews/templates/ews.cfg
Normal 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
|
@ -0,0 +1,8 @@
|
|||||||
|
myENABLE=false
|
||||||
|
myHOST=host
|
||||||
|
myPORT=port
|
||||||
|
myCHANNEL=channels
|
||||||
|
myCERT=false
|
||||||
|
myIDENT=user
|
||||||
|
mySECRET=secret
|
||||||
|
myFORMAT=json
|
12
cloud/ansible/openstack/roles/custom_hpfeeds/tasks/main.yaml
Normal 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
|
94
cloud/ansible/openstack/roles/deploy/tasks/main.yaml
Normal 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
|
6
cloud/ansible/openstack/roles/deploy/vars/main.yaml
Normal 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
|
5
cloud/ansible/openstack/roles/deploy/vars/os_auth.yaml
Normal 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
|
48
cloud/ansible/openstack/roles/install/tasks/main.yaml
Normal 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";
|
||||||
|
}
|
1
cloud/ansible/openstack/roles/install/vars/main.yaml
Normal file
@ -0,0 +1 @@
|
|||||||
|
user_password: LiNuXuSeRPaSs#
|
16
cloud/ansible/openstack/roles/reboot/tasks/main.yaml
Normal 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
@ -0,0 +1,2 @@
|
|||||||
|
**/.terraform
|
||||||
|
**/terraform.*
|
131
cloud/terraform/README.md
Normal 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.
|
66
cloud/terraform/aws/main.tf
Normal 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
|
||||||
|
}
|
12
cloud/terraform/aws/outputs.tf
Normal 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/"
|
||||||
|
}
|
||||||
|
|
54
cloud/terraform/aws/variables.tf
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
3
cloud/terraform/aws/versions.tf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
terraform {
|
||||||
|
required_version = ">= 0.12"
|
||||||
|
}
|
25
cloud/terraform/cloud-init.yaml
Normal 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'
|
5
cloud/terraform/tpot.conf
Normal 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'
|
Before Width: | Height: | Size: 233 KiB After Width: | Height: | Size: 258 KiB |
BIN
doc/t-pot_qr.png
Normal file
After Width: | Height: | Size: 92 KiB |
BIN
doc/t-pot_wallpaper_19201080.png
Normal file
After Width: | Height: | Size: 252 KiB |
BIN
doc/t-pot_wallpaper_4k.png
Normal file
After Width: | Height: | Size: 606 KiB |
BIN
doc/tpotsocial.png
Normal file
After Width: | Height: | Size: 148 KiB |
@ -1,31 +1,36 @@
|
|||||||
FROM alpine
|
FROM alpine:latest
|
||||||
|
#
|
||||||
|
# Include dist
|
||||||
|
ADD dist/ /root/dist/
|
||||||
|
#
|
||||||
# Install packages
|
# Install packages
|
||||||
RUN apk -U --no-cache add \
|
RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
|
||||||
|
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.8 && \
|
||||||
|
#
|
||||||
# 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
@ -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
|
@ -14,7 +14,7 @@ services:
|
|||||||
- adbhoney_local
|
- adbhoney_local
|
||||||
ports:
|
ports:
|
||||||
- "5555:5555"
|
- "5555:5555"
|
||||||
image: "dtagdevsec/adbhoney:1811"
|
image: "dtagdevsec/adbhoney:2006"
|
||||||
read_only: true
|
read_only: true
|
||||||
volumes:
|
volumes:
|
||||||
- /data/adbhoney/log:/opt/adbhoney/log
|
- /data/adbhoney/log:/opt/adbhoney/log
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
FROM alpine
|
FROM alpine:latest
|
||||||
|
#
|
||||||
# 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 sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
|
||||||
|
apk -U upgrade && \
|
||||||
apk add build-base \
|
apk add build-base \
|
||||||
git \
|
git \
|
||||||
libffi \
|
libffi \
|
||||||
@ -13,21 +14,20 @@ 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/ && \
|
||||||
git clone --depth=1 https://github.com/cymmetria/ciscoasa_honeypot && \
|
git clone --depth=1 https://github.com/cymmetria/ciscoasa_honeypot && \
|
||||||
cd ciscoasa_honeypot && \
|
cd ciscoasa_honeypot && \
|
||||||
pip3 install --no-cache-dir --upgrade pip && \
|
|
||||||
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/
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[](https://microbadger.com/images/dtagdevsec/ciscoasa:1811 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/ciscoasa:1811 "Get your own image badge on microbadger.com")
|
[](https://microbadger.com/images/dtagdevsec/ciscoasa:1903 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/ciscoasa:1903 "Get your own image badge on microbadger.com")
|
||||||
|
|
||||||
# ciscoasa
|
# ciscoasa
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "5000:5000/udp"
|
- "5000:5000/udp"
|
||||||
- "8443:8443"
|
- "8443:8443"
|
||||||
image: "dtagdevsec/ciscoasa:1811"
|
image: "dtagdevsec/ciscoasa:2006"
|
||||||
read_only: true
|
read_only: true
|
||||||
volumes:
|
volumes:
|
||||||
- /data/ciscoasa/log:/var/log/ciscoasa
|
- /data/ciscoasa/log:/var/log/ciscoasa
|
||||||
|
45
docker/citrixhoneypot/Dockerfile
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
#
|
||||||
|
# Install packages
|
||||||
|
RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
|
||||||
|
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
|
20
docker/citrixhoneypot/docker-compose.yml
Normal 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:2006"
|
||||||
|
read_only: true
|
||||||
|
volumes:
|
||||||
|
- /data/citrixhoneypot/logs:/opt/citrixhoneypot/logs
|
@ -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
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[](https://microbadger.com/images/dtagdevsec/conpot:1811 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/conpot:1811 "Get your own image badge on microbadger.com")
|
[](https://microbadger.com/images/dtagdevsec/conpot:1903 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/conpot:1903 "Get your own image badge on microbadger.com")
|
||||||
|
|
||||||
# conpot
|
# conpot
|
||||||
|
|
||||||
|
2
docker/conpot/dist/conpot.cfg
vendored
@ -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
|
||||||
|
@ -35,7 +35,7 @@ services:
|
|||||||
- "2121:21"
|
- "2121:21"
|
||||||
- "44818:44818"
|
- "44818:44818"
|
||||||
- "47808:47808"
|
- "47808:47808"
|
||||||
image: "dtagdevsec/conpot:1811"
|
image: "dtagdevsec/conpot:2006"
|
||||||
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:2006"
|
||||||
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:2006"
|
||||||
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:2006"
|
||||||
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:2006"
|
||||||
read_only: true
|
read_only: true
|
||||||
volumes:
|
volumes:
|
||||||
- /data/conpot/log:/var/log/conpot
|
- /data/conpot/log:/var/log/conpot
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
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 sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
|
||||||
|
apk -U add \
|
||||||
|
bash \
|
||||||
build-base \
|
build-base \
|
||||||
git \
|
git \
|
||||||
gmp-dev \
|
gmp-dev \
|
||||||
@ -12,35 +14,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.2 && \
|
||||||
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 +56,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"]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[](https://microbadger.com/images/dtagdevsec/cowrie:1811 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/cowrie:1811 "Get your own image badge on microbadger.com")
|
[](https://microbadger.com/images/dtagdevsec/cowrie:1903 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/cowrie:1903 "Get your own image badge on microbadger.com")
|
||||||
|
|
||||||
# cowrie
|
# cowrie
|
||||||
|
|
||||||
|
46
docker/cowrie/dist/cowrie.cfg
vendored
@ -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
|
||||||
|
@ -18,7 +18,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "22:22"
|
- "22:22"
|
||||||
- "23:23"
|
- "23:23"
|
||||||
image: "dtagdevsec/cowrie:1811"
|
image: "dtagdevsec/cowrie:2006"
|
||||||
read_only: true
|
read_only: true
|
||||||
volumes:
|
volumes:
|
||||||
- /data/cowrie/downloads:/home/cowrie/cowrie/dl
|
- /data/cowrie/downloads:/home/cowrie/cowrie/dl
|
||||||
|
@ -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
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[](https://microbadger.com/images/dtagdevsec/cyberchef:1811 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/cyberchef:1811 "Get your own image badge on microbadger.com")
|
[](https://microbadger.com/images/dtagdevsec/cyberchef:1903 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/cyberchef:1903 "Get your own image badge on microbadger.com")
|
||||||
|
|
||||||
# cyberchef
|
# cyberchef
|
||||||
|
|
||||||
|
@ -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:2006"
|
||||||
read_only: true
|
read_only: true
|
||||||
|
@ -8,7 +8,7 @@ RUN apk -U --no-cache add \
|
|||||||
autoconf \
|
autoconf \
|
||||||
bind-tools \
|
bind-tools \
|
||||||
build-base \
|
build-base \
|
||||||
cython \
|
# cython \
|
||||||
git \
|
git \
|
||||||
libffi \
|
libffi \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
@ -17,6 +17,7 @@ RUN apk -U --no-cache add \
|
|||||||
make \
|
make \
|
||||||
php7 \
|
php7 \
|
||||||
php7-dev \
|
php7-dev \
|
||||||
|
openssl-dev \
|
||||||
py-mysqldb \
|
py-mysqldb \
|
||||||
py-openssl \
|
py-openssl \
|
||||||
py-pip \
|
py-pip \
|
@ -1,6 +1,6 @@
|
|||||||
[](https://microbadger.com/images/dtagdevsec/glastopf:1811 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/glastopf:1811 "Get your own image badge on microbadger.com")
|
[](https://microbadger.com/images/dtagdevsec/glastopf:1903 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/glastopf:1903 "Get your own image badge on microbadger.com")
|
||||||
|
|
||||||
# glastopf
|
# glastopf (deprecated)
|
||||||
|
|
||||||
[glastopf](https://github.com/mushorg/glastopf) is a python web application honeypot.
|
[glastopf](https://github.com/mushorg/glastopf) is a python web application honeypot.
|
||||||
|
|
Before Width: | Height: | Size: 793 KiB After Width: | Height: | Size: 793 KiB |
@ -15,8 +15,8 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- glastopf_local
|
- glastopf_local
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "8081:80"
|
||||||
image: "dtagdevsec/glastopf:1811"
|
image: "dtagdevsec/glastopf:1903"
|
||||||
read_only: true
|
read_only: true
|
||||||
volumes:
|
volumes:
|
||||||
- /data/glastopf/db:/tmp/glastopf/db
|
- /data/glastopf/db:/tmp/glastopf/db
|
@ -1,10 +1,11 @@
|
|||||||
### This is only for testing purposes, do NOT use for production
|
### This is only for testing purposes, do NOT use for production
|
||||||
FROM alpine
|
FROM alpine:latest
|
||||||
|
#
|
||||||
ADD dist/ /root/dist/
|
ADD dist/ /root/dist/
|
||||||
|
#
|
||||||
# Install packages
|
# Install packages
|
||||||
RUN apk -U --no-cache add \
|
RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
|
||||||
|
apk -U --no-cache add \
|
||||||
build-base \
|
build-base \
|
||||||
coreutils \
|
coreutils \
|
||||||
git \
|
git \
|
||||||
@ -15,7 +16,7 @@ RUN apk -U --no-cache add \
|
|||||||
python \
|
python \
|
||||||
python-dev \
|
python-dev \
|
||||||
sqlite && \
|
sqlite && \
|
||||||
|
#
|
||||||
# Install php sandbox from git
|
# Install php sandbox from git
|
||||||
git clone --depth=1 https://github.com/rep/hpfeeds /opt/hpfeeds && \
|
git clone --depth=1 https://github.com/rep/hpfeeds /opt/hpfeeds && \
|
||||||
cd /opt/hpfeeds/broker && \
|
cd /opt/hpfeeds/broker && \
|
||||||
@ -23,10 +24,10 @@ RUN apk -U --no-cache add \
|
|||||||
cp /root/dist/adduser.sql . && \
|
cp /root/dist/adduser.sql . && \
|
||||||
cd /opt/hpfeeds/broker && timeout 5 python broker.py || : && \
|
cd /opt/hpfeeds/broker && timeout 5 python broker.py || : && \
|
||||||
sqlite3 db.sqlite3 < adduser.sql && \
|
sqlite3 db.sqlite3 < adduser.sql && \
|
||||||
|
#
|
||||||
#python setup.py build && \
|
#python setup.py build && \
|
||||||
#python setup.py install && \
|
#python setup.py install && \
|
||||||
|
#
|
||||||
# Clean up
|
# Clean up
|
||||||
apk del --purge autoconf \
|
apk del --purge autoconf \
|
||||||
build-base \
|
build-base \
|
||||||
@ -35,7 +36,7 @@ RUN apk -U --no-cache add \
|
|||||||
python-dev && \
|
python-dev && \
|
||||||
rm -rf /root/* && \
|
rm -rf /root/* && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
#
|
||||||
# Set workdir and start glastopf
|
# Set workdir and start glastopf
|
||||||
WORKDIR /opt/hpfeeds/broker
|
WORKDIR /opt/hpfeeds/broker
|
||||||
CMD python broker.py
|
CMD python broker.py
|
@ -1,13 +1,13 @@
|
|||||||
FROM alpine
|
FROM alpine:latest
|
||||||
|
#
|
||||||
# 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 --no-cache add \
|
||||||
nginx \
|
nginx \
|
||||||
nginx-mod-http-headers-more && \
|
nginx-mod-http-headers-more && \
|
||||||
|
#
|
||||||
# Setup configs
|
# Setup configs
|
||||||
mkdir -p /run/nginx && \
|
mkdir -p /run/nginx && \
|
||||||
rm -rf /etc/nginx/conf.d/* /usr/share/nginx/html/* && \
|
rm -rf /etc/nginx/conf.d/* /usr/share/nginx/html/* && \
|
||||||
@ -15,10 +15,10 @@ RUN apk -U --no-cache add \
|
|||||||
cp -R /root/dist/conf/ssl /etc/nginx/ && \
|
cp -R /root/dist/conf/ssl /etc/nginx/ && \
|
||||||
cp /root/dist/conf/tpotweb.conf /etc/nginx/conf.d/ && \
|
cp /root/dist/conf/tpotweb.conf /etc/nginx/conf.d/ && \
|
||||||
cp -R /root/dist/html/ /var/lib/nginx/ && \
|
cp -R /root/dist/html/ /var/lib/nginx/ && \
|
||||||
|
#
|
||||||
# Clean up
|
# Clean up
|
||||||
rm -rf /root/* && \
|
rm -rf /root/* && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
#
|
||||||
# Start nginx
|
# Start nginx
|
||||||
CMD exec nginx -g 'daemon off;'
|
CMD exec nginx -g 'daemon off;'
|
@ -31,7 +31,8 @@ http {
|
|||||||
# SSL Settings
|
# SSL Settings
|
||||||
##
|
##
|
||||||
|
|
||||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
|
#ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
|
||||||
|
ssl_protocols TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
|
||||||
ssl_prefer_server_ciphers on;
|
ssl_prefer_server_ciphers on;
|
||||||
|
|
||||||
##
|
##
|
||||||
@ -73,25 +74,3 @@ http {
|
|||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
include /etc/nginx/sites-enabled/*;
|
include /etc/nginx/sites-enabled/*;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#mail {
|
|
||||||
# # See sample authentication script at:
|
|
||||||
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
|
|
||||||
#
|
|
||||||
# # auth_http localhost/auth.php;
|
|
||||||
# # pop3_capabilities "TOP" "USER";
|
|
||||||
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
|
|
||||||
#
|
|
||||||
# server {
|
|
||||||
# listen localhost:110;
|
|
||||||
# protocol pop3;
|
|
||||||
# proxy on;
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# server {
|
|
||||||
# listen localhost:143;
|
|
||||||
# protocol imap;
|
|
||||||
# proxy on;
|
|
||||||
# }
|
|
||||||
#}
|
|
@ -9,7 +9,7 @@ server {
|
|||||||
#########################
|
#########################
|
||||||
listen 64297 ssl http2;
|
listen 64297 ssl http2;
|
||||||
index tpotweb.html;
|
index tpotweb.html;
|
||||||
ssl_protocols TLSv1.2;
|
ssl_protocols TLSv1.3;
|
||||||
server_name example.com;
|
server_name example.com;
|
||||||
error_page 300 301 302 400 401 402 403 404 500 501 502 503 504 /error.html;
|
error_page 300 301 302 400 401 402 403 404 500 501 502 503 504 /error.html;
|
||||||
|
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@ -17,7 +17,7 @@ services:
|
|||||||
network_mode: "host"
|
network_mode: "host"
|
||||||
ports:
|
ports:
|
||||||
- "64297:64297"
|
- "64297:64297"
|
||||||
image: "dtagdevsec/nginx:1811"
|
image: "dtagdevsec/nginx:1903"
|
||||||
read_only: true
|
read_only: true
|
||||||
volumes:
|
volumes:
|
||||||
- /data/nginx/cert/:/etc/nginx/cert/:ro
|
- /data/nginx/cert/:/etc/nginx/cert/:ro
|
@ -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"]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[](https://microbadger.com/images/dtagdevsec/dionaea:1811 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/dionaea:1811 "Get your own image badge on microbadger.com")
|
[](https://microbadger.com/images/dtagdevsec/dionaea:1903 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/dionaea:1903 "Get your own image badge on microbadger.com")
|
||||||
|
|
||||||
# dionaea
|
# dionaea
|
||||||
|
|
||||||
|
6
docker/dionaea/dist/etc/services/smb.yaml
vendored
@ -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
|
||||||
|
@ -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:2006"
|
||||||
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
|
||||||
|
160
docker/docker-compose.yml
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
# T-Pot Image Builder (use only for building docker images)
|
||||||
|
version: '2.3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
##################
|
||||||
|
#### Honeypots
|
||||||
|
##################
|
||||||
|
|
||||||
|
# Adbhoney service
|
||||||
|
adbhoney:
|
||||||
|
build: adbhoney/.
|
||||||
|
image: "dtagdevsec/adbhoney:2006"
|
||||||
|
|
||||||
|
# Ciscoasa service
|
||||||
|
ciscoasa:
|
||||||
|
build: ciscoasa/.
|
||||||
|
image: "dtagdevsec/ciscoasa:2006"
|
||||||
|
|
||||||
|
# CitrixHoneypot service
|
||||||
|
citrixhoneypot:
|
||||||
|
build: citrixhoneypot/.
|
||||||
|
image: "dtagdevsec/citrixhoneypot:2006"
|
||||||
|
|
||||||
|
# Conpot IEC104 service
|
||||||
|
conpot_IEC104:
|
||||||
|
build: conpot/.
|
||||||
|
image: "dtagdevsec/conpot:2006"
|
||||||
|
|
||||||
|
# Cowrie service
|
||||||
|
cowrie:
|
||||||
|
build: cowrie/.
|
||||||
|
image: "dtagdevsec/cowrie:2006"
|
||||||
|
|
||||||
|
# Dionaea service
|
||||||
|
dionaea:
|
||||||
|
build: dionaea/.
|
||||||
|
image: "dtagdevsec/dionaea:2006"
|
||||||
|
|
||||||
|
# Glutton service
|
||||||
|
glutton:
|
||||||
|
build: glutton/.
|
||||||
|
image: "dtagdevsec/glutton:2006"
|
||||||
|
|
||||||
|
# Heralding service
|
||||||
|
heralding:
|
||||||
|
build: heralding/.
|
||||||
|
image: "dtagdevsec/heralding:2006"
|
||||||
|
|
||||||
|
# HoneyPy service
|
||||||
|
honeypy:
|
||||||
|
build: honeypy/.
|
||||||
|
image: "dtagdevsec/honeypy:2006"
|
||||||
|
|
||||||
|
# Honeytrap service
|
||||||
|
honeytrap:
|
||||||
|
build: honeytrap/.
|
||||||
|
image: "dtagdevsec/honeytrap:2006"
|
||||||
|
|
||||||
|
# Mailoney service
|
||||||
|
mailoney:
|
||||||
|
build: mailoney/.
|
||||||
|
image: "dtagdevsec/mailoney:2006"
|
||||||
|
|
||||||
|
# Medpot service
|
||||||
|
medpot:
|
||||||
|
build: medpot/.
|
||||||
|
image: "dtagdevsec/medpot:2006"
|
||||||
|
|
||||||
|
# Rdpy service
|
||||||
|
rdpy:
|
||||||
|
build: rdpy/.
|
||||||
|
image: "dtagdevsec/rdpy:2006"
|
||||||
|
|
||||||
|
#### Snare / Tanner
|
||||||
|
## Tanner Redis Service
|
||||||
|
tanner_redis:
|
||||||
|
build: tanner/redis/.
|
||||||
|
image: "dtagdevsec/redis:2006"
|
||||||
|
|
||||||
|
## PHP Sandbox service
|
||||||
|
tanner_phpox:
|
||||||
|
build: tanner/phpox/.
|
||||||
|
image: "dtagdevsec/phpox:2006"
|
||||||
|
|
||||||
|
## Tanner API Service
|
||||||
|
tanner_api:
|
||||||
|
build: tanner/tanner/.
|
||||||
|
image: "dtagdevsec/tanner:2006"
|
||||||
|
|
||||||
|
## Snare Service
|
||||||
|
snare:
|
||||||
|
build: tanner/snare/.
|
||||||
|
image: "dtagdevsec/snare:2006"
|
||||||
|
|
||||||
|
|
||||||
|
##################
|
||||||
|
#### NSM
|
||||||
|
##################
|
||||||
|
|
||||||
|
# Fatt service
|
||||||
|
fatt:
|
||||||
|
build: fatt/.
|
||||||
|
image: "dtagdevsec/fatt:2006"
|
||||||
|
|
||||||
|
# P0f service
|
||||||
|
p0f:
|
||||||
|
build: p0f/.
|
||||||
|
image: "dtagdevsec/p0f:2006"
|
||||||
|
|
||||||
|
# Suricata service
|
||||||
|
suricata:
|
||||||
|
build: suricata/.
|
||||||
|
image: "dtagdevsec/suricata:2006"
|
||||||
|
|
||||||
|
|
||||||
|
##################
|
||||||
|
#### Tools
|
||||||
|
##################
|
||||||
|
|
||||||
|
# Cyberchef service
|
||||||
|
cyberchef:
|
||||||
|
build: cyberchef/.
|
||||||
|
image: "dtagdevsec/cyberchef:2006"
|
||||||
|
|
||||||
|
#### ELK
|
||||||
|
## Elasticsearch service
|
||||||
|
elasticsearch:
|
||||||
|
build: elk/elasticsearch/.
|
||||||
|
image: "dtagdevsec/elasticsearch:2006"
|
||||||
|
|
||||||
|
## Kibana service
|
||||||
|
kibana:
|
||||||
|
build: elk/kibana/.
|
||||||
|
image: "dtagdevsec/kibana:2006"
|
||||||
|
|
||||||
|
## Logstash service
|
||||||
|
logstash:
|
||||||
|
build: elk/logstash/.
|
||||||
|
image: "dtagdevsec/logstash:2006"
|
||||||
|
|
||||||
|
## Elasticsearch-head service
|
||||||
|
head:
|
||||||
|
build: elk/head/.
|
||||||
|
image: "dtagdevsec/head:2006"
|
||||||
|
|
||||||
|
# Ewsposter service
|
||||||
|
ewsposter:
|
||||||
|
build: ews/.
|
||||||
|
image: "dtagdevsec/ewsposter:2006"
|
||||||
|
|
||||||
|
# Nginx service
|
||||||
|
nginx:
|
||||||
|
build: heimdall/.
|
||||||
|
image: "dtagdevsec/nginx:2006"
|
||||||
|
|
||||||
|
# Spiderfoot service
|
||||||
|
spiderfoot:
|
||||||
|
build: spiderfoot/.
|
||||||
|
image: "dtagdevsec/spiderfoot:2006"
|
@ -1,8 +1,8 @@
|
|||||||
FROM alpine
|
FROM alpine:latest
|
||||||
|
#
|
||||||
# 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
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[](https://microbadger.com/images/dtagdevsec/elasticpot:1811 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/elasticpot:1811 "Get your own image badge on microbadger.com")
|
[](https://microbadger.com/images/dtagdevsec/elasticpot:1903 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/elasticpot:1903 "Get your own image badge on microbadger.com")
|
||||||
|
|
||||||
# elasticpot
|
# elasticpot
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ services:
|
|||||||
- elasticpot_local
|
- elasticpot_local
|
||||||
ports:
|
ports:
|
||||||
- "9200:9200"
|
- "9200:9200"
|
||||||
image: "dtagdevsec/elasticpot:1811"
|
image: "dtagdevsec/elasticpot:2006"
|
||||||
read_only: true
|
read_only: true
|
||||||
volumes:
|
volumes:
|
||||||
- /data/elasticpot/log:/opt/ElasticpotPY/log
|
- /data/elasticpot/log:/opt/ElasticpotPY/log
|
||||||
|