JavaScript for hackers
$20.00
Minimum price
$20.00
Suggested price

JavaScript for hackers

Learn to think like a hacker

About the Book

Have you ever wondered how a hacker approaches finding flaws in the browser and JavaScript? This book shares the thought processes and gives you tools to find your own flaws. It shares the basics of JavaScript hacking, then dives in and explains how to construct JavaScript payloads that don't use parentheses.

  • Shows how you can find flaws with fuzzing and how to quickly fuzz millions of characters in seconds.
  • Want to hack the DOM? This book has you covered.
  • Read about various browser SOP bypasses that the author found in detail.
  • No idea about client-side prototype pollution? This is the book for you!
  • Want to learn the latest & greatest XSS techniques? You need to buy this book.
  • Share this book

  • Categories

    • JavaScript
    • Computer Security
    • Computers and Programming
  • Feedback

    Email the Author(s)

About the Author

Gareth Heyes
Gareth Heyes

PortSwigger researcher Gareth Heyes is probably best known for his work escaping JavaScript sandboxes, and creating super-elegant XSS vectors. In his spare time he likes to create interative 3D rooms and games in pure CSS and can be often found posting about it and experimenting on his web site garethheyes.co.uk. Gareth is a father to two wonderful girls and husband to an amazing wife, as well as an ardent fan of Liverpool FC.

In his daily life at PortSwigger, Gareth can often be found creating new XSS vectors, researching new techniques to attack web applications, and preparing to speak at conferences around the globe. A recent highlight was his presentation "Server-side prototype pollution: Black-box detection without the DoS" at OWASP Global AppSec Dublin, 2023. He's also the author of PortSwigger's XSS Cheat Sheet. In his spare time he loves writing new BApp extensions (he's the creator of both Hackvertor and Taborator).

Table of Contents

    • 1:Chapter one - Introduction
      • 1.1:About the author
      • 1.2:The passion
      • 1.3:Environment
      • 1.4:Set a goal
      • 1.5:Fuzzing
      • 1.6:Persistence and luck
      • 1.7:Social media
      • 1.8:The basics
      • 1.9:Summary
    • 2:Chapter two - JavaScript without parentheses
      • 2.1:Calling functions without parentheses
      • 2.2:Calling functions with arguments without parentheses
      • 2.3:Throw expressions
      • 2.4:Tagged templates
      • 2.5:Has instance symbol
      • 2.6:Summary
    • 3:Chapter three - Fuzzing
      • 3.1:The truth
      • 3.2:Fuzzing JavaScript URLs
      • 3.3:Fuzzing HTTP URLs
      • 3.4:Fuzzing HTML
      • 3.5:Fuzzing known behaviours
      • 3.6:Fuzzing escapes
      • 3.7:Summary
    • 4:Chapter four - DOM for hackers
      • 4.1:Where’s my window?
      • 4.2:Scope of a HTML event
      • 4.3:DOM clobbering
      • 4.4:Summary
    • 5:Chapter five - Browser exploits
      • 5.1:Introduction
      • 5.2:Firefox incorrect handling of cross origin URLs
      • 5.3:Safari assignments to cross origin hostnames
      • 5.4:Internet Explorer full SOP bypass
      • 5.5:Chrome partial SOP infoleak
      • 5.6:Safari full SOP bypass
      • 5.7:Opera SOP bypass
      • 5.8:Summary
    • 6:Chapter six - Prototype pollution
      • 6.1:Introduction
      • 6.2:Client-side prototype pollution
      • 6.3:Server-side prototype pollution
      • 6.4:Summary
    • 7:Chapter seven - Non-alphanumeric JavaScript
      • 7.1:Writing non-alphanumeric JavaScript
      • 7.2:Non-alpha without parentheses
      • 7.3:The six character wall
      • 7.4:Infinity and beyond
      • 7.5:Summary
    • 8:Chapter eight - XSS
      • 8.1:Closing scripts
      • 8.2:Comments inside scripts
      • 8.3:HTML entities inside SVG script
      • 8.4:Script without closing script
      • 8.5:Window name payloads
      • 8.6:Assignable protocol
      • 8.7:Source maps to create pingbacks
      • 8.8:New redirection sink
      • 8.9:JavaScript comments
      • 8.10:New lines
      • 8.11:Whitespace
      • 8.12:Dynamic imports
      • 8.13:XHTML namespace in XML
      • 8.14:SVG uploads
      • 8.15:SVG use elements
      • 8.16:HTML entities
      • 8.17:Events
      • 8.18:XSS in hidden inputs
      • 8.19:Popovers
      • 8.20:Summary
    • 9:Credits

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

80% Royalties. Earn $16 on a $20 book.

We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub