c99 shell script

Hello,

My web server has been attacked by c99 shell script, the problem is that I can see database password in the access log's GET . and also the script could create symbolic links to other websites on the same server.

How can I figure out how this happend?
How do I stop c99 from being executed ?
Is OSSEC useful for these cases?

if not is there any tool can help in protect web server from this kind of attacks?

Thanks
essam-Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Daniel McAllisterPresident, IT4SOHO, LLCCommented:
the c99shell script is usually uploaded to a webserver that accepts uploads and allows them to be placed into strategic locations. Once installed, the shell executes as part of the webserver & allows the attacker to access the full webserver.

There are a couple of things you can do to protect yourself:
 1) don't allow php uploads at all! (NOTE: EVEN IF YOU ARE A HOSTING COMPANY! IF YOU ARE WORKING AT BEING A WEB HOSTING COMPANY, FORCE USERS TO SUBMIT PHP SCRIPTS FOR EXAMINATION -- AND KEEP A PHP PROGRAMMER ON STAFF TO LOOK THEM OVER!)

 2) Run your web server in a chroot-jail so that when you are hacked in the future, the attacker will only be able to:
    a) read your html documents & config files, and
    b) write to your log files.

See http://www.faqs.org/docs/securing/chap29sec254.html for some info on the latter...
You may also prefer the more specific instructions at
http://www.cyberciti.biz/tips/chroot-apache-under-rhel-fedora-centos-linux.html

Good Luck!

Dan
IT4SOHO
0
essam-Author Commented:
ddf
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.