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

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -