picoCTF - Web Exploitation - Includes
Web Exploitation - Includes - writeup
description
Can you get the flag? Go to this website and see what you can discover.
writeup
Ok so I went ahead and visited the url http://saturn.picoctf.net:52811/ in firefox.
I am presente with a webpage with a bunch of text and a button that says “Say hello”.
Once I press that button I get a javascript alert() popup that says “This code is in a separate file!”
If I look at the source code of that button I see this:
|
|
So the button is calling a javascript function ‘greetings()’
Lets take a look at that function.
Since the html code is including the js code from a seperate file:
|
|
We need to take a look at that file
So once I point my browser at the address http://saturn.picoctf.net:52811/script.js I see the following JavaScript Code:
|
|
The comment looks like a part of our flag!
There is also a CSS stylesheet ‘style.css’
|
|
Great! Here is our first part of the flag.
Lets put it together:
picoCTF{1nclu51v17y_1of2_f7w_2of2_3d50f001}
So the flag is:
|
|