mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-04-27 11:09:09 -04:00
10 lines
303 B
Bash
10 lines
303 B
Bash
#Find setuid programs
|
|
#!/bin/sh
|
|
tempfile="/tmp/$0.$$"
|
|
trap "rm $tempfile" 0
|
|
find / \( -type f -a -user root -a -perm -4001 \) -print > $tempfile
|
|
for file in `cat $tempfile`; do
|
|
strings -a $file | awk '/^gets$|^strcpy$|^strcat$|^sprintf$/\
|
|
{ printf ("%-10s \t %-50s \n"), $1, file }' "file=$file" -
|
|
done
|