Jump to content
  • Advertisement
Sign in to follow this  
The Batfrog

Programming a container for executables?

This topic is 2505 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. smile.png
I wish to create a program that will run an executable, and then act as a container for that running executable.
My program should be able to pass the executable fake system information, such as "System Time", and block it from any internet access.
I am working with C# under windows.

What is the best method to accomplish this? Is there a name for programs that do this?

Thankyou for your time, forum-ers! biggrin.png

Share this post


Link to post
Share on other sites
Advertisement

[quote name='The Batfrog' timestamp='1328668282' post='4910738']
Is there a name for programs that do this?

Broadly speaking it's a form of sandbox.
[/quote]

Ah! That looks like it! smile.png
I'll do some general research on creating sandboxes.
Any ideas on how to implement a sandbox with network access restriction and system information spoofing?
Would the "AppDomain" class be of any help?

Share this post


Link to post
Share on other sites

[quote name='ApochPiQ' timestamp='1328678556' post='4910784']
Are we talking about arbitrary applications, or just one specific one?


Arbitrary.
[/quote]
Then what you want is called a "virtual machine" :)

Share this post


Link to post
Share on other sites

Then what you want is called a "virtual machine" smile.png


Thankyou smile.png
However, I feel as though using a virtual machine would be unnecessarily computationally expensive, as it would involve running an entire operating system inside the VM.

I imagine there must be a lighter alternative by running the executable through a simpler sandbox, and intercepting kernel API calls such as GetSystemTime.
Is this at all possible?

Share this post


Link to post
Share on other sites
Can you just hook the Win32 API calls using Detours (or you could do the same thing yourself)?

Share this post


Link to post
Share on other sites

Can you just hook the Win32 API calls using Detours (or you could do the same thing yourself)?


This 'hooking' looks like exactly what I'm trying to do! YAY! :)

A couple of questions:

  • Is hooking Win32 API calls with my own code (without Detours) relatively easy?
  • What's the best way to block network access to a sandboxed executable?

Share this post


Link to post
Share on other sites
"best"?

Run it on a machine with no network connection.... obviously.

But could we just back up slightly -- why do you want to do this?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!