Protecting Host Machine from Malware escaping a VM.

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

McLovin

Level 61
Verified
AV-Tester
Apr 17, 2011
8,772
Operating System
Windows 10
Installed Antivirus
Trend Micro
#41
Why not download all the malware and then test it on a computer that you don't use anymore?
 

HeffeD

New Member
Feb 28, 2011
1,597
#42
Hotrod123 said:
I do, but I wish it didnt have to be this way.:( You have seen me constantly browse various forums for the best configuration, and after many opinions and ideas I feel like I have found the perfect blend between testing and security(sorry for all the I's).
That's all we can ever hope for. Nothing is certain, all we can do is try to minimize risk.

Hotrod123 said:
Anyway, thanks for all your help and if I need any more answers you will be sure to be hearing from me again. :cool:
That's what we're here for. :)
 

MalwareDoctor

Moderator
Staff member
Aug 5, 2012
462
#43
MrXidus said:
You'll notice I did say NAT under the picture. :)
I did not realize who I was responding to earlier( really enjoyed watching your vids). Through all of your extensive testing, have you ever had an issue with malware escaping the VM?
 

MrXidus

Super Moderator (Leave of absence)
Apr 17, 2011
2,173
#44
Hotrod123 said:
MrXidus said:
You'll notice I did say NAT under the picture. :)
Through all of your extensive testing, have you ever had an issue with malware escaping the VM?
Nope. That goes for all my 5 years of testing all types of malicious software in a VM.
 

MalwareDoctor

Moderator
Staff member
Aug 5, 2012
462
#45
MrXidus said:
Nope. That goes for all my 5 years of testing all types of malicious software in a VM.
So that is very reasurring. :) Even though there is a risk, that risk hasn't been exploited by hackers yet. When testing, how was the state of the other machines on your network?
 
Sep 26, 2012
15
#46
hi
i am new at this i have a spare pc will ubuntu and virtualbox be a better choice for malware testing
i there a good link to malware testing do and don´ts
 

McLovin

Level 61
Verified
AV-Tester
Apr 17, 2011
8,772
Operating System
Windows 10
Installed Antivirus
Trend Micro
#47
kreto said:
hi
i am new at this i have a spare pc will ubuntu and virtualbox be a better choice for malware testing
i there a good link to malware testing do and don´ts
First of all welcome to MalwareTips.com :D

Not sure about the Ubuntu part, but I'm sure that if you have a backup option when doing what ever it is in Virtualbox you should be said. That being said, have not re-looked at this thread but you could run Virutalbox in Sandboxie and or Bufferzone to do tesing :)
 

Gnosis

New Member
Apr 26, 2011
2,414
#48
I don't know exactly what was said about Ubuntu, but as far as I know you can burn the Linux ISO to a removable disk and have a whole other OS at your disposal via "boot with optical device".
 
Sep 26, 2012
15
#49
the pc will only be used for testing malware and from what i can read ubuntu host (linux) is reasonable immune to malware ubuntu get update often so cd image hmmmm

is the there at good site on malware testing do and don`t or is it learning by doing:D
 
Z

ZeroDay

Guest
#50
kreto said:
the pc will only be used for testing malware and from what i can read ubuntu host (linux) is reasonable immune to malware ubuntu get update often so cd image hmmmm

is the there at good site on malware testing do and don`t or is it learning by doing:D
Running virtual machines using an Ubuntu host for malware testing is a good practice in my opinion.
 

McLovin

