Skip to content
Info disclosure Write-up Intermediate

The Captive Portal

Safari's AutoFill suggested iCloud credentials on a captive portal page served from captive.apple.com, which lacked HSTS protection. An attacker could host a phishing page on that domain and steal credentials when the user selected the AutoFill suggestion.

secjuice.com

Published on secjuice.com

In August 2019 I found a vulnerability in Apples iOS (CVE-2020-3841) during a Red Team Assessment. We were trying to lure users into entering their credentials in a Wi-Fi Phishing Attack.

The author, on secjuice.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 captive portal detection domain lacked HSTS protection and Safari's AutoFill incorrectly matched iCloud credentials to the apple.com domain, allowing credential suggestions on an attacker-controlled page.

Impact

An attacker could steal iCloud credentials with a single click when the user selected the AutoFill suggestion, and could then use those credentials to access the account, potentially bypassing two-factor authentication with additional tools.

What the attacker needed

Victim joins attacker Wi-Fi; victim clicks 'Sign in with Apple'; victim selects AutoFill suggestion

The fix

Apple fixed it by no longer suggesting credentials in the captive-login frame that pops up.

How it was found

  1. Set up a Wi-Fi network that redirects users to a captive portal.
  2. Redirect from the portal IP to captive.apple.com and serve a phishing page there.
  3. Design a page with a 'Sign in with Apple' button and hidden username/password fields.
  4. When the user clicks the button, focus the hidden username field to trigger Safari AutoFill.
  5. Safari suggests iCloud credentials; when the user selects them, the page automatically submits the filled credentials.

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.

When you join a Wi-Fi network, your device checks a special web address to see if you need to log in. Apple used an insecure (HTTP) address on its own domain for this check. Because that address was not protected, an attacker could show a fake login page there, and Safari would offer to fill in your iCloud password, which the attacker could then steal.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.