Openssl Privilege Escalation(Read Any File)

LazysysAdmin Vulnhub — Walkthrough
April 14, 2019
BSides Vancouver: 2018 (Workshop) — Walkthrough
April 19, 2019
Share This:

Openssl Privilege Escalation(Read Any File)

If You Have Permission To Run Openssl Command as root than you can read any file in plain text no matter which user you are

To do so you need to encrypt the file and then decrypt the file

Encrypting File

openssl aes-256-cbc -a -salt -in secrets.txt -out secrets.txt.en

What This Command Will Do is This Will Encrypt /etc/shadow File into secrets.txt.enc

Decrypting The File

Now We Have Successfully Encrypt The File So now we need to decrypt the file to see the file in plain text

openssl aes-256-cbc -d -a -in secrets.txt.enc -out thehackingtutorials.txt.new

Now This Command Will Decrypt secrets.txt.enc to New File Named thehackingtutorials.txt.new

Opening The File

Now You Can View The File By Simply cat + filename

Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: