Now there is no real defense against zero day attacks. These types of attack are newly coded exploits that haven't been discovered yet and analyzed, and thus haven't yet been added to the database of viruses or malware, from which antivirus software would then create a patch for use as the basis for an update.
A basic way to understand how antivirus software works is simple. Experienced hackers can create their own malware and use it to devastating effect. Malware is always written in codes. Whether that string of codes is a simple one-line exploit or runs to thousands of lines, it will always be unique by virtue of its signature.
What we mean by that is, within malware code there is a unique pattern that can be uncovered.
For example, let's look at the plain text word evade to dissect and analyze it. The word evade as you currently see it, is in text format which...