C++ Posted March 3, 2018 Share Posted March 3, 2018 How to execute embedded exe into memory without extracting ? I can extract file from resources but I want to execute without extracting. I hope this is not duplicate posts. Link to comment
whoknows Posted March 3, 2018 Share Posted March 3, 2018 no idea, but asked my friend google, on first result, point me : https://stackoverflow.com/a/6401261/1320686 send a friend request to Google, you can ask everything you want & knows everything! 1 Link to comment
C++ Posted March 3, 2018 Author Share Posted March 3, 2018 30 minutes ago, whoknows said: no idea, but asked my friend google, on first result, point me : https://stackoverflow.com/a/6401261/1320686 send a friend request to Google, you can ask everything you want & knows everything! Already tested that code but gives 0000000 for imagebase so it failed to launch embedded exe. But I'll figure it out soon. Link to comment
cob_258 Posted March 4, 2018 Share Posted March 4, 2018 The code linked above is a RunPE code, it inject an exe into a "new" process and not the same imgbase:=DWORD(VirtualAllocEx(PInfo.hProcess,Ptr(INH^.OptionalHeader.ImageBase),INH^.OptionalHeader.SizeOfImage,MEM_COMMIT or MEM_RESERVE,PAGE_EXECUTE_READWRITE)); the code above gave you 0 because you're trying to alloc on an already allocated memory or because some memory page stuff (which I don't know) (VirtuallAlloc/VirtualAllocEx are not very obedient when you specify the memory), to solve this problem you should call ZwUnmapViewOfSection before calling it I googled "RunPe delphi" and this is one of the results http://www.delphibasics.info/home/delphibasicssnippets/memoryexecutionunit-winxpwinvistawin7 2 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now