How do professional hackers to test their own malwares/viruses without harming their own computer?
Almost all malware, if not all, works by obscurity. Once you understand how it works, and you have the appropriate skill-set, you can defeat it quite easily. If it's your own malware and viruses, then it's really quite simple: you know exactly what your malware does, and how to defeat it, correct? After all, you programmed it.
While yes, I agree in general with the use of a Virtual Machine, it isn't 100%. Nothing is 100%. You can infect your own machines, whether they're online or offline, and do interesting things with them.
You can observe how the malware interacts with your environment through many different methods. Here are some notable examples:
- Observing all changes to the file system, and/or hard drives.
- Observing memory
- Debuggers such as
OllyDbg
, or IDA Pro
.
- Network packet-capturing tools such as
Wireshark
.
Disable the Virtual Machine's internet connection for best results
While others talk about malware "possibly escaping" the Virtual Machine
, it isn't very likely, though it is possible. Even if the malware could detect that it's running inside a virtual machine, that doesn't help much unless the malware self-destructs
upon detecting a virtual environment.
Even if a VM isn't detected, a piece of malware could simply try to escape it by assuming it may be there. So methods to prevent the malware from detecting it's inside a VM may not work, unless it's the type that self-destructs when detecting it.
Regarding the "attacks" you've mentioned, let's take a look at the results of them, assuming you can remove the infections:
- Zip bomb
- A zip bomb, also known as a zip of death or decompression bomb, is a malicious archive file designed to crash or render useless the program or system reading it. It is often employed to disable antivirus software, in order to create an opening for more traditional viruses.
- After removing the infection, the left-behind zip-bomb can be nullified by deleting the files. If you made this yourself, simply make a cleanup routine. If you didn't make it yourself, simply make a cleanup routine. If the program is still forcibly running, you can reboot.
- Won't cause physical problems with your hardware.
- Fork bomb
- In computing, a fork bomb (also called rabbit virus or wabbit) is a denial-of-service attack wherein a process continually replicates itself to deplete available system resources, causing resource starvation and slowing or crashing the system.
- Won't cause physical problems with your hardware.
- Folder blaster.
- Same concept as the zip bomb, but with folder spam. Just write a routine to delete them.
- Won't cause physical problems with your hardware.
Better yet, if you have a virtual testing environment
, you can delete these automatically by saving the state of a virtual machine before the infection, and restoring it after you're done studying the output. This is the easiest, most efficient method by far.