intent
stringlengths
4
313
snippet
stringlengths
2
271
system call signal
mov eax, 48
move 1 into ecx
mov ecx, 1
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
push the byte 0x2e onto the stack
push byte 0x2e
define the doubleword variable real_number1 and initialize to 1234
real_number1 dd 1234
store the value 5 into the byte at memory location var
mov byte [var], 5
move 66h into al
mov al, 66h
move 102 into al
mov al, 102
load the effective address of the result of the operation [esi + 8] into the ecx register
lea ecx, [esi + 8]
declare the cycle label
cycle:
if the contents of the eax register is negative then jump to the label _while_loop
test eax, eax \n js _while_loop
compare if ecx is equal to 10
cmp ecx, 10
system call close
mov eax, 6
restore the top of the stack into the ebp register
pop ebp
move buff to ecx
mov ecx, buff
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
push 0x30317974 onto the stack
push 0x30317974
define the doubleword arr and initialize it to 20
array dd 20
move ebp into ecx
mov ecx, ebp
push the word 2 onto the stack
push word 2
make the system call to send the signal to another process
mov eax, 37
load the effective address [esp+1] into ebx
lea ebx, [esp +1]
exchange ecx with edx
xchg ecx, edx
define string as the byte string '/bin/sh'
string: db '/bin/sh'
decrement the contents of the ecx register
dec ecx
push byte 1 onto the stack
push byte 1
jump to duploop if not negative
jns duploop
system call write
mov eax, 4
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 eax, esp
call function internetreadfile
call internetreadfile
add 3 to the contents of esp
add esp, 3
push double word 0x74652f2f onto the stack and point the esi register to the stack register
push dword 0x74652f2f \n mov esi, esp
move dl into the address [ebx + 6]
mov [ebx + 6], dl
declare the shift_decode label
shift_decode:
jump to the next_cycle label if the zero flag is cleared
jnz next_cycle
system call getppid
mov eax, 64
define exit_call equal to 1
exit_call equ 1
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 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 call_shellcode label
call_shellcode:
set carry flag
stc
define the closefile function
closefile:
move 0x07 into the byte at address [esp+2]
mov byte [esp+2], 0x07
if the contents of the eax register is zero then jump to the label close else move the contents of the edx register into the ebx register
test eax, eax \n jz close \n mov ebx, edx
push the byte 0x77 onto the stack
push byte 0x77
make the system to load and run the program
mov eax, 11
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 jne short decode \n jmp shellcode
create the doubleword variable z in memory and initialize it to zero
z: dd 0x0
push the 0x3905 onto the stack
pushw 0x3905
push the ecx onto the stack
push ecx
jump short to the shellcode label
jmp short shellcode
mask out lowest 4 bits of the ecx register
and ecx, 0000000fh
add the contents of the local variable stored at ebp-4 into eax
add eax, [ebp-4]
subtract the contents of the cl register from the contents of the al register and jump to the l2 label if the result is not zero
sub bl, cl \n jnz l2
swap the contents of the esi register with the contents of the eax register
xchg esi, eax
push the contents of the ebx register onto the stack
push ebx
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 jne retry
move the contents at memory address y to eax
mov eax, [y]
declare section containing initialized data
section .data
move edi into the doubleword starting at the address esp-8
mov dword [esp-8], edi
jump short to the call_decoder label
jmp short call_decoder
define the byte string 'rm -f /tmp/f'
db 'rm -f /tmp/f'
move address of stack pointer into ecx
mov ecx, esp
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 jmp edi
jump short to the gotocall label
jmp short gotocall
remove last character from the stack into ebx
pop ebx
swap the values of edx and ebx registers
xchg edx, ebx
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
move the byte in esi+ecx+1 into bl
mov bl, byte [esi+ecx+1]
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
declare the main_inc label
main_inc:
move a byte from bl into memory address hexstr+edx+1
mov byte [hexstr+edx+1],bl
push 0x68732f6e onto the stack
push 0x68732f6e
jump to nextarg label
jmp nextarg
move /bin/sh into the ecx register
push 0x68732f2f \n push 0x6e69622f \n mov ecx, esp
declare the loop label
loop:
if equal jump to label continue
je continue
perform a xor operation between ax and 0x539 and save the result in ax
xor ax, 0x539
make sys_write kernel call
int 80h
move the contents of the eax register into the long starting at the address [esi+30]
mov long [esi+30], eax
push the ebp onto the stack
push ebp
add the contents of the eax register to the edx register
add edx, eax
put the syscall 9 into the eax register
push byte 9 \n pop eax
load the effective address of the result of the operation [eax] into the ecx register
lea ecx, [eax]
move 0x2e into the byte in esp
mov byte [esp], 0x2e
move ecx into the doubleword starting at the address esp-4
mov dword [esp-4], ecx
move the contents at memory address temp1 to eax
mov eax, [temp1]
make the system call to terminate the process
mov eax, 1
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
push 0x78 to the stack
push 0x78
push the doubleword 0x61747069 to the stack
push dword 0x61747069
declare the up label
up:
push the byte 0x1 onto the stack
push byte 0x1
push the byte 0x01 to the stack
push byte 0x01
jump to fupdisasm+1
jmp fupdisasm+1
subtract 0x70445eaf from the contents in eax and save the result in eax
sub eax, 0x70445eaf
add the contents of the eax register to the contents of esi register
add esi, eax
move 2 into the single byte at the address stored in ebx
mov byte [ebx], 2
jump to the label check_html if the contents of the eax register is zero
test eax, eax \n jz check_html
move 0x33392e31 into eax
mov eax, 0x33392e31
move the contents of al into the byte at the memory location specified by the operation [esi+17]
mov byte [esi+17],al