Towel on the Sunbed
CTF WRITEUP

🌞 Towel on the Sunbed

A professional TryHackMe security case study demonstrating how a business logic race condition can be exploited through concurrent authenticated HTTP requests to bypass a reward cooldown mechanism.

TryHackMe Hacker Holidays Easy Business Logic Race Condition Burp Suite
Platform
TryHackMe
Series
Hacker Holidays
Challenge
Towel on the Sunbed
Difficulty
Easy
Primary Focus
Business Logic Race Condition
Tools
Burp Suite Community Edition, Firefox

Mission

The objective of Towel on the Sunbed is to analyze an authenticated cryptocurrency dashboard and identify whether its reward workflow can be abused through a business logic flaw.

The documented attack focuses on the application’s staking reward mechanism.

The intended workflow allows a user to receive a reward once per day. By analyzing the underlying HTTP request and sending multiple copies concurrently, the challenge demonstrates how a race condition can cause several requests to pass validation before the shared cooldown state is updated.

The resulting state change unlocks the application’s Whale Vault.


Quick Overview

Property Details
Platform TryHackMe
Series Hacker Holidays
Room Towel on the Sunbed
Difficulty Easy
Focus Business Logic Vulnerability
Vulnerability Race Condition
Tools Burp Suite Community Edition, Firefox
Environment Linux Desktop
Documentation Type Penetration Testing Report / Security Case Study

Core Security Concept

The vulnerability does not depend on malformed input.

Instead, the attack abuses the timing of legitimate authenticated requests:

Legitimate Reward Request
          β”‚
          β–Ό
Eligibility Validation
          β”‚
          β–Ό
Reward Granted
          β”‚
          β–Ό
Cooldown Updated

Under concurrent execution, several requests can reach the validation stage before the cooldown state is committed:

Request A ───────┐
Request B ───────┼──► Eligibility Check
Request C β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚
                            β–Ό
                    Multiple Requests
                    Pass Validation
                            β”‚
                            β–Ό
                    Multiple Rewards
                            β”‚
                            β–Ό
                    Cooldown Updated

This creates an integrity-impacting business logic flaw.


Attack Chain

Authenticated Dashboard
β†’
Reward Workflow Analysis
β†’
Capture POST /claim
β†’
Burp Repeater
β†’
Parallel Requests
β†’
Race Condition
β†’
Multiple Rewards
β†’
Whale Vault Unlocked

The documented attack path is therefore:

Authentication
      β”‚
      β–Ό
Dashboard Enumeration
      β”‚
      β–Ό
Reward Workflow Analysis
      β”‚
      β–Ό
Capture HTTP Request
      β”‚
      β–Ό
Burp Suite Repeater
      β”‚
      β–Ό
Parallel Request Execution
      β”‚
      β–Ό
Multiple Rewards Credited
      β”‚
      β–Ό
Whale Vault Unlock
      β”‚
      β–Ό
Root Cause Analysis & Mitigation

Learning Objectives

The challenge provides practical experience with:

  • Business logic vulnerability analysis.
  • HTTP request interception.
  • Burp Suite Repeater.
  • Concurrent request testing.
  • State transition analysis.
  • Reward workflow abuse.
  • Server-side state validation.
  • Security impact analysis.
  • Blue Team detection opportunities.
  • Defensive mitigation planning.

Lab Environment

The documented assessment was performed against an authorized TryHackMe Hacker Holidays training environment.

Component Documented Value
Platform TryHackMe
Environment Linux Desktop
Application Cryptocurrency dashboard
Browser Firefox
Proxy / Testing Tool Burp Suite Community Edition
Authentication Session-based login

No external production system is involved in the documented activity.


Vulnerability Spotlight

Business Logic Race Condition

The application validates multiple reward requests before updating shared cooldown state.

A race condition occurs when the security or business outcome of an operation depends on the timing or ordering of concurrent requests.

In this challenge, the intended control is a reward cooldown.

The expected workflow is:

Validate Reward
      β”‚
      β–Ό
Grant Reward
      β”‚
      β–Ό
Update Cooldown
      β”‚
      β–Ό
Reject Future Requests

The observed vulnerable behavior is:

Validate Reward
Validate Reward
Validate Reward
      β”‚
      β–Ό
