Hacking Web Apps Detecting and Preventing Web Application Security Problems - Shema, Mike (Elsevier Science, 2012)
How can an information security professional keep up with all of the hacks, attacks, and exploits on the Web? One way is to read Hacking Web Apps. The content for this book has been selected by author Mike Shema to make sure that we are covering the most vicious attacks out there. Not only does Mike let you in on the anatomy of these attacks, but he also tells you how to get rid of these worms, trojans, and botnets and how to defend against them in the future. Countermeasures are detailed so that you can fight against similar attacks as they evolve. Attacks featured in this book include
Hacking Web Apps; Copyright; About the Author; Acknowledgements; Table of Contents; Introduction; 1 HTML5; The New Document Object Model (DOM); Cross-Origin Resource Sharing (CORS); WebSockets; Transferring Data; Data Frames; Security Considerations; Web Storage; IndexedDB; Web Workers; Flotsam & Jetsam; History API; Draft APIs; Summary; 2 HTML Injection & Cross-Site Scripting (XSS); Understanding HTML Injection; Identifying Points of Injection; URI Components; Form Fields; HTTP Request Headers & Cookies; JavaScript Object Notation (JSON); Document Object Model (DOM) Properties
Cascading Style Sheets (CSS)User-Generated Content; Identifying the Type of Reflection; Ephemeral; Persistent; Out of Band; Identifying the Injection's Rendered Context; Element Attributes; Elements & Text Nodes; JavaScript Variables; Syntax Delimiters; Putting the Hack Together; Abusing Character Sets; Attack Camouflage with Percent Encoding; Encoding 0X00-Nothing Really Matters; Alternate Encodings for the Same Character; Why Encoding Matters for HTML Injection; Exploiting Failure Modes; Bypassing Weak Exclusion Lists; Leveraging Browser Quirks; The Unusual Suspects; Subverting MIME Types
Surprising MIME TypesSVG Markup; The Impact of XSS; Data Redirection; Employing Countermeasures; Fixing a Static Character Set; Normalizing Character Sets and Encoding; Encoding the Output; Beware of Exclusion Lists and Regexes; Reuse, Don't Reimplement, Code; JavaScript Sandboxes; HTML5 Sandboxes; Browsers' Built-In XSS Defenses; Summary; 3 Cross-Site Request Forgery (CSRF); Understanding Cross-Site Request Forgery; The Mechanics of CSRF; Request Forgery via Forced Browsing; POST Forgery; The Madness of Methods; Attacking Authenticated Actions without Passwords
Dangerous Liaison: CSRF and HTML InjectionBe Wary of the Tangled Web; Variation on a Theme: Clickjacking; Employing Countermeasures; Heading in the Right Direction; A Dependable Origin; An Unreliable Referer1; Custom Headers: X-Marks-the-Spot; Shared Secrets; Mirror the Cookie; Require Manual Confirmation; Understanding Same Origin Policy; Anti-Framing via JavaScript; Framing the Solution; Defending the Web Browser; Vulnerability & Verisimilitude; Summary; 4 SQL Injection & Data Store Manipulation; Understanding SQL Injection; Hacking Tangents: Mathematical and Grammatical