Limitless from PicoCTF - Binary Exploitation

Created by: Mrx-Exploit

Featured image

Source Code Review

In this section we will listen to the source code hahaha let’s see the main func

image

there are two variable ( index and value ) and one array , there are two input and in the end they called another func Hmmm That’s look’s normal

image

Damn something wrong here What is that he takes value and put it in the array with index so wierd

image

There is anther func called win all its function is to read what is inside flag.txt and then print it look’s easy

Pwn

Let’s try to test this program

image

Segmentation fault !!! Why !!?
ops i forgot it’s take int value hahaha let’s try it again

image

That’s looks normal right now :D
Let’s get win func addr then try to set it in the first let’s see what will happen

image

Awesome let’s change it to pass it in the program let’s do that with python

image

Awesome now time to try it

image

it’s doesn’t work you know why buecause it’s takes int again Hmmmm so what will happen if we change it to Decimal so let’s change it with python again easy to do with 0xDiablos :D

image

So easy let’s try it now but in the first let’s create flag.txt

image

Done let’s try it now

image

Cool we got it Daaaaaaaamn i told you it’s will be easy with 0xDiablos

Automated Script

I did script to automate this mission and there is comment Per line so amazing HERE