jsquest d:)

63
JSQuest d:)

Upload: it-weekend

Post on 10-May-2015

904 views

Category:

Documents


9 download

DESCRIPTION

by Dmytro Tarasenko Agenda: 1. JavaScript speed 2. Simple interpreter creation 3. Command Line and File System 4. Password bruteforcing (md5, 7zip) 5. Cross Domain Requests 6. 3D in JavaScript 7. Hiding of JavaScript code

TRANSCRIPT

Page 1: JSQuest   d:)

JSQuest d:)

Page 2: JSQuest   d:)

1. JavaScript speed2. Simple interpreter creation3. Command Line and File System4. Password bruteforcing (md5, 7zip)5. Cross Domain Requests6. 3D in JavaScript7. Hiding of JavaScript code

agenda

Page 3: JSQuest   d:)

JavaScript vs PHPhttp://benchmarksgame.alioth.debian.org

Page 4: JSQuest   d:)

JavaScript vs Python 3http://benchmarksgame.alioth.debian.org

Page 5: JSQuest   d:)

knock - knock

Page 6: JSQuest   d:)

Бонжурно, мой друг :) Похоже, что твоя любопытность сыграла нам на руку ;) Это то, что у нас есть на данный момент:

Файл:https://www.dropbox.com/s/jd1mkl6tznh3u0q/n12

Детали:https://www.dropbox.com/s/kotvnu58rs71kpr/Intro.mov

Удачи...

P.S. Пиши, если что-то пойдет не так. И не забудь прислать мне результат ;)

Page 7: JSQuest   d:)
Page 8: JSQuest   d:)

level 1

Page 9: JSQuest   d:)

81% failed7zip archiveN12 ->

Page 10: JSQuest   d:)

password

Page 11: JSQuest   d:)

bruteforce

Page 12: JSQuest   d:)
Page 13: JSQuest   d:)

a@WEr&*FBdfg%GGd1C#$G*ss@-#$cf^HJ0=dSd#$HJ87F^%$DGY-=fKd%^~23fg-567#$gFg.Idfgsdfg^&-k.)9235Ffd3d1234-=FGrsldfg*#$&0-m243W^&.nSDF56!@#@#$DUJk-=oDF8$$1~--pAS@#%86124$G*)hqr.<GF45FGCssdf56()&%)($*Gf0021

N83

N127zip

Page 14: JSQuest   d:)

Microsoft Windows [Version 6.2.9200](c) 2012 Microsoft Corporation. All rights reserved.

c:\nodejs>node BruteForce.js 7z.exe N12 12Started at 2013-01-19 12:30:51Password was cracked: "N83"Finished at 2013-01-20 06:43:32

Page 15: JSQuest   d:)

d:\tmp\7zip-crack>crark-7z.exe -l3 -g3 -ppass.def -c n12        cRARk-7z 1.03 (CUDA enabled) Freeware    Copyright 2012 by P. Semjanov, http://www.crark.net (c) PSW-soft Password Cracking Library PCL v. 2.0d by P. Semjanov

Choosing best crypto functions...................Chosen: AVX   (SB/IB), AVX   (SB/IB) (-f2444), AES-NIClock cycles per password expected = 35736440/91220634 (*), theoretical = 82576080Pure SHA-256 clock cycles per byte expected = 4.8/12.0 (*), theoretical = 11.3Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz found, CPU rate = 2.36 (*)(*) May be inaccurate if Turbo Boost is on

Processing line 2 of password definition file...Testing 3-chars passwords ...Testing     data.bin    CRC okN83 - CRC OKIn hex (PCL style): \4E \38 \33Passwords tested = 18104 (time = 03:08.30, rate = 96 p/s)Total     tested = 18104, slow tests = 1

Page 16: JSQuest   d:)

got you!

Page 17: JSQuest   d:)

Отличная работа!!!

Похоже, что у нас появилась новая информация касательно этого дела. Вот детали:https://www.dropbox.com/s/vfgh0cteybs50s1/Part1.mov

