A blog with a vulnerable password reset system. Exploit the HTTP method vulnerability to reset the admin password and access the flag.
You've discovered a blog with a password reset system that has some serious security flaws. The admin has a hidden post. Exploit the vulnerable password reset system and reset the admins password. Login and
The easiest way to deploy and manage this challenge is using the provided Makefile:
# Show available commands
make help
# Quick deployment with custom flag
make quick-deploy FLAG=flag{custom_flag_here}
# Standard deployment
make deploy
# Full rebuild
make rebuild
# Clean up
make clean
- Build and run the challenge:
docker-compose up -d
- Access the challenge at: http://localhost
To run with a custom flag, set the environment variable:
# Method 1: Use Makefile
make deploy FLAG=flag{custom_flag_here}
# Method 2: Export environment variable
export FLAG="flag{custom_flag_here}"
docker-compose up -d
# Method 3: Set environment variable before running
FLAG="flag{custom_flag_here}" docker-compose up -d
./build.sh
If you prefer to run containers manually:
# Build the web image
docker build -t password-reset .
# Run MySQL container
docker run -d --name mysql \
-e MYSQL_ROOT_PASSWORD=root_password \
-e MYSQL_DATABASE=blog \
-e MYSQL_USER=blog \
-e MYSQL_PASSWORD=blog_password \
-v $(pwd)/other/db.sql:/docker-entrypoint-initdb.d/init.sql \
mysql:8.0
# Run web container
docker run -d --name web \
-p 80:80 \
-e FLAG="flag{custom_flag}" \
-e DB_HOST=mysql \
--link mysql \
password-reset
The challenge involves exploiting multiple vulnerabilities in the password reset system:
- Visit the main page to understand the blog structure
- Notice there's a login page and password reset functionality
- Navigate to the password reset page (
reset1.php
) - Enter "admin" as the username
- At
reset2.php
, you'll see the security questions - Security Question 1: "What is the difference between a GET request and a POST request and why does it matter to me specifically?"
- Answer 1: "Well clearly a GET request is used to retrieve data from a server, while a POST request is used to send data to a server."
- Security Question 2: "If a wood chuck could chuck wood as efficiently as they claim, how much wood would a wood chuck chuck if Chuck in fact didnt chuck any wood, but could and still would chuck wood if Chuck were a wood chuck?"
- Answer 2: "I would say 42? Perchance."
- Answer the security questions
- Examine the url and notice the params that have been added.
reset3.php?passed=false&username=admin
- Change passed=false to passed=true and reload
- Add new and confirm password
- Login with new credentials
- HTTP Method Vulnerability: All password reset data is passed via GET parameters, exposing sensitive information in URLs and browser history
- No Rate Limiting: No protection against brute force attacks
passwordreset/
├── challenge.json # Challenge metadata and configuration
├── Dockerfile # Container definition
├── docker-compose.yml
├── build.sh # Build script
├── README.md
├── generate_sql.sh # Database initialization script
├── web/ # Application source code
│ ├── index.php
│ ├── login.php
│ ├── reset1.php
│ ├── reset2.php
│ ├── reset3.php
│ ├── reset4.php
│ └── db.php # Database connection
│ └── images/ # Images files
│ ├── cat-hugs.gif
│ ├── celebrate-1.gif
│ ├── celebrate-2.webp
│ ├── educaplay-computer.jpg
│ ├── failed.gif
│ ├── remember.gif
│ ├── skeleton-doot.webp
│ ├── stars.gif
│ ├── thinking-math.webp
│ └── uh-uh-uh.gif
│ └── css/ # CSS files
│ └── main.css
└── other/ # Database files
├── db.sql # Database schema and data
└── mysql.conf # MySQL configuration
The challenge supports the following configurable variables:
FLAG
: The flag value for this challenge instanceDB_USER
: MySQL database usernameDB_PASSWORD
: MySQL database passwordDB_NAME
: MySQL database nameMYSQL_ROOT_PASSWORD
: MySQL root passwordCHALLENGE_NAME
: Container naming prefix
- Web Base Image: PHP 8.2 with Apache
- Database: MySQL 8.0
- Port: 80
- Flag Environment Variable:
FLAG
- Default Flag:
flag{Maybe_I_Should_Use_Something_Other_Than_The_Get_Method}
- Admin Username:
admin
- Admin Password:
blog_password
Beginner - This challenge introduces basic web security concepts:
- Understanding HTTP methods and their security implications
- Password reset security flaws
- Admin privilege escalation