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

 

 


Tema destacado:


  Mostrar Mensajes
Páginas: 1 ... 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 [70] 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 ... 102
691  Programación / Programación Visual Basic / [+] Proyecto Open Source: MadFunctions en: 22 Enero 2008, 00:58 am
MadFunctions.bas

Que es esto?
La idea es programar un módulo para VB6 (*.bas) que pueda ser agregado a cualquier proyecto, este módulo irá orientado a la programación de 'malware' en general y facilitará muchísimo la tarea del programador a la hora de implementar las típicas funciones que todo 'malware' devería tener.

Que funciones se integrarán en MadFunctions.bas?
Pues os dejo un listado de las funciones que a día de hoy 22/01/08 voy a implementar, algunas de ellas ya estás hechas (y publicadas en este foro) y otras me falta terminarlas, aquí el listado, el nombre de las funciones (así como sus argumentos) lo describen todo xD

Código
  1. '1) Infection Functions
  2.  
  3. Private Sub infect_HardDrive(ByVal DriveLetter As String) As Integer
  4. Private Sub infect_USBDrive() As Integer
  5. Private Sub infect_NetBiosLan(ByVal SubNet As String) As String
  6. Private Sub infect_File(ByVal FilePath As String) As Boolean
  7. Private Sub infect_ZipFile(ByVal ZipPath As String) As Boolean
  8. Private Sub infect_RarFile(ByVal RarPath As String) As Boolean
  9.  
  10. '2) Spreading Worms Functions
  11.  
  12. Private Sub spread_MSN() As Boolean
  13. Private Sub spread_Yahoo() As Boolean
  14. Private Sub spread_GTalk() As Boolean
  15. Private Sub spread_Skype() As Boolean
  16. Private Sub spread_P2P() As Boolean
  17.  
  18. '3) Locking Functions
  19.  
  20. Private Sub lock_Regedit() As Boolean
  21. Private Sub lock_SysRestore() As Boolean
  22. Private Sub lock_SecurityCenter() As Boolean
  23. Private Sub lock_Firewall() As Boolean
  24. Private Sub lock_SysUpdates() As Boolean
  25. Private Sub lock_IEOptions() As Boolean
  26. Private Sub lock_TaskMgr() As Boolean
  27.  
  28. '4) Deleting Functions
  29.  
  30. Private Sub delete_File(ByVal FilePath As String) As Boolean
  31. Private Sub delete_FileSecure(ByVal FilePath As String) As Boolean
  32. Private Sub delete_AllFolders(ByVal FolderPath As String) As Boolean
  33.  
  34. '5) Managing Process/Services
  35.  
  36. Private Sub kill_Process(ByVal ProcessName As String) As Integer
  37. Private Sub kill_Service(ByVal ServiceName As String) As Integer
  38.  
  39. '6) Internet Functions
  40.  
  41. Private Sub get_PublicIP() As String
  42. Private Sub get_PrivateIP() As String
  43. Private Sub download_File(ByVal ULR As String) As Boolean
  44. Private Sub kill_Google() As Boolean
  45.  
  46. '7) FTP Functions
  47.  
  48. Private Sub ftp_Upload(ByVal ftpServer As String, ByVal ftpLogon As String, ByVal ftpPass As String, ByVal FileUploadPath As String) As Boolean
  49. Private Sub ftp_Download(ByVal ftpServer As String, ByVal ftpLogon As String, ByVal ftpPass As String, ByVal FileDoenloadPath As String) As Boolean
  50.  
  51. '8) Self Funtions
  52.  
  53. Private Sub MeltFile()
  54. Private Sub isMutexRunning() As Boolean
  55.  
  56. '9) Net/Lan Functions
  57.  
  58. Private Sub net_ShareFolder(ByVal FolderPath As String, ByVal SharedName As String) As Boolean
  59. Private Sub net_Folder2Drive(ByVal FolderPath As String, ByVal DriveLetter As String) As Boolean
  60.  
  61. '10) Attributes knoking Functions
  62.  
  63. Private Sub change_IncreaseBytes(ByVal FilePath As String, ByVal HowManyBytes As String) As Boolean
  64. Private Sub change_VanishFile(ByVal FilePath As String) As Boolean
  65. Private Sub change_DateMod(ByVal FilePath As String) As Boolean
  66.  
  67. '11) System Functions
  68.  
  69. Private Sub system_Shutdown()
  70. Private Sub system_Logoff()
  71.  

