[33C3 CTF] The 0x90s called Writeup

Standard

Description:

The 0x90s called – PWN

The 0x90s called, they want their vulns back!
Pwn this and get the flag. Who would’ve thought?
If you want to try it locally first, check this out.

This challenge was pretty simple and obvious. We are given with a website that is requesting a ‘proof of work’ from us to reduce the load on their infrastructure. We need to press start and then we get a port to which we can connect using netcat, username and password. We connect to the server and search for the flag.

Look at the highlighted rows. We can see that we are in Slack Linux 0.99pl12 machine, that flag.txt is on the root folder and that only root can read it. Before trying anything special or complicated, lets search online for known exploit to this version.

90s_called_1Oh, this was easy! There’s a known exploit available on Github.

Lets run it to see if it works, and if so read the flag.

 

It worked just fine (thanks prdelka for the exploit)! We got root permissions and were able to read the flag.
Flag33C3_Th3_0x90s_w3r3_pre3tty_4w3s0m3

I’ll be happy to read in the comments how the challenge was for you.

[CSAW 2016] PWN: Warmup Writeup

Standard

Description:

So you want to be a pwn-er huh? Well let’s throw you an easy one 😉
nc pwn.chal.csaw.io 8000

warmup

Let’s connect to the server and play with it a little bit:

The program says “WOW:” followed by a memory address. This address is probably the address of the function we need to execute. Let’s open IDA to view the code:

This is a classic BOF (Buffer Overflow) case. The main method uses the gets() function to receive the given input and returns it. gets() is storing 64 characters (40h). Because there is no validation of the given string we need to supply an input that will exploit the program and make it jump to the wanted address: 0x40060d.

A short python script will do the job:

And we got the flag: FLAG{LET_US_BEGIN_CSAW_2016}

[TWCTF-2016: PWN] judgement Writeup

Standard

Guest post by Shak.

Challenge description:
Host : pwn1.chal.ctf.westerns.tokyo
Port : 31729
judgement


Let’s check the binary. The following function is reading the flag from a local file on the server, so this binary will not reveal the flag, but further examining it might.

Next we can see the main function which gets our input and compares it to the flag.

What it also does, is printing our input with no formatting (line 15), which means we can use printf format to read data from the stack. First of all, let’s check if this will work by trying to print the second value from the stack as a string

It works, but no luck there. I wrote a simple python script that will print the first 300 values from the stack and search for the flag:

And indeed we get it: