-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·424 lines (363 loc) · 16 KB
/
index.html
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="Content-Security-Policy" content="default-src *; script-src 'self' 'unsafe-inline'; object-src *; style-src 'self' data: 'unsafe-inline'; img-src *; media-src *; frame-src *; font-src *; connect-src *;">
<meta http-equiv="X-Content-Security-Policy" content="default-src *; script-src 'self' 'unsafe-inline'; object-src *; style-src 'self' data: 'unsafe-inline'; img-src *; media-src *; frame-src *; font-src *; connect-src *;">
<meta http-equiv="X-WebKit-CSP" content="default-src *; script-src 'self' 'unsafe-inline'; object-src *; style-src 'self' data: 'unsafe-inline'; img-src *; media-src *; frame-src *; font-src *; connect-src *;">
<title>How does 🙈 or 💩 affect our S�curity?</title>
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/black.css">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="lib/css/monokai.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
</head>
<body>
<div class="reveal">
<div class="slides">
<section data-background="public/unicode_bg.jpg" data-background-opacity=0.1 >
<h2>How does 🙈 or 💩 affect our S�curity?</h2>
<h4>A bughunter and offensive perspective on Ⓔⓝⓒⓞⓓⓘⓝⓖ ⓕⓤⓒⓚ ⓤⓟⓢ</h4>
<p>
<small>Created by <a target="_blank" rel="noopener noreferrer" href="http://drehsec.tk">Christopher Bleckmann-Dreher</a> / <a target="_blank" rel="noopener noreferrer" href="http://twitter.com/schniggie">@schniggie</a></small><br />
<small><a href="http://bsides.合.xyz">http://bsides.合.xyz</a></small>
</p>
</section>
<section data-background="public/agenda.png" data-background-size="1000px">
<h2>Agenda</h2>
<ol>
<li>WhoAmI</li>
<li>ASCII and ISO-8859</li>
<li>Unicode</li>
<li>Unicode encodings</li>
<li>Security implications 101</li>
<li>Real world examples</li>
<li>Summary + QA</li>
</ol>
</section>
<section data-background="public/me.gif">
<div id='boxedtext'>
<h2>WhoAmI</h2>
<ol>
<li>Offensive IT sec guy / Pentester</li>
<li>Bughunter (retired)</li>
<li>Author</li>
</ol>
<p>
<img data-src="public/visitenkarte_front.png" height=200px>
<img data-src="public/synack.png" height=200px>
<img data-src="public/publikationen.jpg" height=200px>
<img data-src="public/tatoo.jpg" height=200px>
</p>
</div>
</section>
<section data-background="public/zdnet.png">
</section>
<section data-background-iframe="https://wall2.sli.do/event/mx0xh8so" data-background-interactive>
</section>
<section>
<h3>ASCII</h3>
<img style="float:right; background:none; border:none; box-shadow:none;" data-src="public/ascii.png">
<ul style="display: block">
<li>American Standard Code for Information Interchange</li>
<li>Established in 1963</li>
<li>7-Bit character set</li>
<ul>
<li>Only 128 characters</li>
<li>0000000 – 1111111</li>
</ul>
<li>A: (65)₁₀ = (41)₁₆ = (1000001)₂</li>
<li>a: (97)₁₀ = (61)₁₆ = (1100001)₂</li>
</ul>
</section>
<section>
<h3>ISO-8859-?</h3>
<img style="float:right; background:none; border:none; box-shadow:none;" data-src="public/iso8859.png">
<ul style="display: block">
<li>ASCII compatible 👍</li>
<li>8-Bit character set</li>
<ul>
<li>256 characters</li>
<li>00000000 – 11111111</li>
</ul>
<li>8859-2: (Central Europe)</li>
</ul>
</section>
<section>
<h3>Unicode</h3>
<ul style="display: block">
<li>Since 1991</li>
<li>MultiByte character set</li>
<li>Fully ASCII and ISO-8859 compatible 👍</li>
<li>Different encodings (UTF-8, UTF-16, UTF-32, EBCDIC, …)</li>
</ul>
<img style="background:none; border:none; box-shadow:none;" data-src="public/unicode.png">
</section>
<section data-background="public/emoji.png">
<h3>Unicode</h3>
<ul style="display: block">
<li>U+0000 – U+10FFFF</li>
<br />
<li>U+0000 – U+007F: ASCII</li>
<li>U+0080 – U+00FF: ISO</li>
<br />
<li>U+0000 – U+FFFF (BMP: Basic Multilingual Plane) = 65536 characters</li>
<li>U+010000 – U+10FFFF (Astral Planes) = Over a million</li>
</ul>
<img style="background:none; border:none; box-shadow:none;" data-src="public/unicode_poo.png">
</section>
<section data-background="public/utf_overview.png" data-background-size="900px">
<h3>Unicode Encodings</h3><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</section>
<section>
<h5>Security Implications - Length of UTF8 String</h5>
<pre class="stretch"><code data-trim data-noescape>
size_t length = measure(str1) + measure(str2) + 1;
char *concat = malloc(sizeof(char) * length);
if(concat == NULL) { // error }
snprintf(concat, length, "%s%s", str1, str2);
int measure(char *string) {
// allocate enough memory to hold the wide string
size_t needed = mbstowcs(NULL, string, 0) + 1;
wchar_t *wcstring = malloc(needed * sizeof *wcstring);
if (!wcstring) return -1;
// change encodings
if (mbstowcs(wcstring, string, needed) == (size_t)-1) return -2;
// measure width
int width = wcswidth(wcstring, needed);
free(wcstring);
return width;
}
</code></pre>
<!--<p class="fragment">
<img data-src="public/buffer_overflow.gif" height=150px>
</p>!-->
</section>
<section data-transition="zoom">
<h4>Security Implications - JavaScript Compare</h4>
<img data-src="public/manana_1.png" width=800px>
</section>
<section data-background="public/minion_confused.png" data-background-size="650px" data-transition="zoom">
<h4>Security Implications - JavaScript Compare</h4>
<img data-src="public/manana_2.png" width=800px>
</section>
<section>
<h4>Security Implications - JavaScript Compare</h4>
<img data-src="public/manana_3.png" width=1000px>
</section>
<section data-transition="zoom">
<h4>Security Implications - JavaScript RegEx</h4>
<img data-src="public/regex_1.png" width=800px>
</section>
<section data-transition="zoom">
<h4>Security Implications - JavaScript RegEx</h4>
<img data-src="public/regex_2.png" width=800px>
</section>
<section>
<h4>Security Implications - JavaScript RegEx</h4>
<img data-src="public/regex_3.png" width=800px>
<ul>
<li>Test it yourself <a target="_blank" rel="noopener noreferrer" href="http://scriptular.com/">http://scriptular.com</a></li>
</ul>
</section>
<section>
<h4>Security Implications - MySQL vs. UTF-8</h4>
<img data-src="public/mysql_1.png" width=800px>
</section>
<section data-background="public/facepalm.gif">
<h4>Security Implications - MySQL vs. UTF-8</h4>
<img data-src="public/mysql_2.png" width=800px>
</section>
<section data-background="public/facepalm.gif">
<h4>Security Implications - MySQL vs. UTF-8</h4><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</section>
<section data-background="public/mysql_3.png" data-background-size="1000px">
<h4>Security Implications - MySQL vs. UTF-8</h4><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</section>
<section data-background="public/attack_cat.jpeg">
<h3>Abusing Unicode to attack a victim</h3>
</section>
<section data-transition="zoom">
<h4>Anything suspicious?</h4>
<img style="background:none; border:none; box-shadow:none;" data-src="public/phishing_1.png" width=1000px>
</section>
<section data-transition="zoom">
<h4>Anything suspicious?</h4>
<img style="background:none; border:none; box-shadow:none;" data-src="public/phishing_2.png" width=1000px>
</section>
<section data-background="public/poo_domain.png">
<h3>IDN Domains</h3>
<ul>
<li>Allowed since end of 2009</li>
<li>Stored as ASCII strings using Punycode transcription</li>
<li>No changes to the DNS system needed</li>
</ul>
<img style="background:none; border:none; box-shadow:none;" data-src="public/idn.png" width=1000px>
<p style="float:right;font-size: 20px;">Source: <a target="_blank" rel="noopener noreferrer" href="https://en.wikipedia.org/wiki/Internationalized_domain_name">https://en.wikipedia.org/wiki/Internationalized_domain_name</a></p>
</section>
<section>
<h3>IDN Domains</h3>
<img style="background:none; border:none; box-shadow:none;" data-src="public/punycode.png" width=1000px>
</section>
<section>
<h3>IDN Domains and Mailing</h3>
<img style="background:none; border:none; box-shadow:none;" data-src="public/sendmail.png" width=1000px>
</section>
<section>
<h4>IDN Domains – Real world attack scenario</h4>
<p style="float:center;font-size: 15px;">Source: <a target="_blank" rel="noopener noreferrer" href="https://www.heise.de/newsticker/meldung/Browser-noch-immer-fuer-Phishing-per-Unicode-Domain-anfaellig-3686474.html">https://www.heise.de/newsticker/meldung/Browser-noch-immer-fuer-Phishing-per-Unicode-Domain-anfaellig-3686474.html</a></p>
<img style="background:none; border:none; box-shadow:none;" data-src="public/idn_epic.png" width=800px>
</section>
<section>
<h4>IDN Domains – Find good ones</h4>
<img style="background:none; border:none; box-shadow:none;" data-src="public/typo_with_pause.gif">
</section>
<section>
<h4>IDN $$$</h4>
<img style="background:none; border:none; box-shadow:none;" data-src="public/idn_hackerone.png">
</section>
<section data-background="public/LeftRightWrong.png">
<h4>Left or right?</h4>
<img style="background:none; border:none; box-shadow:none;" data-src="public/rtol_1.png" width=700px>
</section>
<section>
<h4>Left or right?</h4>
<img style="background:none; border:none; box-shadow:none;" data-src="public/rtol_2.png" width=800px><br/>
Howto:<pre>ruby -e 'File.rename("backdoor_ppt.exe", "resume\xe2\x80\xaetpp.exe")'</pre>
</section>
<section>
<h3>RTLO Snapchat</h3>
<img style="background:none; border:none; box-shadow:none;" data-src="public/rtlo_4.jpg" width=500px><br/>
</section>
<section>
<h3>RTLO $250</h3>
<img style="background:none; border:none; box-shadow:none;" data-src="public/rtlo_3.png" width=1000px><br/>
</section>
<section>
<h3>RTLO Go Go Go and hunt ... (from 2017)</h3>
<img style="background:none; border:none; box-shadow:none;" data-src="public/rtlo_5.png"><br/>
</section>
<section>
<h3>2019 and still sth. to care about?</h3>
<img style="background:none; border:none; box-shadow:none;" data-src="public/rtlo_6.png"><br/>
</section>
<section>
<h3>Crashing every iOS and OS X device</h3>
<ul>
<li>In 2013 every iOS and OS X device was vulnerable to</li>
</ul>
<img style="background:none; border:none; box-shadow:none;" data-src="public/ios_1.png" width=1000px><br/>
<p style="float:right;font-size: 15px;">Source: <a target="_blank" rel="noopener noreferrer" href="https://arstechnica.com/apple/2013/08/rendering-bug-crashes-os-x-and-ios-apps-with-string-of-arabic-characters/">https://arstechnica.com/apple/2013/08/rendering-bug-crashes-os-x-and-ios-apps-with-string-of-arabic-characters</a></p>
<ul>
<li>For example Browser, Messages (SMS, iMessage, Whatsapp, …), Wireless Hotspots</li>
</ul>
</section>
<section>
<h3>Crashing every iOS and OS X device</h3>
<ul>
<li>Even Facebook implemented filter withtin Messenger</li>
</ul>
<img style="background:none; border:none; box-shadow:none;" data-src="public/ios_2.png" width=1000px><br/>
</section>
<section>
<h3>Frontend 💔 Backend</h3>
<img style="background:none; border:none; box-shadow:none;" data-src="public/me_1.png" width=1000px><br/>
</section>
<section>
<h3>Frontend 💔 Backend</h3>
<img style="background:none; border:none; box-shadow:none;" data-src="public/me_2.png" width=1000px><br/>
</section>
<section>
<h3>Spotify account hijacking</h3>
<img style="background:none; border:none; box-shadow:none;" data-src="public/spotify_1.png" width=700px><br/>
</section>
<section>
<h3>Spotify account hijacking</h3>
<img style="background:none; border:none; box-shadow:none;" data-src="public/spotify_2.png" width=900px><br/>
<pre>
1. User: ᴮᴵᴳᴮᴵᴿᴰ triggers forgot password
1. Forgot password:
>>> canonical_username(u'\u1d2e\u1d35\u1d33\u1d2e\u1d35\u1d3f\u1d30')
u'BIGBIRD'
2. Click on password reset Link in Mail:
>>> canonical_username(canonical_username(u'\u1d2e\u1d35\u1d33\u1d2e\u1d35\u1d3f\u1d30'))
u'bigbird'
</pre>
</section>
<section data-background="public/schranke.jpg">
<h3>Phabricator Bypass</h3>
<img style="background:none; border:none; box-shadow:none;" data-src="public/phabricator_1.png" width=900px><br/>
</section>
<section data-background="public/schranke.jpg">
<h3>Phabricator Bypass</h3>
<img style="background:none; border:none; box-shadow:none;" data-src="public/phabricator_2.png" width=900px><br/>
</section>
<section data-background="public/schranke.jpg">
<h3>Phabricator Bypass</h3>
<img style="background:none; border:none; box-shadow:none;" data-src="public/phabricator_3.png" width=900px><br/>
</section>
<section>
<h3>PILE OF POO</h3>
<img style="background:none; border:none; box-shadow:none;" data-src="public/poo_nullbyte.png" width=900px><br/>
</section>
<section data-background="public/minion_qa.png" data-background-size="600px">
<h3>Summary</h3>
<p style="font-size: 40px;">
For developer:
<ul style="font-size: 30px;">
<li>Verify that methods, functions, frameworks can handle Unicode</li>
<li>Input validation should also handle Unicode characters</li>
<li>Verify that all system and interconnection can handle Unicode</li>
</ul><br />
For Hunters:<br />
<ul style="font-size: 30px;">
<li>Go and inject 💩</li>
<li>Automate it / Implement it in tools</li>
</ul>
</p>
</section>
<section data-background="public/thanks.gif">
<div id='boxedtext'>
<h2>Acknowledgment</h2>
<ul>
<li>Mathias Bynens @mathias</li>
<li>@FakeUnicode</li>
</ul><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
</div>
</section>
<section data-background="public/minion_follower.gif">
<h2>Thanks for your time :)</h2>
<p class="fragment">
<img data-src="public/visitenkarte_front.png" height=300px>
<img data-src="public/visitenkarte_back.png" height=300px>
</p>
</section>
<section data-background-iframe="https://wall2.sli.do/event/mx0xh8so" data-background-interactive>
</section>
</div>
</div>
<script src="js/reveal.js"></script>
<script>
// More info about config & dependencies:
// - https://github.com/hakimel/reveal.js#configuration
// - https://github.com/hakimel/reveal.js#dependencies
Reveal.initialize({
dependencies: [
{ src: 'plugin/markdown/marked.js' },
{ src: 'plugin/markdown/markdown.js' },
{ src: 'plugin/notes/notes.js', async: true },
{ src: 'plugin/highlight/highlight.js', async: true },
]
});
</script>
</body>
</html>