Level 61
Verified
AV-Tester
Apr 17, 2011
8,772
Operating System
Windows 10
Installed Antivirus
Trend Micro
#51
kreto said:
is the there at good site on malware testing do and don`t or is it learning by doing:D
Not really sure there sorry. :s
 

HeffeD

New Member
Feb 28, 2011
1,597
#52
kreto said:
hi
i am new at this i have a spare pc will ubuntu and virtualbox be a better choice for malware testing
VMWare is better for testing malware. Many security programs don't run properly in VirtualBox due to imperfect OS emulation.
 

Spawn

Administrator
Staff member
Jan 8, 2011
16,664
Operating System
Windows 10
Installed Antivirus
Microsoft
#54
Is there any advice for using a Junk (Physical) PC for testing? Any precautions when connected to a home network?
 

Umbra

Level 61
Content Creator
Verified
May 16, 2011
17,486
Operating System
Windows 10
Installed Antivirus
Default-Deny
#55
Disable any sharings from/to the test Pc.
 

HeffeD

New Member
Feb 28, 2011
1,597
#56
Earth said:
Is there any advice for using a Junk (Physical) PC for testing? Any precautions when connected to a home network?
I would recommend disconnecting from your network. That way you're absolutely sure there's no way anything can spread.
 

jamescv7

Level 61
Verified
Mar 15, 2011
12,660
Operating System
Windows 10
Installed Antivirus
Microsoft
#57
From properties of the existed connection, disabled those file and.printer sharing network/in related shared options.

Then make the firewall is on a hardened security so that it will prevent any infiltration alert.
 

Solarquest

Moderator
Staff member
AV-Tester
Jul 22, 2014
1,925
#59
I have an old Pc that I would use for malware testing (one day, when ready..). This will be the only computer/device that will be connected to the router (when testing) and to Internet.
I'll have a security SW on the fully updated host and configure the network on the VM (vitualbox) with NAT. The firewall on the host will be Jetico or similar to block open ports with the VM (as this may happen with windows firewall). On the host I will run a VPN to hide the IP (I have a static IP ..).
All datas will be cloned and a recue/boot disk will be handy.
Is this a good/relatively safe solution to test malware/urls?
What can be done to lower even more the risk of infectrion of the host?
I know that testing thorugh a VM won't provide 100% accurate results since AV won't have all access needed to the system.
How do protect/backup the host from Bootkits, from Malware that modify the MBR, bios?
Do you know a program to back up the MBR and to protect the BIOS from changes? Sbabr is too old, correct? thank you!
 
May 11, 2013
1,677
Operating System
Windows 7
Installed Antivirus
Norton
#60
I agree with what the staff members have said here, it is true that malware on a well secured host running a VM has virtually no options to escape the VM. However various VM software developers have issued statement about bugs and exploits within their software that could make it possible for malware to actually corrupt the VM.

Malware and targeted attacks can propagate from the VM to the host in several circumstances:

  • If there's a bug in the VM software. That's not very common, but it's possible.
  • If there's a bug in the host OS. A bug that specifically allows malware to break out of a VM is unlikely but again possible.
  • If there's a bug in the processor. That's even more unlikely but still not mathematically impossible.
  • If there's a way for the malware to exchange information with the host. This can be over the network; in this respect, there's no difference between using a VM and using a separate physical machine, so you need to firewall the VM appropriately (allow only the bare minimum, don't do anything that might allow the server to hijack the client such as SSH with X forwarding). Another vector is via the VM tools such as file and clipboard sharing: the software running in the VM might read and write shared files, access the host clipboard, etc. So when running malware in a VM you should disable all these convenience tools (disable them in the VM configuration, it's not enough to refrain from installing the guest software since the malware could come with its own).
All in all, most malware can be analyzed safely in a properly configured virtual machine. Disable all guest features and don't connect to the VM with any protocol that allows the server to influence the client. Firewall the VM as if it was hostile (it is); you should use a host-only network so that you can easily control what goes there.

There's another reason why you might prefer a physical machine to a virtual machine. There's quite a bit of malware that attempts to detect whether it's being analyzed, and doesn't behave maliciously when it is. Obvious, common things that malware tries to detect is signs that it's running under a debugger: check if it's being p-traced (or the Windows equivalent), check for sudden pauses in the execution, … And some malware looks for telltale signs of a VM, such as drivers for hardware that common VM software emulates, or CPU oddities that are inexistent or rare outside emulated CPUs. This isn't to say that you cannot analyze malware in a VM: sometimes you can, sometimes you can't, it depends on the malware. If you start in a VM and find nothing you need to be prepared to move to a physical machine.

That being said every day new malware is being generated and i personally have seen malware capable of evading and literally breaking specific VM software. It is a myth to say that the malware does not exist as it does and from what i have seen some of them are seriously nasty. But the odds that you are going to run into such malware just by harvesting the net are remote, because most of these very sophisticated pieces of code are made with a specific task and reason in mind, but during my work i have seen corporate networks being penetrated with malware that will jump out of a VM machine just like that. Again these are targeted attacks and are rare as not many malware writers do have the skill and resources to develop these tools. Does that mean that malware can evade a proper VM? No but they certainly can find holes in the security and exploit it such as bugs.

Another thing i would like to mention is that malware grows increasingly more powerful and in the near future i think that VM capable malware will become a common thing.
Note that there are risks with a physical machine too: malware could attempt to plant itself into one of the many pieces of firmware on the motherboard and peripherals. Toolkits for this are beginning to emerge, such as Rakshasa and Mebromi. So if you analyze some sophisticated malware on a physical machine, don't trust this physical machine any more, ever.

Just saying...