0% found this document useful (0 votes)
10 views3 pages

Assembly Report

assembly report of a trying code

Uploaded by

tolgaaksoydan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Assembly Report

assembly report of a trying code

Uploaded by

tolgaaksoydan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1) After downloading files I used objdump -d in linuxpool to checking the disasembled part as

it was mentioned in attached pdf file. Using objdump, founded starting address of touch1
and I wrote it to a txt file but it failed because ı forgot to overflow attack then I founded
buffer size from getbuf function and changed my file and when I retried new exploit txt file it
passed as below code for my target12.

2) I need code for cookie for exploit string in this part. I got an error about
connecting to server while running the gnu debugger in this part of the
assignment but after i used run -q flag instead of run it solved my problem
and I was able to run the code. Firstly I runned ctarget but returned in
getbuf so ı used a break in getbuf.After rerunning function again I
disassembled and found the stack pointer as 0x 55617480

I runned the ctarget wrote injection code for first argument rdi in pdf file it
was cookie so ı used cookie, rdi and then retq function as Cookie = 0x50fa73aa.
Used objdump -d again to find adress

Finally with getting location of the touch2 as below 0x40188c. passed the
test for phase2 of exploit attack.
3)
To not to fail in this part I must type ascii of cookie for location of touch3 function according
to pdf file. First I got the adress of touch3 function

Then i converted my cokkie to ascii format cookie 35 30 66 61 37 33 61 61 using man ascii

After that I founded stack pointer (same with previous phase2)


Finally I found the address of injection code but when ı tried to solve file failed because ı used
location from register as same with the previous answer after I became sure error was about this I
realized I was not setting register rdi to string and it was wrong and ı corrected my mistake by
changing mov value to rdi as adding 40 bytes . After adding 40 byes ı founded correct address as: 48
c7 c7 80 74 61 55 c3 with same objdump -d ı used in phase 2 . When I tried this the file passed phase
3 of assignment

This is the changed version of injected code from phase2

You might also like