Clickjacking - What It Means and How to Fix It

← Prev

Website security is essential for protecting users, sensitive information, and online transactions. One common security issue identified during website vulnerability assessments is Clickjacking (Missing Frame Protection).

This vulnerability occurs when a website does not have appropriate security controls to prevent unauthorized websites from embedding its pages inside frames. Attackers may exploit this weakness to trick users into clicking buttons or performing actions they did not intend.

In this article, I'll explain what clickjacking means, how it works, its potential risks, and how website owners can prevent it.

What Is Clickjacking?

Clickjacking, also known as a UI redressing attack, is a technique in which an attacker tricks a user into interacting with a website element different from the one the user believes they are clicking.

For example, an attacker might create a fake webpage displaying a button that says Claim Your Free Gift. Behind the visible page, the attacker could place an embedded frame containing a legitimate website. If the elements are positioned to overlap, the user may unknowingly click a sensitive button on the embedded website.

This attack relies on misleading the user rather than directly breaking into the website.

How Does Clickjacking Work?

A typical clickjacking attack involves the following steps:

What Does "Missing Frame Protection" Mean?

Modern browsers allow websites to display other webpages inside frames or iframes. This functionality is useful for legitimate purposes, such as embedding videos, maps, and internal application pages.

However, websites should control which other websites are allowed to embed their pages.

When a security scanner reports Clickjacking (Missing Frame Protection), it generally means the website does not return the expected HTTP response headers that restrict framing.

These "two" important security mechanisms can help address this issue.

What Are the Risks of Clickjacking?

The impact of these type attack depends on the website, the user's permissions, and the actions available on the affected pages.

Potential risks include:

Remember: Missing frame protection alone does not prove that these outcomes are possible. The actual risk must be evaluated against the affected pages and available actions.

How to Fix Clickjacking in ASP.NET Framework on IIS

For websites built with ASP.NET Framework and hosted on Microsoft IIS, frame protection can commonly be configured through the web.config file. Its very simple.

Best Practices for Preventing Clickjacking

In addition to configuring frame protection, website owners should follow these security practices.

Conclusion

Clickjacking (Missing Frame Protection) is a website security finding that indicates a lack of expected controls over how pages can be embedded in other websites.

By configuring appropriate HTTP response headers such as Content-Security-Policy with frame-ancestors and X-Frame-Options, website owners can reduce the risk of attackers tricking users into unintended interactions.

For ASP.NET Framework websites hosted on IIS, these headers can often be configured centrally through web.config. After making the change, always verify the response headers and test the website to ensure that the protection works as intended.

← Previous