Grant Reward
Grant Reward
Grant Reward
      β”‚
      β–Ό
Update Cooldown

The critical issue is that the shared cooldown state is updated after multiple requests have already passed the eligibility check.

Why the Vulnerability Matters

Unlike common injection vulnerabilities such as SQL injection or XSS, the documented attack does not require malicious input.

The attacker uses:

  • a valid authenticated session,
  • a legitimate reward endpoint,
  • legitimate request parameters,
  • and concurrent request execution.

The security boundary is therefore the application’s business workflow and state management, rather than its input parser.


Initial Application Enumeration

The assessment begins after authenticating into the cryptocurrency dashboard.

Initial cryptocurrency dashboard presented after authentication
Figure 1 β€” Initial dashboard presented after authentication.

Key Observations

Observation Security Relevance
Cryptocurrency dashboard Primary application attack surface.
Whale Vault locked Privileged functionality gated by balance.
Reward button available Candidate business logic functionality.
Session-based login Authenticated testing is required.

The presence of a reward mechanism and a locked Whale Vault establishes a clear relationship between application state and user balance.

That makes the reward workflow a logical area for further security testing.


Reward Mechanism Analysis

The dashboard explains how staking rewards work.

Dashboard showing the daily staking reward mechanism
Figure 2 β€” Daily staking reward mechanism.

Expected Business Workflow

Day Reward Balance
Day 1 +50 50
Day 2 +50 100
Day 3 +50 150

Only after Day 3 should the Whale Vault unlock.

This expected progression makes the reward claim operation a high-value target for business logic testing.

Testing Question

The key question becomes:

Does the server enforce the reward cooldown atomically when multiple authenticated requests arrive at approximately the same time?


Capturing the Reward Request

Burp Suite Proxy is used to intercept the reward request before it reaches the server.

Burp Suite showing the captured authenticated reward claim request
Figure 3 β€” Captured authenticated reward request.

Documented Endpoint

POST /claim

Authentication: Session Cookie

Purpose: Claim staking reward.

Why /claim Is a Relevant Test Target

The endpoint has several properties that make it important from a business logic perspective:

  • It is authenticated.
  • It changes server-side state.
  • It affects the user’s balance.
  • It enforces a reward cooldown.
  • It represents a state-changing business operation.
  • It can therefore be evaluated for concurrency weaknesses.

Burp Suite Repeater

The intercepted request is transferred into Burp Suite Repeater.

Reward request displayed in Burp Suite Repeater
Figure 4 β€” Reward request inside Burp Suite Repeater.

Why Repeater?

Repeater provides the ability to:

  • Preserve the authenticated session.
  • Duplicate the captured request.
  • Replay requests.
  • Organize multiple requests.
  • Test request behavior under controlled conditions.

The objective at this stage is not to modify the request payload.

Instead, the objective is to determine whether request timing and concurrency affect server-side validation.


Parallel Request Testing

Multiple identical requests are grouped in Burp Suite Repeater.

Multiple reward requests grouped inside Burp Suite Repeater
Figure 5 β€” Request grouping inside Repeater.

Testing Goal

Determine whether multiple requests pass reward validation before cooldown state is committed.

The requests represent the same legitimate authenticated reward operation.

The security test therefore focuses on concurrent execution rather than payload manipulation.


Race Condition Exploitation

Burp Suite sends the grouped requests simultaneously.

Parallel execution of grouped reward requests in Burp Suite Repeater
Figure 6 β€” Parallel execution of the grouped reward requests.

Concurrency Model

Request A
Request B
Request C

      β”‚
      β–Ό

Server receives requests together.

      β”‚
      β–Ό

Cooldown remains valid
during the concurrent validation window.

No payload modification is required.

The exploitation condition is created by the timing of otherwise valid requests.


Response Analysis

The responses reveal inconsistent business logic behavior.

Multiple successful reward responses following parallel request execution
Figure 7 β€” Multiple successful reward responses.

Observed Behavior

Request Result
Request A βœ… Success
Request B βœ… Success
Request C βœ… Success

Multiple authenticated requests receive valid rewards.

This confirms that the application’s reward validation does not adequately prevent concurrent claims from being processed during the same state window.


Whale Vault Unlock

Refreshing the dashboard confirms persistent application state changes.

