Skip to content

Commit 47d375c

Browse files
committed
SecImprove: limit unpriv user to see only their own processes
1 parent 0c99f99 commit 47d375c

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

install/hst-install-debian.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,10 @@ if [ ! "$release" -eq 10 ]; then
929929
chmod 755 /usr/bin/rssh
930930
fi
931931

932+
# Restrict access to /proc fs
933+
# - Prevent unpriv users from seeing each other running processes
934+
mount -o remount,defaults,hidepid=2 /proc
935+
echo "@reboot root sleep 5 && mount -o remount,defaults,hidepid=2 /proc" > /etc/cron.d/hestia-proc
932936

933937
#----------------------------------------------------------#
934938
# Configure Hestia #

install/hst-install-ubuntu.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,11 @@ if [ ! -e "/sbin/iptables-restore" ]; then
973973
fi
974974
fi
975975

976+
# Restrict access to /proc fs
977+
# - Prevent unpriv users from seeing each other running processes
978+
mount -o remount,defaults,hidepid=2 /proc
979+
echo "@reboot root sleep 5 && mount -o remount,defaults,hidepid=2 /proc" > /etc/cron.d/hestia-proc
980+
976981

977982
#----------------------------------------------------------#
978983
# Configure Hestia #

install/upgrade/versions/1.3.0.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,11 @@ fi
6060

6161
# Set var LOGIN_STYLE hestia.conf
6262
echo "[ * ] Set var LOGIN_STYLE hestia.conf"
63-
$BIN/v-change-sys-config-value "LOGIN_STYLE" "default"
63+
$BIN/v-change-sys-config-value "LOGIN_STYLE" "default"
64+
65+
# Restrict access to /proc fs
66+
if [ ! -e "/etc/cron.d/hestia-proc" ]; then
67+
echo "[ * ] Restrict access to /proc fs"
68+
echo "@reboot root sleep 5 && mount -o remount,defaults,hidepid=2 /proc" > /etc/cron.d/hestia-proc
69+
mount -o remount,defaults,hidepid=2 /proc
70+
fi

0 commit comments

Comments
 (0)