Download fulltext - DiVA Portal

Transcript
CHAPTER 2. BACKGROUND AND THEORY
2.5.1
51
Signature scanning - First generation scanners
Searching files or memory locations for byte sequences extracted from known
malware using simple string matching is one of the simplest malware detection mechanisms. Signatures are made from sequences or patterns of
instructions that identify a malicious block. One important challenge with
using signature scanning is that the signature patterns must be long enough
to detect a malicious sequence uniquely, avoiding producing false positives.
A signature for one particular malware variant might detect other variants
or even new but closely related malware, given that the same signature is
present in both. However, there is also the possibility that other and completely different malware are incorrectly classified as a known malware even
if the overall behavior is different. Incorrect classification may again lead
to disinfection attempts resulting in corrupted files. If the code being disinfected is part of the boot sector or some way critical to the OS, the system
may crash or be rendered useless. To help improve accuracy of detection,
signature scanners may support wildcards in the signature pattern or allow
for several mismatches within the string. To speed up the string matching process, scanners may employ optimizing techniques such as hashing of
code, scanning only the beginning and end of files or using information in
executable file headers to start scanning at the entry point of the code.
2.5.2
Smart scanning - Second generation scanners
Smart scanning manages to mitigate obfuscating techniques such as inserting
NOP or other bogus instructions in the assembly code. The smart scanning
technique ignores such instructions when applying the malware signature.
The same technique can be used with malicious code in textual format, such
as scripts, that is obfuscated by white spaces or newlines. Another smart
scanning-like technique, called “Skeleton detection,” works by removing all
non-essential instructions or code lines such that only important instructions
make up a signature. These bogus code removing operations can generally
be performed using assembly level optimizers on the code prior to performing
scan.
Some second-generation scanners use a technique known as “nearly exact
identification”, which makes use of more than one search string. The classification is then based on the number of matches found in a given file. Determining a correct match is essential if attempting disinfection. In the worst