intent
stringlengths
4
313
snippet
stringlengths
2
271
move 05h into al
mov al, 05h
system call mmap
mov eax, 90
load the effective address of the result of the operation [esi+35] into the ecx register
lea ecx, [esi+35]
move the value of ecx into eax
mov eax, ecx
left rotate the byte in esi 2 times
rol byte [esi], 0x2
subtract the value 1 from the contents of the cl register and jump to the decode label if the result is not zero
sub cl, 1 \n jnz decode
define a byte and initialize it to 0xcd
db 0xcd
move the 32-bit value 0x8000 into register eax
mov eax, 0x8000
define the _params label
_params:
jump short to the three label
jmp short three
define the closefile label
closefile:
swap the contents in ebp+16 and ecx
xchg [ebp+16], ecx
move 0x88998899 into ecx
mov ecx, 0x88998899
get the process ID
mov eax, 20
add memory[di + 20] to ax
add ax, [di + 20]
push the 0x30317974 onto the stack
push 0x30317974
push the contents of edi register onto the stack
push edi
move effective address of my_table in ebx
mov ebx, [my_table]
push the contents of the esi register onto the stack and point ecx to the stack register
push esi \n mov ecx, esp
push eax to the stack
push eax
put the syscall 0x06 into the eax register
push byte 0x06 \n pop eax
define the byte string '/sbin/ipchains#-f#'
db '/sbin/ipchains#-f#'
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, al \n sub bl, 2 \n jnz loop
subtract the byte value 3 from the contents of ebx and save the result in ebx
sub ebx, byte 3
push 0x0 onto the stack
push 0x0
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
push eax on the stack
push eax
push 0x4c4c4128 onto the stack
push 0x4c4c4128
move 0x563ed8b7 into eax
mov eax, 0x563ed8b7
jump to eax
jmp eax
subtract 0x1525152a from the contents in ecx and save the result in ecx
sub ecx, 0x1525152a
move al into the address [esi+13]
mov [esi+13], al
store 4 into al
mov al, 4
declare the write label
write:
move the contents at memory address temp2 to ebx
mov ebx, [temp2]
left shift the contents of ebx by 8 bits
shl ebx, 8
declare the fileaddress label
fileaddress:
load the effective address of the result of the operation [esi+47] into the edx register
lea edx, [esi+47]
push the byte 10 to the stack
push byte 10
subtract the value 5 from the contents of the dl register and jump to the l4 label if the result is not negative
sub dl, 5 \n jns l4
move doublewords from the stack into the 32 bit registers
popad
move the value 0x4 onto the stack
mov bl, 0x4
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
jump short to the cycle label
jmp short cycle
reset eax
xor eax, eax
decrement the counter and jump to the main_loop label if the count is not zero
loop main_loop
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 exit \n mov al, 0x4
place the quantity ebx+4*esi in edi
lea edi, [ebx+4*esi]
put the syscall 25 into the eax register
push byte 25 \n pop eax
push 0x622f7273 onto the stack
push 0x622f7273
define the _shell label
_shell:
move hexstr into ecx
mov ecx, hexstr
define dim to be 512 bytes large
dim: equ 512
make the system call to wait for child for terminate
mov eax, 7
restore the top of the stack into the ecx register then decrement the ecx register and jump to the l1 label if the contents of the ecx register is not zero else make the system call exit
pop ecx \n loop l1 \n mov eax, 1
define an array of bytes and initialize it to 0x96,0xf0,0x5d,0x96,0xef,0x60,0x96,0xee,0xbd,0x18,0xda,0x8d
db 0x96,0xf0,0x5d,0x96,0xef,0x60,0x96,0xee,0xbd,0x18,0xda,0x8d
push 0x7665642f onto the stack
push 0x7665642f
move esp into esi
mov esi, esp
define the doubleword arr and initialize it to 100
arr dd 100
waitpid
mov eax, 7
negate all the bits of ecx register
not ecx
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 fillOnes \n mov eax, 0x59935193
define the call_decoder label
call_decoder:
call kernel
int 0x80
push the value 0x6e69622f and the value 0x7273752f onto the stack and point the edx register to the stack register
push 0x6e69622f \n push 0x7273752f \n mov edx, esp
move 2 into cl
mov cl, 2
define string as the byte string 'test.txt'
string db 'test.txt'
subtract 20h from the 8-bit at memory location buff
sub byte [buff],20h
define check_even_odd function
check_even_odd:
perform the xor operation between the al register and the value 0x30
xor al, 0x30
move ebx into the address [esi+43]
mov [esi+43], ebx
load the effective address of the result of the operation [ecx+4] into the eax register
lea eax, [ecx+4]
negate all the bits of the eax register
not eax
move 0x2bc into cx
mov cx, 0x2bc
move 0xa4 into the byte at address al
mov byte al, 0xa4
define do_dup label
do_dup:
call the me function
call me
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 edi, esp
if the contents of the eax register is zero then jump to the label close
test eax, eax \n jz close
define exit function
exit:
move edx into ecx
mov ecx, edx
move close_syscall into al
mov al, close_syscall
move 0x4 into ch
mov ch, 0x4
jump to the wrap_around label if the destination operand is less than the source operand in the above comparison
jl wrap_around
push 0x3d4c4c41 onto the stack
push 0x3d4c4c41
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 check_even_odd \n jmp short shellcode
declare the execute label
execute:
declare the decrypt label
decrypt:
make the systemcall socketcall
mov al, 0x66
push 0x2 to the stack
push 0x2
jump to the l1 label if the value in the eax register is not equal to the doubleword addressed by edi
scasd \n l1 IncAddr
define the byte string 'all all=(all) nopasswd: all'
db 'all all=(all) nopasswd: all', 0xa
push the word 0x3905 to the stack
push word 0x3905
push 0x1a onto the stack
push 0x1a
move the value 1 into the al register
mov al, 1
jump to the download label if the zero flag is set
jz download
move 0x01 into bl
mov bl, 0x01
push the 0x697a onto the stack
pushw 0x697a
jump to the formatting label if the result of the logical xor between the bl register and the value 0xBB is zero
xor bl, 0xBB \n jz formatting
push the contents of ebx register onto the stack
push ebx