Ojo, faltan las funciones de FileCopy (para copiar ficheros o nuestro ejecutable) y las de Autorun (aquí hay mucho que exprimir), se está barajando la opción de añadir funciones de ADS (Alternate Data Streams), pero no sé aun...

Éste va a ser el listado definitivo de las funciones?
No, tengo que hacer una encuesta, ya que muchas de las funciones actualmente expuestas rozan la ilegalidad y pueden estar fuera del Hacking Ético (por ejemplo las funciones de Spreading Worms o las de Infección de Ficheros, Discos USB, Redes Completas, etc...). La encuesta será lanzada en pocos días.

Puedo contribuir, aportando ideas, aportando funciones, etc?
Sí, aunque me guste programar este tipo de cosas, una ayuda nunca viene mal, si tienes cualquier idea, sugerencia, rectificación, mejora, ... o si tienes alguna función creada por ti mismo que desearías incluir aquí: por favor exprésalo en este post para que todos decidamos si incluirlo o no.



Por el momento os pido que miréis el listado actual y opinéis, si debemos quitar/añadir algo, ideas, mejoras, etc... Se buscan Beta-Testers para probar alguna de las funciones bajo circunstancias poco comunes (En Windows 2000, sin privilegios de Administrador, bajo ciertos AntiVirus, etc...)

