The malware can be automatically installed when you connect the infected drive to your PC. There are a couple of things you can do to avoid this type of infection: First and foremost, be very wary of any USB device that you don't own.