Skip to content
UI spoofing Write-up Intermediate

GOTCHA: Taking phishing to a whole new level

An API endpoint that reveals a user's password lacked the X-Frame-Options header, allowing it to be embedded in an iframe. An attacker could use CSS to isolate individual characters of the password and present them in a fake CAPTCHA to trick the victim into revealing it.

medium.com

Published on medium.com

As a security researcher, I try to identify area’s of potential abuse before bad people do. Once in a while, you stumble upon an attack scenario that is so incredibly stupid yet genius at the same time, that it deserves a name and a logo.

Inti De Ceukelaire, 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

The API endpoint that returns a password did not set the X-Frame-Options header, allowing it to be framed and visually manipulated.

Impact

An attacker could potentially compromise a user's plaintext password, but the attack requires significant user interaction and may be less effective against non-random passwords.

What the attacker needed

Victim must visit attacker's page; victim must interact with fake CAPTCHA; API endpoint lacks X-Frame-Options

The fix

The issue was fixed by implementing the X-Frame-Options header to prevent API responses from being embedded on external webpages.

How it was found

  1. Identify an API endpoint that reveals a password and check for missing X-Frame-Options.
  2. Embed the endpoint in an iframe and set the width to 30px to isolate characters.
  3. Use CSS positioning to isolate each character of the password.
  4. Arrange the isolated characters in a scrambled order within a fake CAPTCHA form.
  5. Apply CSS filters to blur and rotate the CAPTCHA to make it look realistic.
  6. Trick the victim into filling in the CAPTCHA, thereby revealing the password.

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.

A website can be embedded in another site using an iframe. If a sensitive page like a password reveal endpoint lacks a security header, an attacker can frame it and use CSS to show only one character at a time, then trick the user into typing those characters into a fake form.

What is UI spoofing?

The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.

Similar reports

View all

Same bug class and techniques, clearest first.

Clickjacking and UI spoofing

The lesson behind this report.

The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.