Clickjacking, also known as a “UI redress attack”

Posted by

Clickjacking, also known as a “UI redress attack”, is when an attacker uses multiple transparent or opaque layers to trick a user into clicking on a button or link on another page when they were intending to click on the top-level page. Thus, the attacker is “hijacking” clicks meant for their page and routing them to another page, most likely owned by another application, domain, or both.

Using a similar technique, keystrokes can also be hijacked. With a carefully crafted combination of stylesheets, iframes, and text boxes, a user can be led to believe they are typing in the password to their email or bank account, but are instead typing into an invisible frame controlled by the attacker.

Attacker scenario:
If the attacker uses multiple transparent or opaque layers and sent that suspicious link to the user, once the user opens the link, your website would be opened in an iframe as your server is responding to the iframe page request so when the user login his account in iframe your server will check user credentials and response accordingly that will ensure to the user that is a genuine website as the server is responding on his request. If the attacker would set transparent buttons on the login button so the user can become a victim of losing login credentials (account takeover).

“As the Server is responding the same whether a website open in an iframe or website is open without an iframe.”

Let’s assume your user opens his account in the iframe and he is using your platform, as your web server is responding to each request normally so he will consider himself in a safe environment. While using your platform a message is shown “Click here for a free iPhone” as the user was receiving every response from your server he will be sure the offer is from your website but once he clicks on the button he would be a victim of the attacker’s trick.

 

POC:

<html>

<head></head>

<body>

<h1>WEBSITE IS VULNERABLE TO CLICKJACKING</h1>

<iframe width=100% height=80% src=”https://www.devopsschool.com/login“></iframe>

</body>

</html>

Impact: 

The site can also be opened in an iframe after the user has logged in making it hard for the user to avoid phishing. A user can be tricked into entering his credentials in what may be the placeholder for the original website details. And thus his credentials would be sent to the attacker. 

Remediation:
Add an iframe destroyer in the header of the page.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x