Fake login form (phishing)
Show a form that looks identical to the parent site's login UI and exfiltrate the credentials.
Behavior by sandbox policy
| Policy | Expected result |
|---|---|
| No sandbox | works |
sandbox="allow-scripts" | works |
sandbox="" (strictest) | partial |
Embed snippet
This snippet uses the dedicated embed page. Paste it into your own service and check rendering or blocking behavior.
<iframe src="https://xss-playground.com/embed/phishing-form?lang=en" title="XSS Playground - Fake login form (phishing)" width="600" height="420" loading="lazy" referrerpolicy="strict-origin-when-cross-origin"></iframe>
실제 공격 시 이 iframe 은 부모 페이지 안에서 마치 서비스의 모달/로그인 영역처럼 보이도록 위치됩니다. 사용자는 도메인이 attacker.example 인 것을 알기 어렵습니다. (아래 풀스크린 오버레이 시나리오와 결합되면 더 위험.)
가짜 로그인 폼 (자기 origin 안에서 자유롭게 그려짐)
수집 로그
// 로그 없음
해설
- iframe 안의 폼은 자기 origin 의 페이지이므로 어떤 UI 도 자유롭게 그릴 수 있고, 입력값을 자기 서버로 보낼 수 있습니다. SOP 와 무관합니다.
sandbox="allow-scripts"만 줘도 form submit 자체 는 막을 수 있지만, JS 로 값을 수집해 fetch 로 보내는 건 여전히 가능 합니다.sandbox=""(빈 값) 이라야 JS 도 막힙니다.- 가장 확실한 대응은 iframe 의 host 를 allowlist 로 제한하는 것입니다. 유튜브/비메오 같은 신뢰 호스트만 통과시키면 이 시나리오 자체가 성립하지 않습니다.