blob: 2e43568d8e334e8f6b977da946a78e728fb74959 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
---
layout: slides
title: Security
scripts: [ ./script.js ]
styles: [ ../reveal.js/theme/blood.css, ../reveal.js/zenburn.css, ./style.css ]
---
<div class="reveal">
<div class="slides">
<section>
<h1>XSS Injections</h1>
<div class="profile">
<img src="/assets/face.jpg" alt="Noah Loomans">
<div class="info">
<div class="name">Noah Loomans</div>
<div class="pgp-key">67B0 295A C271 345D 0706 4B9B 8B23 75F3 B367 DF6D</div>
</div>
</div>
</section>
<section>
<h2>Cross Site Scripting</h2>
</section>
<section>
<h2>Sample Code</h2>
<pre><code class="hljs" data-trim contenteditable>
<?php
$sql = "SELECT comment FROM comments";
$result = $conn->query($sql);
// output data of each row
while($row = $result->fetch_assoc()) {
echo $row["comment"] . "<br>";
}
?>
</code></pre>
</section>
<section>
<h2>What if I enter <code><b>hello</b></code>?</h2>
</section>
<section>
<pre><code class="hljs html" data-trim data-noescape contenteditable>
<p class="comments">
<span class="fragment">This sucks<br></span>
<span class="fragment">First!<br></span>
<span class="fragment"><mark><b>hello.</b><br></mark></span>
</p>̿
</code></pre>
</section>
<section data-background-image="https://keybase.io/images/blog/zcash/evil.png">
<h1><code><script></code></h1>
</section>
<section>
<h2>Sample Code</h2>
<pre><code class="hljs" data-trim data-noescape contenteditable>
<?php
$sql = "SELECT comment FROM comments";
$result = $conn->query($sql);
// output data of each row
while($row = $result->fetch_assoc()) {
echo <span class="fragment" data-fragment-index="2"><mark>htmlspecialchars(</mark></span>$row["comment"]<span class="fragment" data-fragment-index="2"><mark>);</mark></span> . "<br>";
}
?>
</code></pre>
<p class="fragment" data-fragment-index="1">
Source: <a href="https://www.w3schools.com/php/php_mysql_select.asp">w3schools</a>
</p>
</section>
<section>
<h1><code class="hljs"><</code> -> <code class="hljs">&lt;</code></h1>
</section>
<section>
https://hack-challange-nloomans.c9users.io/
</section>
</div>
</div>
|