Question: #include #include #include const char code () = x31xc0 /* Line 1: xorl %eax, %eax*/ x50 /* Line 2: pushl %eax */ x68 //sh

#include #include #include const char code () = "\x31\xc0" /* Line 1:

#include #include #include const char code () = "\x31\xc0" /* Line 1: xorl %eax, %eax*/ "\x50" /* Line 2: pushl %eax */ "\x68" "//sh" /* Line 3: pushl $0x68732f2f */ "\x68""/bin" /* Line 4: pushl $0x6e69622f */ "\x89\xe3" /* Line 5: movl %esp, %ebx*/ "\x50" /* Line 6: pushl %eax */ "\x53' /* Line 7: pushl %ebx */ "\x89\xe1" "\x99" /* Line 8: /* Line 9: movl %esp, %ecx*/ cdq*/ "\xb0\x0b" "\xcd\x80" /* Line 10: movb /* Line 11: int $0x0b,% al*/ $0x80*/ int main(int argc, char **argv) { char buf[sizeof(code)]; strcpy(buf, code)%;B ((void (*) ( )) buf) ( ); }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!