updater tweaking

This commit is contained in:
t3chn0m4g3 2022-03-19 21:32:11 +00:00
parent cbf431d960
commit 717167b55c
2 changed files with 78 additions and 75 deletions

View file

@ -18,7 +18,7 @@ myCONF_FILE="/root/installer/iso.conf"
myPROGRESSBOXCONF=" --backtitle "$myBACKTITLE" --progressbox 24 80" myPROGRESSBOXCONF=" --backtitle "$myBACKTITLE" --progressbox 24 80"
mySITES="https://ghcr.io https://github.com https://pypi.python.org https://debian.org" mySITES="https://ghcr.io https://github.com https://pypi.python.org https://debian.org"
myTPOTCOMPOSE="/opt/tpot/etc/tpot.yml" myTPOTCOMPOSE="/opt/tpot/etc/tpot.yml"
myLSB_STABLE_SUPPORTED="buster bullseye" myLSB_STABLE_SUPPORTED="bullseye"
myLSB_TESTING_SUPPORTED="stable" myLSB_TESTING_SUPPORTED="stable"
myREMOTESITES="https://hub.docker.com https://github.com https://pypi.python.org https://debian.org https://listbot.sicherheitstacho.eu" myREMOTESITES="https://hub.docker.com https://github.com https://pypi.python.org https://debian.org https://listbot.sicherheitstacho.eu"
myPREINSTALLPACKAGES="aria2 apache2-utils cracklib-runtime curl dialog figlet fuse grc libcrack2 libpq-dev lsb-release net-tools software-properties-common toilet" myPREINSTALLPACKAGES="aria2 apache2-utils cracklib-runtime curl dialog figlet fuse grc libcrack2 libpq-dev lsb-release net-tools software-properties-common toilet"
@ -823,27 +823,25 @@ mkdir -vp /data/adbhoney/{downloads,log} \
/data/elasticpot/log \ /data/elasticpot/log \
/data/elk/{data,log} \ /data/elk/{data,log} \
/data/endlessh/log \ /data/endlessh/log \
/data/ews/conf \
/data/fatt/log \ /data/fatt/log \
/data/honeytrap/{log,attacks,downloads} \
/data/glutton/log \ /data/glutton/log \
/data/hellpot/log \ /data/hellpot/log \
/data/heralding/log \ /data/heralding/log \
/data/honeypots/log \ /data/honeypots/log \
/data/honeysap/log \ /data/honeysap/log \
/data/honeytrap/{log,attacks,downloads} \
/data/ipphoney/log \ /data/ipphoney/log \
/data/log4pot/{log,payloads} \ /data/log4pot/{log,payloads} \
/data/mailoney/log \ /data/mailoney/log \
/data/medpot/log \ /data/medpot/log \
/data/nginx/{log,heimdall} \ /data/nginx/{log,heimdall} \
/data/emobility/log \ /data/p0f/log \
/data/ews/conf \
/data/rdpy/log \
/data/redishoneypot/log \ /data/redishoneypot/log \
/data/sentrypeer/log \ /data/sentrypeer/log \
/data/spiderfoot \ /data/spiderfoot \
/data/suricata/log \ /data/suricata/log \
/data/tanner/{log,files} \ /data/tanner/{log,files} \
/data/p0f/log \
/home/tsec/.ssh/ /home/tsec/.ssh/
touch /data/nginx/log/error.log touch /data/nginx/log/error.log

View file

