An Interest In:
Web News this Week
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
April 3, 2022 10:45 pm GMT
Original Link: https://dev.to/lambdamamba/ctf-writeup-picoctf-2022-web-exploitation-1gcl
CTF Writeup: picoCTF 2022 Web Exploitation
Our category progress and score was,
The Web Exploitation challenges I solved in picoCTF 2022 are the following,
Table of Contents
- 100 points
- Inspect HTML
- Includes
Inspect HTML
The challenge is the following,
And the website looks like the following,
Inspecting element showed the following,
Therefore, the flag is,
picoCTF{1n5p3t0r_0f_h7ml_b6602e8e}
Includes
The challenge is the following,
And the website looks like the following,
I viewed the source, which contained,
<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <link rel="stylesheet" href="style.css"> <title>On Includes</title> </head> <body> <script src="script.js"></script> <h1>On Includes</h1> <p>Many programming languages and other computer files have a directive, often called include (sometimes copy or import), that causes the contents of a second file to be inserted into the original file. These included files are called copybooks or header files. They are often used to define the physical layout of program data, pieces of procedural code and/or forward declarations while promoting encapsulation and the reuse of code.</p> <br> <p> Source: Wikipedia on Include directive </p> <button type="button" onclick="greetings();">Say hello</button> </body></html>
Here, style.css
contained,
body { background-color: lightblue;}/* picoCTF{1nclu51v17y_1of2_ */
and script.js
contained,
function greetings(){ alert("This code is in a separate file!");}// f7w_2of2_4d305f36}
Therefore, the flag is,
picoCTF{1nclu51v17y_1of2_f7w_2of2_4d305f36}
Original Link: https://dev.to/lambdamamba/ctf-writeup-picoctf-2022-web-exploitation-1gcl
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To