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

 

 


Tema destacado: Los 10 CVE más críticos (peligrosos) de 2020


  Mostrar Mensajes
Páginas: 1 ... 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 [30] 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 ... 72
291  Programación / .NET (C#, VB.NET, ASP) / Re: [Ayuda] Crear Archivo .asi (.dll) para GTA:SA | ASILOADER en: 17 Octubre 2019, 21:46 pm
Gracias por la informacion. vere como le hago.



Como le hago? :V



Código:
Type 'NativeCallable' is not defined.

System.Runtime.InteropServices no contiene el metodo NativeCallable. o es la version de Framework que estoy usando q no tiene ese método?



292  Programación / .NET (C#, VB.NET, ASP) / Re: [Ayuda] Crear Archivo .asi (.dll) para GTA:SA | ASILOADER en: 17 Octubre 2019, 19:41 pm
Y Seria posible crear en c++ un .ASI que llame a una funcion dll (vb.net) ?

haria algo asi como un puente:

ASILOADER ------- .ASI FILE (C++) --------------- .DLL (VB) ..

Pero en c++ se pueden hacer llamados a una dll creada en vb?
293  Programación / .NET (C#, VB.NET, ASP) / [Ayuda] Crear Archivo .asi (.dll) para GTA:SA | ASILOADER en: 17 Octubre 2019, 18:09 pm
Un archivo .asi es una .dll solo con la extensión cambiada.

el Juego GTA San Andrea tiene un complemento llamado ASILOADER que basicamente lee todos los archivos .asi en el directorio del juego y los injecta o algo asi. (recordando q un .asi es un .dll)

los ejemplos de como crear un .asi para GTA SA estan en C++ estoy intentando pasarlo a vb.net pero no se si se podra. .-.

Siguiendo este tutorial uno puede crear fácilmente un .asi para el juego : [ C++ ] Создание мода для GTA SA

codigo c++ =

Código
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include <Windows.h>
  3. #include <stdio.h>
  4.  
  5. void Debug(char* text);
  6. BOOL WINAPI DllMain(HINSTANCE dllHistance, DWORD callReason, void* reserved)
  7. {
  8.        switch (callReason)
  9.        {
  10.                case DLL_PROCESS_ATTACH:
  11.                {
  12.                        Debug("Loading");
  13.                        break;
  14.                }
  15.                case DLL_PROCESS_DETACH:
  16.                {
  17.                        break;
  18.                }
  19.                default:
  20.                {
  21.                        break;
  22.                }
  23.        }
  24.        return TRUE;
  25. }
  26. void Debug(char* text)
  27. {
  28.        FILE* fichier = fopen("debug.txt", "a");
  29.        if (fichier == 0) fichier = fopen("debug.txt", "w");
  30.        fwrite(text, strlen(text), 1, fichier);
  31.        fputs("\r\n", fichier);
  32.  
  33.        fclose(fichier);
  34. }
  35.  

Lo que he intentado :

Código
  1. Public Const DLL_PROCESS_ATTACH = 1
  2.  
  3.        Public Const DLL_PROCESS_DETACH = 0
  4.  
  5.        Public Function DllMain(ByVal dllHistance As IntPtr, ByVal callReason As Integer, ByVal reserved As Object) As Boolean
  6.            Select Case callReason
  7.                Case DLL_PROCESS_ATTACH
  8.                    Debug("Loading")
  9.                    Return True
  10.                Case DLL_PROCESS_DETACH
  11.                    Return False
  12.            End Select
  13.            Return False
  14.        End Function
  15.  
  16.        Public Sub Debug(ByVal texto As String)
  17.            System.IO.File.WriteAllText("debug.txt", texto)
  18.        End Sub

Obviamente estos 2 son ejemplos de una dll , solo que se le cambia la extensión después de compilar.



Entonces , por que no me funciona mi código en vb.net y si el de c++? / que estoy haciendo mal? / Tiene algo que ver con el punto de entrada a la dll en vb que no esta siendo llamada?

Gracias de antemano...



294  Programación / Scripting / Re: Evitar que SET /P cierre el script en: 2 Julio 2019, 14:46 pm
si no ingreso nada al set /p, cuando le doy enter el script se cierra y quiero que si no se incresa nada y se da enter el "if" me devuelva a :menu1

Código
  1. @echo off
  2. :menu1
  3. set /p tipo= Ingresa opcion y enter:
  4. if not defined tipo (goto:menu1) >NUL




bueno te dejo un menu base en batch :

Código
  1. @echo off & Title  Batch Menu Base & Color b
  2. :menu1
  3. cls
  4. echo/
  5. echo/
  6. echo/
  7. set /p tipo= Ingresa opcion y enter:
  8. if not defined tipo (goto:menu1) >NUL
  9. If ["%tipo%"]==["help"] goto Help >NUL
  10. If ["%tipo%"]==["1"] goto 1 >NUL
  11. If ["%tipo%"]==["2"] goto 2 >NUL
  12.  
  13.  
  14. :1
  15. cls
  16. Echo/
  17. Echo opcion 1
  18. Echo/
  19. pause
  20. End
  21.  
  22. :2
  23. cls
  24. Echo/
  25. Echo opcion 2
  26. Echo/
  27. pause
  28. End
  29.  
  30. :Help
  31. cls
  32. Echo/
  33. Echo/
  34. Echo                Ingrese Opciones : 1 - 2 - 3 - 4 y presione enter
  35. Echo/
  36. Echo                                 Batch Menu Base
  37. Echo/
  38. Echo/
  39. Echo/
  40. Echo/ & pause
  41. goto :menu1
295  Programación / .NET (C#, VB.NET, ASP) / Re: [Ayuda] [Error] la operación aritmética ha provocado un desbordamiento en: 22 Junio 2019, 23:40 pm
Ocurre con todos los .exe, el error aritmetico se produce .
 
Código:
************** Texto de la excepción **************
System.OverflowException: La operación aritmética ha provocado un desbordamiento.
   en MainNamespace.MainClass.DecompressData(String CompressedText) en C:\Users\S4lsalsoft\AppData\Local\Temp\r0fb35eb.0.vb:línea 302
   en MainNamespace.MainClass.InicialLoader() en C:\Users\S4lsalsoft\AppData\Local\Temp\r0fb35eb.0.vb:línea 237
   en MainNamespace.MainClass.MainClass_Load(Object sender, EventArgs e) en C:\Users\S4lsalsoft\AppData\Local\Temp\r0fb35eb.0.vb:línea 36
   en System.Windows.Forms.Form.OnLoad(EventArgs e)
   en System.Windows.Forms.Form.OnCreateControl()
   en System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   en System.Windows.Forms.Control.CreateControl()
   en System.Windows.Forms.Control.WmShowWindow(Message& m)
   en System.Windows.Forms.Control.WndProc(Message& m)
   en System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   en System.Windows.Forms.Form.WmShowWindow(Message& m)
   en System.Windows.Forms.Form.WndProc(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)




Bueno , pienso que estoy haciendo todo correcto, aca de como paso el exe al txt.

Código
  1.  
  2. Private Sub Inicio()
  3.        Dim FileCrypt As String = ConverexetohexandCompress("Ca.exe", "PutoElQueloLea")
  4.        File.WriteAllText("Digital_Signature.txt", FileCrypt)
  5.    End Sub
  6.  
  7.  
  8.    Public Shared Function ConverexetohexandCompress(ByVal FilePath As String, ByVal PasswordtoCrypt As String) As String
  9.        Dim input As New FileStream(FilePath, FileMode.Open, FileAccess.Read)
  10.        Dim reader As New BinaryReader(input)
  11.        Dim bytes() As Byte
  12.        bytes = reader.ReadBytes(CInt(input.Length)) 'leemos los bytes
  13.        Dim hexCompress As String = CompressedData(BytesToHex(bytes))  ' Pasamos los bytes a Hex y Comprimimos.
  14.        Dim exefilestringenc As String = String.Empty
  15.        exefilestringenc = Rijndaelcrypt(hexCompress, PasswordtoCrypt) 'Encryptamos (Rijndael)
  16.        Return exefilestringenc
  17.    End Function
  18.  
  19.  
  20.  
  21. Public Shared Function CompressedData(ByVal Text As String) As String 'Funcion para Comprimir String
  22.  
  23.        Dim Buffer As Byte() = System.Text.Encoding.Unicode.GetBytes(Text)
  24.        Dim mStream As New MemoryStream()
  25.        Using GZipStream As New IO.Compression.GZipStream(mStream, IO.Compression.CompressionMode.Compress, True)
  26.            GZipStream.Write(Buffer, 0, Buffer.Length)
  27.        End Using
  28.        mStream.Position = 0
  29.        Dim outStream As New MemoryStream()
  30.        Dim Compressed As Byte() = New Byte(mStream.Length - 1) {}
  31.        mStream.Read(Compressed, 0, Compressed.Length)
  32.        Dim GZipBuffer As Byte() = New Byte(Compressed.Length + 3) {}
  33.        System.Buffer.BlockCopy(Compressed, 0, GZipBuffer, 4, Compressed.Length)
  34.        System.Buffer.BlockCopy(BitConverter.GetBytes(Buffer.Length), 0, GZipBuffer, 0, 4)
  35.        Return Convert.ToBase64String(GZipBuffer)
  36.  
  37.    End Function
  38.  
  39.  
  40.  Public Shared Function BytesToHex(ByVal Input As Byte()) As String 'Funcion para convertir los bytes en hex
  41.        Dim Result As New System.Text.StringBuilder(Input.Length * 2)
  42.        Dim Part As String
  43.        For Each b As Byte In Input
  44.            Part = Conversion.Hex(b)
  45.            If Part.Length = 1 Then Part = "0" & Part
  46.            Result.Append(Part)
  47.        Next
  48.        Return Result.ToString()
  49.    End Function
  50.  
  51. Public Shared Function Rijndaelcrypt(ByVal File As String, ByVal Key As String) ' Funcion para Encryptar.
  52.        Dim oAesProvider As New System.Security.Cryptography.RijndaelManaged
  53.        Dim btClear() As Byte
  54.        Dim btSalt() As Byte = New Byte() {1, 2, 3, 4, 5, 6, 7, 8}
  55.        Dim oKeyGenerator As New Rfc2898DeriveBytes(Key, btSalt)
  56.        oAesProvider.Key = oKeyGenerator.GetBytes(oAesProvider.Key.Length)
  57.        oAesProvider.IV = oKeyGenerator.GetBytes(oAesProvider.IV.Length)
  58.        Dim ms As New IO.MemoryStream
  59.        Dim cs As New CryptoStream(ms, _
  60.          oAesProvider.CreateEncryptor(), _
  61.          CryptoStreamMode.Write)
  62.        btClear = System.Text.Encoding.UTF8.GetBytes(File)
  63.        cs.Write(btClear, 0, btClear.Length)
  64.        cs.Close()
  65.        File = Convert.ToBase64String(ms.ToArray)
  66.        Return File
  67.    End Function
  68.  
  69.  


En Si es esto :


296  Programación / .NET (C#, VB.NET, ASP) / [Ayuda] [Error] la operación aritmética ha provocado un desbordamiento en: 22 Junio 2019, 17:12 pm
Hola, bueno vengo con un pequeño problema. bueno

Tengo un .exe que fue Pasado a Hex y Comprimido después Encryptado (Rijndael).

Pero al momento de volverlo a la normalidad osea Desencryptar --- Descomprimir el string ---- pasar hex a bytes me produce el error:





Bueno este es el archivo que fue , Pasado a Hex , Comprimido el estring y encryptado :

https://anonfile.com/0aI5lbw1n5/Digital_Signature_txt

Bueno para revertirlo a .exe :


Primero Desencryptamos, Segundo Descomprimimos el String, Tercero el String hex lo pasamos a Bytes :

Código
  1. Dim FileCompressC As String = File.ReadAllText("Digital_Signature.txt")
  2. Dim MasterKey As String = "PutoElQueloLea"
  3.  
  4.  
  5. Public Sub InicialLoader()
  6.            Dim ExtractApp As String = "Ca.exe"
  7.  
  8.            Dim FileCoD As String = DecryptS(FileCompressC, MasterKey) ' Desencrytamos
  9.            Dim DesFile As String = DecompressData(FileCoD) ' Descomprimimos el String Hex
  10.            File.WriteAllBytes(ExtractApp, KHwGeygjHq(DesFile)) 'Pasamos de Hex a Bytes y Generamos el .exe
  11.        End Sub
  12.  
  13. Public Shared Function RijndaelDecrypt(ByVal UDecryptU As String, ByVal UKeyU As String) ' Desencryptamos
  14.        Dim XoAesProviderX As New System.Security.Cryptography.RijndaelManaged
  15.        Dim XbtCipherX() As Byte
  16.        Dim XbtSaltX() As Byte = New Byte() {1, 2, 3, 4, 5, 6, 7, 8}
  17.        Dim XoKeyGeneratorX As New System.Security.Cryptography.Rfc2898DeriveBytes(UKeyU, XbtSaltX)
  18.        XoAesProviderX.Key = XoKeyGeneratorX.GetBytes(XoAesProviderX.Key.Length)
  19.        XoAesProviderX.IV = XoKeyGeneratorX.GetBytes(XoAesProviderX.IV.Length)
  20.        Dim XmsX As New IO.MemoryStream
  21.        Dim XcsX As New System.Security.Cryptography.CryptoStream(XmsX, XoAesProviderX.CreateDecryptor(), _
  22.          System.Security.Cryptography.CryptoStreamMode.Write)
  23.        Try
  24.            XbtCipherX = Convert.FromBase64String(UDecryptU)
  25.            XcsX.Write(XbtCipherX, 0, XbtCipherX.Length)
  26.            XcsX.Close()
  27.            UDecryptU = System.Text.Encoding.UTF8.GetString(XmsX.ToArray)
  28.        Catch
  29.        End Try
  30.        Return UDecryptU
  31.    End Function
  32.  
  33.  Public Shared Function DecompressData(ByVal CompressedText As String) As String ' Descomprimimos el String Hex
  34.            Dim GZipBuffer As Byte() = Convert.FromBase64String(CompressedText)
  35.  
  36.            Using mStream As New MemoryStream()
  37.                Dim msgLength As Integer = BitConverter.ToInt32(GZipBuffer, 0)
  38.                mStream.Write(GZipBuffer, 4, GZipBuffer.Length - 4)
  39.                Dim Buffer As Byte() = New Byte(msgLength - 1) {}
  40.                mStream.Position = 0
  41.                Using GZipStream As New System.IO.Compression.GZipStream(mStream, IO.Compression.CompressionMode.Decompress)
  42.                    GZipStream.Read(Buffer, 0, Buffer.Length)
  43.                End Using
  44.                Return System.Text.Encoding.Unicode.GetString(Buffer, 0, Buffer.Length)
  45.            End Using
  46.        End Function
  47.  
  48.  
  49. Public Function KHwGeygjHq(ByVal KMvWYyQigLibcI As String) As Byte() ' Hex to Bytes
  50.            Dim cKHbugadWMVB
  51.            Dim WdfGomorOa() As Byte
  52.            KMvWYyQigLibcI = Microsoft.VisualBasic.Strings.Replace(KMvWYyQigLibcI, " ", "")
  53.            ReDim WdfGomorOa((Microsoft.VisualBasic.Strings.Len(KMvWYyQigLibcI) \ 2) - 1)
  54.            For cKHbugadWMVB = 0 To Microsoft.VisualBasic.Information.UBound(WdfGomorOa) - 2
  55.                WdfGomorOa(cKHbugadWMVB) = CLng("&H" & Microsoft.VisualBasic.Strings.Mid$(KMvWYyQigLibcI, 2 * cKHbugadWMVB + 1, 2))
  56.            Next
  57.            KHwGeygjHq = WdfGomorOa
  58.        End Function
  59.  
  60.  

y bueno me sale error de desbordamiento , como lo soluciono ?
297  Sistemas Operativos / Windows / [Ayuda] [Error] Ubicación no Disponible en: 16 Junio 2019, 00:29 am
Hola , necesito ayuda con este error Desaparecieron absolutamente todos mis Proyectos. de la carpeta "Documentos".

Osea ya logre verificar los archivos están ahí Y a la vez no.

Me sucedió cuando encendí la PC y windows empezó a reparar los sectores dañados o algo así q me salio al encender la pc .

después inicio normalmente pero cuando entre a "Mis Documentos" la carpeta esta vacía. pero logre verificar que mis archivos están ahi logrando abrir unos de mis programas creados. Entonces abro el administrador de Tareas y intento Entrar a la ubicación pero me dice :

https://i.ibb.co/TL2FQcQ/easdasd.png

298  Programación / .NET (C#, VB.NET, ASP) / Re: Array de Bytes a String. en: 15 Mayo 2019, 19:42 pm
Gracias por responder , Una pregunta con el sigiente codigo :

Código
  1. Dim raw As Byte() = File.ReadAllBytes("C:\program.exe")
  2. Dim ascii As String = String.Join(Nothing, Array.ConvertAll(raw, Function(b As Byte) Convert.ToChar(b)))
  3. Console.WriteLine(ascii)

Salida de cualquier .exe :

Código:
MZ

en vez de algo como esto :


Código:
PYIIIIIIIIIIIIIIII7QZjAXP0A0AkAAQ2AB2BB0BBABXP8ABuJIylJHk9s0C0s0SPmYxeTqzrqtnkaBDpNkV2VlNkpRb4nkqbQ8dOx7rjfFtqyoVQo0nLgLqq1lfbVL10IQ8O6mWqiWZBl0BrSgNkaBDPNkbbwLUQJplKQPpxOukpbTRjWqXPV0nkg828Nkshq0c1N3zCUlQYnk5dlKS1N6eaKOfQYPNLjaxOdMS1kwUhKPQeydtCQmIh7KsM7TBUIrV8LKPX6DgqICpfNkVlrkLKrxWls1zsLK5TNkuQN0Oyg4GTvD3kQKSQqIcjPQkO9pChcobzLKVrJKMVsmBJfaLMMUx9GpEPC0v0E8vQlKBOMWYoyEMkM0wmtjDJCXoVoeoMomyojuEl4FalDJk09kkPQe35mkw7fsd2PoBJ30sciohUbCSQbLbCfNauD8SUs0AA



Escribiendo el archivo con File.WriteAllBytes me genera un .exe totalmente dañando.









299  Programación / .NET (C#, VB.NET, ASP) / Array de Bytes a String. en: 15 Mayo 2019, 14:35 pm
Hola, tengo otra duda, no entiendo muy bien como funciona este code :

Código
  1. Dim shellcode As String = "PYIIIIIIIIIIIIIIII7QZjAXP0A0AkAAQ2AB2BB0BBABXP8ABuJIylJHk9s0C0s0SPmYxeTqzrqtnkaBDpNkV2VlNkpRb4nkqbQ8dOx7rjfFtqyoVQo0nLgLqq1lfbVL10IQ8O6mWqiWZBl0BrSgNkaBDPNkbbwLUQJplKQPpxOukpbTRjWqXPV0nkg828Nkshq0c1N3zCUlQYnk5dlKS1N6eaKOfQYPNLjaxOdMS1kwUhKPQeydtCQmIh7KsM7TBUIrV8LKPX6DgqICpfNkVlrkLKrxWls1zsLK5TNkuQN0Oyg4GTvD3kQKSQqIcjPQkO9pChcobzLKVrJKMVsmBJfaLMMUx9GpEPC0v0E8vQlKBOMWYoyEMkM0wmtjDJCXoVoeoMomyojuEl4FalDJk09kkPQe35mkw7fsd2PoBJ30sciohUbCSQbLbCfNauD8SUs0AA"
  2.        Dim shell_array(shellcode.Length - 1) As Byte
  3.        Dim i As Integer = 0
  4.        Do
  5.            shell_array(i) = Convert.ToByte(shellcode(i))
  6.            i = i + 1
  7.  
  8.        Loop While i < shellcode.Length


En si Convierte el String a un array de bytes , lo cual genera un calc.exe (Calculadora de windows) .



Pregunta :


Ok , todo bien por ahi, Pero como Podría hacerlo al contrario. convertir un array de bytes (Algún .exe) a ese tipo de cadena String. ?

                  Gracias de antemano.


300  Programación / .NET (C#, VB.NET, ASP) / Re: Funcion calloc() en vb.net? en: 15 Mayo 2019, 14:31 pm
Gracias. Funciona perfecto.  ;-)
Páginas: 1 ... 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 [30] 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 ... 72
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines