Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.23 KB

find.md

File metadata and controls

49 lines (36 loc) · 1.23 KB

ignore permission denied message

find / -iname repo -type f -prune 2>&1 | grep -v "Permission denied"

avoid permission denied messages

find / -iname *kali* 2>&-

Writable file

find / -writable -type f 2>/dev/null | grep -v "/proc/"

find files containing specific text

find / -type f \( -iname \*.php -o -iname \*.config -o -iname \*.conf -o -iname \*.ini -o -iname \*.txt \) -exec grep -i 'password\|passwd' {} \; -print 2>&-

finding SUID executables

find / -perm -4000 -type f -exec ls -la {} 2>/dev/null \;
find / -uid 0 -perm -4000 -type f 2>/dev/null
find / -perm -u=s -type f 2>/dev/null
find / -user root -perm -4000 -print 2>/dev/null
find / -perm -u=s -type f 2>/dev/null
find / -user root -perm -4000 -exec ls -ldb {} \;

find ssh key

find / -type f -iname id_rsa* 2>&-

what the group can do

id
uid=1000(kali) gid=1000(kali) groups=1000(kali),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),109(netdev),119(wireshark),122(bluetooth),134(scanner),143(kaboxer)
find / -group <name> 2>/dev/null
# find / -group wireshark 2>/dev/null