Итак, нам удалось утащить файлик, который они используют для расшифровки полученного тобой data.bin. Интереретатор они где-то прячут и в переписке он не фигурировал :(https://www.dropbox.com/s/qb2kw0euhc0scaf/unpacker-final.alan

Если в двух словах, то тебе нужно написать интерпретатор, который выполнит скрипт - unpacker-final.alan. Этот скрипт разшифрует уже имеющийся у тебя data.bin. В результате, ты получишь другой файл - term.html. По поводу тестов для твоего будущего интерпретатора... Боб набросал немного.

https://www.dropbox.com/s/5n0r1sciaqefsnc/tests.tar.gzВ файле answers.js находится json с ответами, которые ты должен получить запуская эти тесты. Все остальные файлы в формате: command-errX.alan должны вызвать ошибку работы интепретатора.После успешной расшифровки, ты должен получить рабочий файл терминала...

P.S. и помни, что весь текст, представленный здесь закодирован в UTF-8

Page 18: JSQuest   d:)
Page 19: JSQuest   d:)

level 2

Page 20: JSQuest   d:)

95% failedscriptencrypteddata.bin ->

N12 ->7zip archive

Page 21: JSQuest   d:)
Page 22: JSQuest   d:)
Page 23: JSQuest   d:)

# # This is a comment # set i, 0 :LOOP     cut data, i, ch     asc ch, n     gotog n, chLimit, REPLACE     goto LOOP

#\r\n # This is a comment\r\n #\r\n set i, 0\r\n :LOOP\r\n     cut data, i, ch\r\n     asc ch, n\r\n     gotog n, chLimit, REPLACE\r\n     goto LOOP\r\n

1 #2 # This is a comment3 #4 set i, 05 :LOOP6     cut data, i, ch7     asc ch, n8     gotog n, chLimit, REPLACE9     goto LOOP

# # This is a comment # set i, 0 :LOOP     cut data, i, ch     asc ch, n     gotog n, chLimit, REPLACE     goto LOOP

set i, 05 :LOOP     cut data, i, ch     asc ch, n     gotog n, chLimit, REPLACE     goto LOOP

echo i

onEcho()

ParametersonEcho(line, 'i')

Page 24: JSQuest   d:)

/** * echo command handler. Usage: echo v * * @param {Number} line Current script line * @param {String} v Variable name * @return {Number} new script line index */onEcho: function (line, v) { console.log(this.getVar(v)); return ++line;}

Page 25: JSQuest   d:)

bingo!

Page 26: JSQuest   d:)

Мои поздравления!

Моё сообщение тебе:https://www.dropbox.com/s/c8suxtxvmt8hm8o/Part2.mov

Уже совсем близко! У нас в руках программа удаленного терминала, с помощью которой можно будет получить доступ к спутнику. Мы немного поигрались с ней и выяснили, что это небольшая UNIX подобная система. При подключении к спутнику, мы сможем получать видео поток с камер, установленных на спутнике и что-то еще, мы пока не уверены наверняка. Тебе нужно найти, как с помощью этого терминала попасть на спутник.

Удачи, мой друг.

Page 27: JSQuest   d:)
Page 28: JSQuest   d:)

level 3

Page 29: JSQuest   d:)

96% failedterm.htmlscriptencrypteddata.bin ->

N12 ->7zip archive

Page 30: JSQuest   d:)

demo

Page 31: JSQuest   d:)

terminal class

Page 32: JSQuest   d:)

jste libraryconsole.js

Lib.Terminalterminal.js

App.Terminalterminal.js

Page 33: JSQuest   d:)

App.Terminal = speculoos.Class({ extend: Lib.Terminal,

constructor: function (cfg) { cfg.commands = [['list', _('Lists files')]]; this.parent(arguments); },

_onListCmd: function () { var filesFilders = this._fs.getList(); filesFilders.unshift('..'); this.WriteLine(filesFilders.join('\n')); }});

Page 34: JSQuest   d:)

new App.Terminal({ id : 'terminal', user: 'guest', host: 'terminal'});

Page 35: JSQuest   d:)
Page 36: JSQuest   d:)

file system class

Page 37: JSQuest   d:)

{ folder1: { folder2: {}, file1 : 'File content' }, file2 : 'File content'}

Page 38: JSQuest   d:)

Script:

var fs = new App.SatelliteFs();