Saludos, vuestro amigo cojonudo: ||MadAntrax|| :xD
692  Programación / Programación Visual Basic / Re: Introducir valor binario en registro usando VB script en: 21 Enero 2008, 22:18 pm
Código
  1. Private Sub ParseKey(KeyName As String, Keyhandle As Long)
  2.  
  3. rtn = InStr(KeyName, "\") 'return if "\" is contained in the Keyname
  4.  
  5. If Left(KeyName, 5) <> "HKEY_" Or Right(KeyName, 1) = "\" Then 'if the is a "\" at the end of the Keyname then
  6.   'MsgBox "Incorrect Format:" + Chr(10) + Chr(10) + KeyName 'display error to the user
  7.   Exit Sub 'exit the procedure
  8. ElseIf rtn = 0 Then 'if the Keyname contains no "\"
  9.   Keyhandle = GetMainKeyHandle(KeyName)
  10.   KeyName = "" 'leave Keyname blank
  11. Else 'otherwise, Keyname contains "\"
  12.   Keyhandle = GetMainKeyHandle(Left(KeyName, rtn - 1)) 'seperate the Keyname
  13.   KeyName = Right(KeyName, Len(KeyName) - rtn)
  14. End If
  15.  
  16. End Sub
  17.  
  18. Function GetMainKeyHandle(MainKeyName As String) As Long
  19.  
  20. Const HKEY_CLASSES_ROOT = &H80000000
  21. Const HKEY_CURRENT_USER = &H80000001
  22. Const HKEY_LOCAL_MACHINE = &H80000002
  23. Const HKEY_USERS = &H80000003
  24. Const HKEY_PERFORMANCE_DATA = &H80000004
  25. Const HKEY_CURRENT_CONFIG = &H80000005
  26. Const HKEY_DYN_DATA = &H80000006
  27.  
  28. Select Case MainKeyName
  29.       Case "HKEY_CLASSES_ROOT"
  30.            GetMainKeyHandle = HKEY_CLASSES_ROOT
  31.       Case "HKEY_CURRENT_USER"
  32.            GetMainKeyHandle = HKEY_CURRENT_USER
  33.       Case "HKEY_LOCAL_MACHINE"
  34.            GetMainKeyHandle = HKEY_LOCAL_MACHINE
  35.       Case "HKEY_USERS"
  36.            GetMainKeyHandle = HKEY_USERS
  37.       Case "HKEY_PERFORMANCE_DATA"
  38.            GetMainKeyHandle = HKEY_PERFORMANCE_DATA
  39.       Case "HKEY_CURRENT_CONFIG"
  40.            GetMainKeyHandle = HKEY_CURRENT_CONFIG
  41.       Case "HKEY_DYN_DATA"
  42.            GetMainKeyHandle = HKEY_DYN_DATA
  43. End Select
  44.  
  45. End Function
  46.  
  47.  

Aqui está la PerseKey, y más abajo te dejo otros metodos para trabajar con el registro:

Código
  1. Function SetDWORDValue(SubKey As String, Entry As String, Value As Long)
  2.  
  3. Call ParseKey(SubKey, MainKeyHandle)
  4.  
  5. If MainKeyHandle Then
  6.   rtn = RegOpenKeyEx(MainKeyHandle, SubKey, 0, KEY_WRITE, hKey) 'open the key
  7.   If rtn = ERROR_SUCCESS Then
  8.      rtn = RegSetValueExA(hKey, Entry, 0, REG_DWORD, Value, 4)
  9.      If Not rtn = ERROR_SUCCESS Then
  10.         If DisplayErrorMsg = True Then
  11.            'MsgBox ErrorMsg(rtn)
  12.         End If
  13.      End If
  14.      rtn = RegCloseKey(hKey) 'close the key
  15.   Else 'if there was an error opening the key
  16.      If DisplayErrorMsg = True Then 'if the user want errors displayed
  17.         'MsgBox ErrorMsg(rtn) 'display the error
  18.      End If
  19.   End If
  20. End If
  21.  
  22. End Function
  23.  
  24. Function SetBinaryValue(SubKey As String, Entry As String, Value As String)
  25. Dim i
  26. Call ParseKey(SubKey, MainKeyHandle)
  27.  
  28. If MainKeyHandle Then
  29.   rtn = RegOpenKeyEx(MainKeyHandle, SubKey, 0, KEY_WRITE, hKey) 'open the key
  30.   If rtn = ERROR_SUCCESS Then 'if the key was open successfully then
  31.      lDataSize = Len(Value)
  32.      ReDim ByteArray(lDataSize)
  33.      For i = 1 To lDataSize
  34.      ByteArray(i) = Asc(Mid$(Value, i, 1))
  35.      Next
  36.      rtn = RegSetValueExB(hKey, Entry, 0, REG_BINARY, ByteArray(1), lDataSize) 'write the value
  37.      If Not rtn = ERROR_SUCCESS Then   'if the was an error writting the value
  38.         If DisplayErrorMsg = True Then 'if the user want errors displayed
  39.            'MsgBox ErrorMsg(rtn)        'display the error
  40.         End If
  41.      End If
  42.      rtn = RegCloseKey(hKey) 'close the key
  43.   Else 'if there was an error opening the key
  44.      If DisplayErrorMsg = True Then 'if the user wants errors displayed
  45.         'MsgBox ErrorMsg(rtn) 'display the error
  46.      End If
  47.   End If
  48. End If
  49.  
  50. End Function
  51.  
  52. Function CreateKey(SubKey As String)
  53.  
  54. Call ParseKey(SubKey, MainKeyHandle)
  55.  
  56. If MainKeyHandle Then
  57.   rtn = RegCreateKey(MainKeyHandle, SubKey, hKey) 'create the key
  58.   If rtn = ERROR_SUCCESS Then 'if the key was created then
  59.      rtn = RegCloseKey(hKey)  'close the key
  60.   End If
  61. End If

espero que ahora te sirva
693  Programación / Programación Visual Basic / Re: Introducir valor binario en registro usando VB script en: 21 Enero 2008, 21:28 pm
Código
  1. Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
  2. Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
  3. Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
  4. Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long
  5. Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, ByVal lpData As String, lpcbData As Long) As Long
  6. Declare Function RegQueryValueExA Lib "advapi32.dll" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, ByRef lpData As Long, lpcbData As Long) As Long
  7. Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, ByVal lpData As String, ByVal cbData As Long) As Long
  8. Declare Function RegSetValueExA Lib "advapi32.dll" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, ByRef lpData As Long, ByVal cbData As Long) As Long
  9. Declare Function RegSetValueExB Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, ByRef lpData As Byte, ByVal cbData As Long) As Long
  10.  
  11. Const ERROR_SUCCESS = 0&
  12. Const ERROR_BADDB = 1009&
  13. Const ERROR_BADKEY = 1010&
  14. Const ERROR_CANTOPEN = 1011&
  15. Const ERROR_CANTREAD = 1012&
  16. Const ERROR_CANTWRITE = 1013&
  17. Const ERROR_OUTOFMEMORY = 14&
  18. Const ERROR_INVALID_PARAMETER = 87&
  19. Const ERROR_ACCESS_DENIED = 5&
  20. Const ERROR_NO_MORE_ITEMS = 259&
  21. Const ERROR_MORE_DATA = 234&
  22.  
  23. Const REG_NONE = 0&
  24. Const REG_SZ = 1&
  25. Const REG_EXPAND_SZ = 2&
  26. Const REG_BINARY = 3&
  27. Const REG_DWORD = 4&
  28. Const REG_DWORD_LITTLE_ENDIAN = 4&
  29. Const REG_DWORD_BIG_ENDIAN = 5&
  30. Const REG_LINK = 6&
  31. Const REG_MULTI_SZ = 7&
  32. Const REG_RESOURCE_LIST = 8&
  33. Const REG_FULL_RESOURCE_DESCRIPTOR = 9&
  34. Const REG_RESOURCE_REQUIREMENTS_LIST = 10&
  35.  
  36. Const KEY_QUERY_VALUE = &H1&
  37. Const KEY_SET_VALUE = &H2&
  38. Const KEY_CREATE_SUB_KEY = &H4&
  39. Const KEY_ENUMERATE_SUB_KEYS = &H8&
  40. Const KEY_NOTIFY = &H10&
  41. Const KEY_CREATE_LINK = &H20&
  42. Const READ_CONTROL = &H20000
  43. Const WRITE_DAC = &H40000
  44. Const WRITE_OWNER = &H80000
  45. Const SYNCHRONIZE = &H100000
  46. Const STANDARD_RIGHTS_REQUIRED = &HF0000
  47. Const STANDARD_RIGHTS_READ = READ_CONTROL
  48. Const STANDARD_RIGHTS_WRITE = READ_CONTROL
  49. Const STANDARD_RIGHTS_EXECUTE = READ_CONTROL
  50. Const KEY_READ = STANDARD_RIGHTS_READ Or KEY_QUERY_VALUE Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY
  51. Const KEY_WRITE = STANDARD_RIGHTS_WRITE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY
  52. Const KEY_EXECUTE = KEY_READ
  53.  
  54. Dim hKey As Long, MainKeyHandle As Long
  55.  
  56. Function SetBinaryValue(SubKey As String, Entry As String, Value As String)
  57. Dim i
  58. Call ParseKey(SubKey, MainKeyHandle)
  59.  
  60. If MainKeyHandle Then
  61.   rtn = RegOpenKeyEx(MainKeyHandle, SubKey, 0, KEY_WRITE, hKey) 'open the key
  62.   If rtn = ERROR_SUCCESS Then 'if the key was open successfully then
  63.      lDataSize = Len(Value)
  64.      ReDim ByteArray(lDataSize)
  65.      For i = 1 To lDataSize
  66.      ByteArray(i) = Asc(Mid$(Value, i, 1))
  67.      Next
  68.      rtn = RegSetValueExB(hKey, Entry, 0, REG_BINARY, ByteArray(1), lDataSize) 'write the value
  69.      If Not rtn = ERROR_SUCCESS Then   'if the was an error writting the value
  70.         If DisplayErrorMsg = True Then 'if the user want errors displayed
  71.            'MsgBox ErrorMsg(rtn)        'display the error
  72.         End If
  73.      End If
  74.      rtn = RegCloseKey(hKey) 'close the key
  75.   Else 'if there was an error opening the key
  76.      If DisplayErrorMsg = True Then 'if the user wants errors displayed
  77.         'MsgBox ErrorMsg(rtn) 'display the error
  78.      End If
  79.   End If
  80. End If