@ -100,19 +100,30 @@ if [ "$myRELEASE" != "$myLSB_RELEASE" ]
done done
if [ "$myQST" = "n" ]; if [ "$myQST" = "n" ];
then then
echo
echo $myGREEN"Aborting!"$myWHITE echo $myGREEN"Aborting!"$myWHITE
echo
exit exit
else else
echo "###### Stopping and disabling T-Pot services ... " echo "###### Stopping and disabling T-Pot services ... "
echo
systemctl stop tpot systemctl stop tpot
systemctl disable tpot systemctl disable tpot
echo "###### Switching /etc/apt/sources.list from buster to bullseye ... " echo "###### Switching /etc/apt/sources.list from buster to bullseye ... "
echo
sed -i 's/buster/bullseye/g' /etc/apt/sources.list sed -i 's/buster/bullseye/g' /etc/apt/sources.list
echo "###### Updating repositories ... " echo "###### Updating repositories ... "
echo
apt-fast update apt-fast update
echo "###### Running full upgrade ... " echo "###### Running full upgrade ... "
apt-fast full-upgrade -y -o Dpkg::Options::="--force-confold" echo
echo "###### Please reboot now and re-run update.sh." echo "docker.io docker.io/restart boolean true" | debconf-set-selections -v
echo "debconf debconf/frontend select noninteractive" | debconf-set-selections -v
apt-fast full-upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes
dpkg --configure -a
echo "###### $myBLUE""Finished with upgrading. Now restarting update.sh and to continue with T-Pot related updates.""$myWHITE"
exec "$0" "$@"
exit 1
fi fi
exit exit
fi fi
@ -211,9 +222,9 @@ export DEBIAN_FRONTEND=noninteractive
echo "### Installing apt-fast" echo "### Installing apt-fast"
/bin/bash -c "$(curl -sL https://raw.githubusercontent.com/ilikenwf/apt-fast/master/quick-install.sh)" /bin/bash -c "$(curl -sL https://raw.githubusercontent.com/ilikenwf/apt-fast/master/quick-install.sh)"
local myPACKAGES=$(cat /opt/tpot/packages.txt) local myPACKAGES=$(cat /opt/tpot/packages.txt)
# Remove purge in the future echo "### Removing and holding back problematic packages ..."
echo "### Removing repository based install of elasticsearch-curator" apt-fast -y purge cockpit-pcp elasticsearch-curator exim4-base glances mailutils pcp
apt-get purge elasticsearch-curator -y apt-mark hold exim4-base mailutils pcp cockpit-pcp
hash -r hash -r
echo "### Now upgrading packages ..." echo "### Now upgrading packages ..."
dpkg --configure -a dpkg --configure -a
@ -229,11 +240,8 @@ apt-fast -y dist-upgrade -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::
dpkg --configure -a dpkg --configure -a
npm cache clean --force npm cache clean --force
npm install elasticdump -g npm install elasticdump -g
pip3 install --upgrade yq pip3 install --upgrade glances yq
hash -r hash -r
echo "### Removing and holding back problematic packages ..."
apt-fast -y purge exim4-base mailutils pcp cockpit-pcp elasticsearch-curator
apt-mark hold exim4-base mailutils pcp cockpit-pcp
echo echo
echo "### Now replacing T-Pot related config files on host" echo "### Now replacing T-Pot related config files on host"
@ -264,28 +272,25 @@ mkdir -vp /data/adbhoney/{downloads,log} \
/data/elasticpot/log \ /data/elasticpot/log \
/data/elk/{data,log} \ /data/elk/{data,log} \
/data/endlessh/log \ /data/endlessh/log \
/data/ews/conf \
/data/fatt/log \ /data/fatt/log \
/data/honeytrap/{log,attacks,downloads} \
/data/glutton/log \ /data/glutton/log \
/data/hellpot/log \ /data/hellpot/log \
/data/heralding/log \ /data/heralding/log \
/data/honeypots/log \ /data/honeypots/log \
/data/honeysap/log \ /data/honeysap/log \
/data/honeytrap/{log,attacks,downloads} \
/data/ipphoney/log \ /data/ipphoney/log \
/data/log4pot/{log,payloads} \ /data/log4pot/{log,payloads} \
/data/log4pot/log \
/data/mailoney/log \ /data/mailoney/log \
/data/medpot/log \ /data/medpot/log \
/data/nginx/{log,heimdall} \ /data/nginx/{log,heimdall} \
/data/emobility/log \ /data/p0f/log \
/data/ews/conf \
/data/rdpy/log \
/data/redishoneypot/log \ /data/redishoneypot/log \
/data/sentrypeer/log \ /data/sentrypeer/log \
/data/spiderfoot \ /data/spiderfoot \
/data/suricata/log \ /data/suricata/log \
/data/tanner/{log,files} \ /data/tanner/{log,files} \
/data/p0f/log \
/home/tsec/.ssh/ /home/tsec/.ssh/
### For some honeypots to work we need to ensure ntp.service is not listening ### For some honeypots to work we need to ensure ntp.service is not listening