Skip to content
Business logic Write-up Intermediate

A Real World Web Application Penetration Testing Story Small Mistakes Leads To Major Logic Flaws

Two web applications failed to properly validate user identity and phone number inputs, allowing an attacker to send SMS messages to arbitrary Turkish phone numbers. The attacker could bypass rate limits by rotating credentials or using automation, and send large volumes of SMS.

Onurcan Genç Follow

Published on systemweakness.com

Greetings, dear Medium community ! Nowadays, participating in real-world engagements is highly available for me due to my exam period.

Onurcan Genç, on systemweakness.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

Impact

An attacker could send SMS messages to arbitrary Turkish phone numbers, potentially at scale (tens to hundreds of thousands of attempts), causing financial cost and nuisance, though the text notes rate limits and SMS API hardening limited some abuse.

What the attacker needed

Access to the web form; valid identity number; phone number starting with 5; ability to automate requests

The fix

The applications should verify that the phone number belongs to the person whose identity is provided and enforce rate limits per identity and per phone number, not just per session or IP.

How it was found

  1. Provide a valid identity number and a phone number starting with 5 to the SMS sending form.
  2. Observe that the application sends an SMS to the provided number.
  3. Wait for the rate limit window (about 2 minutes) or change credentials to send more messages.
  4. In the second application, fill in account creation fields with a valid identity number but arbitrary birth date and phone number.
  5. Submit the form and receive an SMS code panel; close it and press create account again to resend.
  6. Use a Selenium script to automate filling fields and clicking create account repeatedly across many phone numbers.

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 applications had forms where you enter identity details and a phone number to receive a code by text message. They checked some parts of the input but not enough, so someone could put in other people's details and make the system send text messages to any number they chose. This is a logic flaw: the program follows its rules but the rules themselves are too loose.

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.

More by Onurcan Genç

View all

2 more disclosed reports, best first.

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.