diff --git a/3-frames-and-windows/06-clickjacking/article.md b/3-frames-and-windows/06-clickjacking/article.md index 9752835e5..ccee1917c 100644 --- a/3-frames-and-windows/06-clickjacking/article.md +++ b/3-frames-and-windows/06-clickjacking/article.md @@ -1,79 +1,79 @@ -# The clickjacking attack +# Clickjacking saldırısı -The "clickjacking" attack allows an evil page to click on a "victim site" *on behalf of the visitor*. +Clickjacking saldırısı kötücül bir sayfanın *kullanıcı adına* hedef sitede tıklamalar yapmasına olanak sağlar. -Many sites were hacked this way, including Twitter, Facebook, Paypal and other sites. They have all been fixed, of course. +Sonradan düzeltilmiş olsa da Twitter, Facebook ve PayPal'ın da bulunduğu birçok site, zamanında bu saldırı ile ele geçirilmiştir. -## The idea +## Mantık -The idea is very simple. +Saldırının arkasındaki mantık oldukça basittir. -Here's how clickjacking was done with Facebook: +Örneğin Facebook ile yapılan bir clickjacking saldırısı böyle işler: -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 ` - + */!* -
...And you're cool (I'm a cool hacker actually)!
+
Ve artık zenginsin (ve ayrıca beni Facebook'ta beğenmeni sağladım)!
``` -The full demo of the attack: +Saldırının tam bir örneği: [codetabs src="clickjacking-visible" height=160] -Here we have a half-transparent ` ``` -There are other ways to work around that simple protection too. +Bu basit korumanın arkasından dolaşacak tabii ki daha fazla yöntem var. ## X-Frame-Options -The server-side header `X-Frame-Options` can permit or forbid displaying the page inside a frame. +Sunucu-taraflı `X-Frame-Options` başlığı bir sayfanın iframe içinde gösterilmesine izin verebilir veya reddedebilir. -It must be sent *by the server*: the browser will ignore it if found in a `` tag. So, `` won't do anything. +Başlığın *sunucu tarafından* gönderilmesi şarttır, tarayıcı bu başlığı `` etiketinde görürse yok sayar. Yani `` etkisizdir. -The header may have 3 values: +Başlık üç değerden birini taşıyabilir: `DENY` -: Never ever show the page inside a frame. +: Sayfayı asla iframe içinde gösterme. `SAMEORIGIN` -: Allow inside a frame if the parent document comes from the same origin. +: Sayfanın iframe içinde gösterilmesine ancak ana dosya aynı kaynaktansa izin ver.A `ALLOW-FROM domain` -: Allow inside a frame if the parent document is from the given domain. +: Sayfanın iframe içinde gösterilmesine ancak ana dosya belirtilen alan adından geliyorsa izin ver. -For instance, Twitter uses `X-Frame-Options: SAMEORIGIN`. +Örneğin, Twitter'da `X-Frame-Options: SAMEORIGIN` kullanılıyor. ````online -Here's the result: +Sonuç: ```html @@ -149,16 +149,16 @@ Here's the result: -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. +Tarayıcınıza göre yukarıdaki `iframe` ya boştur ya da tarayıcının bu sayfa hareketine izin vermediği konusunda sizi uyaracaktır. ```` -## Showing with disabled functionality +## İşlevsiz olarak göstermek -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. +`X-Frame-Options` başlığının bir de kötü yanı var: Diğer siteler, iyi bir nedenleri olsa bile, bu başlığı taşıyan siteyi bir iframe içinde gösteremeyecek. -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. +Yine de, başka çözümler var... Örneğin, bir `
` oluşturup `height: 100%; width: 100%;` değerlerini kullanarak sayfayı "kaplayabiliriz", böylece bu `
` gelen tüm tıklamaları engeller, eğer bu korumaya ihtiyaç duymazsak veya `window == top` olursa da yok olur. -Something like this: +Bunun gibi: ```html ``` -The demo: +Örnek: [codetabs src="protector"] -## Samesite cookie attribute +## Samesite çerez niteliği -The `samesite` cookie attribute can also prevent clickjacking attacks. The purpose of the attribute is to prevent cookies from being sent to a website when the user doesn't intend to visit the website. It is designed to prevent cross-site request forgery attacks, but also helps with clickjacking because a hijacked click usually results in an unintended request to a different site. When a cookie has the `samesite` attribute, whether the value is `strict` or `lax`, cookies are not sent to a website when it is loaded inside an iframe. +`samesite` çerez niteliği clickjacking saldırılarını engelleyebilen niteliklerden biridir. Bu niteliğin amacı kullanıcı site dışındaki başka bir siteye gitmek istemediğinde o siteye çerezleri göndermemektir. Çapraz site sahteciliği saldırılarına karşı tasarlanmış olmasına rağmen clickjacking'e karşı doğal bir koruma sağlar, çünkü genellikle bir clickjacking saldırısı başka bir siteye bir istek gönderilmesine neden olur. Bir çerez samesite niteliğine sahip iken, değerinin `strict` veya `lax` olmasına bakılmaksızın iframe içinde açılan bir sayfayla paylaşılmaz. -The `samesite` attribute can be set using HTTP response headers or JavaScript. Via HTTP, it looks like: +`samesite` niteliği HTTP cevap başlıklarıyla veya JavaScript ile tanımlanabilir. HTTP kullanırken böyle gözükür: `Set-Cookie: demoCookie=demoValue; samesite=lax` -or +veya `Set-Cookie: demoCookie=demoValue; samesite=strict` -In JavaScript, it is: +JavaScript için: ```html document.cookie = "demoCookie=demoValue; SameSite=Lax"; document.cookie = "demoCookie=demoValue; SameSite=Strict"; ``` -When the value is `lax`, these types of requests are blocked: -- Form POST submit (<form method="POST" action="...">) +Değer `lax` iken bu türden istekler engellenir: +- Form POST gönderimi (<form method="POST" action="...">) - iframe (<iframe src="..."></iframe>) - AJAX ($.get("...")) -- Image (<img src="...">) -- Script (<script src="..."></script>) +- Görüntü (<img src="...">) +- Betik (<script src="..."></script>) - Stylesheet (<link rel="stylesheet" type="text/css" href="...">) -When the value is `strict`, these types of requests are also blocked, in addition to those under `lax`: -- Clicking a link (<a href="..."></a>) -- Prerender (<link rel="prerender" href=".."/>) -- Form GET submit (<form method="GET" action="...">) +Değer `strict` iken `lax` değerine ek olarak bunlar engellenir: +- Link tıklamaları (<a href="..."></a>) +- Önbetimleme (<link rel="prerender" href=".."/>) +- Form GET gönderimi (<form method="GET" action="...">) -In this case, we are concerned with iframe requests. A clickjacking attempt would fail because the user is not considered logged into, for example, Facebook, so they can't "Like" anything through the iframe. +Bu senaryoda iframe istekleri ilgimizi çeken yer. Clickjacking saldırısı durumnda, nitelikten dolayı kullanıcı örneğin Facebook'ta giriş yapmamış sayılacağından herhangi bir şeyi beğenemez, bu yüzden saldırı sonuçsuz kalır. -The `samesite` attribute will not have an effect when cookies are not used. This may allow websites to easily show public, unauthenticated pages in iframes on unaffiliated websites. However, this may also allow clickjacking attacks to work in a few limited cases. An anonymous polling website that prevents duplicate voting by checking IP addresses, for example, would still be vulnerable to clickjacking because it does not authenticate users using cookies. +`samesite` niteliği çerezlerin kullanılmadığı alanlarda işlevsiz kalır. Bu zaaf sitelerin iframe içinde çereze ihtiyaç duymayan halka açık sitelerin görüntülenebilmesine olanak verir. Örneğin sadece birden fazla oy verilmesin diye IP adreslerini kaydeden anonim bir oylama sitesi saldırıya açık kalacaktır. -## Summary +## Özet -Clickjacking is a way to "trick" users into clicking on a malicious site without even knowing what's happening. That's dangerous if there are important click-activated actions. +Clickjacking kullanıcıları kötücül bir siteye ne olduğunu bile anlamadan tıklamaya "sevk eden" bir yöntemdir. Özellikle önemli butonların bulunduğu sitelerde (örneğin PayPal) tehlikelidir. -A hacker can post a link to their evil page in a message, or lure visitors to their page by some other means. There are many variations. +Saldırgan kötücül sayfaya bir bağlantı paylaşabilir veya kullanıcıları bu sayfaya çekebilir. -From one perspective -- the attack is "not deep": all a hacker is doing is intercepting a single click. But from another perspective, if the hacker knows that after the click another control will appear, then they may use cunning messages to coerce the user into clicking on them as well. +Bir açıdan saldırı "sığ" olarak sınıflandırılabilir: sonuçta saldırgan sadece tek bir tıklamatı ele geçiriyor. Ancak, başka bir açıdan, eğer saldırgan başka tıklamaların gerekeceğini biliyorsa aynı yöntemle kullanıcının oralara tıklamasını sağlayabilir. -The attack is quite dangerous, because when we engineer the UI we usually don't anticipate that a hacker may click on behalf of the visitor. So vulnerabilities can be found in totally unexpected places. +Bu saldırı olukça tehilkelidir, çünkü genellikle bir arayüzü tasarlarken saldırganın kullanıcı yerine tıklamasını heasba katmayız. Yani açıklar beklemediğimiz yerlerden gelebilir. -- It is recommended to use `X-Frame-Options: SAMEORIGIN` on pages (or whole websites) which are not intended to be viewed inside frames. -- Use a covering `
` if we want to allow our pages to be shown in iframes, but still stay safe. +- `X-Frame-Options: SAMEORIGIN` niteiğinin sayfalarda (veya sitelerde) kullanılması önerilir (eğer site iframe içinde görüntülenmek amacı taşımıyorsa) + +- Sayfanın iframe içinde görüntülenebilir olmasını istiyorsak kaplayıcı bir `div` kullanabiliriz, ama önlemlerin alınması gereklidir. diff --git a/3-frames-and-windows/06-clickjacking/clickjacking-visible.view/facebook.html b/3-frames-and-windows/06-clickjacking/clickjacking-visible.view/facebook.html index 6b8231c71..364e957d1 100644 --- a/3-frames-and-windows/06-clickjacking/clickjacking-visible.view/facebook.html +++ b/3-frames-and-windows/06-clickjacking/clickjacking-visible.view/facebook.html @@ -3,7 +3,7 @@ - + diff --git a/3-frames-and-windows/06-clickjacking/clickjacking-visible.view/index.html b/3-frames-and-windows/06-clickjacking/clickjacking-visible.view/index.html index 9f8d82197..a1e3dd665 100644 --- a/3-frames-and-windows/06-clickjacking/clickjacking-visible.view/index.html +++ b/3-frames-and-windows/06-clickjacking/clickjacking-visible.view/index.html @@ -19,14 +19,14 @@ } -
Click to get rich now:
+
Zengin olmak için tıkla:
- + -
...And you're cool (I'm a cool hacker actually)!
+
...Ve zengin oldun (ve sayfamı beğendin)!
diff --git a/3-frames-and-windows/06-clickjacking/clickjacking.view/facebook.html b/3-frames-and-windows/06-clickjacking/clickjacking.view/facebook.html index 6b8231c71..8a7fa7a05 100644 --- a/3-frames-and-windows/06-clickjacking/clickjacking.view/facebook.html +++ b/3-frames-and-windows/06-clickjacking/clickjacking.view/facebook.html @@ -3,7 +3,7 @@ - + diff --git a/3-frames-and-windows/06-clickjacking/clickjacking.view/index.html b/3-frames-and-windows/06-clickjacking/clickjacking.view/index.html index 05ec48cb8..4b1084550 100644 --- a/3-frames-and-windows/06-clickjacking/clickjacking.view/index.html +++ b/3-frames-and-windows/06-clickjacking/clickjacking.view/index.html @@ -19,14 +19,14 @@ } -
Click to get rich now:
+
Zengin olmak için tıkla:
- + - + -
...And you're cool (I'm a cool hacker actually)!
+
...Ve zengin oldun (ve sayfamı beğendin)!
diff --git a/3-frames-and-windows/06-clickjacking/protector.view/iframe.html b/3-frames-and-windows/06-clickjacking/protector.view/iframe.html index a1ca6fcc9..7921a99c6 100644 --- a/3-frames-and-windows/06-clickjacking/protector.view/iframe.html +++ b/3-frames-and-windows/06-clickjacking/protector.view/iframe.html @@ -20,7 +20,7 @@ - This text is always visible. + Bu yazı her zaman görünüt halde. - But if the page was open inside a document from another domain, the div over it would prevent any actions. - - + Ancak eğer sayfa başka bir alan adındaki bir dosyadan gelseydi üzerindeki div herhangi bir aksiyonu engellerdi. + diff --git a/3-frames-and-windows/06-clickjacking/top-location.view/iframe.html b/3-frames-and-windows/06-clickjacking/top-location.view/iframe.html index da477f400..a83092720 100644 --- a/3-frames-and-windows/06-clickjacking/top-location.view/iframe.html +++ b/3-frames-and-windows/06-clickjacking/top-location.view/iframe.html @@ -7,7 +7,7 @@ -
Changes top.location to javascript.info
+
top.location'ı javascript.info'ya çevirir