impr
This commit is contained in:
parent
57cf17c4c0
commit
8ce392c4ae
@ -2748,7 +2748,7 @@ if echo $CHECKS | grep -q IntFiles; then
|
|||||||
echo_not_found "strace"
|
echo_not_found "strace"
|
||||||
fi
|
fi
|
||||||
suids_files=$(find / -perm -4000 -type f ! -path "/dev/*" 2>/dev/null)
|
suids_files=$(find / -perm -4000 -type f ! -path "/dev/*" 2>/dev/null)
|
||||||
printf "%s\n" "$suids_files" | while read s; do
|
for s in $suids_files; do
|
||||||
s=$(ls -lahtr "$s")
|
s=$(ls -lahtr "$s")
|
||||||
#If starts like "total 332K" then no SUID bin was found and xargs just executed "ls" in the current folder
|
#If starts like "total 332K" then no SUID bin was found and xargs just executed "ls" in the current folder
|
||||||
if echo "$s" | grep -qE "^total"; then break; fi
|
if echo "$s" | grep -qE "^total"; then break; fi
|
||||||
@ -2814,7 +2814,7 @@ if echo $CHECKS | grep -q IntFiles; then
|
|||||||
print_2title "SGID"
|
print_2title "SGID"
|
||||||
print_info "https://book.hacktricks.xyz/linux-unix/privilege-escalation#sudo-and-suid"
|
print_info "https://book.hacktricks.xyz/linux-unix/privilege-escalation#sudo-and-suid"
|
||||||
sgids_files=$(find / -perm -2000 -type f ! -path "/dev/*" 2>/dev/null)
|
sgids_files=$(find / -perm -2000 -type f ! -path "/dev/*" 2>/dev/null)
|
||||||
printf "%s\n" "$sgids_files" | while read s; do
|
for s in $sgids_files; do
|
||||||
s=$(ls -lahtr "$s")
|
s=$(ls -lahtr "$s")
|
||||||
#If starts like "total 332K" then no SUID bin was found and xargs just executed "ls" in the current folder
|
#If starts like "total 332K" then no SUID bin was found and xargs just executed "ls" in the current folder
|
||||||
if echo "$s" | grep -qE "^total";then break; fi
|
if echo "$s" | grep -qE "^total";then break; fi
|
||||||
|
Loading…
Reference in New Issue
Block a user