Search

Password Hunting

quick commands:

color coordinate:

grep --color=auto -rnw '/' -ie "PASSWORD" --color=always 2> /dev/null

it searches for PASSWORD in files and it spits out the results in red so we can read

Better for password in plaintext:

grep --color=auto -rnw '/' -ie "PASSWORD=" --color=always 2> /dev/null

you can also change to different variants of password (pass, passwd, pwd, password ) =) etc to try to find that one password you need

password as file name:

locate password | more 
locate passwd | more 
locate pass | more 
locate pwd | more 

^all of these are options

SSH keys. Provides us access to another user or a different machine in the network:

find / -name authorized_keys 2> /dev/null
#OR
find / -name id_rsa 2> /dev/null