Gonzalez Posted September 11, 2009 Report Posted September 11, 2009 [SECTION .text]global _start_start:jmp short enderstarter:xor eax, eaxxor ebx, ebxxor edx, edxinc ebxmov al,4pop ecx ; eax = 4, ebx = 1, edx = len, ecx = popmov dl, lenint 0×80xor eax, eaxinc eax ; Quit the shellcode.int 0×80ender:call starterdb “hello shellcoder =)”,0×0a ; Call the message.len equ $-ender ; Sh0ck - shock@k.st[root@shock Desktop]# $ file=hello; od -An -j96 -N$(($(echo 0x$(readelf -t $file 2>&1 | awk ‘/.text/ {getline; print $4}’)))) -w$(($(echo 0x$(readelf -t $file 2>&1 | awk ‘/.text/ {getline; print $4}’)))) -tx1 $file | sed -e ’s| |\\x|g\xeb\x13\x31\xc0\x31\xdb\x31\xd2\x43\xb0\x04\x59\xb2\x19\xcd\x80\x31\xc0\x40\xcd\x80\xe8\xe8\xff\xff\xff\x68\x65\x6c\x6c\x6f\x20\x73\x68\x65\x6c\x6c\x63\x6f\x64\x65\x72\x20\x3d\x29\x0a[root@shock Desktop]# $ file=hello; echo $(($(echo 0x$(readelf -t $file 2>&1 | awk ‘/.text/ {getline; print $4}’))))46 Bytes.Enjoy =) Quote