Jump to content
Tuts 4 You

Running an exe from resources in VB .NET?


Recommended Posts

Topic title says it all. Is it possible to write a code for it in VB .NET...

But i don't wanna extract it to some place. I wanna run it from resources only. :)

Edited by Keygen_Dr.
Link to comment

90% of the time this won't work. The exe will have to be extracted to memory, and this memory address is different from its imagebase.

Most exes don't have a relocation table so Windows can't adjust the code/data to work at the new address.

You could try allocating memory at the address of the imagebase, but chances are high your app and the one youre trying to load have the same image base, ie. 400000 which about 95% of all apps use.

Let's not even talk about the VB.NET part lol

Link to comment

Actually, with VB.net apps this is quite feasible due to the fact that VB.net apps come with relocations, and thus I'm sure you could rebase it to whatever memory you like, making way for the exe you are trying to load via resources :)

Link to comment

(Malware detector: positive) *cough*

If you want to run .NET files from memory, Loveless' post is sufficient, if you want to run non-.NET files without relocations from memory, create a new process, unmap and re-map it and you're done as well.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...