Skip to content

(Feat) Performance Improvements #1215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions CTF_Challenge_Writeup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Circles CTF Challenge Write-up (2025 CSESoc/DevSoc/SecSoc CTF)

This is the writeup for solving the Circles CTF challenge.

The goal is to find two secret pieces of text. Combine them in order (Piece 1 then Piece 2) to form the final flag: `RCR{[Piece1][Piece2]}`.
For example, if the first piece is `ICouldEatLike` and the second piece is `100McNuggets`, then the final flag is: `RCR{ICouldEatLike100McNuggets}`.

## Part 1: The Writing's on the Wall

The `challenge.html` page describes Part 1 as "The Writing's on the Wall" and gives the following hint:
> "The first piece of the flag is hiding in plain sight, almost on every page of circles. If you're careful and detail-oriented, you'll find it."

This implies the flag piece is located in a common UI element that appears on most pages of the site, such as the main header or navigation bar.

To find it:
- Sharp eyes: Use a screen with accurate colours to see where it is.
- OR Inspect Element: Use Inspect element to find the suspicious element.
- OR Highlighting: Highlight parts of the page with your mouse. Likely the easiest way.

Definitely a beginner friendly and fun challenge.


## Part 2: BOTS0101 - Stop Bots from taking our jobs

The `challenge.html` page describes Part 2 as "BOTS0101 - Stop Bots from taking our jobs" and gives the hint:
> "Today's tech landscape is a freaky one, with a lot of automation going around. Websites often have a guide for web crawlers (like Googlebot) telling them which areas to avoid. But you're not a web crawler, you're a human (surely right), and you can totally avoid it for us."

Some dablling and research tells them to look at the `robots.txt` file.


In your browser, navigate to the `robots.txt` file for Circles (`circles.devsoc.app/robots.txt`).


The content of `robots.txt` will look something like this:
```
User-agent: *
Disallow: /s3cr3t_p4g3.html
```
The line `Disallow: /s3cr3t_p4g3.html` indicates a hidden page that web crawlers are instructed not to access.


Go to the disallowed path in your browser (e.g., `circles.devsoc.app/s3cr3t_p4g3.html`).

This page (`s3cr3t_p4g3.html`) will display the second piece of the flag

## Part 3: Combining the Flags

Combine the flags...

Congratulations! You have successfully completed the CTF challenge.
71 changes: 71 additions & 0 deletions frontend/public/challenge.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-P">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Circles CTF challenge</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
background-color: #f4f4f4;
color: #333;
}

.container {
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.hidden-text-container {
background-color: #800080;
/* Purple background */
padding: 10px;
border-radius: 4px;
margin-top: 15px;
}

.hidden-text {
color: #800080;
/* Purple text, same as background */
font-weight: bold;
}

.hint {
margin-top: 20px;
padding: 10px;
background-color: #e9e9e9;
border-left: 3px solid #888;
}

h1,
h2 {
color: #555;
}
</style>
</head>

<body>
<div class="container">
<h1>Welcome to the Circles CTF challenge for the 2025 CSESoc/DevSoc/SecSoc CTF!!!</h1>
<p>Your mission is to find two secret pieces of text. Combine them in order (Piece 1 then Piece 2) to form the
final flag: <code>RCR{[Piece1][Piece2]}</code>.</p>

<p>For example, if the first piece is <code>ICouldEatLike</code> the second piece is <code>100McNuggets</code>
then the final flag is: <code>RCR{ICouldEatLike100McNuggets}</code>.</p>

<h2>Part 1: The Writing's on the Wall</h2>
<p>The first piece of the flag is hiding in plain sight, almost on every page of circles. If you're careful and
detail-oriented, you'll find it.</p>

<h2>Part 2: BOTS0101 - Stop Bots from taking our jobs</h2>
<p>Today's tech landscape is a freaky one, with a lot of automation going around. Websites often have a guide
for web crawlers (like Googlebot) telling them which areas to avoid. But you're not a web crawler, you're a
human (surely), and you can totally avoid it for us.</p>
</div>
</body>

</html>
5 changes: 4 additions & 1 deletion frontend/public/robots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
Disallow: /s3cr3t_p4g3.html

# Allow everything else
Allow: /
62 changes: 62 additions & 0 deletions frontend/public/s3cr3t_p4g3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Secret Found!</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
background-color: #f0f0f0;
color: #333;
text-align: center;
}

.container {
background-color: #fff;
padding: 30px;
border-radius: 8px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
display: inline-block;
}

h1 {
color: #4CAF50;
}

p {
font-size: 1.2em;
}

.flag-piece {
font-weight: bold;
color: #d9534f;
font-family: 'Courier New', Courier, monospace;
background-color: #f9f2f4;
padding: 5px 10px;
border-radius: 4px;
border: 1px dashed #d9534f;
}

.instructions {
margin-top: 20px;
font-style: italic;
}
</style>
</head>

<body>
<div class="container">
<h1>Congratulations!</h1>
<p>You've found the second piece of the flag!</p>
<p>Flag Piece 2: <span class="flag-piece">And_H3r3_1s_P4rt_Tw0</span></p>
<p class="instructions">Combine the first piece (from the challenge page) with this one to form the full flag.
Remember the format: <code>RCR{[Piece1][Piece2]}</code>.</p>
<p>Get keen for all the epic Circles features coming soon!</p>
<p>And good luck with the rest of the CTF!!! - Circles 2025</p>
</div>
</body>

</html>
13 changes: 13 additions & 0 deletions frontend/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,19 @@ const Header = () => {
<Drawer onClose={() => setShowDrawer(false)} open={showDrawer}>
<DrawerContent onCloseDrawer={() => setShowDrawer(false)} />
</Drawer>
<span
style={{
color: '#722ED1',
fontSize: '20px',
opacity: 0.05,
position: 'absolute',
left: '20%',
top: '1px',
zIndex: 2
}}
>
Th1s_1s_P4rt_0n3_
</span>
</S.HeaderWrapper>
);
};
Expand Down
Loading