Home Readable /etc/shadow
Post
Cancel

Readable /etc/shadow

Readable /etc/shadow

The /etc/shadow file contains user password hashes and is usually readable only by the root user.

Enumeration

We are going to exploit a misconfigured /etc/shadow file to escalate our privileges to root. Let’s check the permission on /etc/shadow.

linpriv

As you can see, we have Read permission on /etc/shadow file.

Exploitation

We will extract the hash of a root user and crack it using johntheripper. After that, we will use the cracked password to login to root account.

linpriv

linpriv

linpriv

Well…As you can see, we have logged in as root user.

This post is licensed under CC BY 4.0 by the author.