Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The clickjacking attack#374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 76 additions & 76 deletions3-frames-and-windows/06-clickjacking/article.md
View file
Open in desktop

Large diffs are not rendered by default.

View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@

<body style="margin:10px;padding:10px">

<input type="button" onclick="alert('Like pressed onfacebook.html!')" value="I LIKE IT !">
<input type="button" onclick="alert('¡ME GUSTA fue presionado enfacebook.html!')" value="ME GUSTA !">

</body>

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,14 +19,14 @@
}
</style>

<div>Click to get rich now:</div>
<div>Haga clic para hacerse rico ahora:</div>

<!-- The url from the victim site -->
<iframe src="facebook.html"></iframe>

<button>Click here!</button>
<button>¡Haga clic aquí!</button>

<div>...And you're cool (I'm a cool hacker actually)!</div>
<div>...Y eres genial (en realidad soy un pirata informático genial)!</div>

</body>
</html>
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@

<body style="margin:10px;padding:10px">

<input type="button" onclick="alert('Like pressed onfacebook.html!')" value="I LIKE IT !">
<input type="button" onclick="alert('¡ME GUSTA fue presionado enfacebook.html!')" value="ME GUSTA !">

</body>

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,14 +19,14 @@
}
</style>

<div>Click to get rich now:</div>
<div>Haga clic para hacerse rico ahora:</div>

<!-- The url from the victim site -->
<iframe src="facebook.html"></iframe>

<button>Click here!</button>
<button>¡Haga clic aquí!</button>

<div>...And you're cool (I'm a cool hacker actually)!</div>
<div>...Y eres genial (en realidad soy un pirata informático genial)!</div>

</body>
</html>
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@
<body>

<div id="protector">
<a href="/" target="_blank">Go to the site</a>
<a href="/" target="_blank">Ir al sitio</a>
</div>

<script>
Expand All@@ -31,11 +31,11 @@

</script>

This text is always visible.
Este texto siempre está visible.

But if the page was open inside a document from another domain, the divover it would prevent any actions.
Pero si la página estuviera abierta dentro de un documento de otro dominio, el divsobre ella evitaría cualquier acción.

<button onclick="alert(1)">Click wouldn't work in that case</button>
<button onclick="alert(1)">El clic no funcionaría en ese caso</button>

</body>
</html>
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@

<body>

<div>Changes top.locationto javascript.info</div>
<div>Cambia top.locationa javascript.info</div>

<script>
top.location = 'https://javascript.info';
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,7 @@

window.onbeforeunload = function() {
window.onbeforeunload = null;
return "Want to leave without learning all the secrets (he-he)?";
return "¿Quieres irte sin conocer todos los secretos (je-je)?";
};

document.body.insertAdjacentHTML('beforeend', '<iframe src="iframe.html">');
Expand All@@ -31,11 +31,11 @@

<body>

<p>After a click on the button the visitor gets a "strange" question about whether they want to leave.</p>
<p>Después de hacer clic en el botón, el visitante recibe una pregunta "extraña" sobre si quiere irse.</p>

<p>Probably they would respond"No",and the iframe protection is hacked.</p>
<p>Probablemente responderían"No",y la protección de iframe está pirateada.</p>

<button onclick="attack()">Add a "protected" iframe</button>
<button onclick="attack()">Agregar un iframe "protegido"</button>

</body>
</html>

[8]ページ先頭

©2009-2025 Movatter.jp