Whale Vault unlocked after successful concurrent reward claims
Figure 8 β€” Whale Vault unlocked.

Validation Result

The documented result includes:

  • Balance permanently increased.
  • Whale status activated.
  • Vault accessible.

This is important because the result confirms that the race condition affected server-side application state, rather than only changing the client-side interface.


Completion Evidence

Challenge completion evidence with the flag intentionally redacted
Figure 9 β€” Challenge completion evidence. The flag remains intentionally redacted.

The final flag has been intentionally redacted for responsible public documentation.

The original documentation intentionally does not expose the flag value, and that redaction is preserved here.


Final Application State

Final completed application state showing the completed challenge
Figure 10 β€” Final completed application state.

The final state provides visual confirmation of the completed application workflow following exploitation of the race condition.


Root Cause Analysis

Why the Vulnerability Exists

The documented behavior indicates that the reward endpoint performs eligibility validation separately from the state update that establishes the cooldown.

The vulnerable logic can be represented as:

if reward_available(user):
    add_reward(user)
    update_cooldown(user)

When concurrent requests arrive, each request can evaluate:

reward_available(user)

before the cooldown update becomes effective.

This creates a timing window in which several requests can independently satisfy the same eligibility condition.

Vulnerable Sequence

Request A ──► Check reward availability ──► PASS
Request B ──► Check reward availability ──► PASS
Request C ──► Check reward availability ──► PASS
                    β”‚
                    β–Ό
              Rewards granted
                    β”‚
                    β–Ό
             Cooldown updated

Secure Design

A safer workflow should make validation and state modification part of an atomic operation:

BEGIN TRANSACTION
      β”‚
      β–Ό
Check cooldown
      β”‚
      β–Ό
Lock reward record
      β”‚
      β–Ό
Update balance
      β”‚
      β–Ό
Update cooldown
      β”‚
      β–Ό
COMMIT

The essential requirement is that concurrent requests cannot independently pass the same eligibility check before the state transition is committed.


Security Impact

Potential Real-World Risk

The documented business logic flaw could represent reward or transaction abuse in systems where a state-changing operation is expected to occur only once within a defined period.

Industry Possible Abuse
Crypto Wallets Duplicate token rewards
Cashback Apps Cashback farming
Loyalty Programs Unlimited points
Banking Apps Double credit transactions
E-commerce Coupon reuse

These examples illustrate the class of business logic risk demonstrated by the CTF.

CIA Impact

Principle Severity
Confidentiality 🟒 Low
Integrity πŸ”΄ High
Availability 🟒 Low

The primary documented impact is integrity, because the vulnerability allows application state and reward balances to be modified beyond the intended business rules.


Blue Team Detection Opportunities

A race-condition abuse pattern can produce behavioral indicators that are useful for SOC monitoring and application security telemetry.

Detection Indicators

Signal Detection Strategy
Multiple POST /claim requests Identify the same session making repeated claims within milliseconds.
Duplicate reward events Correlate reward transactions with application balance changes.
Rapid privilege progression Monitor users reaching reward thresholds significantly faster than expected.
High-frequency authenticated requests Apply behavioral analytics to unusual request bursts.

Example Detection Rule

IF

Same Session
POST /claim
β‰₯2 Successful Requests
Within One Second

THEN

Raise Business Logic Abuse Alert.

The detection approach should correlate HTTP activity with the resulting business event rather than relying solely on request volume.


MITRE ATT&CK Mapping

The original documentation identifies the following ATT&CK mappings.

Technique ID Evidence
Valid Accounts T1078 The documented exploitation uses an authenticated account and session.
Application Layer Protocol T1071 The attack operates through HTTP communication with the web application.
Exploitation of Public-Facing Application β€” The vulnerable web endpoint is targeted through the application interface.

These mappings are retained from the original documentation and are presented as contextual mappings for the documented activity.


OWASP Mapping

The original documentation associates the vulnerability with the following OWASP categories:

OWASP Category Relevance
A01 β€” Broken Access Control Business functionality becomes improperly accessible through abuse of the intended workflow.
A04 β€” Insecure Design The reward workflow lacks appropriate concurrency controls.
A05 β€” Security Misconfiguration The original documentation identifies improper reward workflow implementation as relevant to the issue.

The core technical issue demonstrated by the challenge is the application’s business logic and concurrency handling.


