Skip to content

Instantly share code, notes, and snippets.

@muhammad-asn
Created August 3, 2024 08:05
Show Gist options
  • Save muhammad-asn/758a03ff6ea0aebec166ac37f427715d to your computer and use it in GitHub Desktop.
Save muhammad-asn/758a03ff6ea0aebec166ac37f427715d to your computer and use it in GitHub Desktop.
Check hidden process that used bind mounts
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
}
@muhammad-asn
Copy link
Author

muhammad-asn commented Aug 3, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment