Antivirus bypass using junk code
Antivirus engines sometimes search within the logic of the code to perform detection on it in order to later classify it as a particular type of malware.
To make it difficult for antivirus software to search through the logic of the code, we can use junk code, which helps us make the logic of the code more complicated.
There are many ways to use this technique, but the most common methods involve using conditional jumps, irrelevant variable names, and empty functions.
For example, instead of writing malware that contains a single basic function with two ordinary variables (for instance, an IP address and a port number) with generic variable names and no conditions, it would be preferable, if we wished to complicate the code, to create three functions, of which two are empty (unused) functions. Within the malicious function, we can also add a certain number of conditions that will never occur and add some meaningless variable names.
The...