How secure is DA

netswitch

Verified User
Joined
Dec 15, 2003
Messages
225
Location
Belgium
hello,

One of our customer runnin a DA box got hacked last week, the hackers used a gallery php script to take control of the machine.

They succeded to get the ability tu use the user apache and to install some tools in /tmp and /dev/shm

I was wondering if this was made possible by only a misconfiguraton of my box or if all the DA combo were sensible to this kind of hack and if it was the case what were the solutions we could deploy to prevent us from this.

Regards
 
A box is only as secure as the updated software that's installed on it.

It would be interesting to hear what versions of popularly exploitable software you had -

OpenSSL
Kernel Version
PERL versions
MySQL
and others...
 
kernel : 2.4.24
Open SSL : OpenSSL 0.9.7a Feb 19 2003
PERL : 5.8
Mysql - Apache - PHP : "the one installed by da"
 
Well, those all look like current versions - there must have been some other script (phpBB, Ikonboard CGI, old Invisionboard's) that were exploited as the underlying cause...

I highly doubt the exploit was with the DA panel itself

BTW: Have you updated apache/mysql since the default installs? They may or may not be current versions
 
yes, apache and co were in the last version.
I dont meant the DA daemon wasn't secure what I would like to know is if the default DA setup is secure, her the exploit came from a script calld php my e gallery.

If any user installing this script on the server is able to put down the system, it makes me fell un comfortable.
 
as I can see in my php info, safe mode is off.
(I think there are some portals that can't run when it's on like postnuke)

don't know how to check the no exec of /tmp


Isn't there a "secure your box " how to yet ?
 
I would like to know what gallery script it was.. But it is probably not wise to post it here. When I install something I check the script here to see if there's a history of leaks in it or not:

Main site http://icat.nist.gov/icat.cfm

When you search for Gallery it will show all kinds of scripts with leaks or flaws. See if you Gallery script shows up in here.

Some other usefull links for exploits:

www.packetstormsecurity.nl
www.securityfocus.com

I have done some security auditing on a default DA install and it is pretty secure when your system is also updated. Remember that you have to update your kernel and all other system related files yourself (like sshd).
 
Last edited:
netswitch said:
as I can see in my php info, safe mode is off.
(I think there are some portals that can't run when it's on like postnuke)

don't know how to check the no exec of /tmp


Isn't there a "secure your box " how to yet ?

If you don't know what security is all about, go learn, while you learn hire an administartor... there are plenty about.

From what you have said it appears the problem is firstly with a script on the server... what script? thats something you would need to find out... try get any scripts updated to the latest versions, if you know one of the scripts is vulnerable speak to the author(s) about getting it fixed, and temporarily remove public access to the script...

Then you want to remove permissions from compiling tools etc from allowing anything like apache using them... also remove execute permissions from /tmp (you will need to have a tmp partition mounted with noexec etc)

Before all that, safe-mode alone may well have saved you from this.

Chris
 
the faulty script seems to be "php my e gallery".

Well if I was a full security and programming guru, I don't think I would (need to) use DA.

I don't really understand your 2 first sentences as you are writing howtos on how to set up mrtg..
why don't you just said in your how to "go and hire an admin"

I really appreciate the work you do for the DA community here on the forums and I am a bit surprised with the beginning of your reaction..
 
Firstly, dont take any of my comments on this forum offensively, none of my comments are intented to be offensive towards you or anyone else :)

netswitch said:
Well if I was a full security and programming guru, I don't think I would (need to) use DA.

Programming has little to do with systems administration in any way, DA is scripted in C, you dont need any knowledge of C to secure a system as an example. Security also has little to do with DA, DA is *not* a security system for your server... its there to automate the setting up of websites and allow easy control for users.

netswitch said:
I don't really understand your 2 first sentences as you are writing howtos on how to set up mrtg..
why don't you just said in your how to "go and hire an admin"

I write how-to guides to help people along as much as possible in many aspects, getting the most out of your system and security would just be 2 areas. The problem is not I dont write enough how-to guides and applications, its rather, that beyond a certain point how-to guides cause more trouble than they are worth, spamassassin with mailscanner is an example or a slightly more complicated guide, if you have followed it you will probably understand what I mean.... if you havn't seen it you may want to take a read through to understand what I am saying here.

The point I made, "If you don't know what security is all about, go learn, while you learn hire an administartor... there are plenty about."

You said that suprised you, as I said above, dont think it was offensive in any way, or somehow "bashing" you, i'll go over what I said to hopefully clear that up for you..

Whether you want to have a systems admin or not.. you always have 3 options if you dont know much about administration in general yourself... the 3 options are

1) Learn To adminster systems yourself (doesn't happen overnight..)

2) Hire a systems administrator

3) Ignore the security and other forms of administartion, and remain vulnerable

At the moment it appears you are (3) but trying to (1) by using bits of advice from (2)

The problem being you *cannot* mix options 1 and 3... they do not work with each other, you need to make the decision of:

*1 - (1) (and stay vulnerable until you learn and have secured your system well)

*2 - (1) and temporarily get (2) while you are learning.

*3 - Change your mind and just go for (2)

*4 - Take the easy and cheap option, (3)



*2 is the best option in the long run, providing you want that extra knowledge and the lower cost yourself (since you dont hire anyone, the only costs are the learning)

Option *1 is similar to *2, the difference being until you have learnt what you need the system remains vulnerable... I made the point clearly above - learning how to administer and secure a system does not happen overnight.

If you dont want the knowledge yourself, or dont have the time etc... option *3 generally works..... pay for a professional to keep your system updated and secure over the month.

My comment for option *4 would invalidate what I stated in the first line of this message :D

Hope this helps you and your client, and puts you in the right direction for your systems after this time :)
 
ok then.

I ll surely go for *1 maybe *2 if I can find someone not too expensive that I trust.


the faulty script is a module for phpnuke : My_eGallery


Maybe when I ll have learned enough on system security I l write a howto for poeple like me now ;-)
 
Our primary business is contract systems administration.

That said, if you insist on running unsafe scripts, php with safe mode turned off, etc., you may very well get hacked whether we or anyone else administer your server.

The first and most important part of security is to have a security policy.

For example, our security policy doesn't allow safe_mode to be off on our shared servers.

We can help any of our clients with "issues" caused by safe_mode being on, if we can do it without affecting other users' ability to use the shared server, but anyone who needs safe_mode to be turned off will probably need to find another host, who's less security conscious, or get a dedicated server.

Once you have a security policy in place you need to do several things:

1) implement it

2) update it as necessary

3) reimplement it as necessary

We're happy to work with our clients to set up a security policy, but it's certainly not run-of-the-mill systems administration.

Jeff
 
jlasman said:
if you insist on running unsafe scripts, php with safe mode turned off, etc., you may very well get hacked whether we or anyone else administer your server

A very important point that anyone considering using a systems admin should remember :)

Chris
 
Ok so now I have the first point of my "secure your setup how to" :
-Enabling safe mode in php

;-)
 
Back
Top