Just trying to get the assembler instructions for <__execve> of the code below because i want to build the shell spawn opcode list:
#include <stdio.h>
int main()
{
char *happy[2];
happy[0] = "/bin/sh";
happy[1] = NULL;
execve (happy[0], happy, NULL);
}
Objdump gives me this :
8053a20: 53 push %ebx
8053a21: 8b 54 24 10 mov 0x10(%esp),%edx
8053a25: 8b 4c 24 0c mov 0xc(%esp),%ecx
8053a29: 8b 5c 24 08 mov 0x8(%esp),%ebx
8053a2d: b8 0b 00 00 00 mov $0xb,%eax
8053a32: ff 15 a4 d5 0e 08 call *0x80ed5a4
8053a38: 3d 00 f0 ff ff cmp $0xfffff000,%eax
8053a3d: 77 02 ja 8053a41 <__execve+0x21>
8053a3f: 5b pop %ebx
8053a40: c3 ret
8053a41: c7 c2 e8 ff ff ff mov $0xffffffe8,%edx
8053a47: f7 d8 neg %eax
8053a49: 65 8b 0d 00 00 00 00 mov %gs:0x0,%ecx
8053a50: 89 04 11 mov %eax,(%ecx,%edx,1)
8053a53: 83 c8 ff or $0xffffffff,%eax
8053a56: 5b pop %ebx
8053a57: c3 ret
8053a58: 90 nop
8053a59: 90 nop
8053a5a: 90 nop
From several texts I've read there was supposed to be a int 0x80 somewhere in the above output. Why isn't there one?
Are there any major changes in the 3.2 kernel concerning how syscalls work that might affect the algorithms of shellcode building (specific register loads, etc) which are presented in books written 3-4 years ago? The above dump looks very different from the output presented in the "Shellcoders Handbook" or "Smash the Stack"
Thanks!