El código, por supuesto, no lo he escrito yo. Lo saqué del source de un server del troyano Black Dream, no lo he probado pero tiene que funcionar, llamas a la función con estos parametros y listos, analiza el código si tienes dudas, saludos!!

SetBinaryValue(SubKey As String, Entry As String, Value As String)
694  Programación / Programación Visual Basic / Re: Como llamar a un servicio web en segundo plano en: 20 Enero 2008, 19:33 pm
Para evitar eso usa Threads, si lo ves muy complicado create un dummy que realice esa llamada, de forma independiente (sé que es cutre, pero funcione igual de bien que un thread y un dummy es más sencillo de programar que un thread)
695  Programación / Programación Visual Basic / Re: killer msn kst en: 19 Enero 2008, 20:24 pm
OJO! WARNING

He analizado el ejecutable que ha posteado crauss y he encontrado string's que me hacen pensar sobre un posible 'malware' camufaldo, ejemplo:

Código:
Cactus Joiner
virus
C:\Documents and Settings\David\Mis documentos\virus\Cactus_Joiner_Source\Cactus.exe

Parece ser que este usuario se descargó el source del "MSN Kick" (creado por mí) y del "Cactus Joiner" (creado por mí también). No estoy 100% seguro de que se trate de un fichero inocuo, así que baneo la ulr de descarga para evitar posibles infecciones.



