Foreword |
|
xxiii | |
Introduction |
|
xxvii | |
Part I: Theory and Ideals |
|
|
|
1 | (30) |
|
|
2 | (1) |
|
Definitions of the Word Hacker |
|
|
2 | (7) |
|
|
2 | (1) |
|
|
3 | (2) |
|
|
5 | (1) |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
7 | (1) |
|
|
8 | (1) |
|
|
9 | (6) |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
11 | (1) |
|
|
12 | (1) |
|
|
13 | (1) |
|
|
14 | (1) |
|
|
15 | (4) |
|
|
15 | (1) |
|
|
16 | (1) |
|
|
16 | (1) |
|
|
17 | (1) |
|
|
17 | (2) |
|
|
19 | (5) |
|
|
19 | (2) |
|
|
21 | (1) |
|
|
22 | (1) |
|
|
23 | (1) |
|
|
23 | (1) |
|
|
24 | (3) |
|
Public vs. Private Research |
|
|
25 | (1) |
|
Who Is Affected when a Exploit Is Released? |
|
|
26 | (1) |
|
|
27 | (1) |
|
|
28 | (3) |
|
|
31 | (36) |
|
|
32 | (1) |
|
What Are the Laws of Security? |
|
|
32 | (1) |
|
Client-side Security Doesn't Work |
|
|
33 | (4) |
|
|
34 | (3) |
|
|
37 | (1) |
|
|
37 | (1) |
|
You Can't Exchange Encryption Keys without a Shared Piece of Information |
|
|
37 | (4) |
|
|
38 | (2) |
|
|
40 | (1) |
|
|
41 | (1) |
|
Viruses and Trojans Cannot Be 100 Percent Protected Against |
|
|
41 | (3) |
|
|
42 | (1) |
|
|
43 | (1) |
|
|
44 | (1) |
|
Firewalls Cannot Protect You 100 Percent from Attack |
|
|
44 | (5) |
|
|
45 | (1) |
|
|
46 | (1) |
|
Attacking Exposed Servers |
|
|
46 | (1) |
|
Attacking the Firewall Directly |
|
|
47 | (1) |
|
|
48 | (1) |
|
|
48 | (1) |
|
|
49 | (1) |
|
Secret Cryptographic Algorithms Are Not Secure |
|
|
49 | (2) |
|
|
50 | (1) |
|
|
51 | (1) |
|
|
51 | (1) |
|
If a Key Isn't Required, You Don't Have Encryption: You Have Encoding |
|
|
51 | (2) |
|
|
52 | (1) |
|
|
53 | (1) |
|
|
53 | (1) |
|
Passwords Cannot Be Securely Stored on the Client Unless There Is Another Password to Protect Them |
|
|
53 | (4) |
|
|
55 | (1) |
|
|
56 | (1) |
|
|
57 | (1) |
|
In Order for a System to Begin to Be Considered Secure, It Must Undergo an Independent Security Audit |
|
|
57 | (1) |
|
|
57 | (1) |
|
|
58 | (1) |
|
|
58 | (1) |
|
Security Through Obscurity Doesn't Work |
|
|
58 | (3) |
|
|
59 | (1) |
|
|
60 | (1) |
|
|
61 | (1) |
|
People Believe That Something Is More Secure Simply Because It's New |
|
|
61 | (3) |
|
|
62 | (1) |
|
|
63 | (1) |
|
|
63 | (1) |
|
What Can Go Wrong Will Go Wrong |
|
|
64 | (3) |
|
|
64 | (1) |
|
|
64 | (1) |
|
|
64 | (1) |
|
|
64 | (1) |
|
|
65 | (2) |
|
|
67 | (34) |
|
|
68 | (1) |
|
What Are the Classes of Attack? |
|
|
68 | (20) |
|
|
68 | (11) |
|
|
79 | (3) |
|
File Creation, Reading, Modification, Removal |
|
|
82 | (1) |
|
|
82 | (1) |
|
Special File/Database Access |
|
|
83 | (2) |
|
|
85 | (3) |
|
|
88 | (2) |
|
How Do You Test for Vulnerability without Exercising the Exploit? |
|
|
89 | (1) |
|
How to Secure Against These Classes of Attack |
|
|
90 | (7) |
|
|
91 | (1) |
|
|
92 | (2) |
|
File Creation, Reading, Modification, Removal |
|
|
94 | (1) |
|
|
95 | (1) |
|
Special File/Database Access |
|
|
95 | (2) |
|
|
97 | (1) |
|
|
97 | (1) |
|
|
98 | (3) |
|
|
101 | (20) |
|
|
102 | (1) |
|
|
102 | (1) |
|
|
102 | (5) |
|
|
102 | (3) |
|
|
105 | (1) |
|
|
105 | (2) |
|
|
107 | (10) |
|
|
107 | (1) |
|
|
108 | (4) |
|
|
112 | (1) |
|
Debuggers, Decompilers, and Related Tools |
|
|
113 | (4) |
|
|
117 | (1) |
|
|
117 | (1) |
|
Cost/Availability of Tools |
|
|
117 | (1) |
|
Obtaining/Creating a Duplicate Environment |
|
|
118 | (1) |
|
How to Secure Against These Methodologies |
|
|
118 | (1) |
|
Limit Information Given Away |
|
|
119 | (1) |
|
|
119 | (1) |
|
|
120 | (1) |
|
|
120 | (1) |
Part II: Theory and Ideals |
|
|
|
121 | (24) |
|
|
122 | (1) |
|
|
122 | (18) |
|
|
123 | (3) |
|
|
126 | (1) |
|
|
126 | (2) |
|
|
128 | (4) |
|
File System Monitoring Tools |
|
|
132 | (4) |
|
|
136 | (4) |
|
|
140 | (2) |
|
|
140 | (1) |
|
|
141 | (1) |
|
How to Secure Against Diffing |
|
|
142 | (1) |
|
|
142 | (1) |
|
|
143 | (2) |
|
|
145 | (32) |
|
|
146 | (1) |
|
An Overview of Cryptography and Some of Its Algorithms (Crypto 101) |
|
|
146 | (7) |
|
|
146 | (1) |
|
|
147 | (2) |
|
|
149 | (1) |
|
|
149 | (2) |
|
|
151 | (2) |
|
Problems with Cryptography |
|
|
153 | (10) |
|
|
154 | (3) |
|
|
157 | (2) |
|
|
159 | (4) |
|
|
163 | (6) |
|
|
164 | (2) |
|
|
166 | (1) |
|
|
166 | (1) |
|
Other Ways Brute Force Attacks Are Being Used |
|
|
167 | (1) |
|
|
167 | (2) |
|
|
169 | (1) |
|
|
169 | (4) |
|
Differential Cryptanalysis |
|
|
170 | (2) |
|
|
172 | (1) |
|
|
173 | (1) |
|
|
173 | (1) |
|
|
174 | (3) |
|
|
177 | (26) |
|
|
178 | (1) |
|
Why Unexpected Data Is Dangerous |
|
|
178 | (1) |
|
Situations Involving Unexpected Data |
|
|
179 | (7) |
|
|
179 | (2) |
|
Unexpected Data in SQL Queries |
|
|
181 | (4) |
|
|
185 | (1) |
|
|
186 | (8) |
|
|
186 | (3) |
|
|
189 | (1) |
|
Application Authentication |
|
|
190 | (4) |
|
Protection: Filtering Bad Data |
|
|
194 | (4) |
|
Escaping Characters Is Not Always Enough |
|
|
194 | (1) |
|
|
194 | (1) |
|
Cold Fusion/Cold Fusion Markup Language (CFML) |
|
|
195 | (1) |
|
|
195 | (1) |
|
|
196 | (1) |
|
Protecting Your SQL Queries |
|
|
196 | (1) |
|
Silently Removing vs. Alerting on Bad Data |
|
|
197 | (1) |
|
|
198 | (1) |
|
|
198 | (1) |
|
Available Safety Features |
|
|
198 | (3) |
|
|
199 | (1) |
|
|
200 | (1) |
|
Cold Fusion/Cold Fusion Markup Language |
|
|
200 | (1) |
|
|
200 | (1) |
|
|
201 | (1) |
|
|
201 | (1) |
|
|
202 | (1) |
|
|
203 | (56) |
|
|
204 | (1) |
|
What Is a Buffer Overflow? |
|
|
204 | (3) |
|
|
207 | (15) |
|
|
207 | (3) |
|
What Happens When I Overflow a Buffer? |
|
|
210 | (6) |
|
Methods to Execute Payload |
|
|
216 | (1) |
|
Direct Jump (Guessing Offsets) |
|
|
216 | (1) |
|
|
216 | (2) |
|
|
218 | (1) |
|
|
219 | (1) |
|
|
220 | (1) |
|
|
220 | (1) |
|
|
221 | (1) |
|
Off-by-One Struct Pointer |
|
|
221 | (1) |
|
Dereferencing---Smashing the Heap |
|
|
222 | (3) |
|
Corrupting a Function Pointer |
|
|
222 | (1) |
|
|
223 | (2) |
|
|
225 | (32) |
|
|
225 | (1) |
|
|
225 | (1) |
|
|
226 | (1) |
|
The Payload Construction Kit |
|
|
226 | (11) |
|
|
237 | (1) |
|
Finding the DATA Section, Using a Canary |
|
|
237 | (1) |
|
|
238 | (1) |
|
|
238 | (1) |
|
Using What You Have---Preloaded Functions |
|
|
238 | (5) |
|
|
243 | (2) |
|
Loading New Libraries and Functions |
|
|
245 | (1) |
|
|
246 | (1) |
|
|
247 | (1) |
|
Nybble-to-Byte Compression |
|
|
247 | (1) |
|
Building a Backward Bridge |
|
|
247 | (1) |
|
|
247 | (4) |
|
``The Shiny Red Button''---Injecting a Device Driver into Kernel Mode |
|
|
251 | (2) |
|
|
253 | (1) |
|
Finding New Buffer Overflow Exploits |
|
|
253 | (4) |
|
|
257 | (1) |
|
|
258 | (1) |
Part III: Remote Attacks |
|
|
|
259 | (26) |
|
|
260 | (1) |
|
How Is Sniffing Useful to an Attacker? |
|
|
260 | (1) |
|
|
260 | (1) |
|
|
261 | (6) |
|
Authentication Information |
|
|
261 | (1) |
|
|
261 | (1) |
|
|
262 | (1) |
|
|
262 | (1) |
|
|
262 | (1) |
|
|
263 | (1) |
|
|
263 | (1) |
|
|
264 | (1) |
|
|
264 | (1) |
|
|
264 | (1) |
|
Windows NT Authentication |
|
|
265 | (1) |
|
|
266 | (1) |
|
|
266 | (1) |
|
|
266 | (1) |
|
|
267 | (5) |
|
Network Associates Sniffer Pro |
|
|
267 | (1) |
|
|
268 | (1) |
|
|
269 | (1) |
|
|
270 | (1) |
|
|
271 | (1) |
|
|
271 | (1) |
|
Advanced Sniffing Techniques |
|
|
272 | (2) |
|
|
272 | (1) |
|
|
273 | (1) |
|
|
273 | (1) |
|
|
273 | (1) |
|
Operating System Interfaces |
|
|
274 | (5) |
|
|
274 | (3) |
|
|
277 | (1) |
|
|
277 | (2) |
|
|
279 | (1) |
|
|
279 | (2) |
|
|
279 | (1) |
|
|
279 | (2) |
|
|
281 | (1) |
|
|
281 | (2) |
|
|
281 | (1) |
|
|
282 | (1) |
|
|
282 | (1) |
|
|
282 | (1) |
|
|
282 | (1) |
|
|
283 | (1) |
|
|
283 | (1) |
|
|
283 | (1) |
|
|
283 | (1) |
|
|
284 | (1) |
|
|
285 | (22) |
|
|
286 | (1) |
|
What Is Session Hijacking? |
|
|
286 | (16) |
|
|
287 | (3) |
|
TCP Session Hijacking with Packet Blocking |
|
|
290 | (1) |
|
|
290 | (2) |
|
|
292 | (1) |
|
TCP Session Hijacking Tools |
|
|
293 | (1) |
|
|
293 | (3) |
|
|
296 | (4) |
|
|
300 | (1) |
|
|
301 | (1) |
|
How to Protect Against Session Hijacking |
|
|
302 | (1) |
|
|
302 | (1) |
|
|
302 | (1) |
|
|
303 | (2) |
|
|
304 | (1) |
|
|
305 | (2) |
|
Spoofing: Attacks on Trusted Identity |
|
|
307 | (32) |
|
|
308 | (5) |
|
|
308 | (1) |
|
Spoofing Is Identity Forgery |
|
|
308 | (1) |
|
Spoofing Is an Active Attack against Identity Checking Procedures |
|
|
308 | (1) |
|
Spoofing Is Possible at All Layers of Communication |
|
|
309 | (1) |
|
Spoofing Is Always Intentional |
|
|
309 | (2) |
|
Spoofing May Be Blind or Informed, but Usually Involves Only Partial Credentials |
|
|
311 | (1) |
|
Spoofing Is Not the Same Thing as Betrayal |
|
|
312 | (1) |
|
Spoofing Is Not Always Malicious |
|
|
312 | (1) |
|
|
312 | (1) |
|
|
313 | (1) |
|
The Importance of Identity |
|
|
313 | (1) |
|
|
314 | (2) |
|
Asymmetric Signatures between Human Beings |
|
|
314 | (2) |
|
Establishing Identity within Computer Networks |
|
|
316 | (14) |
|
|
317 | (1) |
|
In the Beginning, there was...a Transmission |
|
|
318 | (2) |
|
|
320 | (1) |
|
Ability to Transmit: ``Can It Talk to Me?'' |
|
|
320 | (1) |
|
Ability to Respond: ``Can It Respond to Me?'' |
|
|
321 | (3) |
|
Ability to Encode: ``Can It Speak My Language?'' |
|
|
324 | (2) |
|
Ability to Prove a Shared Secret: ``Does It Share a Secret with Me?'' |
|
|
326 | (2) |
|
Ability to Prove a Private Keypair: ``Can I Recognize Your Voice?'' |
|
|
328 | (1) |
|
Ability to Prove an Identity Keypair: ``Is Its Identity Independently Represented in My Keypair?'' |
|
|
329 | (1) |
|
Configuration Methodologies: Building a Trusted Capability Index |
|
|
329 | (1) |
|
Local Configurations vs. Central Configurations |
|
|
329 | (1) |
|
|
330 | (2) |
|
The Plague of Auto-Updating Applications |
|
|
331 | (1) |
|
|
332 | (3) |
|
Subtle Spoofs and Economic Sabotage |
|
|
332 | (1) |
|
Subtlety Will Get You Everywhere |
|
|
333 | (1) |
|
Selective Failure for Selecting Recovery |
|
|
333 | (2) |
|
Attacking SSL through Intermittent Failures |
|
|
335 | (1) |
|
|
335 | (2) |
|
|
337 | (2) |
|
|
339 | (20) |
|
|
340 | (2) |
|
|
340 | (1) |
|
|
340 | (1) |
|
Daemon/Service Vulnerabilities |
|
|
341 | (1) |
|
Program Interaction Vulnerabilities |
|
|
341 | (1) |
|
|
341 | (1) |
|
|
342 | (15) |
|
|
344 | (1) |
|
|
344 | (1) |
|
|
344 | (2) |
|
|
346 | (1) |
|
|
347 | (7) |
|
|
354 | (2) |
|
|
356 | (1) |
|
|
356 | (1) |
|
|
357 | (1) |
|
|
358 | (1) |
|
|
359 | (24) |
|
|
360 | (10) |
|
|
360 | (1) |
|
|
360 | (3) |
|
|
363 | (1) |
|
|
364 | (1) |
|
|
365 | (1) |
|
|
366 | (2) |
|
|
368 | (1) |
|
|
368 | (2) |
|
Session Hijacking and Client Holes |
|
|
370 | (1) |
|
How to Secure Against Client Holes |
|
|
370 | (8) |
|
|
370 | (3) |
|
|
373 | (1) |
|
|
373 | (2) |
|
|
375 | (3) |
|
|
378 | (2) |
|
|
380 | (3) |
|
Viruses, Trojan Horses, and Worms |
|
|
383 | (24) |
|
|
384 | (1) |
|
How Do Viruses, Trojans Horses, and Worms Differ? |
|
|
384 | (3) |
|
|
384 | (1) |
|
|
385 | (1) |
|
|
385 | (1) |
|
|
386 | (1) |
|
|
387 | (1) |
|
|
387 | (4) |
|
|
388 | (1) |
|
|
389 | (1) |
|
Other Tricks of the Trade |
|
|
390 | (1) |
|
Dealing with Cross-Platform Issues |
|
|
391 | (1) |
|
|
391 | (1) |
|
|
391 | (1) |
|
|
392 | (1) |
|
Proof that We Need to Worry |
|
|
392 | (6) |
|
|
392 | (1) |
|
|
392 | (1) |
|
|
393 | (5) |
|
Creating Your Own Malware |
|
|
398 | (2) |
|
|
398 | (1) |
|
Other Thoughts on Creating New Malware |
|
|
399 | (1) |
|
How to Secure Against Malicious Software |
|
|
400 | (3) |
|
|
400 | (2) |
|
|
402 | (1) |
|
|
403 | (1) |
|
|
403 | (1) |
|
|
404 | (3) |
Part IV: Reporting |
|
|
Reporting Security Problems |
|
|
407 | (20) |
|
|
408 | (1) |
|
Should You Report Security Problems? |
|
|
408 | (1) |
|
Who to Report Security Problems To? |
|
|
409 | (12) |
|
|
411 | (3) |
|
Reporting Security Problems to Vendors |
|
|
414 | (4) |
|
Reporting Security Problems to the Public |
|
|
418 | (2) |
|
|
420 | (1) |
|
|
421 | (1) |
|
Repercussions from Vendors |
|
|
421 | (1) |
|
|
422 | (1) |
|
How to Secure Against Problem Reporting |
|
|
422 | (3) |
|
|
422 | (1) |
|
|
422 | (1) |
|
|
423 | (1) |
|
|
423 | (2) |
|
|
425 | (2) |
Index |
|
427 | |