For example,I have created this code:
/* shellcode.c */
int main(){
char *name[2];
name[0] ="/bin/sh";
name[1] = 0x0;
execve(name[0], name, 0x0);
exit(0);
}
#gcc -o shellcode -g shellcode.c
#gdb shellcode
(gdb)disassemble main
(gdb)disassemble execve
(gdb)disassemble exit
Now I must build shellcode from asm,but I can't get the exact asm code for
execve() and exit() without static compile.How to invoke a syscall in asm?
#gcc -o shellcode -g -static shellcode.c
gcc -o shellcode -g -static shellcode.c
ld: fatal: library -lc: not found
ld: fatal: File processing errors. No output written to shellcode
collect2: ld returned 1 exit status
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code