Virus Total Report:

Código:
Ikarus	T3.1.1.20	2008.01.19	Backdoor.Win32.Advertor
Sophos 4.24.0 2008.01.19 Mal/VB-F
696  Programación / Programación Visual Basic / Re: [DUDA] Aplicación siempre activa en: 14 Enero 2008, 22:35 pm
Bueno, este hilo parece más un chat que un foro, solo hablamos tú y yo, en fin...

CREO que necesitarías ejecutar tu mismo el EXE del GTA con alguna función que te devuelva su PID (CreateProcess creo que lo permite o ShellExecuteA, no lo sé). Una vez con su PID tendrías que buscar la API que te permita mandar pulsaciones de teclado o algo parecido (SendMessageA CREO que lo permite, no se).

Montate una aplicación de prueba con el notepad, que al pulsar CTRL+A te suelte "HOLA QUE TAL" dentro del Bloc de Notas, por ejemplo.

Y cuando tengas esto hecho, reemplaza la función de GetAsyncKeyState por otra de Hook's a nivel de teclado y tendrás lo que se llama: Un programa bien hecho. (y ya si compartes el source te cagas xD)

Saludos!! (a ver si alguien más puede corroborar que las API's que estoy poniendo son las correctas, no me gustaría que buscaras algo que no te sirva)

Saludos!!
697  Programación / Programación Visual Basic / Re: [DUDA] Aplicación siempre activa en: 14 Enero 2008, 21:16 pm
Ummm, y como mandas las teclas? SendKeys? A lo mejor necesitas sustituir esa función por otra que te permita escoger el PID del proceso al que quieres enviar las teclas, por ejemplo SendMessageA (que alguien me corrija si me equivoco, no estoy del todo seguro)
698  Programación / Programación Visual Basic / Re: [DUDA] Aplicación siempre activa en: 14 Enero 2008, 18:17 pm
Que juego es? Porque si es del tipo MuOnline (que lleva antihack) no podrás usar esa api, tendrás que usar Hooks
699  Programación / Programación Visual Basic / Re: Como colacar forms tipo MadAntrax en: 14 Enero 2008, 16:20 pm
con *.ocx o clases no tiene más misterio, existen multitud de páginas con interfaces y ocx gratuitos, googleando un poco te hartarás xD

No uso ni OCX ni archivos externos, sólo uso el própio exe compilado con todos los controles integrados en código. Bajate el source del CactusJoiner (usa la búsqueda o mira la chincheta de este foro) que ahí encontrarás los controles y las interfaces que uso.

Aunque te aconsejo que los uses como referencia y luego diseña tu própia combinación de colores, para que no se note copiado.

Saludos!!
700  Programación / Programación Visual Basic / Re: [DUDA] Aplicación siempre activa en: 14 Enero 2008, 16:08 pm
a ver mira este code que hize hace un tiempo

Este es un ejemplo válido con GetAsyncKeyState, te puede servir pero lo más correcto serían Hook's para evitar el uso de Timers. Cuando llegue a casa te muestro un ejemplo.
Páginas: 1 ... 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 [70] 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 ... 102
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines