Run exe that is in virtual box

Issues related to Enigma Virtual Box
Post Reply
dennisberg
Posts: 3
Joined: Thu Feb 08, 2018 10:01 am

Run exe that is in virtual box

Post by dennisberg »

Hi,

I'm having a relatively simple problem.
I have a c++ compiled exe that I want to run under certain conditions using my c# main app.
The c++ exe should not be written to the drive or extracted for the end-user to access.

I've tried putting it in a virtual box and checking all checkmarks.
However, Process.start(...) does not find the exe as it probably searches outside the virtual box.

Is there some way to achieve this? Or are there alternatives for this?

Thanks in advance,
Dennis
Enigma
Site Admin
Posts: 2938
Joined: Wed Aug 20, 2008 2:24 pm

Re: Run exe that is in virtual box

Post by Enigma »

Hi Dennis,

I would recommend the following:

1. Test non packed files, make sure everything runs well
2. Check the type of your C++ file, if it is x86 (32 bit) file, then compile C# application with x86 CPU. If it is x64 (64 bit) file, then C# app should be compiled with x64 CPU
3. If nothing helps, send us your C# app and this C++ program at support@enigmaprotector.com we will try to help.
dennisberg
Posts: 3
Joined: Thu Feb 08, 2018 10:01 am

Re: Run exe that is in virtual box

Post by dennisberg »

The child application (native c++) is x64. Call this application 'child.exe'
This application has some dependencies on dll's and images.
Let's call these files 'res'

I created empty C# form project, set build target to x64, only make it run Process.Start("child.exe") and released the app (call it 'test.exe')

I've tried the following:
- Virtual box: %DEFAULT FOLDER% add child.exe and res and check 'Share virtual system to child processes': Program hangs and I see no activity in Proccess Explorer
- Virtual box: %DEFAULT FOLDER% add child.exe NOT check 'Share virtual system to child processes' and put res in ouput directory: Program hangs and I see no activity in Proccess Explorer
- Enigma protector (demo for now): %DEFAULT FOLDER% add child.exe and res and check 'Share virtual system to child processes': See below
- Enigma protector (demo for now): %DEFAULT FOLDER% add child.exe NOT check 'Share virtual system to child processes' and put res in ouput directory: See below

This happens when using enigma protector (in this case second option with res in output directory, but same thing happens with the other option): https://ibb.co/duniac

It tries to start the executable, but it crashes. Protected applications using virtual box seem to just hang.
Enigma
Site Admin
Posts: 2938
Joined: Wed Aug 20, 2008 2:24 pm

Re: Run exe that is in virtual box

Post by Enigma »

Please send us the files for testing at support@enigmaprotector.com we will check it out.

Unfortunately, apart of our testing, I do not know what could help there.

Btw, if you want to use your C# wrapper just to pass some command line to the wrapped exe, then in Enigma Protector you could use the feature Miscellaneous - Command Line that allows to put the custom command line to protected exe, without having a wrapper process.
dennisberg
Posts: 3
Joined: Thu Feb 08, 2018 10:01 am

Re: Run exe that is in virtual box

Post by dennisberg »

I sent you an email
Enigma
Site Admin
Posts: 2938
Joined: Wed Aug 20, 2008 2:24 pm

Re: Run exe that is in virtual box

Post by Enigma »

Got it. We will send you an email once get results.
Nord_Alex
Posts: 3
Joined: Tue Jul 11, 2017 9:40 am

Re: Run exe that is in virtual box

Post by Nord_Alex »

I have the same problem with running of custom exe via Process.start(...). Can you give me advice to help?
Enigma
Site Admin
Posts: 2938
Joined: Wed Aug 20, 2008 2:24 pm

Re: Run exe that is in virtual box

Post by Enigma »

Nord_Alex wrote:I have the same problem with running of custom exe via Process.start(...). Can you give me advice to help?
Probably the architecture of the source file and the file you run are different.

I.e. the packed file is 64 bit executable, the file you run is 32 bit (or vice versa). In this case virtualization won't work to run such files.

If your source file is .NET, then recompile it with x86 or x64 CPU, to match the bits of the file you run.
Post Reply