| Foreword |
|
xvii | |
| Acknowledgments |
|
xxi | |
| Introduction |
|
xxiii | |
|
|
|
1 | (26) |
|
What Is Web Application Hacking? |
|
|
2 | (7) |
|
|
|
2 | (1) |
|
|
|
3 | (1) |
|
Methods, Headers, and Body |
|
|
4 | (2) |
|
|
|
6 | (1) |
|
Authentication, Sessions, and Authorization |
|
|
7 | (1) |
|
|
|
7 | (1) |
|
|
|
8 | (1) |
|
Why Attack Web Applications? |
|
|
9 | (1) |
|
|
|
10 | (1) |
|
|
|
10 | (1) |
|
How Are Web Apps Attacked? |
|
|
11 | (13) |
|
|
|
12 | (1) |
|
|
|
13 | (4) |
|
|
|
17 | (6) |
|
|
|
23 | (1) |
|
|
|
24 | (1) |
|
|
|
24 | (1) |
|
References and Further Reading |
|
|
24 | (3) |
|
|
|
27 | (52) |
|
|
|
28 | (12) |
|
Footprinting and Scanning: Defining Scope |
|
|
28 | (1) |
|
|
|
29 | (1) |
|
Advanced HTTP Fingerprinting |
|
|
30 | (2) |
|
Infrastructure Intermediaries |
|
|
32 | (8) |
|
|
|
40 | (35) |
|
|
|
41 | (19) |
|
Using Search Tools for Profiling |
|
|
60 | (5) |
|
|
|
65 | (5) |
|
Common Web Application Profiles |
|
|
70 | (5) |
|
|
|
75 | (2) |
|
|
|
75 | (1) |
|
|
|
75 | (1) |
|
|
|
76 | (1) |
|
|
|
76 | (1) |
|
|
|
77 | (1) |
|
References and Further Reading |
|
|
77 | (2) |
|
|
|
79 | (42) |
|
Point-and-click Exploitation Using Metasploit |
|
|
81 | (3) |
|
|
|
84 | (15) |
|
|
|
99 | (3) |
|
Web Platform Security Best Practices |
|
|
102 | (15) |
|
|
|
102 | (2) |
|
|
|
104 | (6) |
|
|
|
110 | (5) |
|
|
|
115 | (2) |
|
|
|
117 | (1) |
|
References and Further Reading |
|
|
117 | (4) |
|
Attacking Web Authentication |
|
|
121 | (38) |
|
Web Authentication Threats |
|
|
122 | (24) |
|
Username/Password Threats |
|
|
122 | (17) |
|
Strong(er) Web Authentication |
|
|
139 | (3) |
|
Web Authentication Services |
|
|
142 | (4) |
|
|
|
146 | (7) |
|
|
|
147 | (1) |
|
|
|
148 | (4) |
|
|
|
152 | (1) |
|
Some Final Thoughts: Identity Theft |
|
|
153 | (1) |
|
|
|
153 | (2) |
|
References and Further Reading |
|
|
155 | (4) |
|
Attacking Web Authorization |
|
|
159 | (50) |
|
|
|
161 | (7) |
|
|
|
161 | (1) |
|
Identifying Access/Session Tokens |
|
|
162 | (3) |
|
|
|
165 | (1) |
|
|
|
166 | (1) |
|
|
|
167 | (1) |
|
|
|
168 | (2) |
|
|
|
170 | (15) |
|
|
|
170 | (8) |
|
|
|
178 | (6) |
|
|
|
184 | (1) |
|
|
|
184 | (1) |
|
Authorization Attack Case Studies |
|
|
185 | (14) |
|
Horizontal Privilege Escalation |
|
|
186 | (5) |
|
Vertical Privilege Escalation |
|
|
191 | (3) |
|
|
|
194 | (2) |
|
Using Curl to Map Permissions |
|
|
196 | (3) |
|
Authorization Best Practices |
|
|
199 | (7) |
|
|
|
200 | (2) |
|
Web Authorization/Session Token Security |
|
|
202 | (3) |
|
|
|
205 | (1) |
|
|
|
206 | (1) |
|
References and Further Reading |
|
|
206 | (3) |
|
|
|
209 | (26) |
|
|
|
210 | (2) |
|
Where to Find Attack Vectors |
|
|
212 | (1) |
|
Bypass Client-side Validation Routines |
|
|
213 | (1) |
|
Common Input Validation Attacks |
|
|
213 | (19) |
|
|
|
213 | (2) |
|
Canonicalization (dot-dot-slash) |
|
|
215 | (5) |
|
|
|
220 | (4) |
|
|
|
224 | (1) |
|
Manipulate Application Behavior |
|
|
225 | (1) |
|
SQL Injection and Datastore Attacks |
|
|
226 | (1) |
|
|
|
226 | (2) |
|
|
|
228 | (1) |
|
|
|
229 | (1) |
|
|
|
230 | (2) |
|
|
|
232 | (1) |
|
References and Further Reading |
|
|
233 | (2) |
|
|
|
235 | (32) |
|
|
|
236 | (2) |
|
|
|
237 | (1) |
|
SELECT, INSERT, and UPDATE |
|
|
237 | (1) |
|
|
|
238 | (9) |
|
|
|
238 | (4) |
|
|
|
242 | (4) |
|
Alternate Character Encoding |
|
|
246 | (1) |
|
Exploit SQL Injection Vulnerabilities |
|
|
247 | (14) |
|
|
|
247 | (2) |
|
|
|
249 | (7) |
|
|
|
256 | (5) |
|
|
|
261 | (5) |
|
|
|
262 | (1) |
|
Decouple Query Logic from Query Data |
|
|
262 | (3) |
|
|
|
265 | (1) |
|
|
|
265 | (1) |
|
|
|
266 | (1) |
|
Attacking XML Web Services |
|
|
267 | (26) |
|
|
|
268 | (11) |
|
Transport: SOAP Over HTTP(S) |
|
|
269 | (2) |
|
|
|
271 | (4) |
|
Directory Services: UDDI and DISCO |
|
|
275 | (4) |
|
Similarities to Web Application Security |
|
|
279 | (1) |
|
|
|
279 | (8) |
|
Web Service Security Basics |
|
|
287 | (3) |
|
Web Services Security Measures |
|
|
287 | (3) |
|
|
|
290 | (1) |
|
References and Further Reading |
|
|
291 | (2) |
|
Attacking Web Application Management |
|
|
293 | (38) |
|
|
|
294 | (3) |
|
|
|
294 | (1) |
|
|
|
295 | (1) |
|
Proprietary Management Ports |
|
|
295 | (1) |
|
Other Administration Services |
|
|
295 | (2) |
|
|
|
297 | (11) |
|
|
|
297 | (1) |
|
|
|
297 | (1) |
|
|
|
298 | (3) |
|
|
|
301 | (7) |
|
|
|
308 | (13) |
|
Unnecessary Web Server Extensions |
|
|
308 | (4) |
|
|
|
312 | (9) |
|
Developer-driven Mistakes |
|
|
321 | (6) |
|
|
|
327 | (1) |
|
References and Further Reading |
|
|
328 | (3) |
|
|
|
331 | (36) |
|
|
|
332 | (14) |
|
|
|
346 | (7) |
|
|
|
353 | (8) |
|
|
|
354 | (4) |
|
Firefox Secure Configuration |
|
|
358 | (1) |
|
|
|
359 | (1) |
|
Server-side Countermeasures |
|
|
360 | (1) |
|
|
|
361 | (1) |
|
References and Further Reading |
|
|
361 | (6) |
|
Denial-of-Service (DoS) Attacks |
|
|
367 | (30) |
|
Common DoS Attack Techniques |
|
|
368 | (15) |
|
Old School DoS: Vulnerabilities |
|
|
369 | (1) |
|
Modern DoS: Capacity Depletion |
|
|
370 | (3) |
|
|
|
373 | (10) |
|
General DoS Countermeasures |
|
|
383 | (11) |
|
|
|
384 | (7) |
|
|
|
391 | (1) |
|
|
|
392 | (2) |
|
|
|
394 | (1) |
|
References and Further Reading |
|
|
394 | (3) |
|
|
|
397 | (38) |
|
|
|
398 | (9) |
|
Clarify Security Objectives |
|
|
400 | (1) |
|
|
|
400 | (1) |
|
|
|
400 | (1) |
|
Decompose the Application |
|
|
401 | (3) |
|
Identify and Document Threats |
|
|
404 | (1) |
|
|
|
405 | (1) |
|
Develop Threat Mitigation Strategies |
|
|
406 | (1) |
|
|
|
407 | (16) |
|
Manual Source Code Review |
|
|
408 | (6) |
|
Automated Source Code Review |
|
|
414 | (1) |
|
|
|
414 | (9) |
|
Security Testing of Web App Code |
|
|
423 | (4) |
|
|
|
424 | (2) |
|
Test Tools, Utilities, and Harnesses |
|
|
426 | (1) |
|
|
|
426 | (1) |
|
Security in the Web Development Process |
|
|
427 | (4) |
|
|
|
427 | (2) |
|
|
|
429 | (1) |
|
|
|
429 | (2) |
|
|
|
431 | (1) |
|
References and Further Reading |
|
|
431 | (4) |
|
Web Application Security Scanners |
|
|
435 | (30) |
|
Technology: Web App Security Scanners |
|
|
436 | (23) |
|
|
|
437 | (1) |
|
|
|
438 | (5) |
|
Reviews of Individual Scanners |
|
|
443 | (12) |
|
|
|
455 | (4) |
|
|
|
459 | (4) |
|
|
|
459 | (2) |
|
|
|
461 | (2) |
|
|
|
463 | (1) |
|
References and Further Reading |
|
|
463 | (2) |
|
A. Web Application Security Checklist |
|
|
465 | (6) |
|
B. Web Hacking Tools and Techniques Cribsheet |
|
|
471 | (12) |
|
C. URLScan and ModSecurity |
|
|
483 | (24) |
|
|
|
484 | (16) |
|
Basic URLScan Deployment (IIS5.x and Earlier) |
|
|
485 | (7) |
|
Advanced URLScan Configuration |
|
|
492 | (5) |
|
|
|
497 | (3) |
|
|
|
500 | (5) |
|
|
|
500 | (1) |
|
ModSecurity Configuration |
|
|
501 | (4) |
|
|
|
505 | (1) |
|
References and Further Reading |
|
|
505 | (2) |
|
D. About the Companion Web Site |
|
|
507 | (2) |
| Index |
|
509 | |