-2

Disassembly:

0:  31 c9                    xor    ecx,ecx
2:  f7 e1                    mul    ecx
4:  51                       push   ecx
5:  68 2f 2f 73 68           push   0x68732f2f
a:  68 2f 62 69 6e           push   0x6e69622f
f:  89 e3                    mov    ebx,esp
11: b0 0b                    mov    al,0xb
13: cd 80                   int    0x80
15: 51                      push   ecx
16: b0 01                   mov    al,0x1
18: cd 80                   int    0x80
1
  • 4
    will you please comment what you have tried and where you are struck at a minimal glance it appears to be too simple that a few minutes of peering on the hex can reveal everything
    – blabb
    Feb 18, 2019 at 3:42

1 Answer 1

1
0:  31 c9                 xor    ecx,ecx     ;; ecx = 0
2:  f7 e1                 mul    ecx         ;; eax = eax * ecx (set eax to 0)
4:  51                    push   ecx         ;; push 0 on stack (string end)
5:  68 2f 2f 73 68        push   0x68732f2f  ;; push "//sh" on stack
a:  68 2f 62 69 6e        push   0x6e69622f  ;; push "/bin" on stack
f:  89 e3                 mov    ebx,esp     ;; ebx = esp (esp = @"/bin//sh\0")
11: b0 0b                 mov    al,0xb      ;; eax = 0xb (sys_call_execve)
13: cd 80                 int    0x80        ;; call execve("/bin//sh")
15: 51                    push   ecx         ;; push 0 on stack
16: b0 01                 mov    al,0x1      ;; eax = 1 (sys_call_exit)
18: cd 80                 int    0x80        ;; call exit(ebx)

Basically, this is a shellcode that run /bin/sh and, then, exit().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.