Created
August 3, 2024 08:05
-
-
Save muhammad-asn/758a03ff6ea0aebec166ac37f427715d to your computer and use it in GitHub Desktop.
Check hidden process that used bind mounts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function procbindmounts { | |
cat /proc/*/mounts | awk '$2 ~ /^\/proc\/[0-9]*($|\/)/ { print $2 }' | sort -ur | | |
while read dir; do | |
echo ===== POSSIBLE PROCESS HIDING $dir | |
echo -ne Overlay:\\t | |
cut -d' ' -f1-7 $dir/stat | |
umount $dir | |
echo -ne Hidden:\\t\\t | |
cut -d' ' -f1-7 $dir/stat | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reference:
https://righteousit.com/2024/07/24/hiding-linux-processes-with-bind-mounts/