pwny.cc
Search…
Internal Recon

Sudo - Useful Commands

1
#List user's privileges
2
sudo -l
Copied!

Find - Useful Commands #SUID #SGID #StickyBit

1
#Find world writeable directories
2
find / -perm 777 2>/dev/null
3
4
#Find SUID files
5
find / -perm /4000 -type f 2>/dev/null
6
7
#Find root SUID files
8
find / -perm /4000 -uid 0 -type f 2>/dev/null
9
10
#Find SGID files - Run as the group, not the user who started it
11
find / -perm -g=s -type f 2>/dev/null
12
13
#Find Sticky bit files
14
find / -perm -1000 -type d 2>/dev/null
15
16
#Find SUID or SGID (3 folders deep)
17
find / -perm -g=s -o -perm -4000 ! -type l -maxdepth 3 -exec ls -ld {} \; 2>/dev/nul
Copied!
Last modified 8mo ago