mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-28 19:28:50 +00:00
include alerta-cli
This commit is contained in:
parent
574ff3f9a7
commit
4fce521579
3 changed files with 16 additions and 11 deletions
|
@ -8,6 +8,7 @@ tee /data/ews/conf/ews.ip << EOF
|
||||||
[MAIN]
|
[MAIN]
|
||||||
ip = $myEXTIP
|
ip = $myEXTIP
|
||||||
EOF
|
EOF
|
||||||
|
echo $myLOCALIP > /data/elk/logstash/mylocal.ip
|
||||||
chown tpot:tpot /data/ews/conf/ews.ip
|
chown tpot:tpot /data/ews/conf/ews.ip
|
||||||
if [ -f /var/run/check.lock ];
|
if [ -f /var/run/check.lock ];
|
||||||
then rm /var/run/check.lock
|
then rm /var/run/check.lock
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# v16.10.0 by mo, DTAG, 2016-05-12 #
|
# v16.10.0 by mo, DTAG, 2016-05-12 #
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
# Type of install, SENSOR, INDUSTRIAL or FULL?
|
# Type of install, TPOT, SENSOR, INDUSTRIAL or FULL?
|
||||||
myFLAVOR="TPOT"
|
myFLAVOR="TPOT"
|
||||||
|
|
||||||
# Some global vars
|
# Some global vars
|
||||||
|
@ -150,18 +150,10 @@ tee -a /etc/ssh/ssh_config <<EOF
|
||||||
UseRoaming no
|
UseRoaming no
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Let's pull some updates
|
|
||||||
fuECHO "### Pulling Updates."
|
|
||||||
apt-get update -y
|
|
||||||
|
|
||||||
# Let's install docker
|
# Let's install docker
|
||||||
fuECHO "### Installing docker-engine."
|
fuECHO "### Installing docker-engine."
|
||||||
wget -qO- https://get.docker.com/ | sh
|
wget -qO- https://get.docker.com/ | sh
|
||||||
|
|
||||||
# Let's enable docker at boot and start service
|
|
||||||
#systemctl enable docker
|
|
||||||
#systemctl start docker
|
|
||||||
|
|
||||||
# Let's add proxy settings to docker defaults
|
# Let's add proxy settings to docker defaults
|
||||||
if [ -f $myPROXYFILEPATH ];
|
if [ -f $myPROXYFILEPATH ];
|
||||||
then fuECHO "### Setting up the proxy for docker."
|
then fuECHO "### Setting up the proxy for docker."
|
||||||
|
@ -267,6 +259,9 @@ tee -a /etc/crontab <<EOF
|
||||||
# Check if containers and services are up
|
# Check if containers and services are up
|
||||||
*/5 * * * * root check.sh
|
*/5 * * * * root check.sh
|
||||||
|
|
||||||
|
# Example for alerta-cli IP update
|
||||||
|
#*/5 * * * * root alerta --endpoint-url http://<ip>:<port>/api delete --filters resource=<host> && alerta --endpoint-url http://<ip>:<port>/api send -e IP -r <host> -E Production -s ok -S T-Pot -t \$(cat /data/elk/logstash/mylocal.ip) --status open
|
||||||
|
|
||||||
# Check if updated images are available and download them
|
# Check if updated images are available and download them
|
||||||
27 1 * * * root for i in \$(cat /data/images.conf); do docker pull dtagdevsec/\$i:latest1610; done
|
27 1 * * * root for i in \$(cat /data/images.conf); do docker pull dtagdevsec/\$i:latest1610; done
|
||||||
|
|
||||||
|
@ -289,7 +284,8 @@ mkdir -p /data/conpot/log \
|
||||||
/data/cowrie/log/tty/ /data/cowrie/downloads/ /data/cowrie/keys/ /data/cowrie/misc/ \
|
/data/cowrie/log/tty/ /data/cowrie/downloads/ /data/cowrie/keys/ /data/cowrie/misc/ \
|
||||||
/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 \
|
/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 \
|
||||||
/data/elasticpot/log \
|
/data/elasticpot/log \
|
||||||
/data/elk/data /data/elk/log /data/glastopf /data/honeytrap/log/ /data/honeytrap/attacks/ /data/honeytrap/downloads/ \
|
/data/elk/data /data/elk/log /data/elk/logstash/conf \
|
||||||
|
/data/glastopf /data/honeytrap/log/ /data/honeytrap/attacks/ /data/honeytrap/downloads/ \
|
||||||
/data/emobility/log \
|
/data/emobility/log \
|
||||||
/data/ews/log /data/ews/conf /data/ews/dionaea /data/ews/emobility \
|
/data/ews/log /data/ews/conf /data/ews/dionaea /data/ews/emobility \
|
||||||
/data/suricata/log /home/tsec/.ssh/
|
/data/suricata/log /home/tsec/.ssh/
|
||||||
|
@ -323,10 +319,18 @@ chown tpot:tpot -R /data
|
||||||
chmod 600 /home/tsec/.ssh/authorized_keys
|
chmod 600 /home/tsec/.ssh/authorized_keys
|
||||||
chown tsec:tsec /home/tsec/*.sh /home/tsec/.ssh /home/tsec/.ssh/authorized_keys
|
chown tsec:tsec /home/tsec/*.sh /home/tsec/.ssh /home/tsec/.ssh/authorized_keys
|
||||||
|
|
||||||
|
# Let's pull some updates
|
||||||
|
fuECHO "### Pulling Updates."
|
||||||
|
apt-get update -y
|
||||||
|
|
||||||
# Installing upgrades
|
# Installing upgrades
|
||||||
fuECHO "### Installing Upgrades."
|
fuECHO "### Installing Upgrades."
|
||||||
apt-get upgrade -y
|
apt-get upgrade -y
|
||||||
|
|
||||||
|
# Installing alerta-cli
|
||||||
|
fuECHO "### Installing alerta-cli."
|
||||||
|
pip install alerta
|
||||||
|
|
||||||
# Let's clean up apt
|
# Let's clean up apt
|
||||||
apt-get autoclean -y
|
apt-get autoclean -y
|
||||||
apt-get autoremove -y
|
apt-get autoremove -y
|
||||||
|
|
|
@ -32,7 +32,7 @@ d-i clock-setup/ntp boolean true
|
||||||
tasksel tasksel/first multiselect ubuntu-server
|
tasksel tasksel/first multiselect ubuntu-server
|
||||||
|
|
||||||
# Packages
|
# Packages
|
||||||
d-i pkgsel/include string apt-transport-https ca-certificates curl dialog dstat ethtool genisoimage git htop iw libpam-google-authenticator lm-sensors ntp openssh-server syslinux pv vim wireless-tools wpasupplicant
|
d-i pkgsel/include string apt-transport-https ca-certificates curl dialog dstat ethtool genisoimage git htop iw libpam-google-authenticator lm-sensors ntp openssh-server syslinux pv python-pip vim wireless-tools wpasupplicant
|
||||||
|
|
||||||
# Update Policy
|
# Update Policy
|
||||||
d-i pkgsel/update-policy select unattended-upgrades
|
d-i pkgsel/update-policy select unattended-upgrades
|
||||||
|
|
Loading…
Reference in a new issue