The Dutch Hacker
weak rsa challenge

Weak RSA Challenge – HackTheBox

Weak RSA Challenge on hackthebox

Weak RSA challenge is part of the Beginners track on hackthebox

Download the file and unzip it. We see 2 files. flag.enc and key.pub

Let’s see what is inside both of them. by using the cat command

Weak RSA Challenge on hackthebox

The key is an RSA key. That’s why the name of the challenge is Weak RSA. We need to use that to decrypt the message. I found one way on this site but this is a rabbit hole SSH encrypt and decrypt – ATI public wiki (ttu.ee)

After some more googling I came along this site GitHub – Ganapati/RsaCtfTool: RSA attack tool (mainly for ctf) – retreive private key from weak public key and/or uncipher data

Installed the tool in the opt directory of my kali linux

cd /opt
git clone https://github.com/Ganapati/RsaCtfTool.git
sudo apt-get install libgmp3-dev libmpc-dev
cd RsaCtfTool
pip3 install -r "requirements.txt"

Now that all is installed. I typed in the following command

python3 /opt/RsaCtfTool/RsaCtfTool.py --publickey key.pub --uncipherfile flag.enc

It took a while but the flag is there

Weak RSA Challenge on hackthebox

Most Popular Post

Sign Up

Signup today for free and be the first to get notified on new updates.
* indicates required

Follow Me

Most Popular Post

Contact Us