This commit is contained in:
kali 2020-05-14 13:39:17 -04:00
parent 41cb2b2be0
commit 574c4de5d7

View File

@ -1846,7 +1846,7 @@ if [ "`echo $CHECKS | grep IntFiles`" ]; then
printf $Y"[+] "$GREEN"SUID - Check easy privesc, exploits and write perms\n"$NC printf $Y"[+] "$GREEN"SUID - Check easy privesc, exploits and write perms\n"$NC
printf $B"[i] "$Y"https://book.hacktricks.xyz/linux-unix/privilege-escalation#commands-with-sudo-and-suid-commands\n"$NC printf $B"[i] "$Y"https://book.hacktricks.xyz/linux-unix/privilege-escalation#commands-with-sudo-and-suid-commands\n"$NC
for s in `find / -perm -4000 2>/dev/null`; do for s in `find / -perm -4000 2>/dev/null`; do
if [ "`ls -l \"$s\" | cut -d ' ' -f 3`" = "$USER" ]; then if [ -O "$s" ]; then
echo "You own the SUID file: $s" | sed "s,.*,${C}[1;31m&${C}[0m," echo "You own the SUID file: $s" | sed "s,.*,${C}[1;31m&${C}[0m,"
elif [ -w "$s" ]; then #If write permision, win found (no check exploits) elif [ -w "$s" ]; then #If write permision, win found (no check exploits)
echo "You can write SUID file: $s" | sed "s,.*,${C}[1;31;103m&${C}[0m," echo "You can write SUID file: $s" | sed "s,.*,${C}[1;31;103m&${C}[0m,"