Lab: CSRF where token validation depends on token being present
tags: Portswigger Web Security Academy Web
- Description: This lab’s email change functionality is vulnerable to CSRF.
- Goal: To solve the lab, use your exploit server to host an HTML page that uses a CSRF attack to change the viewer’s email address.
You can log in to your own account using the following credentials: wiener:peter
Recon
-
Login and update email to trace the package
It’s very similar with previous lab $\to$ it contained
CSRF_tokenas its carried data:
-
Try to use 1st method to bypass
It seems can work properly.
Exp - Delete CSRF_token directly to bypass
Actually, this is totally the same with the first lab’s payload
Exploit Payload:
1 | |