fs.getActiveFolder()

fs.getList()

fs.setActiveFolder('folder1')

fs.getList()

fs.read('file1')

Console output:

undefined

"."

["[folder1]", "file2"]

undefined

[“[folder2]", "file1"]

“File content"

Page 39: JSQuest   d:)

MD5 bruteforce

Page 40: JSQuest   d:)

d:\>ighashgpu.exe /c:csdep /min:5 /max:8 /t:md5 /h:b34e7acf7bae9b7526982baed3cbe564

*******************************************************************      MD4/MD5/SHA1 GPU Password Recovery v0.80.16.1       ******    For ATI RV 7X0 cards and nVidia 'CUDA' ones (G80+)    ******      (c) 2009-2010 Ivan Golubev, http://golubev.com      ******             see "readme.htm" for more details            ********************************************************************** Any commercial use of this program is strictly forbidden *******************************************************************

Found 1 CUDA device(s)Starting brute-force attack, Charset Len = 96, Min passlen = 5, Max passlen = 8Charset (unicode -> 0) [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~⌂ ]Charset in HEX: 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a 30 31 32 33 34 35 36 37 38 39 21 22 23 24 25 26 27 28 29 2a 2b2c 2d 2e 2f 3a 3b 3c 3d 3e 3f 40 5b 5c 5d 5e 5f 60 7b 7c 7d 7e 7f 20Starting from [AAAAA]Hash type: MD5, Hash: b34e7acf7bae9b7526982baed3cbe564Device #0: [GeForce GTX 570] 1484.00 Mhz 480 SPHardware monitoring disabled.CURPWD: #-RBD" DONE: 03.81% ETA: 7m 47s CURSPD: 1610.0M

Page 41: JSQuest   d:)

MD5 bruteforce speed

Unit

GeForce GTX 570Intel i7 3.4 GHz

Total

HASH/sec

1 484 000 40 times 38 000

1 532 000

Page 42: JSQuest   d:)

Audio player

Page 43: JSQuest   d:)

Audio

player

playlist.json

MP3 files

CrossDomain

Request d:(

Page 44: JSQuest   d:)

Eric Carlson’s JSONP libraryhttps://github.com/IntoMethod/Lightweight-JSONP

jsonp(this.url, this._onDataLoaded);

Page 45: JSQuest   d:)

well done!

Page 46: JSQuest   d:)

Мои поздравления :)

Итак, у нас есть учетная запись админа! Теперь нам ничего не стоит попасть на спутник ;)Все детали в видео сообщении ;) Удачи!

https://www.dropbox.com/s/r9azu9ypihn19ka/Part3.mov

Page 47: JSQuest   d:)
Page 48: JSQuest   d:)

level 4

Page 49: JSQuest   d:)

Satellite consoleterm.htmlscriptencrypteddata.bin ->

N12 ->7zip archive

Page 50: JSQuest   d:)

demo

Page 51: JSQuest   d:)

JS 3D Library

Page 52: JSQuest   d:)

Ricardo Cabello, aka Mr. Doob

Page 53: JSQuest   d:)

Three.jshttp://www.mrdoob.com

Open SourceCommunityExamples

ForumVideo

Page 54: JSQuest   d:)

<canvas/>

scene

fog

light

planet clouds

moon

stars

Page 55: JSQuest   d:)

Image Cross Domain Requests

Page 56: JSQuest   d:)

WebGL doesn’t work with remote images!

Page 57: JSQuest   d:)

Google Picasa WEB

1. Access-Control-Allow-Origin: * 2. Same domain

Page 58: JSQuest   d:)

Anti cheating

Page 59: JSQuest   d:)

cheating demo

Page 61: JSQuest   d:)

(function () { /* * Application lives in App namespace */ eval('var App = {};');}());

/* * There is no App namespace inside window */window.App; // undefined;

Page 62: JSQuest   d:)

author: source code:

registration link:levels description:

facebook group:

[email protected]://github.com/tmptrash/JSQuesthttps://sites.google.com/site/docjsquesthttps://sites.google.com/site/docjsquestfinalhttps://www.facebook.com/groups/368390203293904

Page 63: JSQuest   d:)

Questions?