diff --git a/4-frames-and-windows/06-clickjacking/article.md b/4-frames-and-windows/06-clickjacking/article.md index 17787261c5..bcffc3fd2b 100644 --- a/4-frames-and-windows/06-clickjacking/article.md +++ b/4-frames-and-windows/06-clickjacking/article.md @@ -4,22 +4,20 @@ The "clickjacking" attack allows an evil page to click on a "victim site" *on be Many sites were hacked this way, including Twitter, Facebook, Paypal and other sites. They are all fixed, of course. -[cut] - ## The idea The idea is very simple. Here's how clickjacking was done with Facebook: -1. A visitor is lured to the evil page. No matter how. -2. The page has a harmlessly-looking link on it (like "get rich now" or "click here, very funny" and so on). +1. A visitor is lured to the evil page. It doesn't matter how. +2. The page has a harmless-looking link on it (like "get rich now" or "click here, very funny"). 3. Over that link the evil page positions a transparent ` -Depending on the browser, `iframe` above is either empty or it has a message telling that "the browser can't show it". +Depending on your browser, the `iframe` above is either empty or alerting you that the browser won't permit that page to be navigating in this way. ## Showing with disabled functionality -The protecting `X-Frame-Options` header has a side-effect. Other sites can't show our page in an `iframe`, even if they have "legal" reasons to do so. +The `X-Frame-Options` header has a side-effect. Other sites won't be able to show our page in a frame, even if they have good reasons to do so. -So there are other solutions. For instance, we can "cover" the page with a `
` with `height:100%;width:100%`, so that it handles all clicks. That `
` should disappear if `window == top` or we figure out that we don't need protection. +So there are other solutions... For instance, we can "cover" the page with a `
` with `height: 100%; width: 100%;`, so that it intercepts all clicks. That `
` should disappear if `window == top` or if we figure out that we don't need the protection. -Like this: +Something like this: ```html