PIcoCTF 2018 – Binary Exploitation - buffer overflow0
Objective:
Let's start off simple, can you overflow the right buffer in
this program [1] to get the flag? You
can also find it in
/problems/buffer-overflow-0_1_316c391426b9319fbdfb523ee15b37db on the shell
server. Source [2] .
Hints:
(1)
How can you trigger the flag to print? (2) If
you try to do the math by hand, maybe try and add a few more characters.
Sometimes there are things you aren't expecting.
Solution:
I started by CDing
over to the problem folder
Ls shows us a flag file(Which we can’t open) the program and
the c code
The title tells us this is about a buffer over flow
Running the program we get this
./vuln
This program takes 1 argument.
Ok let’s give it an argument
./vuln 1
Thanks! Received: 1
Lets try just throwing a bunch values at it
./vuln 11111111111111111111111111111111111
picoCTF{ov3rfl0ws_ar3nt_that_bad_3598a894}
that was super simple but expected since it was the first flag in binary exploitation
Comments
Post a Comment