intent
stringlengths
4
313
snippet
stringlengths
2
271
perform the xor operation between eax register and edi register and store the result in eax
xor eax, [edi]
jump to label _accept
jmp _accept
move the byte 2h into al
mov al, byte 2h
put the syscall 0x5 into the al register
mov al, 0x05
extend the sign bit of eax into the edx register
cdq
push 0x29 onto the stack
push 0x29
push the dword 0x45525649 onto the stack
push dword 0x45525649
zero out the edx register and jump to the l2 label if the contents of the ecx register is not equal to the contents of the edx register
xor edx, edx \n cmp ecx, edx \n jne l2
add the contents of the bh register into the ah register
add ah, bh
move the contents of esp into ecx
mov ecx, esp
push the word 0x8223 onto the stack
push word 0x8223
zero out eax
xor eax, eax
declare the shellcode label
shellcode:
move 0x5309 into cx
mov cx, 0x5309
move 0x1f into al
mov al, 0x1f
jump to the label no_error if not equal
jne no_error
use stdout
mov ebx, 1
push the byte +0x1 onto the stack
push byte +0x1
declare the shell_ret label
shell_ret:
if the contents of the cl register is equal to the contents of the dl register then jump to the EncodedShellcode label
cmp cl, dl \n je EncodedShellcode
system call dup2
mov eax, 63
if the byte starting at the address contained in the esi register is lower than the byte value 0xD then jump to the wrap_around label
cmp byte [esi], 0xD \n jl wrap_around
push the 0x682f2f2f value onto the stack
push 0x682f2f2f
call _malloc
call _malloc
jump to the loop_2 label if the contents of the bl register is equal to the contents of the al register
cmp bl, al \n je loop_2
jump to the wrap_around label if the byte starting at the address contained in the esi register is lower than or equal to the byte value 0xD
cmp byte [esi], 0xD \n jle wrap_around
move 0x1 into ecx
mov ecx, 0x1
jump to label l20
jmp l20
return the address off the stack and returns control to that location
ret
create the doubleword variable y in memory and initialize it to zero
y: dd 0x0
return to where the function was called
ret
call the shell_ret function
call shell_ret
define hellolen equal to the length of the hello string
hellolen: equ $-hello
decrement the ecx register and jump to the main_inc label if the contents of the ecx register is not zero else point the ebx register to the stack register
loop main_inc \n mov ebx, esp
move 12 to edx
mov edx, 12
restore the original value of ebx
pop ebx
left rotate the edi register 1 time
rol edi, 1
push 0x65782e2f onto the stack
push 0x65782e2f
push double word 0x39396e2d onto the stack and point the esi register to the stack register
push dword 0x39396e2d \n mov esi, esp
move sock_reg into ebx
mov ebx, sock_reg
push the 0x2f656c2d onto the stack
push 0x2f656c2d
pop the top of the stack into the edx register
pop edx
push the byte 11 to the stack
push byte 11
push 0x7268732f onto the stack
push 0x7268732f
negate the contents of eax
neg eax
jump to 0x41 if not zero
jnz 0x41
put the syscall 0x3f into the eax register
push byte 0x3f \n pop eax
divide the contents of eax by the word value stored at memory location value
div dword [value]
push the word 0x6666 onto the stack
push word 0x6666
declare a byte with no label containing the value 0x68
db 0x68
push the value 0x69622f2f onto the stack and point the edx register to the stack register
push 0x69622f2f \n mov edx, esp
restore the top of the stack into the edx register
pop edx
right shift the contents of eax register by 28 bit positions
shr eax, 28
decrement the ecx register and jump to the l4 label if the contents of the ecx register is not zero else move the contents of the esp register into the edx register
loop l4 \n mov edx, esp
multiply ecx by 2 using left shift
shl ecx, 1
move 30 into cl
mov cl, 30
jump to the reading label
jmp reading
make the system call sigaction
mov eax, 67
move 0x9a8dd091 into eax
mov eax, 0x9a8dd091
push the dword 0x6e69622f onto the stack
push dword 0x6e69622f
move the 32-bit integer representation of 4 into the doubleword starting at address ebx
mov dword [ebx], 4
push the value 0x10 onto the stack
push 0x10
if the contents of the eax register is equal to the contents of the edi register then jump to the memory address 0x47 else zero out the ecx register
cmp eax, ebx \n je 0x47 \n xor ecx, ecx
allocate 10 words each initialized to 0
my_table times 10 dw 0
put ASCII /bin/sh into eax
push 0x68732f2f \n push 0x6e69622f \n mov eax, esp
subtract 0x04feca01 from the contents in eax and save the result in eax
sub eax, 0x04feca01
push the dword 0x6e69922f onto the stack
push dword 0x6e69922f
define me label
me:
right shift ax by 1 bit
shr ax, 1
move 1666 into bx
mov bx, 1666
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 0x3 into the al register
cmp eax, ebx \n je exit \n add al, 0x3
if the unsigned contents of the ecx register is greater than the unsigned contents of the edx register then jump to the l1 label else
cmp ecx, edx \n ja l1
put the syscall 0x0b into the eax register
push byte 0x0b \n pop eax
define the child label
child:
if the contents of the eax register is not equal to the contents of the eax register then jump to the memory address 0x8
cmp eax, eax \n jne 0x8
push the value 0x30 onto the stack
push 0x30
if the contents of the ax register is not equal to the contents of the bx register then jump to the l3 label
cmp ax, bx \n jne l3
add the contents of the esi register to the contents of eax register
add eax, esi
restore the top of the stack into the esp register
pop esp
divide ebx by 2 using right shift
shr ebx, 1
if not zero jump to numeric label 1
jnz 1
push the 0x69616863 onto the stack
push 0x69616863
load the effective address of the operation [bp+0x08] into the bx register
lea bx, [bp+0x08]
push the value 0x2f2f2f2f onto the stack and point ecx to the stack register
push 0x2f2f2f2f \n mov ecx, esp
jump to the label l1 if the contents of the eax register is not zero else call the function myfunct
test eax, eax \n jnz l1 \n call myfunct
compare the contents of the al register and the contents of the cl register
cmp al, cl
make space on stack
sub esp, 4
declare an unlabeled byte initialized to 0x80
db 0x80
move the address in ebx into eax
mov eax, ebx
declare the entrypoint label
entrypoint:
replaces the contents of the edx register with its two's complement
neg edx
define call_shellcode function
call_shellcode:
move the address of the arguments into ecx
mov ecx, arguments
push the contents of the esi register onto the stack and point edx to the stack register
push esi \n mov edx, esp
open the file
mov eax, 5
reserve a word for wordvar
wordvar: resw 1
invoke sys_exit
mov eax, 1
move 0xb01 into dx
mov dx, 0xb01
subtract 3e716230 from the contents of the eax register
sub eax, 3e716230
jump to the label l3 if the contents of the dl register is greater than or equal to the decimal value 27
cmp dl, 27 \n jge l3