Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello all,
this is the general idea:

bool detect()
{
  
  RunFileInVirtualEnvironment(suspect.exe);
  
  if(file behavior is malicious)
  {
      return true;
  }
  
  return false;
}


I looked into App domains the problem is i want the file to run normally without restrictions. i just need it to run in a sandbox and flag suspicious actions(ex: if it wants to format c: , give it a virtual c: to format). is that possible ??
it has to be automated i cant load it manually into a virtual machine.

thank you in advance.

Mohamed Hossam
Posted

1 solution

VirtualBox has a pretty robust control API, and I believe it can at least let you programatically run executables in the VM. To detect the malicious is a harder problem. I guess you could rename the system DLLs on the VM and make wrapper DLLs for them that detect and log/block the particular functions you identify as bad.
You write a program that loads DLLs and writes a wrapper for each. Not trivial, but do-able. Hard part is figuring out what function calls what rate as malicious, which are friendly under some case, but a problem in combination.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900