In Seguridad Última actualizaciónated:
Comparte en:
Cloudways ofrece alojamiento en la nube administrado para empresas de cualquier tamaño para alojar un sitio web o aplicaciones web complejas.

Es difícil resistirse a hacer clic en un enlace de oferta de iPhone gratuito. Pero tenga cuidado: su clic puede ser secuestrado fácilmente y los resultados pueden ser desastrosos.

¿Qué es Clickjacking?

El secuestro de clics es un método de ataque, también conocido como corrección de la interfaz de usuario, porque se configura al disfrazar (o corregir) un enlace con una superposición que engaña al usuario para que haga algo diferente de lo que cree.

Most users of social networks enjoy the convenience of staying logged to them at all times. Attackers could easily take advantage of this habit to force users to like or follow something without noticing. To do this, a cybercriminal could put a tempting button –for example, with an appealing text, such as “Free iPhone – limited time offer”– on its own webpage and overlay an invisible frame with the social network’s page in it, in such a way that a “Like” or “Share” button lays over the Free iPhone button.

Este simple truco de clickjacking puede obligar a los usuarios de Facebook a dar me gusta a grupos o páginas de fans sin saberlo.

The described scenario is fairly innocent in the sense that the only consequence for the victim is to be added to a social network group. But with some extra effort, the same technique could be used to determine if a user is logged into their banking account, and instead of liking or sharing some social media item, he or she could be forced to click on a button that transfers funds to an attacker’s account, for example. The worst part is that the malicious action cannot be traced because the user was legitimately logged into their bank account, and they voluntarily clicked on the transfer button.

Porque la mayoría de las técnicas de clickjacking requieren ingeniería social, las redes sociales se convierten en vectores de ataque ideales.

Veamos cómo se utilizan.

Clickjacking en Twitter

Hace unos diez años, la red social Twitter sufrió un ataque masivo que difundió rápidamente un mensaje, lo que llevó a los usuarios a hacer clic en un enlace, aprovechando su curiosidad natural.

Tweets with the text “Don’t click,” followed by a link, propagated rapidly across thousands of Twitter accounts. When users clicked on the link and then on a seemingly innocent button on the target page, a tweet was sent from their accounts. That tweet included the text “Don’t click,” followed by the malicious link.

Twitter engineers patched the clickjacking attack not long after it started. The attack itself proved to be harmless, and it worked as an alarm telling the potential risks involved in Twitter clickjacking initiatives. The malicious link took the user to a web page with a hidden iframe. Inside the frame was an invisible button that sent the malicious tweet from the victim’s account.

Clickjacking en Facebook

Los usuarios de la aplicación móvil de Facebook están expuestos a un error que permite a los spammers publicar contenido en el que se puede hacer clic en sus líneas de tiempo, sin su consentimiento. El error fue descubierto por un profesional de seguridad que estaba analizando una campaña de spam. El experto observó que muchos de sus contactos publicaban un enlace a una página con imágenes divertidas. Antes de llegar a las imágenes, se pidió a los usuarios que hicieran clic en una declaración de mayoría de edad.

Lo que no sabían era que la declaración estaba bajo un marco invisible.

When users accepted the declaration, they were taken to a page with funny pictures. But in the meantime, the link was published in the users’ Facebook timeline. That was possible because the web browser component in the Facebook app for Android isn’t compatible with the frame options headers (below we explain what they are), and therefore allows for malicious frame overlaying.

Facebook doesn’t recognize the issue as a bug because it has no impact on users’ accounts integrity. So it’s uncertain if it is ever going to be fixed.

Clickjacking en redes sociales menores

It is not just Twitter and Facebook. Other less popular social networks and blogging platforms also have vulnerabilities that allow for clickjacking. LinkedIn, for example, had a flaw that opened a door for attackers to trick users into sharing and posting links on their behalf but without their consent. Before it got fixed, the flaw allowed attackers to load the LinkedIn ShareArticle page on a hidden frame, and overlay this frame on pages with seemingly innocent and appealing links or buttons.

Another case is Tumblr, the public web blogging platform. This site uses JavaScript code to prevent clickjacking. But this protection method becomes ineffective since the pages can be isolated in an HTML5 frame that prevents them from running JavaScript code. A carefully crafted technique could be used to steal passwords, combining the mentioned flaw with a password helper browser plugin: by tricking users to type in a false captcha text, they can be inadvertently sending their passwords to the attacker’s site.

Falsificación de solicitudes entre sitios

Una variante del ataque de clickjacking se llama falsificación de solicitud entre sitios, o CSRF para abreviar. Con la ayuda de la ingeniería social, los ciberdelincuentes dirigen los ataques CSRF contra los usuarios finales, obligándolos a ejecutar acciones no deseadas. El vector de ataque puede ser un enlace enviado por correo electrónico o chat.

CSRF attacks do not intend to steal the user’s data because the attacker can’t see the response to the phony request. Instead, the attacks target state-changing requests, like a password change or a funds transfer. If the victim has Privilegios administrativos, el ataque tiene el potencial de comprometer una aplicación web completa.

A CSRF attack can be stored on vulnerable websites, particularly websites with so-called “stored CSRF flaws.” This can be accomplished by entering IMG or IFRAME tags in input fields that are later shown on a page, such as comments or a search results page.

