intent
stringlengths
4
313
snippet
stringlengths
2
271
move the contents of cl into the byte at memory address esi+eax
mov [esi+eax], cl
move the address of message string into ecx
mov ecx, msg
write
mov eax, 4
decrement ecx and jumps to the decrypt label unless decrementing ecx caused its value to become zero
loop decrypt
move the contents of the esp register into the ecx register
mov ecx, [esp]
push the word 0x662d onto the stack and point the ebx register to the stack register
push word 0x662d \n mov ebx, esp
create main label
main:
push eax onto stack
push eax
move the 4th element of the word_table into cx
mov cx, word_table + 3
extend the sign bit of eax register into the edx register
cdq
make the system call write
mov eax, 4
if the contents of the eax register is zero then jump short to the memory location loc_402B13
test eax, eax \n jz short loc_402B13
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
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
define the _user label
_user:
perform the xor operation between eax and 0x58494741 value and store the result in eax
xor eax, 0x58494741
jump short to decode
jmp short decode
define string as the byte string 'prova.txt'
string: db 'prova.txt'
allocate a single byte of memory and initialize it to the letter 'c'
letter_c db 'c'
declare a byte contining 0x68
db 0x68
load the effective address of the result of the operation [esi+14] into the ebx register
lea ebx, [esi+14]
push esi on the stack
push esi
move _start into eax
mov eax, _start
move 0x353ffc3b into esi
mov esi, 0x353ffc3b
if zero jump to the shift_decode label
jz shift_decode
move the byte at the address [esi + 1] into dl
mov dl, byte [esi + 1]
jump short to the memory location loc_402B13 if the contents of the eax register is zero
test eax, eax \n jz short loc_402B13
push 0x5000 onto stack port
push word 0x5000
increment eax
inc eax
jump to the exit label if the zero flag is set
jz exit
if the remainder is not equal to zero jump to local label checkbuzz
jne checkbuzz
push the byte 5 onto the stack
push byte 5
push nib/
push 0x6e69622f
move m_src to eax
mov eax, m_src
subtract 15444 from dx and save the result into dx
sub dx, 15444
push the value 0x6475732f and the value 0x6374652f onto the stack and point the esi register to the stack register
push 0x6475732f \n push 0x6374652f \n mov esi, esp
create label main_inc
main_inc:
compare ebx register's lower half value against ascii value 48
cmp bl, 48
move decimal value 10 into ebx
mov ebx, 10
declare the execfile label
execfile:
move the byte at the memory location specified by the operation [esi+1+ebp] into al
mov al, byte [esi+1+ebp]
move the effective address of byte_tbl+2 to al register
mov al, [byte_tbl+2]
move the 32-bit value 0x40000 into register ebx
mov ebx, 0x40000
call set_argv
call set_argv
jump to the label l1 if the contents of the eax register is not zero
test eax, eax \n jnz l1
put the byte L1 into the eax register
push byte L1 \n pop eax
perform or operation between dx and 0xfff and save the result into dx
or dx, 0xfff
define size to be 1024 bytes large
size: equ 1024
mul eax by ebx
mul ebx
push the dword 0x72657355 onto the stack
push dword 0x72657355
preserve ecx on the stack
push ecx
move the memory address of buffer variable into eax
mov eax, buffer
jump to label read
jmp read
push 0x7273752f to the stack
push 0x7273752f
move the value 0xfee1dead into the ebx register
mov ebx, 0xfee1dead
move the contents at memory specified by temp into eax
mov eax, [temp]
jump short to the call_write label
jmp short call_write
invoke sys_open
mov eax, 5
push the value 15 onto the stack and point ecx to the stack register
push 15 \n mov ecx, esp
create a string 'hello world!' plus a linefeed character
hello: db 'hello world!',10
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
push 0x68736164 onto the stack
push 0x68736164
add esi into memory address ebp-4
add [ebp-4], esi
compare if ecx is zero
cmp ecx, 0
specify sys_write syscall
mov eax, 4
push ebp onto the stack
push ebp
load the effective address of the result of the operation [ebp+20] into the esi register
lea esi, [ebp+20]
move 4294948047 into ecx
mov ecx, 4294948047
save the old base pointer value
push ebp
load the effective address of the result of the operation [esi+23] into the ebx register
lea ebx, [esi+23]
load the effective address [ebx] into edi
lea edi, [ebx]
make kernel call to exit program
int 80h
compare the byte pointed to by eax at this address against zero
cmp byte [eax], 0
compare the contents of edx and the contents of ebx
cmp edx, ebx
mmap
mov eax, 90
move the number of bytes of var4 into eax
mov eax, type var4
declare the gotocall label
gotocall:
move the byte at the address [eax] into dl
mov dl, byte [eax]
push the word 2 onto the stack and point ecx to the stack register
push word 2 \n mov ecx, esp
move bx into ax
mov ax, bx
push the 0x4c4c4128 onto the stack
push 0x4c4c4128
jump to label write if below
jb write
move 21 into cl
mov cl, 21
load the effective address [zero_reg+3] into eax
lea eax, [zero_reg+3]
return a code of zero
mov ebx, 0
declare the download label
download:
perform the xor operation between cl and 0x32 and store the resut in cl
xor cl, 0x32
put the syscall 4 into the eax register
push byte 4 \n pop eax
push the byte 1 onto the stack
push byte 1
jump to label next if below
jb next
preserve esi on the stack
push esi
move al into the byte in esi
mov byte [esi], al
jump short to the process_shellcode label
jmp short process_shellcode
declare message string msg2 containing 'this is how we recycle in nasm'
msg2 db 'this is how we recycle in nasm.', 0ah
initialize eax with decimal value 0
xor eax, eax
push the byte 0x06 onto the stack
push byte 0x06
return to caller
ret
call the shellcode function
call shellcode
push the word 0x5445 onto the stack
push word 0x5445
make the system call fork
mov eax, 2