Foreward |
|
xvii | |
Introduction |
|
ixx | |
|
Part I Introduction to Ethical Disclosure |
|
|
1 | (70) |
|
Ethics of Ethical Hacking |
|
|
3 | (20) |
|
|
8 | (1) |
|
How Does This Stuff Relate to an Ethical Hacking Book? |
|
|
8 | (3) |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
11 | (1) |
|
The Controversy of Hacking Books and Classes |
|
|
11 | (5) |
|
|
12 | (2) |
|
|
14 | (1) |
|
Recognizing Trouble When It Happens |
|
|
14 | (1) |
|
|
15 | (1) |
|
Where Do Attackers Have Most of Their Fun? |
|
|
16 | (2) |
|
Security Does Not Like Complexity |
|
|
16 | (1) |
|
|
17 | (1) |
|
|
18 | (5) |
|
|
18 | (2) |
|
|
20 | (3) |
|
Ethical Hacking and the Legal System |
|
|
23 | (22) |
|
|
24 | (1) |
|
Addressing Individual Laws |
|
|
24 | (15) |
|
|
24 | (3) |
|
|
27 | (1) |
|
|
27 | (5) |
|
|
32 | (1) |
|
|
32 | (2) |
|
|
34 | (1) |
|
18 USC Sections 2510 and 2701 |
|
|
34 | (2) |
|
|
36 | (1) |
|
Digital Millennium Copyright Act |
|
|
37 | (1) |
|
|
38 | (1) |
|
Cyber Security Enhancement Act of 2002 |
|
|
38 | (1) |
|
|
39 | (6) |
|
|
40 | (2) |
|
|
42 | (3) |
|
Proper and Ethical Disclosure |
|
|
45 | (26) |
|
Different Teams and Points of View |
|
|
46 | (2) |
|
|
47 | (1) |
|
|
48 | (2) |
|
Full Disclosure Policy (RainForest Puppy Policy) |
|
|
50 | (1) |
|
Organization for Internet Safety (OIS) |
|
|
51 | (8) |
|
|
52 | (1) |
|
|
53 | (2) |
|
|
55 | (3) |
|
|
58 | (1) |
|
|
59 | (1) |
|
Conflicts Will Still Exist |
|
|
59 | (1) |
|
|
60 | (5) |
|
Pros and Cons of Proper Disclosure Processes |
|
|
60 | (4) |
|
Vendors Paying More Attention |
|
|
64 | (1) |
|
So What Should We Do from Here on Out? |
|
|
65 | (6) |
|
|
66 | (1) |
|
|
66 | (1) |
|
|
67 | (1) |
|
|
67 | (2) |
|
|
69 | (2) |
|
Part II Penetration Testing and Tools |
|
|
71 | (110) |
|
|
73 | (22) |
|
|
73 | (2) |
|
|
75 | (1) |
|
|
75 | (3) |
|
|
75 | (1) |
|
|
76 | (1) |
|
Contracts, Safety, and Staying Out of Jail |
|
|
77 | (1) |
|
|
78 | (12) |
|
|
78 | (1) |
|
On-Site Meeting with the Customer to Kick Off Assessment |
|
|
79 | (1) |
|
|
79 | (2) |
|
|
81 | (1) |
|
|
81 | (3) |
|
|
84 | (2) |
|
|
86 | (3) |
|
|
89 | (1) |
|
|
89 | (1) |
|
|
90 | (5) |
|
|
91 | (1) |
|
|
92 | (3) |
|
Beyond Hacking Exposed: Advanced Tools for Today's Hacker |
|
|
95 | (58) |
|
Scanning in the ``Good Old Days'' |
|
|
96 | (12) |
|
Paketto Keiretsu (scanrand, paratrace) |
|
|
96 | (11) |
|
|
107 | (1) |
|
Past and Present Forms of Fingerprinting |
|
|
108 | (17) |
|
|
109 | (5) |
|
|
114 | (1) |
|
|
114 | (4) |
|
|
118 | (1) |
|
|
118 | (4) |
|
|
122 | (1) |
|
|
122 | (3) |
|
|
125 | (15) |
|
|
126 | (1) |
|
|
127 | (1) |
|
Passive Sniffing vs. Active Sniffing |
|
|
127 | (7) |
|
|
134 | (3) |
|
|
137 | (1) |
|
Defenses Against Active Sniffing |
|
|
137 | (1) |
|
Sniffing for Usernames and Passwords |
|
|
138 | (1) |
|
|
139 | (1) |
|
Sniffing and Hacking LAN Manager Logon Credentials |
|
|
140 | (8) |
|
Using the Challenge and Hashes (the Hard Way) |
|
|
143 | (1) |
|
Using ettercap (the Easy Way) |
|
|
144 | (2) |
|
|
146 | (1) |
|
Sniffing and Cracking Kerberos |
|
|
146 | (2) |
|
|
148 | (5) |
|
|
150 | (1) |
|
|
151 | (2) |
|
Automated Penetration Testing |
|
|
153 | (28) |
|
|
154 | (7) |
|
|
154 | (1) |
|
|
154 | (1) |
|
|
155 | (5) |
|
|
160 | (1) |
|
Automated Penetration Testing Tools |
|
|
161 | (16) |
|
|
161 | (3) |
|
|
164 | (1) |
|
|
165 | (4) |
|
|
169 | (1) |
|
|
169 | (8) |
|
|
177 | (1) |
|
|
177 | (4) |
|
|
177 | (2) |
|
|
179 | (2) |
|
|
181 | (136) |
|
Programming Survival Skills |
|
|
183 | (30) |
|
|
184 | (4) |
|
The Problem-Solving Process |
|
|
184 | (1) |
|
|
185 | (2) |
|
|
187 | (1) |
|
|
188 | (1) |
|
|
188 | (6) |
|
Basic C Language Constructs |
|
|
188 | (5) |
|
|
193 | (1) |
|
|
193 | (1) |
|
|
194 | (1) |
|
|
194 | (5) |
|
Random Access Memory (RAM) |
|
|
195 | (1) |
|
|
195 | (1) |
|
|
195 | (1) |
|
|
196 | (1) |
|
|
197 | (1) |
|
|
197 | (1) |
|
|
197 | (1) |
|
Putting the Pieces of Memory Together |
|
|
198 | (1) |
|
|
198 | (1) |
|
|
199 | (3) |
|
|
199 | (1) |
|
Arithmetic Logic Unit (ALU) |
|
|
199 | (1) |
|
|
200 | (1) |
|
|
200 | (1) |
|
|
200 | (2) |
|
|
202 | (1) |
|
|
202 | (4) |
|
Machine vs. Assembly vs. C |
|
|
202 | (1) |
|
|
202 | (2) |
|
|
204 | (1) |
|
|
205 | (1) |
|
|
206 | (1) |
|
|
206 | (1) |
|
|
206 | (3) |
|
|
206 | (2) |
|
|
208 | (1) |
|
|
209 | (1) |
|
|
209 | (4) |
|
|
210 | (2) |
|
|
212 | (1) |
|
|
213 | (26) |
|
|
213 | (3) |
|
|
214 | (1) |
|
Operational Implementation |
|
|
214 | (1) |
|
Function Calling Procedure |
|
|
214 | (1) |
|
|
215 | (1) |
|
|
216 | (5) |
|
|
216 | (1) |
|
|
217 | (3) |
|
Ramifications of Buffer Overflows |
|
|
220 | (1) |
|
|
221 | (1) |
|
Local Buffer Overflow Exploits |
|
|
221 | (8) |
|
Components of the Exploit |
|
|
222 | (1) |
|
Exploiting Stack Overflows by Command Line |
|
|
223 | (2) |
|
Exploiting Stack Overflows with Generic Exploit Code |
|
|
225 | (1) |
|
|
226 | (1) |
|
|
227 | (2) |
|
|
229 | (1) |
|
Remote Buffer Overflow Exploits |
|
|
229 | (5) |
|
|
229 | (3) |
|
Determining the Remote esp Value |
|
|
232 | (1) |
|
Manual Brute Force with Perl |
|
|
232 | (2) |
|
|
234 | (1) |
|
|
234 | (5) |
|
|
235 | (2) |
|
|
237 | (2) |
|
|
239 | (30) |
|
|
239 | (11) |
|
|
240 | (3) |
|
Reading from Arbitrary Memory |
|
|
243 | (2) |
|
Writing to Arbitrary Memory |
|
|
245 | (2) |
|
|
247 | (3) |
|
|
250 | (1) |
|
|
250 | (12) |
|
|
251 | (1) |
|
Memory Allocators (malloc) |
|
|
252 | (1) |
|
|
253 | (4) |
|
Exploiting Heap Overflows |
|
|
257 | (4) |
|
|
261 | (1) |
|
|
261 | (1) |
|
Memory Protection Schemes |
|
|
262 | (2) |
|
|
262 | (1) |
|
GRSecurity Kernel Patches and Scripts |
|
|
262 | (1) |
|
|
263 | (1) |
|
|
263 | (1) |
|
|
264 | (1) |
|
|
264 | (5) |
|
|
265 | (2) |
|
|
267 | (2) |
|
|
269 | (26) |
|
|
269 | (10) |
|
|
270 | (2) |
|
|
272 | (2) |
|
|
274 | (2) |
|
Shell-Spawning Shellcode with execve |
|
|
276 | (3) |
|
|
279 | (1) |
|
|
279 | (8) |
|
|
279 | (3) |
|
Assembly Program to Establish a Socket |
|
|
282 | (2) |
|
|
284 | (3) |
|
|
287 | (1) |
|
Reverse Connecting Shellcode |
|
|
287 | (3) |
|
Reverse Connecting C Program |
|
|
287 | (1) |
|
Reverse Connecting Assembly Program |
|
|
288 | (2) |
|
|
290 | (1) |
|
|
290 | (5) |
|
|
292 | (2) |
|
|
294 | (1) |
|
Writing a Basic Windows Exploit |
|
|
295 | (22) |
|
Compiling and Debugging Windows Programs |
|
|
295 | (18) |
|
|
295 | (2) |
|
|
297 | (9) |
|
Building a Basic Windows Exploit |
|
|
306 | (7) |
|
|
313 | (4) |
|
|
314 | (1) |
|
|
315 | (2) |
|
Part IV Vulnerability Analysis |
|
|
317 | (94) |
|
|
319 | (30) |
|
Ethical Reverse Engineering |
|
|
319 | (1) |
|
|
320 | (1) |
|
|
320 | (1) |
|
Reverse Engineering Considerations |
|
|
321 | (1) |
|
|
321 | (8) |
|
Source Code Auditing Tools |
|
|
322 | (1) |
|
The Utility of Source Code Auditing Tools |
|
|
323 | (2) |
|
Manual Source Code Auditing |
|
|
325 | (4) |
|
|
329 | (1) |
|
|
329 | (1) |
|
Automated Binary Analysis Tools |
|
|
329 | (16) |
|
|
332 | (1) |
|
Manual Auditing of Binary Code |
|
|
332 | (13) |
|
|
345 | (1) |
|
|
345 | (4) |
|
|
346 | (1) |
|
|
347 | (2) |
|
Advanced Reverse Engineering |
|
|
349 | (26) |
|
Why Try to Break Software? |
|
|
350 | (1) |
|
The Software Development Process |
|
|
350 | (1) |
|
|
351 | (10) |
|
|
352 | (2) |
|
|
354 | (1) |
|
|
354 | (1) |
|
|
354 | (2) |
|
|
356 | (5) |
|
|
361 | (1) |
|
|
361 | (1) |
|
Instrumented Fuzzing Tools and Techniques |
|
|
362 | (9) |
|
|
362 | (3) |
|
Fuzzing Unknown Protocols |
|
|
365 | (1) |
|
|
365 | (4) |
|
|
369 | (1) |
|
|
369 | (1) |
|
|
370 | (1) |
|
|
371 | (4) |
|
|
371 | (2) |
|
|
373 | (2) |
|
From Vulnerability to Exploit |
|
|
375 | (22) |
|
|
376 | (4) |
|
Debugging for Exploitation |
|
|
376 | (4) |
|
|
380 | (1) |
|
Understanding the Problem |
|
|
380 | (10) |
|
Preconditions and Postconditions |
|
|
380 | (1) |
|
|
381 | (9) |
|
|
390 | (1) |
|
|
390 | (1) |
|
|
390 | (1) |
|
|
391 | (1) |
|
|
391 | (1) |
|
|
391 | (6) |
|
|
392 | (2) |
|
|
394 | (3) |
|
Closing the Holes: Mitigation |
|
|
397 | (14) |
|
|
397 | (3) |
|
|
398 | (1) |
|
|
398 | (1) |
|
|
398 | (1) |
|
|
399 | (1) |
|
|
400 | (11) |
|
Source Code Patching Considerations |
|
|
400 | (2) |
|
Binary Patching Considerations |
|
|
402 | (4) |
|
|
406 | (1) |
|
|
406 | (1) |
|
|
406 | (2) |
|
|
408 | (3) |
Index |
|
411 | |