Ejemplo de clickjacking de la vida real

Back in 2016, Andres Ferrate (Google Ads traffic quality officer) clarified in a blog post that some publishers were hiding Ads (iFrames) over typical clickable content.

Entonces, cuando un usuario normal intenta hacer clic en un elemento deseado, en su lugar, se hace clic en los anuncios superpuestos. En el segundo GIF, puede ver el movimiento del mouse de seguimiento del bloque de anuncios invisible. Esto carga los anuncios, independientemente de dónde haga clic un visitante en la página web maliciosa.

Para los nuevos, son los clics en los anuncios los que generan dinero real para cualquier sitio web, mucho más que lo que hacen con las meras impresiones.

While this particular instance of clickjacking was annoying to the visitors, Advertisers were losing money for nothing. Finally, Google terminated the Adsense accounts of such publishers to ensure their ad network stays productive para cada parte interesada.

PrevEntrando ataques de encuadre

Moderno browsers can be told if a particular resource is allowed or not to load within a frame. They also can opt to load a resource in a frame only when the request originates from the same site the user is at. This way, users cannot be tricked to click on invisible frames with content from other sites, and their clicks don’t get hijacked.

Las técnicas de mitigación del lado del cliente se denominan fractura de marcos o eliminación de marcos. Aunque pueden ser eficaces en algunos casos, también se pueden omitir fácilmente. Es por eso que los métodos del lado del cliente no se consideran mejores prácticas. En lugar de romper marcos, los expertos en seguridad recomiendan métodos del lado del servidor como X-Frame-Options (XFO) o más recientes, como Content Security Policy.

Opciones de marco X is a response header that web servers include on web pages to indicate si ab o norowser is allowed to show its contents inside a frame.

El encabezado X-Frame-Option permite tres valores.

  • DENY, que prohíbe mostrar la página dentro de un marco
  • SAMEORIGIN, que permite mostrar la página dentro de un marco, siempre que permanezca en el mismo dominio
  • PERMITIR-DESDE URI, que permite la visualización de la página dentro de un marco, pero solo en un URI específico (Identificador uniforme de recursos), por ejemplo, solo dentro de una página web específica en particular.

More recent anti-clickjacking methods include Content Security Policy (CSP) with the frame-ancestors directive. This option is being widely used in the replacement of XFO. One major benefit of CSP in comparison to XFO is that it allows a web server to authorize multiple domains to frame its content. However, it is not yet supported by all browsres.

Antepasados ​​de marcos de CSP La directiva admite tres tipos de valores: 'ninguna,' parte superiorrevimpedir que cualquier dominio muestre el contenido; "self, ' para permitir que solo el sitio actual muestre el contenido en un marco, o una lista de URL con comodines, como '* .some site.com,'https://www.example.com/index.html, 'etc., para permitir solo enmarcar en cualquier página que coincida con un elemento de la lista.

Cómo proteger suself against clickjacking

It is convenient to stay logged to a social network while browsing around, but if you do so, you need to be cautious with your clicks. You should also pay attention to the sites you visit because not all of them take the necessary measures to prevent clickjacking. En caso de que no esté seguro del sitio web que está visitando, no debe hacer clic en ningún clic sospechoso, por muy tentador que pueda resultar.

Another thing to pay attention to is your browser version. Even if a site uses all the clickjacking prevention headers we mentioned before, not all browsers support all of them, so be sure to use the latest version you can get and that it supports anti-clickjacking features.

Common sense is an effective self-protection device against clickjacking. When you see unusual content, including a link posted by a friend on any social network, before doing anything, you should ask yourself if that is the type of content your friend would publish. If not, you should warn your friend that he or she could have become a victim of clickjacking.

One last piece of advice: if you are an influencer, or you just have a really big number of followers or friends on any social network, you should double your precautions and practice a responsible behavior online. Because if you become a clickjacking victim, the attack will end up affecting a whole lot of people.

Comparte en:
  • Equipo Editorial
    Autor
    Un equipo de expertos en Geekflare es pasiónately dedicadoatededicado a compartir contenido procesable, ofrecer conocimientos y brindar asesoramiento personalizado para ayudar a las personas y las empresas a prosperar en un mundo digital.

Gracias a nuestros patrocinadores

Más lecturas interesantes sobre seguridad

Impulse su negocio

Algunas de las herramientas y servicios para ayudar a su negocio grow.
  • La herramienta de conversión de texto a voz que utiliza IA para generarate Voces realistas parecidas a las humanas.

    Prueba la IA de Murf
  • Web scraping, proxy residencial, administrador de proxy, desbloqueador web, rastreador de motores de búsqueda y todo lo que necesita para recopilar datos web.

    Prueba Brightdata
  • Monday.com es un sistema operativo de trabajo todo en uno para ayudarlo a administrar proyectos, tareas, trabajo, ventas, CRM, operaciones, workflows, y más.

    Intente Monday
  • Intruder es un escáner de vulnerabilidades en línea que encuentra debilidades de ciberseguridad en su infraestructura, para evitar costosas filtraciones de datos.

    Intente Intruder