VirtualBox: better to use NAT or Bridged Adapter for a malware test machine?

Discussion in 'sandboxing & virtualization' started by MrBrian, Feb 19, 2014.

Thread Status:
Not open for further replies.
  1. wat0114

    wat0114 Registered Member

    Joined:
    Aug 5, 2012
    Posts:
    4,066
    Location:
    Canada
    Hi MrBrian,

    I just set up my VMWare build #8 guest with NAT and Jetico firewall on the host machine intercepts all network traffic attempts from the guest's vmnat.exe process, including both udp and tcp protocols as well as icmp attempts either outbound or to the host's ip address.

    EDIT

    as a quick test I shutdown Jetico fw and enabled Windows 7 fw, created a block inbound icmp v4 then pinged the host from guest vm and I received replies successfully, so it appears Windows fw does not block the guest vm in NAT mode.
     
    Last edited: Mar 2, 2014
  2. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
    @wat0114: Interesting; thanks for the tests :). When you tested the built-in firewall, what network location were you using for the host's network (Public, Work, Home)?
     
  3. wat0114

    wat0114 Registered Member

    Joined:
    Aug 5, 2012
    Posts:
    4,066
    Location:
    Canada
    Public profile.
     
  4. Nebulus

    Nebulus Registered Member

    Joined:
    Jan 20, 2007
    Posts:
    1,635
    Location:
    European Union
    This happens (I think) because Windows Firewall and Jetico firewall work at different levels in the stack. And because VBox must inject traffic at some point in order for virtual NAT to work, and if that injection point is at a point where the traffic doesn't pass through Windows Firewall, then you get the result from the experiment.
     
  5. wat0114

    wat0114 Registered Member

    Joined:
    Aug 5, 2012
    Posts:
    4,066
    Location:
    Canada
    Yes, I think you're right. I mentioned something along those lines regarding Jetico's low level monitoring in a different thread.
     
  6. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
    I just tried some simple outbound block rules in the built-in Windows firewall for guests, and, believe it or not, they seemed to block traffic to other local machines (including the host), while preserving internet access. This worked for both Bridged Adapter and NAT. For example, using Bridged Adapter, my guest Windows firewall rule is block outbound from Local addresses 192.168.1.0/24 to Remote addresses 192.168.1.0/24.
     
    Last edited: Mar 3, 2014
  7. wat0114

    wat0114 Registered Member

    Joined:
    Aug 5, 2012
    Posts:
    4,066
    Location:
    Canada
    Thanks for the links and tips on pfsense, but it sems like it might be more work and resource usage than is worth any security gains - if any - it has over just using bridged mode and a firewall on both the guest and host machines.
     
  8. Nebulus

    Nebulus Registered Member

    Joined:
    Jan 20, 2007
    Posts:
    1,635
    Location:
    European Union
    For normal use you are correct. But the OP talked about "a malware test machine", so the situation is a bit different. You cannot rely on a firewall installed in the same machine where you intend to run malware.
     
  9. wat0114

    wat0114 Registered Member

    Joined:
    Aug 5, 2012
    Posts:
    4,066
    Location:
    Canada
    Maybe, but I'd have no problems using firewalls of Jetico's strength on both machines, a recent image on hand if needed. I keep nothing of sensitive personal nature on either too.
     
  10. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
  11. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
    I deleted those posts because I made a new tutorial :p.

    If anyone wants the document from the first post that I deleted: https://docs.google.com/file/d/1oiI...08CI0hmbKElmWPTDSmHZtMuiAKO_otFddF/edit?pli=1.
     
  12. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
    You're welcome :).

    If one doesn't want to do the pfSense thing, then perhaps use the advice in post #31 to protect the host better. However, I like not having to worry about open ports on the host anymore :D. Also, what Nebulus said.
     
  13. wat0114

    wat0114 Registered Member

    Joined:
    Aug 5, 2012
    Posts:
    4,066
    Location:
    Canada
    I remember a year or so ago using nMap and probing host from guest and not finding any open ports.
     
  14. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
    Last edited: Mar 9, 2014
  15. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
    I don't know what proportion of malware tries to spread via vulnerabilities in programs that have ports open, but there are some. Example: from paper hxxp://info.baesystemsdetica.com/rs/baesystems/images/snake_whitepaper.pdf on the Uroburos malware:
     
  16. wat0114

    wat0114 Registered Member

    Joined:
    Aug 5, 2012
    Posts:
    4,066
    Location:
    Canada

    That one looks familiar to me. I might have even used that one as well. I remember setting the options to scan all ports.
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.