Writeup – CSL – Shares

Writeup – CSL – Shares

As the first box I’m doing from the great guys over at CyberSecLabs (, let’s fire it up and get to work!

Turn this bad boy on!

After adding the alias shares.csl to my /etc/hosts file, I kicked off AutoRecon and took a close look at the results. Here we see port 21 (FTP), port 80 (HTTP), port 111 (RPC), port 2049 (NFS), and port 27853 (Running SSH!), as well as some higher level ports. This high SSH port seemed odd to me.

Looking into the easy ports here, with NFS (Network File Sharing), we take a look at the nmap scan that was run on Port 111, and we see the following mount:

The *.*.*.* means it can be mounted by any IP address.

We mount this drive and see what we’ve got:

How to mount the directory. There’s more!

Thinking back to the high-port number running SSH, I bet that .ssh directory may be interesting!

Boom, private key!

Unfortunately, when you try using the private SSH key to login, and if you paid attention above, you’ll be denied access, asking for a passphrase, as the key is …. ENCRYPTED! But have no fear, ssh2john is here!

Prep the key for cracking!

Once you have it prepped for john, run john with the rockyou.txt wordlist to find the passphrase for the original key!

Boom. Now let’s login.

Now that we have the passphrase, don’t forget to chmod 600 the original private key and let’s login. Once logged in, run sudo -l, and we see there’s a user named amy that we can run /usr/bin/pkexec or /usr/bin/python3 as.

Getting somewhere now!

It’s trivial at this point to get on as amy. Simply search GTFOBins for the python binary, and take a look at sudo privileges, Switching users to amy and running python is a breeze.

And we’re amy!

Now, as amy, don’t forget to get the access.txt flag, and let’s sudo -l again! Now you see that we can run /usr/bin/ssh as anyone we want with no password, including root!

GTFOBins again? No way!

A quick trip back to GTFOBins shows us the way. Just look under sudo for ssh:

Don’t forget that system flag!

Thanks for tuning in to the first box I’ve gone after in the Beginner section of CyberSecLabs! I’m truly enjoying the quality of the content they’re providing here so far, and stay tuned for more!

Thanks Is Never Enough!

It’s always weird to start a blog post with an image, but that’s what I’m doing here. You see, I’ve got a ton to be thankful for at this point. In the past 7 months, I’ve participated in the SANS Cyber FastTrack, scoring 65th out of 3,498 people. I’ve been generously gifted the PTS Course from eLearnSecurity and obtained my eJPT certification, and now, I’m proud to announce that ActualTom has obtained his first corporate sponsorship from the awesome folks over at CyberSecLabs (

I first met the founder of CyberSecLabs through networking in random InfoSec communities and Discord servers. We discussed my frustrations with HackTheBox’s platform (specifically, the fact the VPN is open to a bunch of users and labs get messed up a lot), he offered to sponsor a subscription to their platform.

My reviews will be honest and to the point of a thoughtful review of their platform. That said, the Beginner labs in CyberSecLabs are supposed to be a good prep for the OSCP certification I’m dutifully working towards.

So, to the team at CyberSecLabs – THANK YOU. Really, from the bottom of my heart, thank you. You guys have gone out of your way to be helpful in your Discord, and you’ve made my life, consisting of a fulltime job, a family, a college degree I’m chasing, a non-profit I’m helping run, and finally my passion, achievable. I look forward to reviewing your platform, and again, thank you.