Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

vb rat


ghost's Avatar
0 0

Hey i made a RAT and put a keylogger. but am confused on what to send back to my client… :whoa:

Server -

Private Sub Timer1_Timer() Timer1.Enabled = True Dim i As Integer Dim result As Integer

For i = 32 To 128 result = 0 result = GetAsyncKeyState(i)

If result = -32767 Then Text1.Text = Text1.Text + Chr(i) End If Next i End Sub

What would i put for my sock.senddata? would it be the Text1.Text or Chr(i) or i dont know lol. please help


ghost's Avatar
0 0

Oh please, gtfo.


ghost's Avatar
0 0

That's not a RAT. That's not even an example of a socket connection. In fact, without seeing the graphical interface, no one would even know wtf your "program" is supposed to do, except maybe be a crappy example of a "not-even" keylogger. Prepare better when you get ready to ask for information / assistance.

thk-h3x wrote: Oh please, gtfo.

For the reasons above, I have to agree. :angry:


ghost's Avatar
0 0

brownpinoy88 wrote: …and put a keylogger

You should also test for keys that have been pressed between your timer's interval (no matter how low you set a timer's interval in visual basic, you're still going to get some slipping through on slower computers). Maybe a loop?

If you press a key when the program is not checking, the next time you use getasynckeystate for that key, it will return 1 (unless the key is down at the time). It may also be number other than 1. It's been a while since I've used it, but you would definitely want to look into that feature… as well as a more flexible programming language.

brownpinoy88 wrote: but am confused on what to send back to my client…

You should be sending what's in the text box, but unless your keylogger is visible to the user, all logs should be stored in variables, not controls.

Even if you *are *going to use a text box, instead of "text1.text = text1.text + chr(i)", you should have:

text1.selstart = len(text1.text) text1.seltext = chr(i)

The problem with the first method occurs when you have large amounts of text. When the user presses a key there is a huge delay while it adds all the text again (about a second, could be less… could be more. Either way it would be very noticable to a touch typer).

Pretty sure that text boxes also have a size limit. I don't currently have a working copy of legacy VB, so you would need to check this out for yourself.

Basic sockets tutorial: Introduction to Visual Basic Socket Programming