11The challenges
XSS in JavaScript strings 3
Hard45MIN
In this module, you will practice identifying and exploiting XSS vulnerabilities. Read the assignment and use the skills learned in previous modules to solve the task.
Try to figure out how to execute JavaScript code in the task. The string in the task is defined inside a function that is never called, so you will need to use creativity to run the JavaScript code. After that, you can solve the task in the required manner.
If you can't figure out how to execute JavaScript code, check the spoiler below. However, we recommend trying your best before looking at the ready-made answer!
SPOILER
1 / 2
Hakatemia Pro
Learn to hack — start here
Hundreds of interactive courses, virtual labs and CTF challenges in your browser. Start a free trial — no card required.