intent
stringlengths 4
313
| snippet
stringlengths 2
271
|
---|---|
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 |
jump short to encodedshellcode if equal | je short encodedshellcode |
add 20 to the single byte stored at memory address var | add byte [var], 20 |
perform xor operation between ebx register and the word __flag_byte and save the result in ebx | xor [ebx], word __flag_byte |
compare if edi is equal to 0 | cmp edi, 0 |
move the contents of ebx into the 4 bytes at memory address var | mov [var], ebx |
call _continue | call _continue |
push the value 10 onto the stack and point eax to the stack register | push 10 \n mov eax, esp |
move the value of ax into memory at address 1000h | mov [1000h], ax |
add 0x2 to the contents in cl and save the result in cl | add cl, 0x2 |
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 eax, esp |
jump to the two label | jmp two |
define the numeric label 3 | 3: |
reserve array realarray of 10 real numbers | realarray resq 10 |
move the address of the character on the stack into ebx | mov ebx, esp |
move 0x80 into ah | mov ah, 0x80 |
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 |
move 5 into al | mov al, 5 |
zero out the eax register and the ebx register | xor ebx, ebx \n mul ebx |
define decode function | decode: |
move 0x7 into bl | mov bl, 0x7 |
push the dword 0x6f702f6e onto the stack | push dword 0x6f702f6e |
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 |
move the address of msg3 into eax | mov eax, msg3 |
move the contents of x into ebx | mov ebx, x |
push '//pa' onto the stack | push '//pa' |
close | mov eax, 6 |
push 0x6e69622f onto the stack | push 0x6e69622f |
subtract 0x6374612e from the contents in ecx and save the result in ecx | sub ecx, 0x6374612e |
subtract the byte 0x1 from the contents of the esp register | sub esp, byte 0x1 |
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 |
move a byte from the address buff+ecx into al | mov al, byte[buff+ecx] |
load the effective address of ebp-8 into the ebx register | lea ebx, [ebp-8] |
decrement the contents of the cl register and jump to the loop_dup label if the result is not negative | dec cl \n jns loop_dup |
declare the format label | format: |
test the value of eax | test eax, eax |
push 1 onto the stack | push 1 |
put the byte CHMOD_CALL into the eax register | push byte CHMOD_CALL \n pop eax |
move 0x04 into bl | mov bl, 0x04 |
push the word 0x3905 onto the stack | push word 0x3905 |
define the callpop label | callpop: |
perform the xor operation between the al register and the value 0x41 | xor al, 0x41 |
move 04h into al | mov al, 04h |
add 24 to eax | add eax, 24 |
initialize ecx to zero | xor ecx, ecx |
initialize cx to 01 | mov cx, 01 |
move the contents of eax into address defined by ebp+var_a | mov [ebp+var_a], eax |
zero out ah register | xor ah, ah |
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 |
point ebp to the esp register | mov ebp, esp |
move 4 into eax | mov eax, 4 |
put syscall value into eax | pop eax |
call the prepare function | call prepare |
push 0x76766c2d to the stack | push 0x76766c2d |
push 0x2f2f2f2f to the stack | push 0x2f2f2f2f |
push 0x46 onto the stack | push 0x46 |
push 0x6f723a30 onto the stack | push 0x6f723a30 |
invoke subroutine socket | mov ebx, 1 |
right rotate the contents of the esi register by 1 bit | ror esi, 1 |
move 0x17 into al | mov al, 0x17 |
zero out the edx register and jump to the l2 label if the contents of the ecx register is equal to the contents of the edx register | xor edx, edx \n cmp ecx, edx \n je l2 |
move readbuffer into edx | mov edx, readbuffer |
move m_src1 to ebx | mov ebx, m_src1 |
define the label 2 | 2: |
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, 5 \n dec al \n jnz l2 |
push the byte +0x6 onto the stack | push byte +0x6 |
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 |
define the byte string '/sbin/insmod#/tmp/o.o' | db '/sbin/insmod#/tmp/o.o' |
zero out eax and ecx | xor ecx, ecx \n mul ecx |
move the value 672274793 into the ecx register | mov ecx, 672274793 |
copy the address of var into esi | mov esi, var |
restore edx from the value we pushed onto the stack at the start | pop edx |
push the 0x69622f65 onto the stack | push 0x69622f65 |
compare the contents of the al register and 0xf2 | cmp al, 0xf2 |
move the contents of the esp register into the ecx register | mov ecx, esp |
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 |
push 0x30313a31 to the stack | push 0x30313a31 |
push 0x1 onto the stack | push 0x1 |
compare the word at the address ecx and 0x5951 | cmp word [ecx], 0x5951 |
move the contents of the esi register into the bx register | mov bx, [esi] |
define writestring function | writestring: |
subtract 88 from the contents of the al register | sub al, 88 |
define the byte string '/etc/passwd#' | db '/etc/passwd#' |
push the byte 0x1 onto the stack and point ecx to the stack register | push byte 0x1 \n mov ecx, esp |
subtract the byte 8 from the contents of the ebx register | sub ebx, byte 8 |
define shellcode as an array of bytes and initialize it to 0x4b,0xf7,0x13,0x59,0xcc,0x8c,0x63,0x5e,0x9f,0x8d,0x99,0x9f,0x1f,0xa4,0x3b,0x6e,0xc6,0x36,0x23 | shellcode: db 0x4b,0xf7,0x13,0x59,0xcc,0x8c,0x63,0x5e,0x9f,0x8d,0x99,0x9f,0x1f,0xa4,0x3b,0x6e,0xc6,0x36,0x23 |
move permissions to read write and execute into ecx | mov ecx, 0777 |
zero out the eax and ebx register | xor ebx, ebx \n mul ebx |
move the contents of memory address ebp+12 into esi | mov esi, [ebp+12] |
declare msglength to have the constant value 12 | msglength: equ 12 |
increment the memory variable count | inc count |
move 0x2f3e20 into eax | mov eax, 0x2f3e20 |
perform a logical xor between the dl register and 0xbb and save the result in dl | xor dl, 0xbb |
push the dword 0x3a303a3a onto the stack | push dword 0x3a303a3a |
push the dword 0x6f726577 onto the stack | push dword 0x6f726577 |
push the 0x656c6966 onto the stack | push 0x656c6966 |
push the byte 6 onto the stack | push byte 6 |
push the value 0x7461632f and the value 0x6e69622f onto the stack and point the esi register to the stack register | push 0x7461632f \n push 0x6e69622f \n mov esi, esp |
push the double word 0x303a3a31 onto the stack | push dword 0x303a3a31 |
push 0x74 to the stack | push 0x74 |