Skip to main content

Clickjacking via IFRAME

Clickjacking is an attack that tricks a user into clicking a webpage element which is invisible or disguised as another element. This can cause users to unwittingly download malware, visit malicious web pages, provide credentials or sensitive information, transfer money, or purchase products online.

Typically, clickjacking is performed by displaying an invisible page or HTML element, inside an iframe, on top of the page the user sees. The user believes they are clicking the visible page but in fact they are clicking an invisible element in the additional page transposed on top of it.

Mitigation

There are two general ways to defend against clickjacking:

  • Client-side methods – the most common is called Frame Busting. Client-side methods can be effective in some cases, but are considered not to be a best practice, because they can be easily bypassed.
  • Server-side methods – the most common is X-Frame-Options. Server-side methods are recommended by security experts as an effective way to defend against clickjacking.

HTB

  • https://lillox.info/book-machine.html

References

  1. https://www.imperva.com/learn/application-security/clickjacking
  2. https://javascript.info/clickjacking
  3. https://book.hacktricks.xyz/pentesting-web/clickjacking