Plenty of malware refuses to run inside a virtual machine — so why not run everything in one?
A well-known evasion technique is to detect a virtual or analysis environment and stay dormant, so that researchers see nothing. Some families do this quite thoroughly.
The obvious thought is that this could be turned around: if malicious software declines to run in a virtual machine, then running ordinary work inside one would cause a chunk of it to deactivate itself.
I assume this does not work as neatly as it sounds. Where does the reasoning break down, and is anything like it done in practice?
@threat_model_thea · 2w ago
The reasoning breaks at the assumption that this behaviour is a property of malware. It is a property of a strategy, and strategies respond to what defenders do.
The reason some families check for virtual environments is that a virtual machine used to be strong evidence of an analyst's sandbox rather than a real target. Refusing to run avoided being studied, at the cost of skipping a few real victims — a good trade when virtual machines were rare.
The moment ordinary users are all in virtual machines, that trade inverts. Skipping virtual environments would mean skipping everyone, and the check would be removed in a week. You cannot build a defence out of your adversary's cost calculation when your defence is what changes the calculation.
This is the general shape of the objection, and it applies to a lot of clever inversions of attacker behaviour.
Reply
Report