恶意Javascript - 它做什么?

时间:2010-10-27 10:15:30

标签: javascript security

这个javascript的作用是什么?这是缓冲区溢出?这是一个xss?它能做什么?这个farbbibliothek [x]数组的解码版本是什么?

<SCRIPT> 
farbbibliothek = new Array(); 
farbbibliothek[0] = new Array("#FF0000","#FF1100","#FF2200","#FF3300","#FF4400","#FF5500","#FF6600","#FF7700","# 
FF8800","#FF9900","#FFaa00","#FFbb00","#FFcc00","#FFdd00","#FFee00","#FFff00","#FFee00","#FFdd00","#FFcc00","# 
FFbb00","#FFaa00","#FF9900","#FF8800","#FF7700","#FF6600","#FF5500","#FF4400","#FF3300","#FF2200","#FF1100"); 
farbbibliothek[1] = new Array("#00FF00","#000000","#00FF00","#00FF00"); 
farbbibliothek[2] = new Array("#00FF00","#FF0000","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","# 
00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","# 
00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","# 
00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00"); 
farbbibliothek[3] = new Array("#FF0000","#FF4000","#FF8000","#FFC000","#FFFF00","#C0FF00","#80FF00","#40FF00","# 
00FF00","#00FF40","#00FF80","#00FFC0","#00FFFF","#00C0FF","#0080FF","#0040FF","#0000FF","#4000FF","#8000FF","# 
C000FF","#FF00FF","#FF00C0","#FF0080","#FF0040"); 
farbbibliothek[4] = new Array("#FF0000","#EE0000","#DD0000","#CC0000","#BB0000","#AA0000","#990000","#880000","# 
770000","#660000","#550000","#440000","#330000","#220000","#110000","#000000","#110000","#220000","#330000","# 
440000","#550000","#660000","#770000","#880000","#990000","#AA0000","#BB0000","#CC0000","#DD0000","#EE0000"); 
farbbibliothek[5] = new Array("#000000","#000000","#000000","#FFFFFF","#FFFFFF","#FFFFFF"); 
farbbibliothek[6] = new Array("#0000FF","#FFFF00"); 
farben = farbbibliothek[4]; 
function farbschrift() 
{ 
for(var i=0 ; i<Buchstabe.length; i++) 
{ 
document.all["a"+i].style.color=farben[i]; 
} 
farbverlauf(); 
} 
function string2array(text) 
{ 
Buchstabe = new Array(); 
while(farben.length<text.length) 
{ 
farben = farben.concat(farben); 
} 
k=0; 
while(k<=text.length) 
{ 
Buchstabe[k] = text.charAt(k); 
k++; 
} 
} 
function divserzeugen() 
{ 
for(var i=0 ; i<Buchstabe.length; i++) 
{ 
document.write("<font face='monotype corsiva' size=30><span id='a"+i+"' class='a"+i+"'>"+Buchstabe[i] + "</span></fon
t>"); 
} 
farbschrift(); 
} 
var a=1; 
function farbverlauf() 
{ 
for(var i=0 ; i<farben.length; i++) 
{ 
farben[i-1]=farben[i]; 
} 
farben[farben.length-1]=farben[-1]; 

setTimeout("farbschrift()",30); 
} 
// Zu Demonstrationszwecken***************** 
var farbsatz=1; 
function farbtauscher() 
{ 
farben = farbbibliothek[farbsatz]; 
while(farben.length<text.length) 
{ 
farben = farben.concat(farben); 
} 
farbsatz=Math.floor(Math.random()*(farbbibliothek.length-0.0001)); 
} 
setInterval("farbtauscher()",5000); 
text= " Test123 "; //h 
string2array(text); 
divserzeugen(); 
//document.write(text); 
</SCRIPT> 

4 个答案:

答案 0 :(得分:7)

这完全无害:它是十六进制颜色值的数组。 “Farbbibliothek”是德语,意思是“色彩库”。

似乎代码生成了许多文本元素,并为它们提供了各种颜色。我看不出任何危险的东西。

Here's一个正在运作的JSFiddle。看起来不错!

答案 1 :(得分:2)

为方便起见,以下是您的代码段中使用的德语单词的翻译:

farbbibliothek:彩色图书馆 farben:颜色
divserzeugen:创建divs farbschrift:彩色字体/经文
farbverlauf:颜色渐变
buchstabe:字符
farbtauscher:换色器

答案 2 :(得分:2)

这只是一个“黑客”针对受感染网站的海报。它和华丽的广告牌一样无害。

答案 3 :(得分:1)

有一个setInterval(“farbtauscher()”,5000);在它,它没有在Pekka的JSFiddle做任何事情,所以我做了一个样本,看看为什么...... http://www.abv8.com/farbbibliothek.html ......它循环通过颜色