Protecting Host Machine from Malware escaping a VM.

Discussion in 'General Security Discussions' started by 3link9, Jan 18, 2012.

  1. McLovin

    McLovin Level 61
    Trusted AV Tester

    Apr 17, 2011
    8,768
    6,393
    I stream ✌
    Queensland, Australia
    Windows 10
    Trend Micro
    Why not download all the malware and then test it on a computer that you don't use anymore?
     
  2. HeffeD

    HeffeD New Member

    Feb 28, 2011
    1,597
    12
    That's all we can ever hope for. Nothing is certain, all we can do is try to minimize risk.

    That's what we're here for. :)
     
  3. MalwareDoctor

    MalwareDoctor Moderator
    Staff Member

    Aug 5, 2012
    462
    1,072
    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?
     
  4. MrXidus

    MrXidus Super Moderator (Leave of absence)

    Apr 17, 2011
    2,173
    931
    Australia
    Nope. That goes for all my 5 years of testing all types of malicious software in a VM.
     
  5. MalwareDoctor

    MalwareDoctor Moderator
    Staff Member

    Aug 5, 2012
    462
    1,072
    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?
     
  6. kreto

    kreto New Member

    Sep 26, 2012
    12
    3
    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
     
  7. McLovin

    McLovin Level 61
    Trusted AV Tester

    Apr 17, 2011
    8,768
    6,393
    I stream ✌
    Queensland, Australia
    Windows 10
    Trend Micro
    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 :)
     
  8. Gnosis

    Gnosis New Member

    Apr 26, 2011
    2,414
    222
    Somewhere west of the Mississippi
    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".
     
  9. kreto

    kreto New Member

    Sep 26, 2012
    12
    3
    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
     
  10. ZeroDay

    ZeroDay Guest

    Running virtual machines using an Ubuntu host for malware testing is a good practice in my opinion.
     
  11. McLovin

    McLovin Level 61
    Trusted AV Tester

    Apr 17, 2011
    8,768
    6,393
    I stream ✌
    Queensland, Australia
    Windows 10
    Trend Micro
    Not really sure there sorry. :s
     
  12. HeffeD

    HeffeD New Member

    Feb 28, 2011
    1,597
    12
    VMWare is better for testing malware. Many security programs don't run properly in VirtualBox due to imperfect OS emulation.
     
  13. kreto

    kreto New Member

    Sep 26, 2012
    12
    3
    hi
    thanks for all the help but my knowledge is not enough so it is playing with fire from can read.
     
  14. Spawn

    Spawn Administrator
    Staff Member Content Creator

    Jan 8, 2011
    16,261
    24,194
    Is there any advice for using a Junk (Physical) PC for testing? Any precautions when connected to a home network?
     
  15. Umbra

    Umbra From Emsisoft
    Developer

    May 16, 2011
    17,163
    29,656
    Community manager
    Vietnam & France
    Windows 10
    Emsisoft
    Disable any sharings from/to the test Pc.
     
  16. HeffeD

    HeffeD New Member

    Feb 28, 2011
    1,597
    12
    I would recommend disconnecting from your network. That way you're absolutely sure there's no way anything can spread.
     
  17. jamescv7

    jamescv7 Level 61
    Trusted

    Mar 15, 2011
    12,664
    17,723
    Web and FileMaker Developer
    Philippines
    Windows 10
    Microsoft
    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.
     
  18. MrBrian

    MrBrian New Member

    May 25, 2014
    14
    6
    #58 MrBrian, May 25, 2014
    Last edited: May 25, 2014
    Spawn likes this.
  19. Solarquest

    Solarquest Moderator
    Staff Member AV Tester

    Jul 22, 2014
    1,835
    14,610
    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!
     
  20. Nico@FMA

    Nico@FMA Level 27

    May 11, 2013
    1,677
    3,704
    Security Consultant, ICT Advisor and Developer
    Friesland (Harlingen)
    Windows 7
    Norton
    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...
     
    soccer97 and Umbra like this.
Loading...