Skip to content
Business logic Write-up Intermediate

Live Love WAF — Skirt the firewalls or die trying

The hotel chain's discount code URLs could be brute-forced, but a Kasada bot-detection WAF blocked automated requests. The researcher bypassed it by using a Chrome extension to solve the JavaScript challenge and harvest valid cookies, then fed those cookies to a Python brute-forcer.

medium.com

Published on medium.com

One of the very first reasons I taught myself how to code was for the sole purpose of web scrapping, I needed to open a lot of pages really quickly and grab specific data from them. Over the years I overcame relatively easy obstacles to get what I wanted — using headless browsers, using proxies and finding origin IPs…

Louis Shyers, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the WAF's bot-detection relied on a JavaScript challenge and a cookie that remained valid for hundreds of requests, allowing a real browser to be automated to harvest cookies for a separate brute-force script.

Impact

An attacker could enumerate all valid group booking discount codes for the hotel chain, potentially obtaining unauthorized discounts.

What the attacker needed

A web browser; ability to install a Chrome extension; basic scripting knowledge

How it was found

  1. Open the target site in a real browser and let the Kasada JavaScript challenge complete.
  2. Extract the custom_cookie from the browser and save it to a local file.
  3. Delete the site's cookies and close the tab, then repeat to get fresh cookies.
  4. Run a Python script that brute-forces the 4-digit codes, reloading the saved cookie every ~100 requests.
  5. Limit the script to two threads to avoid triggering the Akamai WAF's rate limit.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

The website had special discount codes in its web addresses, and the researcher wanted to guess them all to find valid ones. A security system called a WAF (Web Application Firewall) tried to stop automated guessing by checking if a real person was using a browser. The researcher built a browser extension that solved the check and saved the proof, then used that proof to let a script keep guessing.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.