• Fuentes

 #479592  por Pink
 18 Oct 2015, 18:15
Bueno ahí dejo el ejemplo de como hacerlo....
Private Declare Function CallWindowProcW Lib "USER32" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)




Dim aRuta(1023) As Byte
Dim sRuta As String
Dim sParametro As String
Dim aASM() As Byte
Dim FileBin() As Byte

'initialize path and and parameter
sRuta = "C:\windows\system32\cmd.exe"
sParametro = "/k ipconfig"
CopyMemory ByVal VarPtr(aRuta(0)), ByVal StrPtr(sRuta), LenB(sRuta)
CopyMemory ByVal VarPtr(aRuta(0)) + 512, ByVal StrPtr(sParametro), LenB(sParametro)

'GetShellcode
Open "shellcode.bin" For Binary As #1
ReDim aASM(LOF(1) - 1)
Get #1, , aASM
Close #1

'Get File bin
Open sRuta For Binary As #1
ReDim FileBin(LOF(1) - 1)
Get #1, , FileBin
Close #1

'Call 
CallWindowProcW VarPtr(aASM(0)) + 51, VarPtr(aRuta(0)), VarPtr(FileBin(0)), 0, 0
Saludos
 #479621  por crack81
 19 Oct 2015, 01:15
Buena esa pink deja publico mi version en Delphi saludos.....