Challenge Author: Jeffery John
Difficulty: Easy
Description
Why search for the flag when I can make a bookmarklet to print it for me?
Process / Notes
- Follow the link to the http site
- There’s a JavaScript function with an encrypted flag
- Viewing the page source
- There’s a line that looks like it responds to copying the code to one’s clipboard
- Tried moving the JavaScript line into the
<scirpt></scirpt>section and that didn’t seem to work - At 15 minutes, checking how to do this
- It looks like you paste the JavaScript into the “console” part of the Inspector! It seems I was close but interacting with the wrong area
- Warning about running JavaScript you don’t understand, and running malicious code here could be a massive security risk but we trust this source
- The flag popped up once the code was run in the console
18 minutes 11 seconds to complete
Hints
- A bookmarklet is a bookmark that runs JavaScript instead of loading a webpage
- What happens when you click the bookmarklet?
- Web browsers have other ways to run JavaScript too
Core Lessons
- Understanding what a “bookmarklet” is
- Knowing how to run JavaScript in the Page Inspector’s Console
- Understanding exactly what a script is doing so you don’t run malicious code