Is a VM safe to run a simple virus on?

  • I just made a very simple batch virus that runs itself and runs on startup. I want to test it because I want to send it to a YouTuber who films himself running these viruses on a Virtual Machine.

    The question is, how can I make the Virtual Machine safe for running this without going to my actual computer? Also, since a VM uses RAM from the host PC, how to make it so that the RAM is un-affected by this virus?

    (The Virus Runs itself 5 times and also copies itself to the users Documents Folder, Desktop, and other places creating a lot of lag.)

    I have absolutely no intention of spreading the virus to the public.

    Unless you accidentally wrote a VM escape vulnerability (which would probably be worth a good amount of money), or shared folders from your host computer to the VM, then you don't have anything to worry about.

    You should know what it does because you wrote it! Did you write it to go to your actual computer?

  • Echo

    Echo Correct answer

    4 years ago

    The default settings for most VMs will be sufficient for keeping everything isolated, that's what they're designed for.

    The specific settings might be a little different depending on what software your're using, but here's a few things you can check in your VM's settings to keep your computer safe:

    • Disable file sharing, shared clipboard, and Drag'n Drop
    • Set a cap for memory and processor usage, and virtual hard drive size
    • Make sure your network settings are set to disconnected or NAT
    • Make sure all your serial and USB ports are disabled/ not shared
    • Check that printers and other wireless devices associated with your PC aren't shared

    So will disconnectiing from the internet work?

    @user8798029 Yes it will, but is 1: Not necessary if you're using NAT or an equivalent and, 2: probably fine to disable once you download the virus, assuming it isn't reliant on internet connection.

License under CC-BY-SA with attribution

Content dated before 7/24/2021 11:53 AM