-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpragyan_supersecurevault.html
484 lines (443 loc) · 52 KB
/
pragyan_supersecurevault.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
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="author" content="F3real" />
<meta name="keywords" content="ctf,reversing" />
<meta name="description" content="How to solve Pragyan CTF 2019 Super Secure Vault reversing challenge" />
<title>Pragyan CTF 2019 Super Secure Vault - EnSec blog</title>
<link href="https://f3real.github.io/theme/css/combined.css" rel="stylesheet" />
<!-- Feeds -->
</head>
<body data-spy="scroll" data-target="#scrollspy">
<div id="wrapper">
<!-- Sidebar -->
<nav id="sidebar-wrapper-small" class="twitchy-background">
<ul id="accordion-small" class="sidebar-nav sidebar-nav-small">
<li>
<a href="https://f3real.github.io" title="EnSec blog" class="collapsed">
<span class="fas fa-home"></span>
</a>
</li>
<li class="nav-divider"></li>
<li>
<a href="https://f3real.github.io/archives.html" title="Recent Articles" class="collapsed">
<span class="fas fa-th-list"></span>
</a>
</li>
<li class="nav-divider"></li>
<li>
<a data-toggle="collapse" data-parent="#accordion-small" href="#collapse-social-small" title="Social" class="collapsed">
<i class="fas fa-users padding-small"></i>
</a>
</li>
<li class="panel anti-panel"><ul id="collapse-social-small" class="collapse ">
<li>
<a href="https://github.com/F3real" title="Github"><i class="fab fa-github-square padding-small"></i></a>
</li>
<li>
<a href="https://www.linkedin.com/in/stefan-ili%C4%87-61a004111" title="Linkedin"><i class="fab fa-linkedin padding-small"></i></a>
</li>
</ul></li>
<li class="nav-divider"></li>
<li>
<a href="#" title="Back to top" class="collapsed">
<span class="fas fa-arrow-up"></span>
</a>
</li>
</ul>
</nav>
<nav id="sidebar-wrapper" class="twitchy-background">
<ul id="accordion" class="sidebar-nav">
<li class="sidebar-brand">
<a href="https://f3real.github.io/">
<span class="fas fa-home padding-small"></span>
EnSec blog
</a>
</li>
<li>
<a href="https://f3real.github.io/archives.html">
<span class="fas fa-th-list padding-small"></span>
Archives
</a>
</li>
<li class="nav-divider"></li>
<li>
<a data-toggle="collapse" data-parent="#accordion" href="#collapse-social">
<i class="fas fa-users padding-small"></i>
Contact
</a>
</li>
<li class="panel anti-panel"><ul id="collapse-social" class="sidebar_submenu collapse ">
<li>
<a href="https://github.com/F3real" title="Github">
<i class="fab fa-github-square padding-small"></i>
Github
</a>
</li>
<li>
<a href="https://www.linkedin.com/in/stefan-ili%C4%87-61a004111" title="Linkedin">
<i class="fab fa-linkedin padding-small"></i>
Linkedin
</a>
</li>
</ul></li>
<li class="nav-divider"></li>
<li class="panel anti-panel"><ul id="collapse-pages" class="sidebar_submenu collapse ">
</ul></li>
<li class="nav-divider"></li>
<li>
<a data-toggle="collapse" data-parent="#accordion" href="#collapse-categories">
<i class="fas fa-folder-open padding-small"></i>
Categories
</a>
</li>
<li class="panel anti-panel"><ul id="collapse-categories" class="sidebar_submenu collapse ">
<li class="active">
<a href="https://f3real.github.io/category/ctf.html">
<i class="fas fa-folder-open padding-small"></i>
ctf
<span class="badge badge-secondary float-right categorybadge">28</span>
</a>
</li>
<li >
<a href="https://f3real.github.io/category/misc.html">
<i class="fas fa-folder-open padding-small"></i>
misc
<span class="badge badge-secondary float-right categorybadge">15</span>
</a>
</li>
<li >
<a href="https://f3real.github.io/category/reversing.html">
<i class="fas fa-folder-open padding-small"></i>
reversing
<span class="badge badge-secondary float-right categorybadge">6</span>
</a>
</li>
<li >
<a href="https://f3real.github.io/category/tutorial.html">
<i class="fas fa-folder-open padding-small"></i>
tutorial
<span class="badge badge-secondary float-right categorybadge">5</span>
</a>
</li>
</ul></li>
</ul>
</nav>
<!-- /#sidebar-wrapper -->
<!-- open/close sidebar -->
<button onclick="toggleMenu();return false;" class="btn btn-primary" id="menu-toggle">
<span id="right-arrow" class="fas fa-chevron-right" title="expand sidebar"></span>
<span id="left-arrow" class="fas fa-chevron-left" title="minimize sidebar"></span>
</button>
<!-- /open/close sidebar -->
<!-- Page Content -->
<div id="page-content-wrapper">
<div class="container-fluid">
<section id="content">
<article>
<div class="row">
<div class="col-lg-10">
<header class="page-header">
<h1>
<a href="https://f3real.github.io/pragyan_supersecurevault.html"
rel="bookmark"
title="Permalink to Pragyan CTF 2019 Super Secure Vault">
Pragyan CTF 2019 Super Secure Vault
</a>
<small>
<div class="post-info">
<div class="publish-info-block">
<small>
<span class="published">
<i class="fa fa-calendar padding-small"></i><time datetime="2019-03-12T10:01:00+01:00"> Tue 12 March 2019</time>
</span>
<span class="category">
<i class="fa fa-folder-open padding-small"></i><a href="https://f3real.github.io/category/ctf.html">ctf</a>
</span>
<span class="tags">
<i class="fa fa-tags padding-small"></i>
<a href="https://f3real.github.io/tag/ctf.html">ctf</a> / <a href="https://f3real.github.io/tag/reversing.html">reversing</a> </span>
</small>
</div>
</div><!-- /.post-info --> </small>
</h1>
</header>
</div>
</div>
<div class="row">
<div class="col-lg-10">
<div class="entry-content">
<p>Super secure vault was one harder challenges from Pragyan CTF and also one bringing most points. <a href="https://github.com/F3real/ctf_solutions/tree/master/2019/pragyan/SuperSecureVault">Here</a> you can find full solution and binary if you want to follow along.</p>
<p>We need to reverse the program, find correct input and get the flag.</p>
<p>First, let's look at the source code in IDA:</p>
<div class="highlight"><pre><span></span><code><span class="kt">int</span><span class="w"> </span><span class="kr">__cdecl</span><span class="w"> </span><span class="n">main</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">argv</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">**</span><span class="n">envp</span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="p">....</span>
<span class="w"> </span><span class="n">v13</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">213</span><span class="p">;</span>
<span class="w"> </span><span class="n">v14</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">8</span><span class="p">;</span>
<span class="w"> </span><span class="n">v15</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">229</span><span class="p">;</span>
<span class="w"> </span><span class="n">v16</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">5</span><span class="p">;</span>
<span class="w"> </span><span class="n">v17</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">25</span><span class="p">;</span>
<span class="w"> </span><span class="n">v18</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">4</span><span class="p">;</span>
<span class="w"> </span><span class="n">v19</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">83</span><span class="p">;</span>
<span class="w"> </span><span class="n">v20</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">7</span><span class="p">;</span>
<span class="w"> </span><span class="n">v21</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">135</span><span class="p">;</span>
<span class="w"> </span><span class="n">v22</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">5</span><span class="p">;</span>
<span class="w"> </span><span class="n">printf</span><span class="p">(</span><span class="s">"Enter the key: "</span><span class="p">,</span><span class="w"> </span><span class="n">argv</span><span class="p">,</span><span class="w"> </span><span class="n">envp</span><span class="p">);</span>
<span class="w"> </span><span class="n">__isoc99_scanf</span><span class="p">(</span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">s</span><span class="p">);</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">strlen</span><span class="p">(</span><span class="o">&</span><span class="n">s</span><span class="p">)</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="mi">30</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="n">fail</span><span class="p">(</span><span class="mf">0L</span><span class="n">L</span><span class="p">);</span>
<span class="w"> </span><span class="n">v3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">getNum</span><span class="p">((</span><span class="kr">__int64</span><span class="p">)</span><span class="s">"27644437104591489104652716127"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">v14</span><span class="p">);</span><span class="c1">// 27644437</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">mod</span><span class="p">(</span><span class="o">&</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="n">v3</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">v13</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="n">fail</span><span class="p">(</span><span class="mf">0L</span><span class="n">L</span><span class="p">);</span>
<span class="w"> </span><span class="n">v10</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">v14</span><span class="p">;</span>
<span class="w"> </span><span class="n">v4</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">getNum</span><span class="p">((</span><span class="kr">__int64</span><span class="p">)</span><span class="s">"27644437104591489104652716127"</span><span class="p">,</span><span class="w"> </span><span class="n">v14</span><span class="p">,</span><span class="w"> </span><span class="n">v16</span><span class="p">);</span><span class="c1">// 10459</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">mod</span><span class="p">(</span><span class="o">&</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="n">v4</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">v15</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="n">fail</span><span class="p">(</span><span class="mf">0L</span><span class="n">L</span><span class="p">);</span>
<span class="w"> </span><span class="n">v11</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">v16</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">v10</span><span class="p">;</span><span class="w"> </span><span class="c1">// 13</span>
<span class="w"> </span><span class="n">v5</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">getNum</span><span class="p">((</span><span class="kr">__int64</span><span class="p">)</span><span class="s">"27644437104591489104652716127"</span><span class="p">,</span><span class="w"> </span><span class="n">v11</span><span class="p">,</span><span class="w"> </span><span class="n">v18</span><span class="p">);</span><span class="c1">// 1489</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">mod</span><span class="p">(</span><span class="o">&</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="n">v5</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">v17</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="n">fail</span><span class="p">(</span><span class="mf">0L</span><span class="n">L</span><span class="p">);</span>
<span class="w"> </span><span class="n">v12</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">v18</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">v11</span><span class="p">;</span><span class="w"> </span><span class="c1">// 17</span>
<span class="w"> </span><span class="n">v6</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">getNum</span><span class="p">((</span><span class="kr">__int64</span><span class="p">)</span><span class="s">"27644437104591489104652716127"</span><span class="p">,</span><span class="w"> </span><span class="n">v12</span><span class="p">,</span><span class="w"> </span><span class="n">v20</span><span class="p">);</span><span class="c1">// 1046527</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">mod</span><span class="p">(</span><span class="o">&</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="n">v6</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">v19</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="n">fail</span><span class="p">(</span><span class="mf">0L</span><span class="n">L</span><span class="p">);</span>
<span class="w"> </span><span class="n">v7</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="p">)</span><span class="n">getNum</span><span class="p">((</span><span class="kr">__int64</span><span class="p">)</span><span class="s">"27644437104591489104652716127"</span><span class="p">,</span><span class="w"> </span><span class="n">v20</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">v12</span><span class="p">,</span><span class="w"> </span><span class="n">v22</span><span class="p">);</span><span class="c1">// 16127</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">mod</span><span class="p">(</span><span class="o">&</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="n">v7</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">v21</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="n">fail</span><span class="p">(</span><span class="mf">0L</span><span class="n">L</span><span class="p">);</span>
<span class="w"> </span><span class="n">printf</span><span class="p">(</span><span class="s">"Enter password: "</span><span class="p">,</span><span class="w"> </span><span class="n">v7</span><span class="p">);</span>
<span class="w"> </span><span class="n">__isoc99_scanf</span><span class="p">(</span><span class="s">"%s"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">s2</span><span class="p">);</span>
<span class="w"> </span><span class="n">func2</span><span class="p">((</span><span class="kr">__int64</span><span class="p">)</span><span class="o">&</span><span class="n">s2</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="s">"27644437104591489104652716127"</span><span class="p">);</span>
<span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<span class="w"> </span><span class="p">...</span>
<span class="p">}</span>
</code></pre></div>
<p>Program asks us for a key, after which it checks results of modulo operations on it. Modulo values are obtained from <code>getNum</code> function.</p>
<div class="highlight"><pre><span></span><code><span class="kr">__int64</span><span class="w"> </span><span class="kr">__fastcall</span><span class="w"> </span><span class="n">getNum</span><span class="p">(</span><span class="kr">__int64</span><span class="w"> </span><span class="n">numString</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">start</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">offset</span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">x</span><span class="p">;</span><span class="w"> </span><span class="c1">// [sp+18h] [bp-8h]@1</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span><span class="w"> </span><span class="c1">// [sp+1Ch] [bp-4h]@1</span>
<span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">start</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">start</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">offset</span><span class="p">;</span><span class="w"> </span><span class="o">++</span><span class="n">i</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="o">*</span><span class="p">(</span><span class="n">_BYTE</span><span class="w"> </span><span class="o">*</span><span class="p">)(</span><span class="n">i</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">numString</span><span class="p">)</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">48</span><span class="p">;</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">int</span><span class="p">)</span><span class="n">x</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div>
<p>Actually, this is rather simple functions converting a portion of the input string, from start to offset, to number.</p>
<p>Looking at the code we see that in total we have 5 different conditions that have to hold for our input:</p>
<div class="highlight"><pre><span></span><code>s = 213 mod 27644437
s = 229 mod 10459
s = 25 mod 1489
s = 83 mod 1046527
s = 135 mod 16127
</code></pre></div>
<p>Since modulus are coprime, we can use chinese reminder theorem to solve this system of equations. I won't go into details of it, but the good explanation can be found <a href="http://homepages.math.uic.edu/~leon/mcs425-s08/handouts/chinese_remainder.pdf">here</a>.</p>
<p>Python solution:</p>
<div class="highlight"><pre><span></span><code><span class="n">a</span> <span class="o">=</span> <span class="p">[</span><span class="mi">213</span><span class="p">,</span> <span class="mi">229</span><span class="p">,</span> <span class="mi">25</span><span class="p">,</span> <span class="mi">83</span><span class="p">,</span> <span class="mi">135</span><span class="p">]</span>
<span class="n">m</span> <span class="o">=</span> <span class="p">[</span><span class="mi">27644437</span><span class="p">,</span> <span class="mi">10459</span><span class="p">,</span> <span class="mi">1489</span><span class="p">,</span> <span class="mi">1046527</span><span class="p">,</span> <span class="mi">16127</span><span class="p">]</span>
<span class="c1">#Check if all numbers are coprime</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">m</span><span class="p">)):</span>
<span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">i</span> <span class="o">+</span> <span class="mi">1</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">m</span><span class="p">)):</span>
<span class="k">if</span> <span class="n">gcd</span><span class="p">(</span><span class="n">m</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">m</span><span class="p">[</span><span class="n">j</span><span class="p">])</span> <span class="o">!=</span> <span class="mi">1</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">"Numbers are not coprime."</span><span class="p">)</span>
<span class="n">quit</span><span class="p">()</span>
<span class="c1">#Calculate solution </span>
<span class="n">M</span> <span class="o">=</span> <span class="n">reduce</span><span class="p">(</span><span class="n">mul</span><span class="p">,</span> <span class="n">m</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="n">zi</span> <span class="o">=</span> <span class="p">[</span><span class="n">M</span><span class="o">//</span><span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">m</span><span class="p">];</span>
<span class="n">yi</span> <span class="o">=</span> <span class="p">[</span><span class="n">modinv</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">)</span> <span class="k">for</span> <span class="n">x</span><span class="p">,</span><span class="n">y</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">zi</span><span class="p">,</span><span class="n">m</span><span class="p">)]</span>
<span class="n">wi</span> <span class="o">=</span> <span class="p">[</span><span class="n">x</span><span class="o">*</span><span class="n">y</span><span class="o">%</span><span class="n">M</span> <span class="k">for</span> <span class="n">x</span><span class="p">,</span><span class="n">y</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">zi</span><span class="p">,</span><span class="n">yi</span><span class="p">)]</span>
<span class="n">solution</span> <span class="o">=</span> <span class="p">[</span><span class="n">x</span><span class="o">*</span><span class="n">y</span> <span class="k">for</span> <span class="n">x</span><span class="p">,</span><span class="n">y</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">wi</span><span class="p">,</span><span class="n">a</span><span class="p">)]</span>
<span class="n">solution</span> <span class="o">=</span> <span class="nb">sum</span><span class="p">(</span><span class="n">solution</span><span class="p">)</span> <span class="o">%</span> <span class="n">M</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Solution: </span><span class="si">{</span><span class="n">solution</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span>
</code></pre></div>
<p>Running our code we get 3087629750608333480917556.</p>
<p>Now we also have to figure the second part. Let's look at the source code of the second function:</p>
<div class="highlight"><pre><span></span><code><span class="kt">int</span><span class="w"> </span><span class="kr">__fastcall</span><span class="w"> </span><span class="n">func2</span><span class="p">(</span><span class="kr">__int64</span><span class="w"> </span><span class="n">s2</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">s1</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">numString</span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="kt">unsigned</span><span class="w"> </span><span class="kr">__int64</span><span class="w"> </span><span class="n">v3</span><span class="p">;</span><span class="w"> </span><span class="c1">// rax@1</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">v4</span><span class="p">;</span><span class="w"> </span><span class="c1">// ST30_4@7</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">v5</span><span class="p">;</span><span class="w"> </span><span class="c1">// ST34_4@7</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">;</span><span class="w"> </span><span class="c1">// [sp+24h] [bp-3Ch]@1</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">v8</span><span class="p">;</span><span class="w"> </span><span class="c1">// [sp+28h] [bp-38h]@1</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">v9</span><span class="p">;</span><span class="w"> </span><span class="c1">// [sp+28h] [bp-38h]@6</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">v10</span><span class="p">;</span><span class="w"> </span><span class="c1">// [sp+2Ch] [bp-34h]@1</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">v11</span><span class="p">;</span><span class="w"> </span><span class="c1">// [sp+2Ch] [bp-34h]@6</span>
<span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">v12</span><span class="p">;</span><span class="w"> </span><span class="c1">// [sp+40h] [bp-20h]@1</span>
<span class="w"> </span><span class="n">v12</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strcat</span><span class="p">(</span><span class="n">s1</span><span class="p">,</span><span class="w"> </span><span class="n">numString</span><span class="p">);</span>
<span class="w"> </span><span class="n">v3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="kr">__int64</span><span class="p">)</span><span class="o">&</span><span class="n">v12</span><span class="p">[</span><span class="n">strlen</span><span class="p">(</span><span class="n">v12</span><span class="p">)];</span>
<span class="w"> </span><span class="o">*</span><span class="p">(</span><span class="n">_WORD</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">v3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="err">'</span><span class="mi">08</span><span class="err">'</span><span class="p">;</span>
<span class="w"> </span><span class="o">*</span><span class="p">(</span><span class="n">_BYTE</span><span class="w"> </span><span class="o">*</span><span class="p">)(</span><span class="n">v3</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="sc">'\0'</span><span class="p">;</span>
<span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<span class="w"> </span><span class="n">v8</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<span class="w"> </span><span class="n">v10</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="p">(</span><span class="n">v12</span><span class="p">)</span><span class="w"> </span><span class="o">>></span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
<span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">v8</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">strlen</span><span class="p">(</span><span class="n">v12</span><span class="p">)</span><span class="w"> </span><span class="o">>></span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="o">*</span><span class="p">(</span><span class="n">_BYTE</span><span class="w"> </span><span class="o">*</span><span class="p">)(</span><span class="n">i</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">s2</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">matrix</span><span class="p">[</span><span class="mi">100</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="p">(</span><span class="mi">10</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="p">(</span><span class="n">v12</span><span class="p">[</span><span class="n">v8</span><span class="p">]</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">48</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">v12</span><span class="p">[</span><span class="n">v8</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">48</span><span class="p">)</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">48</span><span class="w"> </span>
<span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="p">(</span><span class="n">v12</span><span class="p">[</span><span class="n">v10</span><span class="p">]</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">48</span><span class="p">)</span>
<span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">v12</span><span class="p">[</span><span class="n">v10</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">]])</span>
<span class="w"> </span><span class="n">fail</span><span class="p">(</span><span class="mf">1L</span><span class="n">L</span><span class="p">);</span>
<span class="w"> </span><span class="o">++</span><span class="n">i</span><span class="p">;</span>
<span class="w"> </span><span class="n">v8</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span>
<span class="w"> </span><span class="n">v10</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="n">v9</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<span class="w"> </span><span class="n">v11</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">strlen</span><span class="p">(</span><span class="n">v12</span><span class="p">)</span><span class="w"> </span><span class="o">>></span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
<span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">v9</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">strlen</span><span class="p">(</span><span class="n">v12</span><span class="p">)</span><span class="w"> </span><span class="o">>></span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">v4</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="p">(</span><span class="n">v12</span><span class="p">[</span><span class="n">v9</span><span class="p">]</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">48</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">v12</span><span class="p">[</span><span class="n">v9</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">48</span><span class="p">;</span>
<span class="w"> </span><span class="n">v5</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">10</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="p">(</span><span class="n">v12</span><span class="p">[</span><span class="n">v11</span><span class="p">]</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">48</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">v12</span><span class="p">[</span><span class="n">v11</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">48</span><span class="p">;</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="o">*</span><span class="p">(</span><span class="n">_BYTE</span><span class="w"> </span><span class="o">*</span><span class="p">)(</span><span class="n">i</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">s2</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">matrix</span><span class="p">[</span><span class="mi">100</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="p">(</span><span class="n">v4</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">v4</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="mi">97</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">v5</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">v5</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="mi">97</span><span class="p">]</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="n">fail</span><span class="p">(</span><span class="mf">1L</span><span class="n">L</span><span class="p">);</span>
<span class="w"> </span><span class="o">++</span><span class="n">i</span><span class="p">;</span>
<span class="w"> </span><span class="n">v9</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span>
<span class="w"> </span><span class="n">v11</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="n">puts</span><span class="p">(</span><span class="s">"Your Skills are really great. Flag is:"</span><span class="p">);</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">printf</span><span class="p">(</span><span class="s">"pctf{%s}</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">s2</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></div>
<p>Our first input is concatenated with string constant <code>numString</code> and later expanded with <code>80</code>. This string is used with hardcoded <code>matrix</code> to check the second input we provided.</p>
<p>We can export <code>matrix</code> array from IDA by going <code>Edit->Export data</code>. Since we have both first input and <code>matrix</code> we can just write the same code to output what should <code>s2</code> string be. The easiest way to do this is just to make a copy C code we have and modify it.</p>
<p>Python solver:</p>
<div class="highlight"><pre><span></span><code><span class="n">v12</span> <span class="o">=</span> <span class="s2">"30876297506083334809175562764443710459148910465271612780"</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"v12 len: </span><span class="si">{</span><span class="nb">len</span><span class="p">(</span><span class="n">v12</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span>
<span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
<span class="n">v8</span> <span class="o">=</span> <span class="mi">0</span>
<span class="n">v10</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">v12</span><span class="p">)</span> <span class="o">//</span> <span class="mi">2</span>
<span class="n">password</span> <span class="o">=</span> <span class="s2">""</span>
<span class="c1">#Checks first part of function</span>
<span class="k">while</span> <span class="n">v8</span> <span class="o"><</span> <span class="nb">len</span><span class="p">(</span><span class="n">v12</span><span class="p">)</span><span class="o">/</span><span class="mi">2</span><span class="p">:</span>
<span class="n">index</span> <span class="o">=</span> <span class="mi">100</span> <span class="o">*</span> <span class="p">(</span><span class="mi">10</span> <span class="o">*</span> <span class="p">(</span><span class="nb">ord</span><span class="p">(</span><span class="n">v12</span><span class="p">[</span><span class="n">v8</span><span class="p">])</span> <span class="o">-</span> <span class="mi">48</span><span class="p">)</span> <span class="o">+</span> <span class="nb">ord</span><span class="p">(</span><span class="n">v12</span><span class="p">[</span><span class="n">v8</span> <span class="o">+</span> <span class="mi">1</span><span class="p">])</span> <span class="o">-</span> <span class="mi">48</span><span class="p">)</span> <span class="o">-</span> <span class="mi">48</span> <span class="o">+</span> <span class="mi">10</span> <span class="o">*</span> <span class="p">(</span> <span class="nb">ord</span><span class="p">(</span><span class="n">v12</span><span class="p">[</span><span class="n">v10</span><span class="p">])</span> <span class="o">-</span> <span class="mi">48</span><span class="p">)</span> <span class="o">+</span> <span class="nb">ord</span><span class="p">(</span><span class="n">v12</span><span class="p">[</span><span class="n">v10</span> <span class="o">+</span> <span class="mi">1</span><span class="p">])</span>
<span class="n">password</span> <span class="o">=</span> <span class="n">password</span> <span class="o">+</span> <span class="nb">chr</span><span class="p">(</span><span class="n">matrix</span><span class="p">[</span><span class="n">index</span><span class="p">])</span>
<span class="n">i</span><span class="o">+=</span><span class="mi">1</span><span class="p">;</span>
<span class="n">v8</span> <span class="o">+=</span> <span class="mi">2</span>
<span class="n">v10</span> <span class="o">+=</span> <span class="mi">2</span>
<span class="n">v9</span> <span class="o">=</span> <span class="mi">0</span>
<span class="n">v11</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">v12</span><span class="p">)</span> <span class="o">//</span> <span class="mi">2</span>
<span class="k">while</span> <span class="n">v9</span> <span class="o"><</span> <span class="nb">len</span><span class="p">(</span><span class="n">v12</span><span class="p">)</span> <span class="o">//</span> <span class="mi">2</span><span class="p">:</span>
<span class="n">v4</span> <span class="o">=</span> <span class="mi">10</span> <span class="o">*</span> <span class="p">(</span><span class="nb">ord</span><span class="p">(</span><span class="n">v12</span><span class="p">[</span><span class="n">v9</span><span class="p">])</span> <span class="o">-</span> <span class="mi">48</span><span class="p">)</span> <span class="o">+</span> <span class="nb">ord</span><span class="p">(</span><span class="n">v12</span><span class="p">[</span><span class="n">v9</span> <span class="o">+</span> <span class="mi">1</span><span class="p">])</span> <span class="o">-</span> <span class="mi">48</span>
<span class="n">v5</span> <span class="o">=</span> <span class="mi">10</span> <span class="o">*</span> <span class="p">(</span><span class="nb">ord</span><span class="p">(</span><span class="n">v12</span><span class="p">[</span><span class="n">v11</span><span class="p">])</span> <span class="o">-</span> <span class="mi">48</span><span class="p">)</span> <span class="o">+</span> <span class="nb">ord</span><span class="p">(</span><span class="n">v12</span><span class="p">[</span><span class="n">v11</span> <span class="o">+</span> <span class="mi">1</span><span class="p">])</span> <span class="o">-</span> <span class="mi">48</span>
<span class="n">password</span> <span class="o">=</span> <span class="n">password</span> <span class="o">+</span> <span class="nb">chr</span><span class="p">(</span><span class="n">matrix</span><span class="p">[</span><span class="mi">100</span> <span class="o">*</span> <span class="p">(</span><span class="n">v4</span> <span class="o">*</span> <span class="n">v4</span> <span class="o">%</span> <span class="mi">97</span><span class="p">)</span> <span class="o">+</span> <span class="n">v5</span> <span class="o">*</span> <span class="n">v5</span> <span class="o">%</span> <span class="mi">97</span><span class="p">])</span>
<span class="n">i</span><span class="o">+=</span><span class="mi">1</span><span class="p">;</span>
<span class="n">v9</span> <span class="o">+=</span> <span class="mi">2</span><span class="p">;</span>
<span class="n">v11</span> <span class="o">+=</span> <span class="mi">2</span><span class="p">;</span>
<span class="nb">print</span><span class="p">(</span><span class="n">password</span><span class="p">)</span>
</code></pre></div>
<p>Running our code we get: <code>R3v3rS1Ng_#s_h311_L0t_Of_Fun</code></p>
</div>
<footer class="text-right">
<p>- F3real</p>
</footer>
<div id="show-comments" class="span7 text-center">
<a href="https://f3real.github.io/pragyan_supersecurevault.html#disqus_thread"
data-disqus-identifier="pragyan_supersecurevault"
class="btn btn-primary twitchy-background">Show Comments</a>
</div>
<section id="comments" class="comments hidden">
<hr/>
<h2>Comments</h2>
<div id="disqus_thread"></div>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by
Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</section>
</div>
</div>
</article>
</section>
<footer>
<hr>
<div class="row">
<div class="col-lg-10 text-center">
<p><small>
Built by <a href="http://docs.getpelican.com/en/latest">Pelican</a> / <a href="https://github.com/F3real/pelican-twitchy">pelican-twitchy</a>
· © 2024 F3real
</small></p>
</div>
</div>
</footer> </div>
</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->
<!-- disqus -->
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'https-f3real-github-io'; // required: replace example with your forum shortname
var disqus_identifier = 'pragyan_supersecurevault';
var disqus_url = 'https://f3real.github.io/pragyan_supersecurevault.html';
var disqus_config = function () {
this.language = "en";
};
var commentsDiv = document.getElementById('show-comments');
commentsDiv.onclick = function() {
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
this.style.display = 'none';
};
</script>
<!-- /disqus -->
<script>
const wrapper = document.getElementById('wrapper');
const sidebarBig = document.getElementById('sidebar-wrapper');
const sidebarSmall = document.getElementById('sidebar-wrapper-small');
const triggers = Array.from(document.querySelectorAll('[data-toggle="collapse"]'));
for (var i = 0; i < triggers.length; i++) {
triggers[i].addEventListener('click', (ev) => {
const elm = ev.currentTarget;
ev.preventDefault();
const selector = elm.getAttribute('href').replace('#','');
elm.classList.toggle('collapsed');
document.getElementById(selector).classList.toggle('show');
}, false);
}
function showBigNav() {;
sidebarBig.style.display = 'block';
sidebarSmall.style.display = 'none';
}
function showSmallNav() {
sidebarBig.style.display = 'none';
sidebarSmall.style.display = 'block';
}
const mediaQuery = window.matchMedia('(min-width:768px)');
mediaQuery.onchange = e => {
if (wrapper.classList.contains('toggled')) {
wrapper.classList.remove('toggled');
} else {
if (e.matches) {
showBigNav();
} else {
showSmallNav();
}
}
}
function setNavbar() {
var condition = wrapper.classList.contains('toggled');
if (!mediaQuery.matches) {
condition = !condition;
}
if (condition) {
showSmallNav();
} else {
showBigNav();
}
}
function toggleMenu(){
wrapper.classList.toggle('toggled');
setNavbar();
}
window.onload = setNavbar;
</script>
<script data-goatcounter="https://f3real.goatcounter.com/count"
async src="//gc.zgo.at/count.js"></script>
</body>
</html>