Flushed - H@cktivityCon CTF

Category: Scripting
Solves (at time of writing): 67
Description: It is like Rescue Mission all over again! Except this time... the flag was flushed down the toilet!

Flushed

We once again get an IP and Port to netcat into.

Netcatting in, it seems like a normal shell.

But after typing ls we see the twist.

Everything is being converted into ascii art?

This solution is unintended, you are supposed to write a script to recognize the characters, this is what I did:

Well not everything, after experimenting a bit, only stdout gets converted into ascii art. (so non-error messages).

If we try to do something like thiscommanddoesntexist it shows up normally.

This error (on stderr) gets shown normally.

So what happens if we output command like ls as an error, and route it to stderr?

In bash we can do that with prefixing our command with >&2, so our final command would be >&2 ls

And yes, this worked.

Knowing how to evade that, we can base64 the file, and decrypt it on our own PC to take a look at it.

And the decoded image looks like this:

~sw1tchbl4d3, 31/07/2020 (dd/mm/yyyy)