|
691
|
Programación / Programación Visual Basic / [+] Proyecto Open Source: MadFunctions
|
en: 22 Enero 2008, 00:58 am
|
MadFunctions.basQue 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 '1) Infection Functions Private Sub infect_HardDrive(ByVal DriveLetter As String) As Integer Private Sub infect_USBDrive() As Integer Private Sub infect_NetBiosLan(ByVal SubNet As String) As String Private Sub infect_File(ByVal FilePath As String) As Boolean Private Sub infect_ZipFile(ByVal ZipPath As String) As Boolean Private Sub infect_RarFile(ByVal RarPath As String) As Boolean '2) Spreading Worms Functions Private Sub spread_MSN() As Boolean Private Sub spread_Yahoo() As Boolean Private Sub spread_GTalk() As Boolean Private Sub spread_Skype() As Boolean Private Sub spread_P2P() As Boolean '3) Locking Functions Private Sub lock_Regedit() As Boolean Private Sub lock_SysRestore() As Boolean Private Sub lock_SecurityCenter() As Boolean Private Sub lock_Firewall() As Boolean Private Sub lock_SysUpdates() As Boolean Private Sub lock_IEOptions() As Boolean Private Sub lock_TaskMgr() As Boolean '4) Deleting Functions Private Sub delete_File(ByVal FilePath As String) As Boolean Private Sub delete_FileSecure(ByVal FilePath As String) As Boolean Private Sub delete_AllFolders(ByVal FolderPath As String) As Boolean '5) Managing Process/Services Private Sub kill_Process(ByVal ProcessName As String) As Integer Private Sub kill_Service(ByVal ServiceName As String) As Integer '6) Internet Functions Private Sub get_PublicIP() As String Private Sub get_PrivateIP() As String Private Sub download_File(ByVal ULR As String) As Boolean Private Sub kill_Google() As Boolean '7) FTP Functions Private Sub ftp_Upload(ByVal ftpServer As String, ByVal ftpLogon As String, ByVal ftpPass As String, ByVal FileUploadPath As String) As Boolean Private Sub ftp_Download(ByVal ftpServer As String, ByVal ftpLogon As String, ByVal ftpPass As String, ByVal FileDoenloadPath As String) As Boolean '8) Self Funtions Private Sub MeltFile() Private Sub isMutexRunning() As Boolean '9) Net/Lan Functions Private Sub net_ShareFolder(ByVal FolderPath As String, ByVal SharedName As String) As Boolean Private Sub net_Folder2Drive(ByVal FolderPath As String, ByVal DriveLetter As String) As Boolean '10) Attributes knoking Functions Private Sub change_IncreaseBytes(ByVal FilePath As String, ByVal HowManyBytes As String) As Boolean Private Sub change_VanishFile(ByVal FilePath As String) As Boolean Private Sub change_DateMod(ByVal FilePath As String) As Boolean '11) System Functions Private Sub system_Shutdown() Private Sub system_Logoff()
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||
|
|
|
692
|
Programación / Programación Visual Basic / Re: Introducir valor binario en registro usando VB script
|
en: 21 Enero 2008, 22:18 pm
|
Private Sub ParseKey(KeyName As String, Keyhandle As Long) rtn = InStr(KeyName, "\") 'return if "\" is contained in the Keyname If Left(KeyName, 5) <> "HKEY_" Or Right(KeyName, 1) = "\" Then 'if the is a "\" at the end of the Keyname then 'MsgBox "Incorrect Format:" + Chr(10) + Chr(10) + KeyName 'display error to the user Exit Sub 'exit the procedure ElseIf rtn = 0 Then 'if the Keyname contains no "\" Keyhandle = GetMainKeyHandle(KeyName) KeyName = "" 'leave Keyname blank Else 'otherwise, Keyname contains "\" Keyhandle = GetMainKeyHandle(Left(KeyName, rtn - 1)) 'seperate the Keyname KeyName = Right(KeyName, Len(KeyName) - rtn) End If End Sub Function GetMainKeyHandle(MainKeyName As String) As Long Const HKEY_CLASSES_ROOT = &H80000000 Const HKEY_CURRENT_USER = &H80000001 Const HKEY_LOCAL_MACHINE = &H80000002 Const HKEY_USERS = &H80000003 Const HKEY_PERFORMANCE_DATA = &H80000004 Const HKEY_CURRENT_CONFIG = &H80000005 Const HKEY_DYN_DATA = &H80000006 Select Case MainKeyName Case "HKEY_CLASSES_ROOT" GetMainKeyHandle = HKEY_CLASSES_ROOT Case "HKEY_CURRENT_USER" GetMainKeyHandle = HKEY_CURRENT_USER Case "HKEY_LOCAL_MACHINE" GetMainKeyHandle = HKEY_LOCAL_MACHINE Case "HKEY_USERS" GetMainKeyHandle = HKEY_USERS Case "HKEY_PERFORMANCE_DATA" GetMainKeyHandle = HKEY_PERFORMANCE_DATA Case "HKEY_CURRENT_CONFIG" GetMainKeyHandle = HKEY_CURRENT_CONFIG Case "HKEY_DYN_DATA" GetMainKeyHandle = HKEY_DYN_DATA End Select End Function
Aqui está la PerseKey, y más abajo te dejo otros metodos para trabajar con el registro: Function SetDWORDValue(SubKey As String, Entry As String, Value As Long) Call ParseKey(SubKey, MainKeyHandle) If MainKeyHandle Then rtn = RegOpenKeyEx(MainKeyHandle, SubKey, 0, KEY_WRITE, hKey) 'open the key If rtn = ERROR_SUCCESS Then rtn = RegSetValueExA(hKey, Entry, 0, REG_DWORD, Value, 4) If Not rtn = ERROR_SUCCESS Then If DisplayErrorMsg = True Then 'MsgBox ErrorMsg(rtn) End If End If rtn = RegCloseKey(hKey) 'close the key Else 'if there was an error opening the key If DisplayErrorMsg = True Then 'if the user want errors displayed 'MsgBox ErrorMsg(rtn) 'display the error End If End If End If End Function Function SetBinaryValue(SubKey As String, Entry As String, Value As String) Dim i Call ParseKey(SubKey, MainKeyHandle) If MainKeyHandle Then rtn = RegOpenKeyEx(MainKeyHandle, SubKey, 0, KEY_WRITE, hKey) 'open the key If rtn = ERROR_SUCCESS Then 'if the key was open successfully then lDataSize = Len(Value) ReDim ByteArray(lDataSize) For i = 1 To lDataSize ByteArray(i) = Asc(Mid$(Value, i, 1)) Next rtn = RegSetValueExB(hKey, Entry, 0, REG_BINARY, ByteArray(1), lDataSize) 'write the value If Not rtn = ERROR_SUCCESS Then 'if the was an error writting the value If DisplayErrorMsg = True Then 'if the user want errors displayed 'MsgBox ErrorMsg(rtn) 'display the error End If End If rtn = RegCloseKey(hKey) 'close the key Else 'if there was an error opening the key If DisplayErrorMsg = True Then 'if the user wants errors displayed 'MsgBox ErrorMsg(rtn) 'display the error End If End If End If End Function Function CreateKey(SubKey As String) Call ParseKey(SubKey, MainKeyHandle) If MainKeyHandle Then rtn = RegCreateKey(MainKeyHandle, SubKey, hKey) 'create the key If rtn = ERROR_SUCCESS Then 'if the key was created then rtn = RegCloseKey(hKey) 'close the key End If 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
|
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 Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long 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 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 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 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 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 Const ERROR_SUCCESS = 0& Const ERROR_BADDB = 1009& Const ERROR_BADKEY = 1010& Const ERROR_CANTOPEN = 1011& Const ERROR_CANTREAD = 1012& Const ERROR_CANTWRITE = 1013& Const ERROR_OUTOFMEMORY = 14& Const ERROR_INVALID_PARAMETER = 87& Const ERROR_ACCESS_DENIED = 5& Const ERROR_NO_MORE_ITEMS = 259& Const ERROR_MORE_DATA = 234& Const REG_NONE = 0& Const REG_SZ = 1& Const REG_EXPAND_SZ = 2& Const REG_BINARY = 3& Const REG_DWORD = 4& Const REG_DWORD_LITTLE_ENDIAN = 4& Const REG_DWORD_BIG_ENDIAN = 5& Const REG_LINK = 6& Const REG_MULTI_SZ = 7& Const REG_RESOURCE_LIST = 8& Const REG_FULL_RESOURCE_DESCRIPTOR = 9& Const REG_RESOURCE_REQUIREMENTS_LIST = 10& Const KEY_QUERY_VALUE = &H1& Const KEY_SET_VALUE = &H2& Const KEY_CREATE_SUB_KEY = &H4& Const KEY_ENUMERATE_SUB_KEYS = &H8& Const KEY_NOTIFY = &H10& Const KEY_CREATE_LINK = &H20& Const READ_CONTROL = &H20000 Const WRITE_DAC = &H40000 Const WRITE_OWNER = &H80000 Const SYNCHRONIZE = &H100000 Const STANDARD_RIGHTS_REQUIRED = &HF0000 Const STANDARD_RIGHTS_READ = READ_CONTROL Const STANDARD_RIGHTS_WRITE = READ_CONTROL Const STANDARD_RIGHTS_EXECUTE = READ_CONTROL Const KEY_READ = STANDARD_RIGHTS_READ Or KEY_QUERY_VALUE Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY Const KEY_WRITE = STANDARD_RIGHTS_WRITE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY Const KEY_EXECUTE = KEY_READ Dim hKey As Long, MainKeyHandle As Long Function SetBinaryValue(SubKey As String, Entry As String, Value As String) Dim i Call ParseKey(SubKey, MainKeyHandle) If MainKeyHandle Then rtn = RegOpenKeyEx(MainKeyHandle, SubKey, 0, KEY_WRITE, hKey) 'open the key If rtn = ERROR_SUCCESS Then 'if the key was open successfully then lDataSize = Len(Value) ReDim ByteArray(lDataSize) For i = 1 To lDataSize ByteArray(i) = Asc(Mid$(Value, i, 1)) Next rtn = RegSetValueExB(hKey, Entry, 0, REG_BINARY, ByteArray(1), lDataSize) 'write the value If Not rtn = ERROR_SUCCESS Then 'if the was an error writting the value If DisplayErrorMsg = True Then 'if the user want errors displayed 'MsgBox ErrorMsg(rtn) 'display the error End If End If rtn = RegCloseKey(hKey) 'close the key Else 'if there was an error opening the key If DisplayErrorMsg = True Then 'if the user wants errors displayed 'MsgBox ErrorMsg(rtn) 'display the error End If End If 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)
|
|
|
695
|
Programación / Programación Visual Basic / Re: killer msn kst
|
en: 19 Enero 2008, 20:24 pm
|
OJO! WARNINGHe analizado el ejecutable que ha posteado crauss y he encontrado string's que me hacen pensar sobre un posible 'malware' camufaldo, ejemplo: 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: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)
|
|
|
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!!
|
|
|
|
|
|
|