intent
stringlengths
4
313
snippet
stringlengths
2
271
mul eax by ecx
mul ecx
push the byte 37 onto the stack
push byte 37
push the dword 0x6b6e756a onto the stack
push dword 0x6b6e756a
move the contents of the esp register into the edx register
mov edx, esp
push zero onto the stack
xor eax, eax \n push eax
jump to two
jmp two
right rotate esi 1 time
ror esi, 1
move 0xfff into cx
mov cx, 0xfff
push the value 0x6e7a762d onto the stack and point the edi register to the stack register
push 0x6e7a762d \n mov edi, esp
subtract the contents of the bl register from the contents of the cl register and jump to the l3 label if the result is not negative
sub cl, bl \n jns l3
move the value 0x61722f6c into the double word starting at the address [esp-0x18]
mov dword [esp-0x18], 0x61722f6c
declare the decoder function
decoder:
jump to the label checkforfile if the contents of the eax register is not zero
test eax, eax \n jnz checkforfile
move the 4 bytes in memory at the address contained in ebx into eax
mov eax, [ebx]
jump to the address specified by the label loop if the operands are not equals in the previous comparison
jne loop
move the 32-bit integer representation of 2 into the doubleword starting at the address in ebx
mov dword [ebx], 2
define port as an array of bytes and initialize it to 0xd4, 0x31, 0xc0, 0xa8, 0x3, 0x77
port: db 0xd4, 0x31, 0xc0, 0xa8, 0x3, 0x77
move decimal number 90 into eax
mov eax, 90
define string as the byte string '/etc/passwd'
string: db '/etc/passwd'
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 [edx], 0x2e \n jne l2 \n jmp while
declare inc_dec function
inc_dec:
zero out the eax and edx register
xor edx, edx \n mul edx
define the label 1
1:
move the stack pointer into edx
mov edx, esp
put the syscall 0x2 into the al register
mov al, 0x2
move 0xd2c45e5e into esi
mov esi, 0xd2c45e5e
push the value 0x6374652f onto the stack and point eax to the stack register
push 0x6374652f \n mov eax, esp
declare the formatting label
formatting:
push the word 0x401f onto the stack
push word 0x401f
decrement the counter and jump to the do_dup label if the count is not zero
loop do_dup
jump to the one label
jmp one
compare if eax is zero
cmp eax, 0
declare the encrypt label
encrypt:
push the value 0x64687373 onto the stack and point the ebp register to the stack register
push 0x64687373 \n mov ebp, esp
push the byte +0x7f onto the stack
push byte +0x7f
push 0x7369642d to the stack
push 0x7369642d
push 0x68736162 onto the stack
push 0x68736162
jump to label multiplyloop
jmp multiplyloop
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], 0x7 \n jle lowbound
make the system call to read the file
mov eax, 3
if the contents of the bl register is not zero then jump to the label not_found
test bl, bl \n jz not_found
move the value 0x6d6f646e into the double word starting at the address [esp-0x14]
mov dword [esp-0x14], 0x6d6f646e
push bx onto the stack
push bx
push the value 0x6374652f onto the stack and point ebp to the stack register
push 0x6374652f \n mov ebp, esp
right shift the contents of eax by 31 bits
sar eax, 31
move 0x969d8cd0 into eax
mov eax, 0x969d8cd0
push $0x6e69622f onto the stack
pushl $0x6e69622f
set the direction flag to zero
cld
decrement ecx and jumps to the up label unless decrementing ecx caused its value to become zero
loop up
clear the ax register
xor ax, ax
subtract 1662 from the contents of ax register and save the result in ax
sub ax, 1662
declare the get label
get:
move value of 1 into register ax
mov ax, 1
if not 0 then jump to the scan label
jnz scan
if the contents of the cl register is greater than the decimal value 12 then jump to the label l2
cmp cl, 12 \n jg l2
jump to the esp label
jmp esp
compare if edx is zero
cmp edx, 0
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 eax, esp
push the byte 0x2 onto the stack
push byte 0x2
move 0102 into cl
mov cl, 0102
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
move 0x2e into al
mov al, 0x2e
push 0x0a4c4c41 onto the stack
push 0x0a4c4c41
multiply the contents of eax by the 32-bit contents of the memory location value
mul [value]
push the word 0x1ff onto the stack
push word 0x1ff
push 0x69622f3a onto the stack
push 0x69622f3a
move ecx into ebp
mov ebp, ecx
define message byte and initialize it to '/bin/sh'
message db '/bin/sh'
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
push the word 0x5c11 to the stack
push word 0x5c11
jump to even_numer if greater
je even_number
push 0x69622f2f to the stack
push 0x69622f2f
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, edi \n jne infinite \n xor eax, eax
jump to the decoded_shellcode label if the result of the logical xor between the ax register and the value 0x539 is zero
xor ax, 0x539 \n jz decoded_shellcode
push 0x45683933 onto the stack
push 0x45683933
subtract 1 from the contents of the cl register
sub cl, 1
jump to the label _close if the zero flag is set
jz _close
declare a constant size and set equal to 50000
size: equ 50000
move the 4th element of the array word_table into cx
mov cx, word_table[3]
push the value of register eax onto the stack
push eax
push 0x742f2f2f onto the stack
push 0x742f2f2f
if it is less than or equal to 10 then jump to lp1
jle lp1
push the contents of the ecx register onto the stack.
push ecx
subtract 13 from the byte in esi and save the result in esi
sub byte [esi], 13
call the _continue function
call _continue
define a byte string and initialize it to '/bin/sh'
db '/bin/sh'
decrement the byte in dl
dec byte dl
push the word 0x2e2e onto the stack
push word 0x2e2e
push the word 0xc005 onto the stack
push word 0xc005
push double word 0x2f2f2f2f and the double word 0x7273752f onto the stack and point the edx register to the stack register
push dword 0x2f2f2f2f \n push dword 0x7273752f \n mov edx, esp
zero out the ecx register and jump to the l1 label if the contents of the ebx register is not equal to the contents of the ecx register
xor ecx, ecx \n cmp ebx, ecx \n jne l1
move the contents of the address [ebp-8] into the ebx register
mov ebx, [ebp-8]
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
move doublewords from the stack into the general purpose registers
popad
dup2
mov eax, 63
reserve an array of ten reals for realarray
realarray resq 10
add eax to esi
add esi, eax
push the 0x203a4457 onto the stack
push 0x203a4457
exit
mov eax, 1
perform a logical xor between the eax register and the ebx register and save the result in eax
xor eax, ebx