Home Compressor
Post
Cancel

Compressor

Overview


Misc challenge that appeared within the 2022 HackTheBox Cyber Apocalypse CTF that features a restricted shell/jail application.

Enumeration


After using netcat to connect to this service. We can see it is some form of a restricted shell. We view the options and choose the one that says it runs pwd; ls -la.

Desktop View

We verify this option, with a output that seems true. Now lets see what the other options do.

Desktop View

We created a file that has the contents of /bin/bash and used the program to read the file contents to us as well. Nothing out of the ordinary, but we could try some methods of exploitation.

Exploit - Command Injection


We will now try to chain chains together if this program is just executing our input without any sanitization.

Desktop View

Success! Looks like we have a form of command execution that is outside their specified options. We were able to run echo and ls -la. We will now try to find the flag for the challenge.

Desktop View

We can see the flag is luckily in the ctf directory. We are able to read it, Challenge complete!

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