What do you think?
Rate this book
327 pages, Paperback
Published April 7, 2020
This is a relatively new book on web application security (as of early 2021) published by O'Reilly, so I was pretty excited to read it. The author is a security engineer at a well-known tech company who has worked with web standards organizations. The project leader of OWASP endorses it as "a comprehensive resource on web application security." The back cover promises "detailed knowledge regarding modern web application security." Unfortunately, I didn't realize it was only about 300 pages long. That is not a lot of space to cover recon techniques, Cross-Site Scripting (XSS), Cross-Site Request Forgery (CSRF), XML External Entity (XXE), various types of injection, and defense against all of above, among other topics. I think the book is organized in a clever way. It is split into three parts: recon, offense, and defense. This steps you through the approaches an attacker or pentester may take to gather information then attack an application. If you are a developer who does not know much about web application security, that is a good lead in to defense and secure coding practices. Most of the code examples are in JavaScript (Express.js) and should be easy to understand even if you're more accustomed to another server-side language.
I understand the challenges writing good tech books. If you go into a lot of depth and detail, a lot of the content will become dated quickly. That being said, I think that this book goes too far in the other direction. Most of the chapters are roughly 10 pages long. Some of them are only about 5 pages. This often amounts to a code sample, screenshot or diagram, and a few paragraphs scratching the surface of a topic. For example, the XSS chapter in the offense section is 13 pages long. That is a one-page introduction, four pages setting up a thought experiment for stored XSS, then a few pages each explaining stored, reflected, DOM-based, and mutation-based XSS. The XSS chapter in the defense section is 10 pages long. It includes good advice (pass user input into the DOM as a string whenever possible, sanitize user input, use a CSP, etc.), but again does not go into much depth. The book's introduction says the primary audience is "an early-to-mid-career software engineer or web application developer," and I would agree. I did not get that impression from the book's description, though. If you're looking for a high-level intro to web app security, this book is for you. If you're looking for a modernized Web Application Hacker's Handbook, you're not going to find it here.