300 words
2 minutes
Blitzstorm CTF 2024 - Web Challenge Write-Up

This blog covers the web challenges I authored for Blitzstorm CTF 2024. Below is a walkthrough of each challenge, including exploitation techniques and bypass tricks.


Challenge: Tindog#

Description: The developer knows how to code, but he doesnโ€™t know about security.
Author: Hanzala
Points: 100

After launching the challenge, we are presented with a static page about dogs.

Tindog Page

Inspecting the source reveals a hidden comment.

Comment in Code

Navigating to research.html shows some research content.

research.html

Using Wappalyzer, we identify that the backend is using PHP.

Wappalyzer

We try a PHP filter trick, such as:

php-filter://resource=flag.php

This provides base64-encoded output of the flag.php source code.

Base64 Flag

Decoding this reveals the flag.

Decoded Flag


Challenge: Cyber-Awareness#

Description: This person is trying to raise awareness, but they are unaware that someone may be observing their action.
Author: Hanzala
Points: 100

On visiting the page, we find a basic cyber awareness-themed webpage.

Cyber Awareness

Nothing interesting is visible, so we run directory brute-forcing. This reveals a .git folder.

.git Found

We use tools like git-dumper or download all .git contents manually.

.git Download

After recovering the repo locally, we check the status.

Git Status

We see that the flag file was deleted. Using the following command helps us recover it:

git checkout --

Git Checkout

We finally retrieve the flag.

Flag


Challenge: Discover#

Description: The developer thinks this is the safest app in the world. Can you prove him wrong?
Author: Hanzala
Points: 200

This challenge includes a command execution feature with some filtering logic.

We observe that inserting a newline character \n can bypass the allowlist check and execute commands.

Command Bypass

Listing the root directory reveals the flag file.

Flag Found

However, keywords like flag and .txt are blacklisted. To bypass this, we use the following:

  • [] character class to obfuscate characters (f[l]ag)
  • ${IFS} to bypass space (cat${IFS}f[l]ag)

This results in successful execution.

Flag Bypass


๐Ÿ› ๏ธ Configuration Files#

The configuration files for setting up and running the above web challenges are available on GitHub.

๐Ÿ‘‰ View the repository here

Thanks to everyone who participated โ€” great job! ๐Ÿ‘

Blitzstorm CTF 2024 - Web Challenge Write-Up
https://blog.hanzalaghayasabbasi.com/posts/blitzstorm-ctf-web-2024/
Author
Hanzala Ghayas Abbasi
Published at
2024-01-30
License
CC BY-NC-SA 4.0