In the first edition of this critically acclaimed book, Andrew Hoffman defined the three pillars of application security: reconnaissance, offense, and defense. In this revised and updated second edition, he examines dozens of related topics, from the latest types of attacks and mitigations to threat modeling, the secure software development lifecycle (SSDL/SDLC), and more. Hoffman, senior staff security engineer at Ripple, also provides information regarding exploits and mitigations for several additional web application technologies such as GraphQL, cloud-based deployments, content delivery networks (CDN) and server-side rendering (SSR). Following the curriculum from the first book, this second edition is split into three distinct pillars comprising three separate skill sets: Pillar 1: Recon—Learn techniques for mapping and documenting web applications remotely, including procedures for working with web applications Pillar 2: Offense—Explore methods for attacking web applications using a number of highly effective exploits that have been proven by the best hackers in the world. These skills are valuable when used alongside the skills from Pillar 3. Pillar 3: Defense—Build on skills acquired in the first two parts to construct effective and long-lived mitigations for each of the attacks described in Pillar 2.

Browse the chapters to quickly get to know the structure and content of the book.
By browsing the chapters of this book you can quickly see what each part teaches, how the whole is structured and where to start. Each chapter focuses on one concept or skill, and you see its main topics so your choice is more informed. Whether you follow the whole book or just one part, this view helps you find your way.

The History of Software Security
Instead of a technical overview, which you can find in several places throughout Web Application Security, I start this part of the book with a philosophical overview.
To exploit web applications efficiently, a wide array of skills is required. On the one hand, a hacker needs knowledge of network protocols, software development techniques, and common vulnerabilities found in various types of applications. But on the other hand, the hacker also needs to understand the application they are targeting. The more intimate this knowledge is, the better and more applicable it will be.
The hacker should understand the purpose of the application from a functional perspective. Who are its users? How does the application generate revenue? For what purpose do users select the application over competitors? Who are the competitors? What functionality is found in the application?
Without deep understanding of the target application from a nontechnical perspective, it is actually difficult to determine what data and functionality matter. For example, a web application used for car sales may consider the storage of objects representing cars for sale (price, inventory, etc.) to be mission-critical data. But a hobby website where car enthusiasts can post and share modifications done to their own cars may consider the user accounts more valuable than the inventory listed on a user’s profile.
The same can be said when talking about functionality rather than just data. Many web applications ...

Introduction to Web Application Reconnaissance

The Structure of a Modern Web Application

Finding Subdomains

API Analysis

Identifying Third-Party Dependencies

Identifying Weak Points in Application Architecture

Part I Summary
In Part I of this book, we explored a number of ways to investigate and document the structure and function of a web application. We evaluated ways of finding APIs on a server, including those that exist on subdomains rather than at just the top-level domain. We considered methods of enumerating the endpoints that those APIs exposed and the HTTP verbs that they accepted.
After building out a map of subdomains, APIs, and HTTP verbs, we looked at ways of determining what type of request and response payloads would be accepted by each endpoint. We approached this from a generic angle, as well as by looking at methods of finding open specifications that would lead us to the payload’s structure more rapidly.
After investigating ways of mapping out an application’s API structure, we began a conversation regarding third-party dependencies and evaluated various ways of detecting third-party integrations on a first-party application. From this investigation, we learned how to detect SPA frameworks, databases, and web servers, and learned general techniques (like fingerprinting) to identify versions of other dependencies.
Finally, we concluded our conversation regarding recon by discussing architectural flaws that can lead to poorly protected functionality. By evaluating a few common forms of insecure web application architecture, we gained insight into dangers faced by hastily developed web applications.
Now in Part II, we will begin learning common techniques used by ...

Introduction to Hacking Web Applications

Cross-Site Scripting

Cross-Site Request Forgery

XML External Entity

Injection

Denial of Service

Attacking Data and Objects

Client-Side Attacks

Exploiting Third-Party Dependencies

Business Logic Vulnerabilities

Part II Summary
This is the final part of Web Application Security. Building on Parts I and II, we will deeply analyze what goes into building a modern, full stack web application. At each point in our analysis, we will consider significant security risks and concerns. Following our concerns, we will evaluate alternative implementations as well as mitigations that alleviate security risk.
Throughout this process, you will learn about techniques that you can integrate into your software development life cycle to reduce the vulnerabilities in your production code. These techniques range from secure-by-default application architecture, to avoidance of insecure anti-patterns, all the way to proper security-oriented code-review technique and countermeasures for specific types of exploits.
By the end of Part III, you will have a strong foundation in web application reconnaissance, offensive pen-testing techniques, and secure software development. At that point, I encourage you to reread points of interest in the first two parts (but with added context) or go on to apply your new skills in the real world.
Let’s move on and begin learning about software security and the skills required to build hacker-resistant web applications.

Securing Modern Web Applications

Secure Application Architecture

Secure Application Configuration

Secure User Experience

Threat Modeling Applications

Reviewing Code for Security

Vulnerability Discovery

Vulnerability Management

Defending Against XSS Attacks

Defending Against CSRF Attacks

Defending Against XXE

Defending Against Injection

Defending Against DoS

Defending Data and Objects

Defense Against Client-Side Attacks

Securing Third-Party Dependencies

Mitigating Business Logic Vulnerabilities

Part III Summary
37 chapters in production
Reading time
11:10
Book type
Subscription
Participants
Be the first
Last updated
Sep 30, 2026