Protecting Host Machine from Malware escaping a VM.

McLovin

Level 78
Verified
Honorary Member
Malware Hunter
Apr 17, 2011
9,228
Why not download all the malware and then test it on a computer that you don't use anymore?
 

HeffeD

Level 1
Feb 28, 2011
1,690
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. :)
 

MDTechVideos

Moderator
Verified
Staff Member
Well-known
Aug 5, 2012
473
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?
 
  • Like
Reactions: DDE_Server

MrXidus

Super Moderator (Leave of absence)
Apr 17, 2011
2,503
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.
 
  • Like
Reactions: Xtwillight

MDTechVideos

Moderator
Verified
Staff Member
Well-known
Aug 5, 2012
473
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?
 
  • Like
Reactions: DDE_Server
F

ForgottenSeer 2567

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
 
  • Like
Reactions: DDE_Server

McLovin

Level 78
Verified
Honorary Member
Malware Hunter
Apr 17, 2011
9,228
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

Level 5
Apr 26, 2011
2,779
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".
 
F

ForgottenSeer 2567

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

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.
 

HeffeD

Level 1
Feb 28, 2011
1,690
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.
 
F

ForgottenSeer 2567

hi
thanks for all the help but my knowledge is not enough so it is playing with fire from can read.
 

Ink

Administrator
Verified
Jan 8, 2011
22,490
Is there any advice for using a Junk (Physical) PC for testing? Any precautions when connected to a home network?
 

HeffeD

Level 1
Feb 28, 2011
1,690
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.
 
  • Like
Reactions: DDE_Server

jamescv7

Level 85
Verified
Honorary Member
Mar 15, 2011
13,070
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
Verified
Staff Member
Malware Hunter
Well-known
Jul 22, 2014
2,525
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!
 

Nico@FMA

Level 27
Verified
May 11, 2013
1,687
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...
 

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top