Weak File Permissions
The name itself tells everything, weak file permissions on sesitive files.
Readable /etc/shadow
Note: the /etc/shadow file on the VM is world-readable
View the contents
Copy the hash from the file and crack the password using any password-cracking tool.
Then use the cracked password to gain access.
Writable /etc/shadow
Note that the /etc/shadow file on the VM is world-writable:
If they are writable then generate a new password hash with the password of your choice
Edit the /etc/shadow file and replace the original root user's password hash with the new password that you generated.
Writable /etc/passwd
Historically the /etc/passwd file contained user password hashes and some versions of Linux will still allow password hashes to be stored there.
Step 1: Check Permissions
Step 2: Generate a new password
Step 3: Edit the /etc/passwd file and place the generated password hash between the first and second colon(:) of the root user's row.
Last updated