Introduction |
|
xix | |
|
|
1 | (102) |
|
Chapter 1 Introduction to Antivirus Software |
|
|
3 | (12) |
|
What Is Antivirus Software? |
|
|
3 | (1) |
|
Antivirus Software: Past and Present |
|
|
4 | (1) |
|
Antivirus Scanners, Kernels, and Products |
|
|
5 | (1) |
|
Typical Misconceptions about Antivirus Software |
|
|
6 | (1) |
|
|
7 | (6) |
|
|
7 | (1) |
|
Making Use of Native Languages |
|
|
7 | (1) |
|
|
8 | (1) |
|
|
8 | (1) |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
10 | (1) |
|
Miscellaneous File Formats |
|
|
11 | (1) |
|
|
11 | (1) |
|
Packet Filters and Firewalls |
|
|
11 | (1) |
|
|
12 | (1) |
|
|
12 | (1) |
|
|
13 | (2) |
|
Chapter 2 Reverse-Engineering the Core |
|
|
15 | (42) |
|
Reverse-Engineering Tools |
|
|
15 | (5) |
|
Command-Line Tools versus GUI Tools |
|
|
16 | (1) |
|
|
17 | (1) |
|
Tricks for Retrieving Debugging Symbols |
|
|
17 | (3) |
|
|
20 | (8) |
|
Backdoors and Configuration Settings |
|
|
21 | (2) |
|
|
23 | (2) |
|
Debugging User-Mode Processes with a Kernel-Mode Debugger |
|
|
25 | (2) |
|
Analyzing AV Software with Command-Line Tools |
|
|
27 | (1) |
|
|
28 | (1) |
|
A Practical Example: Writing Basic Python Bindings for Avast for Linux |
|
|
29 | (8) |
|
A Brief Look at Avast for Linux |
|
|
29 | (3) |
|
Writing Simple Python Bindings for Avast for Linux |
|
|
32 | (5) |
|
The Final Version of the Python Bindings |
|
|
37 | (1) |
|
A Practical Example: Writing Native C/C++ Tools for Comodo Antivirus for Linux |
|
|
37 | (18) |
|
Other Components Loaded by the Kernel |
|
|
55 | (1) |
|
|
56 | (1) |
|
Chapter 3 The Plug-ins System |
|
|
57 | (20) |
|
Understanding How Plug-ins Are Loaded |
|
|
58 | (4) |
|
A Full-Featured Linker in Antivirus Software |
|
|
58 | (1) |
|
Understanding Dynamic Loading |
|
|
59 | (1) |
|
Advantages and Disadvantages of the Approaches for Packaging Plug-ins |
|
|
60 | (2) |
|
|
62 | (7) |
|
Scanners and Generic Routines |
|
|
63 | (1) |
|
File Format and Protocol Support |
|
|
64 | (1) |
|
|
65 | (1) |
|
|
66 | (1) |
|
|
67 | (1) |
|
|
68 | (1) |
|
|
69 | (5) |
|
|
69 | (1) |
|
|
70 | (2) |
|
|
72 | (1) |
|
|
73 | (1) |
|
|
74 | (3) |
|
Chapter 4 Understanding Antivirus Signatures |
|
|
77 | (10) |
|
|
77 | (3) |
|
|
78 | (1) |
|
|
78 | (1) |
|
|
79 | (1) |
|
|
80 | (1) |
|
|
80 | (5) |
|
|
81 | (2) |
|
Graph-Based Hashes for Executable Files |
|
|
83 | (2) |
|
|
85 | (2) |
|
Chapter 5 The Update System |
|
|
87 | (16) |
|
Understanding the Update Protocols |
|
|
88 | (4) |
|
|
89 | (2) |
|
Verifying the Update Files |
|
|
91 | (1) |
|
Dissecting an Update Protocol |
|
|
92 | (8) |
|
When Protection Is Done Wrong |
|
|
100 | (1) |
|
|
101 | (2) |
|
Part II Antivirus Software Evasion |
|
|
103 | (114) |
|
Chapter 6 Antivirus Software Evasion |
|
|
105 | (12) |
|
Who Uses Antivirus Evasion Techniques? |
|
|
106 | (1) |
|
Discovering Where and How Malware Is Detected |
|
|
107 | (7) |
|
Old Tricks for Determining Where Malware Is Detected: Divide and Conquer |
|
|
107 | (1) |
|
Evading a Simple Signature-Based Detection with the Divide and Conquer Trick |
|
|
108 | (5) |
|
Binary Instrumentation and Taint Analysis |
|
|
113 | (1) |
|
|
114 | (3) |
|
Chapter 7 Evading Signatures |
|
|
117 | (16) |
|
File Formats: Corner Cases and Undocumented Cases |
|
|
118 | (1) |
|
|
118 | (6) |
|
Evasion Tips and Tricks for Specific File Formats |
|
|
124 | (7) |
|
|
124 | (2) |
|
|
126 | (1) |
|
|
127 | (1) |
|
Executing Code on the Fly |
|
|
128 | (1) |
|
Hiding the Logic: Opaque Predicates and Junk Code |
|
|
128 | (1) |
|
|
129 | (2) |
|
|
131 | (2) |
|
Chapter 8 Evading Scanners |
|
|
133 | (32) |
|
Generic Evasion Tips and Tricks |
|
|
133 | (15) |
|
|
134 | (2) |
|
|
136 | (1) |
|
Taking Advantage of File Format Weaknesses |
|
|
136 | (1) |
|
Using Anti-emulation Techniques |
|
|
137 | (5) |
|
Using Anti-disassembling Techniques |
|
|
142 | (2) |
|
Disrupting Code Analyzers through Anti-analysis |
|
|
144 | (3) |
|
|
147 | (1) |
|
Causing File Format Confusion |
|
|
148 | (1) |
|
Automating Evasion of Scanners |
|
|
148 | (14) |
|
|
149 | (1) |
|
|
150 | (1) |
|
|
150 | (1) |
|
|
151 | (1) |
|
|
152 | (1) |
|
|
153 | (1) |
|
Installing Zoner Antivirus |
|
|
154 | (1) |
|
|
154 | (4) |
|
|
158 | (2) |
|
|
160 | (2) |
|
|
162 | (3) |
|
Chapter 9 Evading Heuristic Engines |
|
|
165 | (18) |
|
|
165 | (15) |
|
|
166 | (1) |
|
Bypassing a Simplistic Static Heuristic Engine |
|
|
166 | (7) |
|
Dynamic Heuristic Engines |
|
|
173 | (1) |
|
|
173 | (3) |
|
Bypassing a Userland HIPS |
|
|
176 | (2) |
|
|
178 | (2) |
|
|
180 | (3) |
|
Chapter 10 Identifying the Attack Surface |
|
|
183 | (24) |
|
Understanding the Local Attack Surface |
|
|
185 | (2) |
|
Finding Weaknesses in File and Directory Privileges |
|
|
185 | (1) |
|
|
186 | (1) |
|
Incorrect Privileges in Files and Folders |
|
|
186 | (1) |
|
Incorrect Access Control Lists |
|
|
187 | (10) |
|
Kernel-Level Vulnerabilities |
|
|
187 | (1) |
|
|
188 | (1) |
|
Exploiting SUID and SGID Binaries on Unix-Based Platforms |
|
|
189 | (1) |
|
ASLR and DEP Status for Programs and Binaries |
|
|
190 | (3) |
|
Exploiting Incorrect Privileges on Windows Objects |
|
|
193 | (3) |
|
|
196 | (1) |
|
Understanding the Remote Attack Surface |
|
|
197 | (6) |
|
|
198 | (1) |
|
Generic Detection and File Disinfection Code |
|
|
199 | (1) |
|
Network Services, Administration Panels, and Consoles |
|
|
199 | (1) |
|
Firewalls, Intrusion Detection Systems, and Their Parsers |
|
|
200 | (1) |
|
|
201 | (1) |
|
|
201 | (1) |
|
Security Enhanced Software |
|
|
202 | (1) |
|
|
203 | (4) |
|
Chapter 11 Denial of Service |
|
|
207 | (10) |
|
Local Denial-of-Service Attacks |
|
|
208 | (6) |
|
|
208 | (1) |
|
Creating a Simple Compression Bomb |
|
|
209 | (3) |
|
Bugs in File Format Parsers |
|
|
212 | (1) |
|
Attacks against Kernel Drivers |
|
|
213 | (1) |
|
Remote Denial-of-Service Attacks |
|
|
214 | (1) |
|
|
214 | (1) |
|
Bugs in File Format Parsers |
|
|
215 | (1) |
|
|
215 | (2) |
|
Part III Analysis and Exploitation |
|
|
217 | (104) |
|
Chapter 12 Static Analysis |
|
|
219 | (16) |
|
Performing a Manual Binary Audit |
|
|
219 | (14) |
|
|
220 | (8) |
|
|
228 | (5) |
|
|
233 | (2) |
|
Chapter 13 Dynamic Analysis |
|
|
235 | (34) |
|
|
235 | (31) |
|
|
236 | (1) |
|
|
237 | (2) |
|
Automating Fuzzing of Antivirus Products |
|
|
239 | (1) |
|
|
240 | (3) |
|
Porting Antivirus Kernels to Unix |
|
|
243 | (1) |
|
|
244 | (3) |
|
Problems, Problems, and More Problems |
|
|
247 | (1) |
|
|
248 | (2) |
|
|
250 | (2) |
|
|
252 | (1) |
|
Blind Code Coverage Fuzzer |
|
|
253 | (1) |
|
Using Blind Code Coverage Fuzzer |
|
|
254 | (5) |
|
Nightmare, the Fuzzing Suite |
|
|
259 | (1) |
|
|
260 | (2) |
|
|
262 | (1) |
|
Configuring and Running the Fuzzer |
|
|
262 | (4) |
|
|
266 | (3) |
|
Chapter 14 Local Exploitation |
|
|
269 | (28) |
|
Exploiting Backdoors and Hidden Features |
|
|
270 | (4) |
|
Finding Invalid Privileges, Permissions, and ACLs |
|
|
274 | (5) |
|
Searching Kernel-Land for Hidden Features |
|
|
279 | (6) |
|
More Logical Kernel Vulnerabilities |
|
|
285 | (10) |
|
|
295 | (2) |
|
Chapter 15 Remote Exploitation |
|
|
297 | (24) |
|
Implementing Client-Side Exploitation |
|
|
297 | (20) |
|
Exploiting Weakness in Sandboxing |
|
|
297 | (1) |
|
Exploiting ASLR, DEP, and RWX Pages at Fixed Addresses |
|
|
298 | (2) |
|
|
300 | (1) |
|
Taking Advantage of Emulators |
|
|
301 | (1) |
|
|
302 | (1) |
|
Finding Weaknesses in Intel x86, AMD x86_64, and ARM Emulators |
|
|
303 | (1) |
|
Using JavaScript, VBScript, or ActionScript |
|
|
303 | (1) |
|
Determining What an Antivirus Supports |
|
|
304 | (2) |
|
Launching the Final Payload |
|
|
306 | (1) |
|
Exploiting the Update Services |
|
|
307 | (1) |
|
Writing an Exploit for an Update Service |
|
|
308 | (9) |
|
|
317 | (1) |
|
Differences between Client-Side and Server-Side Exploitation |
|
|
317 | (1) |
|
Exploiting ASLR, DEP, and RWX Pages at Fixed Addresses |
|
|
318 | (1) |
|
|
318 | (3) |
|
Part IV Current Trends and Recommendations |
|
|
321 | (26) |
|
Chapter 16 Current Trends in Antivirus Protection |
|
|
323 | (8) |
|
Matching the Attack Technique with the Target |
|
|
324 | (2) |
|
The Diversity of Antivirus Products |
|
|
324 | (1) |
|
|
324 | (1) |
|
|
325 | (1) |
|
|
325 | (1) |
|
Targeting Small to Medium-Sized Companies |
|
|
326 | (1) |
|
Targeting Governments and Big Companies |
|
|
326 | (2) |
|
The Targets of Governments |
|
|
327 | (1) |
|
|
328 | (3) |
|
Chapter 17 Recommendations and the Possible Future |
|
|
331 | (16) |
|
Recommendations for Users of Antivirus Products |
|
|
331 | (7) |
|
|
332 | (5) |
|
Isolating Machines Improves Protection |
|
|
337 | (1) |
|
Auditing Security Products |
|
|
338 | (1) |
|
Recommendations for Antivirus Vendors |
|
|
338 | (6) |
|
Engineering Is Different from Security |
|
|
339 | (1) |
|
Exploiting Antivirus Software Is Trivial |
|
|
339 | (1) |
|
|
340 | (1) |
|
|
340 | (1) |
|
|
341 | (1) |
|
Reduce Dangerous Code in Parsers |
|
|
342 | (1) |
|
Improve the Safety of Update Services and Protocols |
|
|
342 | (1) |
|
Remove or Disable Old Code |
|
|
343 | (1) |
|
|
344 | (3) |
Index |
|
347 | |