Skip to Content
ASP.NET Core Security
book

ASP.NET Core Security

by Christian Wenz
July 2022
Beginner to intermediate
368 pages
9h 48m
English
Manning Publications
Content preview from ASP.NET Core Security

4 Cross-site request forgery

This chapter covers

  • Learning how cross-site request forgery (CSRF) works
  • Looking at consequences CSRF may bring
  • Preventing CSRF
  • Protecting cookies to prevent CSRF
  • Clickjacking and how it’s related to CSRF

In 2005, security researcher Samy Kamkar found a security vulnerability in the then-popular social network Myspace (if you’ve been around long enough, you might remember that service). He managed to inject JavaScript code into his profile page, a classical cross-site scripting (XSS) attack (explained in chapter 2). The JavaScript code, however, did something really interesting: when executed, it issued an HTTP request on the victim’s behalf, adding them to Kamkar’s friends list. This started a chain reaction, and ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro ASP.NET Core Identity: Under the Hood with Authentication and Authorization in ASP.NET Core 5 and 6 Applications

Pro ASP.NET Core Identity: Under the Hood with Authentication and Authorization in ASP.NET Core 5 and 6 Applications

Adam Freeman

Publisher Resources

ISBN: 9781633439986Publisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link