Defensive Recommendations

Atomic Reward Transactions

Reward eligibility checks and balance updates should occur within an atomic transaction.

Reward Request
      β”‚
      β–Ό
Transaction Lock
      β”‚
      β–Ό
Eligibility Validation
      β”‚
      β–Ό
Balance Update
      β”‚
      β–Ό
Cooldown Commit
      β”‚
      β–Ό
Audit Log
      β”‚
      β–Ό
Response

Row-Level Locking

Where applicable, locking the relevant reward or account record can prevent concurrent requests from independently passing the same eligibility check.

Idempotency Keys

State-changing reward operations can use idempotency controls so repeated requests cannot create duplicate business events.

Server-Side Cooldown Enforcement

Cooldown validation must be enforced by the server and must remain effective throughout the complete state transition.

Concurrency Regression Testing

Security and application tests should intentionally send concurrent requests against state-changing endpoints to verify that business rules remain atomic.

Audit Logging

Reward claims should generate auditable events containing sufficient context to identify:

  • authenticated session,
  • reward operation,
  • timestamp,
  • resulting state change,
  • repeated or anomalous requests.

Key Findings

Business Logic Race Condition
The reward workflow allows multiple concurrent authenticated requests to pass eligibility validation before the shared cooldown state is updated.
Server-Side State Impact
The exploitation resulted in a persistent balance increase, activated Whale status, and unlocked the Whale Vault, demonstrating that the issue affects server-side application state rather than only client-side presentation.
Concurrency Is the Attack Primitive
The documented exploitation does not require malformed input. The security weakness is triggered by executing legitimate authenticated reward requests concurrently.

Tools Used

Burp Suite Community Edition Firefox
Tool Documented Purpose
Burp Suite Community Edition Intercept, duplicate, group, replay, and execute the authenticated reward request concurrently.
Firefox Access and interact with the TryHackMe cryptocurrency dashboard.

No additional tools are introduced beyond those documented in the original walkthrough.


Learning Outcomes

This challenge provided practical experience with:

  • Business Logic Testing β€” analyzing whether application workflows enforce their intended rules.
  • HTTP Interception β€” identifying and examining state-changing requests.
  • Burp Suite Repeater β€” replaying and grouping authenticated requests.
  • Race Condition Testing β€” evaluating application behavior under concurrent requests.
  • State Transition Analysis β€” comparing expected and observed application state.
  • Server-Side Validation β€” verifying that exploitation affects persistent application state.
  • Security Impact Analysis β€” translating a CTF vulnerability into realistic business risks.
  • Blue Team Detection β€” identifying request and transaction patterns that can indicate abuse.
  • Defensive Engineering β€” applying atomic transactions, locking, idempotency, and audit logging.

Repository Structure

The documented repository structure is:

Towel-on-the-Sunbed-TryHackMe-Walkthrough/
β”œβ”€β”€ Documentation/
β”‚   β”œβ”€β”€ Documentation.md
β”‚   └── Documentation.docx
β”œβ”€β”€ Resources/
β”‚   └── notes.md
β”œβ”€β”€ Screenshots/
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ index.md
β”‚   └── assets/
└── README.md

The GitHub Pages documentation is represented by:

docs/index.md

with the screenshot assets referenced from the docs/ document.


Stage Screenshot
Dashboard 01-dashboard-initial.png
Reward Workflow 02-dashboard-staking.png
HTTP Capture 03-burp-captured-claim.png
Burp Repeater 04-repeater-request.png
Request Group 05-repeater-tab-group.png
Parallel Execution 06-repeater-parallel-send.png
Responses 07-parallel-responses.png
Vault Unlock 08-whale-vault-unlocked.png
Redacted Flag 09-flag-redacted.png
Final State 10-whale-vault-final.png

All screenshot paths used by the walkthrough remain relative to:

docs/index.md

The original filenames have not been renamed or replaced.


Responsible Use

This documentation was created exclusively for an authorized TryHackMe training environment.

The techniques described here should only be used against systems for which explicit authorization to test has been granted.

This repository exists for:

  • Cybersecurity education.
  • CTF and penetration-testing practice.
  • Portfolio documentation.
  • Responsible security research.
  • Secure software development awareness.
  • Defensive security understanding.