The Web Application Hacker's Handbook
Finding and Exploiting Security Flows
2nd Edition
by
Dafydd Stuttard & Marcus Pinto
Introduction
This book is a practical guide to discovering and exploiting security flaws in web applications. By “web applications” we mean those that are accessed using a web browser to communicate with a web server. We examine a wide variety of different technologies, such as databases, file systems, and web services, but only in the context in which these are employed by web applications. If you want to learn how to run port scans, attack firewalls, or break into servers in other ways, we suggest you look elsewhere. But if you want to know how to hack into a web application, steal sensitive data, and perform unauthorized actions, this is the book for you. There is enough that is interesting and fun to say on that subject without straying into any other territory.
Overview of This Book
The focus of this book is highly practical. Although we include sufficient background
and theory for you to understand the vulnerabilities that web applications
contain, our primary concern is the tasks and techniques that you need to master
to break into them. Throughout the book, we spell out the specific steps you need
to follow to detect each type of vulnerability, and how to exploit it to perform
unauthorized actions. We also include a wealth of real-world examples, derived
from the authors’ many years of experience, illustrating how different kinds of
security flaws manifest themselves in today’s web applications.
Security awareness is usually a double-edged sword. Just as application
developers can benefit from understanding the methods attackers use, hackers
can gain from knowing how applications can effectively defend themselves.
In addition to describing security vulnerabilities and attack techniques, we
describe in detail the countermeasures that applications can take to thwart an attacker. If you perform penetration tests of web applications, this will enable
you to provide high-quality remediation advice to the owners of the applications
you compromise.
Who should read This Book
This book’s primary audience is anyone who has a personal or professional
interest in attacking web applications. It is also aimed at anyone responsible for
developing and administering web applications. Knowing how your enemies
operate will help you defend against them.
We assume that you are familiar with core security concepts such as logins
and access controls and that you have a basic grasp of core web technologies
such as browsers, web servers, and HTTP. However, any gaps in your current
knowledge of these areas will be easy to remedy, through either the explanations
contained in this book or references elsewhere.
In the course of illustrating many categories of security flaws, we provide
code extracts showing how applications can be vulnerable. These examples are
simple enough that you can understand them without any prior knowledge
of the language in question. But they are most useful if you have some basic
experience with reading or writing code