Cross-Site Request Forgery A
cross-site request forgery (CSRF) attack creates a request that appears to be associ‐
ated with one site when, in fact, it’s going to another site. Or, put another way, a user
Web-Based Attacks | 251
visits one page that either is on site X or appears to be on site X when in fact a request
on that page is being requested against site Y. To understand this attack, it helps to
know how HTTP works and how websites work. In order to understand this, let’s
take a look at some simple HTML source in
Example 8-3
.
Example 8-3. Sample HTML source code This is a title