intent
stringlengths
4
313
snippet
stringlengths
2
271
define decoded_shellcode function
decoded_shellcode:
load the effective address of the result of the operation [esi+30] into the edx register
lea edx, [esi+30]
zero out the edx register and push zero onto the stack
xor edx, edx \n push edx
push the 20 onto the stack
push 20
create variable b in memory and initialize to zero
b: dd 0x0
add the contents of eax to the contents of edx
add edx, eax
move 0x34399797 into esi
mov esi, 0x34399797
declare data section
section .data
declare the call_shellcode label
call_shellcode:
add 0x33 to the contents in al and save the result in al
add al, 0x33
swap the contents of the ebx register with the contents of the esp register
xchg ebx, esp
push the dword 0x74652f2f onto the stack
push dword 0x74652f2f
terminate the process
mov eax, 1
define string as the byte string 'tmp.txt'
string: db 'tmp.txt'
define word1 unsigned word and initialize it to 65535
word1 word 65535
push the byte 0x10 onto the stack
push byte 0x10
initialize ecx with decimal value 0
xor ecx, ecx
reset both lower and uppper bytes of ebx to be 0
xor ebx, ebx
subtract the contents of the edx register from the contents of the edx register
sub edx, edx
declare an uninitialized word labeled x
x dw ?
define the _cmd label
_cmd:
push 0x636e2f2f to the stack
push 0x636e2f2f
move esi into the address [esi+35]
mov [esi+35], esi
move 128 into cl
mov cl, 128
move 0x2f into the byte in esp
mov byte [esp], 0x2f
move the byte 0eh into bl
mov bl, byte 0eh
compare the contents of the eax register and the contents of the ebx register
cmp eax, ebx
push the ebx value to the stack
push ebx
push the byte 9 onto the stack
push byte 9
subtract 0x7 from the byte in esi register
sub bl, byte [esi]
jump to the fillOnes label if the contents of the al register is equal to 0xf2 else move the value 0x59935193 into the eax register
cmp al, 0xf2 \n je fillOnes \n mov eax, 0x59935193
move the contents of the edx register into the ecx register
mov ecx, edx
compare the dword at the address [eax-8] and egg
cmp dword [eax-8], egg
move the address of msg string into ebx
mov ebx, msg
reserve 1 byte for variableName1
variablename1: resb 1
save 63 into al
mov al, 63
compare if the contents at memory location ebp+var_a is 0
cmp [ebp+var_a], 0
increment the contents of the cl register
inc cl
move 2 into the single byte at memory location ecx
mov byte [ecx], 2
push 0x68736162 to the stack
push 0x68736162
load the effective address of the result of the operation [esi +4] into the esi register
lea esi, [esi +4]
jump short to the two label
jmp short two
move edx into ebx
mov ebx, edx
push 0x2e383631 onto the stack
push 0x2e383631
decrement ecx and jumps to the Label1 label if the contents of the ecx register is not zero and the zero flag is equal to zero
loopnz Label1
move the contents of src variable into edx
mov edx, src
move v_src to esi
mov esi, v_src
push ax onto the stack
push ax
push the value 0x6475732f and the value 0x6374652f onto the stack and point the ecx register to the stack register
push 0x6475732f \n push 0x6374652f \n mov ecx, esp
make the system call dup2
mov eax, 63
pop the value on the stack back into cx
pop cx
push the double word 0x2f6e6962 onto the stack
push dword 0x2f6e6962
move the byte in edi into bl
mov bl, byte [edi]
system call pause
mov eax, 29
jump to the label l4 if the contents of the eax register is not zero else call the function search
test eax, eax \n jnz l4 \n call search
move esi into the doubleword starting at the address esp-4
mov dword [esp-4], esi
declare incpage function
incpage:
define the jmp_search label
jmp_search:
define decode_pr label
decode_pr:
move 0x02 into dl
mov dl, 0x02
move buff to eax
mov eax, buff
move the contents of the al register at the memory location specified by the operation [bp+0x07]
mov [bp+0x07], al
push 0x31373737 onto the stack
push 0x31373737
push the value 0x6e69622f and the value 0x7273752f onto the stack and point the ebx register to the stack register
push 0x6e69622f \n push 0x7273752f \n mov ebx, esp
define the doubleword variable big_number and initialize it to 123456789
big_number dd 123456789
define the _exec label
_exec:
make the system call for exit
mov eax, 1
compare the value in the eax register to the doubleword addressed by the edi register
scasd
swap the address [ebp+16] with the contents of the ecx register
xchg [ebp+16], ecx
call the _printf function
call _printf
push the byte chmod_call onto the stack
push byte chmod_call
replaces the contents of the ebx register with its two's complement
neg ebx
push the doubleword 0x62732f2f onto the stack and point the ebx register to the stack register
push dword 0x62732f2f \n mov ebx, esp
if the doubleword starting at the address [eax-8] is not equal to the contents stored at the egg address then jump to the _next label
cmp dword [eax-8], egg \n jne _next
declare an unlabeled byte initialized to 10
db 10
define the _isegg label
_isegg:
move an ascii linefeed character into eax
mov eax, 0ah
move the contents of the esp register into the ebx register
mov ebx, esp
compare if eax is equal to 0
cmp eax, 0
move 0x20 into dl
mov dl, 0x20
kill
mov eax, 37
define msg2 as the byte string 'passwd'
msg2 db 'passwd', 0x00
jump short to exi label
jmp short exi
move 03h into al
mov al, 03h
move the contents of memory address esi+ecx into bl
mov bl, [esi+ecx]
move 0x1 into cl
mov cl, 0x1
push the word 0x2 onto the stack
push word 0x2
move ah into the address [esp+58]
mov [esp+58], ah
make the system call alarm
mov eax, 27
decrement the ecx register and jump to the fill label if the contents of the ecx register is not zero else move the contents of the esp register into the ecx register
loop fill \n mov ecx, esp
push the value 0x6873732f and the value 0x6374652f onto the stack and point the ebx register to the stack register
push 0x6873732f \n push 0x6374652f \n mov ebx, esp
add the register dl in the memory location byte_value
add byte_value, dl
jump to the _end label if the value in the eax register is not equal to the doubleword addressed by edi else jump to the edi register
scasd \n jnz _end \n jmp edi
decrement the ecx register and jump to the eggLoop label if the contents of the ecx register is not zero else jump to the edi register
loop eggLoop \n jmp edi
divide ecx by 4 using right shift
shr ecx, 2
move the value 0x1 into the al register
mov al, 0x1
push the dword 0x68732f2f onto the stack
push dword 0x68732f2f
push the dword 0x0101017f onto the stack
push dword 0x0101017f
move m_src3 to ecx
mov ecx, m_src3
push 0x7372656f onto the stack
push 0x7372656f