LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-20-2009, 12:38 PM   #1
bonobo09
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Rep: Reputation: 0
Sites serving malicious content


Hello,

I don't have much experience with security and I was hopeing that someone will point me to the right direction.

I have notice that server was hacked and contects was put in the webserver folders - now I think the server is on "Sites serving malicious content"

how can I invistage? or where can I start to clean up this machine and find out how people get into the server?

any advise will be greately apprciatted
 
Old 07-20-2009, 12:42 PM   #2
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
There is a Linux Security forum here on LQ. Hit the report button and ask to have your post moved there. You're probably going to be asked for a lot of information by some very well qualified people, and you're probably going to wind up having to completely rebuild your server (it is your server?). Good luck!
 
Old 07-20-2009, 12:50 PM   #3
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
There is a well known problem where the Apache web server can be made to serve Windows viruses. Are you running the Apache web server software?

You may find answers faster if you use Google to search for information. I searched Google for "apache virus serving" and got some good links. A little imagination can result in other good search strings.
 
Old 07-20-2009, 12:59 PM   #4
bonobo09
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Yes, I am running apache on that server and serving cgi. I found the malicious content and removed it. but how to trace how someone got into the server and created those contents? and prevent that from happening again?

Thank you so much for your help.
 
Old 07-20-2009, 01:29 PM   #5
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 bonobo09 View Post
I have notice that server was hacked and contects was put in the webserver folders - now I think the server is on "Sites serving malicious content"
How did you find out? What did you notice?


Quote:
Originally Posted by bonobo09 View Post
I found the malicious content and removed it. but how to trace how someone got into the server and created those contents? and prevent that from happening again?
Removing files is a good way to stop serving them. However it does not stop people from uploading files again. To help you with that we need more information from you. Like if your system and application logs show any "weird errors" and what software you run on top of your webserver. Do you run a CMS or forum software? And what versions? Do you run FTP? Statistics software like awstats? Prevention we should talk about only after you have stabilized the current situation and know how to deal with the aftermath. For now please post a listing by running (adjust paths and output if necessary): '( /bin/ps -axfwwwe 2>&1; /usr/sbin/lsof -P -w -n 2>&1; /bin/netstat -anpe 2>&1; /usr/bin/w -lf 2>&1; /usr/bin/last 2>&1 ) | tee /tmp/log' and shut down (and keep from restarting) any running webserver, database, ftp and other publicly accessable services you do not need for managing the server (basically you'll only need SSH to access it). Please post as much information as possible and check back regularly because we might want you to run more commands.



Quote:
Originally Posted by stress_junkie View Post
There is a well known problem where the Apache web server can be made to serve Windows viruses.
Awesome! Could you please share the details of that "well known problem"? I'm really curious as to what this would be then.

Quote:
Originally Posted by stress_junkie View Post
You may find answers faster if you use Google to search for information.
People search LQ to find help with their problems. They might join LQ if they require more help. Telling them then to "go Google" does not really help a user if s/he does not know what the problem is or what to look for, especially in cases like these.
 
Old 07-20-2009, 07:58 PM   #6
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Quote:
Originally Posted by unSpawn View Post
Awesome! Could you please share the details of that "well known problem"? I'm really curious as to what this would be then.
It was surprisingly difficult to find any reference to this, especially since it was discovered only a few months ago. Nevertheless here is one reference:
http://www.secureworks.com/research/.../linuxservers/

I'm sure that I originally read about it elsewhere.

Quote:
Originally Posted by unSpawn View Post
People search LQ to find help with their problems. They might join LQ if they require more help. Telling them then to "go Google" does not really help a user if s/he does not know what the problem is or what to look for, especially in cases like these.
Having just done the Google search for this issue I can say that useful information was not as easy to find as I had expected. This was a big brouhaha just five months ago.

I understand your point but in some cases a question poster would find more information faster by using a web search site than by waiting for an answer here. I just reread the LQ rules. This isn't mentioned. I thought that it was.

http://www.linuxquestions.org/linux/rules.html

I think that there is a balance between providing information on request and asking someone to be a little bit self sufficient. Maybe I'm wrong.
 
Old 07-21-2009, 06:39 AM   #7
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 stress_junkie View Post
It was surprisingly difficult to find any reference to this (..) I'm sure that I originally read about it elsewhere.
Thanks for following up. The link you posted points to the "Random JS rootkit". Addressing your "well-known problem where the Apache web server" comment this does not expose a flaw in Apache, meaning the references point to "traditional" avenues of attack and mitre.org doesn't show any CVE's that appear to be related. (For reference, in discovery > disclosure > protection order: The Register, Slashdot, linux.com, SANS ISC, Trendmicro, Finjan, servertune.com, servertune.com, SANS ISC, SANS ISC)



Quote:
Originally Posted by stress_junkie View Post
I understand your point but in some cases a question poster would find more information faster by using a web search site than by waiting for an answer here. (..) I think that there is a balance between providing information on request and asking someone to be a little bit self sufficient. Maybe I'm wrong.
You're not wrong about there being a balance. Speaking in general terms even when faced with overly broad questions we should take the time to point out how to ask questions or where to find documentation. Those that posess more than new user level knowledge must realise that for people getting to the point where they truly are self-sufficient requires time, effort and dedication. As goes for all of us even then there will be areas of expertise where help, guidance or a second opinion is appreciated. More than that it is LQ's primary goal to serve as a quality knowledge base. That means that with each unresolved question we have the opportunity to "write documentation" as it were that helps this LQ member now but will also help other GNU/Linux users later on. And when combined with a structured approach to troubleshooting, the educational "added value" will serve as a good example of how to foster self-sufficiency. Still speaking in general terms for some this could mean dropping the "get first reply in" attitude altogether, for others doing (more) research before they post and for others not dismissing a thread having one or more replies as "solved". Me writing this does absolutely not exclude me from not seeing the same pitfalls at times...
 
  


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
Bookmarking LQ Content at other Social Sites jeremy LQ Suggestions & Feedback 5 07-06-2006 08:20 AM
LXer: Search engines 'point to malicious sites' LXer Syndicated Linux News 0 05-15-2006 04:54 PM
copy content between 2 web sites jim656 Linux - Networking 5 11-08-2005 10:11 AM
Apache serving content after the content is removed? jrbush82 Linux - Software 6 05-05-2004 04:39 AM
DNS - serving sites locally m0untaind0g Linux - Networking 2 02-19-2004 07:42 AM

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

All times are GMT -5. The time now is 09:25 PM.

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