Introduction |
|
xv | |
|
Chapter 1 Web Browser Security |
|
|
1 | (30) |
|
|
2 | (1) |
|
|
3 | (1) |
|
Symbiosis with the Web Application |
|
|
4 | (1) |
|
|
4 | (1) |
|
|
5 | (1) |
|
|
5 | (1) |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
7 | (1) |
|
|
7 | (2) |
|
|
9 | (1) |
|
|
9 | (1) |
|
Cross-origin Resource Sharing |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
11 | (1) |
|
|
12 | (1) |
|
|
13 | (2) |
|
|
15 | (1) |
|
|
15 | (1) |
|
Anti-phishing and Anti-malware |
|
|
16 | (1) |
|
|
17 | (1) |
|
|
17 | (1) |
|
|
17 | (3) |
|
|
20 | (1) |
|
|
20 | (1) |
|
|
20 | (1) |
|
|
21 | (1) |
|
|
21 | (1) |
|
Browser Hacking Methodology |
|
|
22 | (9) |
|
|
28 | (1) |
|
|
28 | (1) |
|
|
29 | (2) |
|
Chapter 2 Initiating Control |
|
|
31 | (46) |
|
Understanding Control Initiation |
|
|
32 | (1) |
|
Control Initiation Techniques |
|
|
32 | (1) |
|
Using Cross-site Scripting Attacks |
|
|
32 | (14) |
|
Using Compromised Web Applications |
|
|
46 | (1) |
|
Using Advertising Networks |
|
|
46 | (1) |
|
Using Social Engineering Attacks |
|
|
47 | (12) |
|
Using Man-in-the-Middle Attacks |
|
|
59 | (18) |
|
|
72 | (1) |
|
|
73 | (1) |
|
|
73 | (4) |
|
Chapter 3 Retaining Control |
|
|
77 | (52) |
|
Understanding Control Retention |
|
|
78 | (1) |
|
Exploring Communication Techniques |
|
|
79 | (1) |
|
Using XMLHttpRequest Polling |
|
|
80 | (3) |
|
Using Cross-origin Resource Sharing |
|
|
83 | (1) |
|
Using WebSocket Communication |
|
|
84 | (2) |
|
Using Messaging Communication |
|
|
86 | (3) |
|
Using DNS Tunnel Communication |
|
|
89 | (7) |
|
Exploring Persistence Techniques |
|
|
96 | (1) |
|
|
96 | (2) |
|
|
98 | (3) |
|
|
101 | (3) |
|
Using Man-in-the-Browser Attacks |
|
|
104 | (6) |
|
|
110 | (1) |
|
|
111 | (5) |
|
Evasion using Obfuscation |
|
|
116 | (13) |
|
|
125 | (1) |
|
|
126 | (1) |
|
|
127 | (2) |
|
Chapter 4 Bypassing the Same Origin Policy |
|
|
129 | (54) |
|
Understanding the Same Origin Policy |
|
|
130 | (1) |
|
Understanding the SOP with the DOM |
|
|
130 | (1) |
|
Understanding the SOP with CORS |
|
|
131 | (1) |
|
Understanding the SOP with Plugins |
|
|
132 | (1) |
|
Understanding the SOP with UI Redressing |
|
|
133 | (1) |
|
Understanding the SOP with Browser History |
|
|
133 | (1) |
|
|
134 | (1) |
|
|
134 | (6) |
|
Bypassing SOP in Adobe Reader |
|
|
140 | (1) |
|
Bypassing SOP in Adobe Flash |
|
|
141 | (1) |
|
Bypassing SOP in Silverlight |
|
|
142 | (1) |
|
Bypassing SOP in Internet Explorer |
|
|
142 | (1) |
|
|
143 | (1) |
|
|
144 | (1) |
|
|
145 | (4) |
|
Bypassing SOP in Cloud Storage |
|
|
149 | (1) |
|
|
150 | (1) |
|
|
151 | (1) |
|
|
151 | (2) |
|
Exploiting UI Redressing Attacks |
|
|
153 | (17) |
|
Exploiting Browser History |
|
|
170 | (13) |
|
|
178 | (1) |
|
|
179 | (1) |
|
|
179 | (4) |
|
Chapter 5 Attacking Users |
|
|
183 | (64) |
|
|
183 | (4) |
|
|
187 | (1) |
|
|
188 | (2) |
|
|
190 | (2) |
|
Using Mouse and Pointer Events |
|
|
192 | (3) |
|
|
195 | (1) |
|
|
196 | (1) |
|
|
197 | (1) |
|
|
198 | (1) |
|
|
199 | (5) |
|
|
204 | (19) |
|
Using Signed Java Applets |
|
|
223 | (5) |
|
|
228 | (2) |
|
Non-cookie Session Tracking |
|
|
230 | (1) |
|
|
231 | (3) |
|
Attacking Password Managers |
|
|
234 | (2) |
|
Controlling the Webcam and Microphone |
|
|
236 | (11) |
|
|
242 | (1) |
|
|
243 | (1) |
|
|
243 | (4) |
|
Chapter 6 Attacking Browsers |
|
|
247 | (64) |
|
|
248 | (1) |
|
Fingerprinting using HTTP Headers |
|
|
249 | (4) |
|
Fingerprinting using DOM Properties |
|
|
253 | (5) |
|
Fingerprinting using Software Bugs |
|
|
258 | (1) |
|
Fingerprinting using Quirks |
|
|
259 | (1) |
|
Bypassing Cookie Protections |
|
|
260 | (1) |
|
Understanding the Structure |
|
|
261 | (2) |
|
|
263 | (2) |
|
Bypassing Path Attribute Restrictions |
|
|
265 | (3) |
|
Overflowing the Cookie Jar |
|
|
268 | (2) |
|
Using Cookies for Tracking |
|
|
270 | (1) |
|
|
271 | (1) |
|
|
272 | (1) |
|
Downgrading HTTPS to HTTP |
|
|
272 | (4) |
|
|
276 | (1) |
|
Attacking the SSL/TLS Layer |
|
|
277 | (1) |
|
|
278 | (1) |
|
|
279 | (2) |
|
Abusing the Samsung Galaxy |
|
|
281 | (2) |
|
|
283 | (1) |
|
Attacking Encryption in JavaScript |
|
|
283 | (3) |
|
JavaScript and Heap Exploitation |
|
|
286 | (7) |
|
Getting Shells using Metasploit |
|
|
293 | (1) |
|
Getting Started with Metasploit |
|
|
294 | (1) |
|
|
295 | (1) |
|
Executing a Single Exploit |
|
|
296 | (4) |
|
|
300 | (2) |
|
Using BeEF with Metasploit |
|
|
302 | (9) |
|
|
305 | (1) |
|
|
305 | (1) |
|
|
306 | (5) |
|
Chapter 7 Attacking Extensions |
|
|
311 | (60) |
|
Understanding Extension Anatomy |
|
|
312 | (1) |
|
How Extensions Differ from Plugins |
|
|
312 | (1) |
|
How Extensions Differ from Add-ons |
|
|
313 | (1) |
|
|
313 | (1) |
|
Understanding Firefox Extensions |
|
|
314 | (7) |
|
Understanding Chrome Extensions |
|
|
321 | (9) |
|
Discussing Internet Explorer Extensions |
|
|
330 | (1) |
|
Fingerprinting Extensions |
|
|
331 | (1) |
|
Fingerprinting using HTTP Headers |
|
|
331 | (1) |
|
Fingerprinting using the DOM |
|
|
332 | (3) |
|
Fingerprinting using the Manifest |
|
|
335 | (1) |
|
|
336 | (1) |
|
|
336 | (3) |
|
|
339 | (16) |
|
Achieving OS Command Execution |
|
|
355 | (4) |
|
Achieving OS Command Injection |
|
|
359 | (12) |
|
|
364 | (1) |
|
|
365 | (1) |
|
|
365 | (6) |
|
Chapter 8 Attacking Plugins |
|
|
371 | (50) |
|
Understanding Plugin Anatomy |
|
|
372 | (1) |
|
How Plugins Differ from Extensions |
|
|
372 | (2) |
|
How Plugins Differ from Standard Programs |
|
|
374 | (1) |
|
|
374 | (2) |
|
|
376 | (1) |
|
|
377 | (1) |
|
|
377 | (2) |
|
Automatic Plugin Detection |
|
|
379 | (1) |
|
Detecting Plugins in BeEF |
|
|
380 | (2) |
|
|
382 | (1) |
|
|
382 | (6) |
|
|
388 | (12) |
|
|
400 | (3) |
|
Attacking ActiveX Controls |
|
|
403 | (5) |
|
|
408 | (2) |
|
|
410 | (11) |
|
|
415 | (1) |
|
|
416 | (1) |
|
|
416 | (5) |
|
Chapter 9 Attacking Web Applications |
|
|
421 | (92) |
|
Sending Cross-origin Requests |
|
|
422 | (1) |
|
Enumerating Cross-origin Quirks |
|
|
422 | (3) |
|
|
425 | (1) |
|
|
425 | (1) |
|
Cross-origin Web Application Detection |
|
|
426 | (1) |
|
Discovering Intranet Device IP Addresses |
|
|
426 | (1) |
|
Enumerating Internal Domain Names |
|
|
427 | (2) |
|
Cross-origin Web Application Fingerprinting |
|
|
429 | (1) |
|
Requesting Known Resources |
|
|
430 | (6) |
|
Cross-origin Authentication Detection |
|
|
436 | (4) |
|
Exploiting Cross-site Request Forgery |
|
|
440 | (1) |
|
Understanding Cross-site Request Forgery |
|
|
440 | (3) |
|
Attacking Password Reset with XSRF |
|
|
443 | (1) |
|
Using CSRF Tokens for Protection |
|
|
444 | (1) |
|
Cross-origin Resource Detection |
|
|
445 | (5) |
|
Cross-origin Web Application Vulnerability Detection |
|
|
450 | (1) |
|
SQL Injection Vulnerabilities |
|
|
450 | (15) |
|
Detecting Cross-site Scripting Vulnerabilities |
|
|
465 | (4) |
|
Proxying through the Browser |
|
|
469 | (3) |
|
Browsing through a Browser |
|
|
472 | (5) |
|
|
477 | (3) |
|
|
480 | (2) |
|
|
482 | (5) |
|
Launching Denial-of-Service Attacks |
|
|
487 | (1) |
|
Web Application Pinch Points |
|
|
487 | (2) |
|
DDoS Using Multiple Hooked Browsers |
|
|
489 | (4) |
|
Launching Web Application Exploits |
|
|
493 | (1) |
|
|
493 | (2) |
|
Cross-origin JBoss JMX Remote Command Execution |
|
|
495 | (2) |
|
Cross-origin GlassFish Remote Command Execution |
|
|
497 | (4) |
|
Cross-origin m0n0wall Remote Command Execution |
|
|
501 | (1) |
|
Cross-origin Embedded Device Command Execution |
|
|
502 | (11) |
|
|
508 | (1) |
|
|
508 | (1) |
|
|
509 | (4) |
|
Chapter 10 Attacking Networks |
|
|
513 | (92) |
|
|
514 | (1) |
|
Identifying the Hooked Browser's Internal IP |
|
|
514 | (6) |
|
Identifying the Hooked Browser's Subnet |
|
|
520 | (3) |
|
|
523 | (1) |
|
Ping Sweeping using XMLHttpRequest |
|
|
523 | (5) |
|
|
528 | (3) |
|
|
531 | (1) |
|
|
532 | (5) |
|
Port Scanning using the IMG Tag |
|
|
537 | (2) |
|
Distributed Port Scanning |
|
|
539 | (3) |
|
Fingerprinting Non-HTTP Services |
|
|
542 | (3) |
|
Attacking Non-HTTP Services |
|
|
545 | (1) |
|
|
545 | (4) |
|
Achieving Inter-protocol Communication |
|
|
549 | (15) |
|
Achieving Inter-protocol Exploitation |
|
|
564 | (15) |
|
Getting Shells using BeEF Bind |
|
|
579 | (1) |
|
|
579 | (6) |
|
Using BeEF Bind in your Exploits |
|
|
585 | (11) |
|
Using BeEF Bind as a Web Shell |
|
|
596 | (9) |
|
|
599 | (1) |
|
|
600 | (1) |
|
|
601 | (4) |
|
Chapter 11 Epilogue: Final Thoughts |
|
|
605 | (4) |
Index |
|
609 | |