Variant analysis is the process of taking a known problem, such as a crashing bug or security vulnerability, and finding other occurrences (or "variants") of that problem in a codebase. The existence of a specific vulnerability in a codebase is strong evidence that the same vulnerability may exist in many other places in the codebase. The methods for variant analysis have traditionally been manual, ineffective, and time intensive. However, automated approaches to variant analysis are now becoming widely available. This document introduces variant analysis, illustrates the limits of traditional tools in performing variant analysis, and introduces modern automated variant analysis tools.
Why Do Variant Analysis?
If variant analysis is something that you do not do as part of your vulnerability response process, and instead limit your response to simply finding and fixing individual vulnerabilities as you become aware of them, you run the risk of letting similar vulnerabilities slip through the cracks. Worse still, as a result of fixing a vulnerability and publishing a patch, you are effectively shining a spotlight on your codebase. It's likely that malicious actors will try to find similar vulnerabilities in your code, even if you don't. These actors don't even need to have access to your source code to do this. It's common for them to use tools such as decompilers or other binary inspection tools to help them understand the vulnerability you fixed and identify similar problems.
Microsoft, for example, is intimately familiar with this problem. Understandably, the company is a big target for this kind of activity. To mitigate this, it makes variant analysis a core part of its security response process. Before releasing any patches at all, it makes an effort to try and fix anything similar all at once.
This is a preview of the Variant Analysis Refcard. To read the entire Refcard, please download the PDF from the link above.