Koozali.org: home of the SME Server

Securing Down 6.0

Brian L.

Securing Down 6.0
« on: April 11, 2004, 06:57:49 AM »
Everyone,

After recovering from being hacked on my 5.6 box, I am getting paranoid about security on my 6.0 box.

How do you guys (or what do you use to) disable services, close ports, secure the filesystem, and scan for vulnerabilities/open ports?

This could make a good addition to the wiki.

Brian

Offline Boris

  • *
  • 783
  • +0/-0
Securing Down 6.0
« Reply #1 on: April 12, 2004, 07:41:40 PM »
What services and applications you going to be using?
...

Brian

Securing Down 6.0
« Reply #2 on: April 19, 2004, 02:58:46 AM »
Well, various ones, per the usual SME user.

IMAP
SSH
HTTP
HTTPS
Webmail
VPN
POP3

It would also be nice to turn off unneccessary services similar to the services contrib for 5.6. Does such a contrib exist for 6.0.1?

Brian

Hermie

Securing Down 6.0
« Reply #3 on: April 19, 2004, 06:21:47 AM »
you could use tools like nessus to scan the external interface and rkhunter to look for root kits and exploits

did you find out how you got broken into, that would be my first stop

Offline Boris

  • *
  • 783
  • +0/-0
Securing Down 6.0
« Reply #4 on: April 19, 2004, 07:30:57 AM »
Quote from: "Brian"
It would also be nice to turn off unnecessary services similar to the services contrib for 5.6. Does such a contrib exist for 6.0.1?

Yes it does.
e-smith-service-control-1.1.0-06.noarch.rpm works with SME 6.x
Get it here: http://www.ibiblio.org/pub/Linux/distributions/smeserver/contribs/dmay/mitel/contrib/e-smith-service-control/e-smith-service-control-1.1.0-06.noarch.rpm

Re: securing your box:
Will you have users accessing it via ssh and VPN? If you can avoid it don't give shell accounts to users. Do "background check" on the applications you are installing and exercise generally advisable security measures like good passwords, changed regularly etc...
SME in the default installation is relatively secure. Every new change you do (create an account, install application, open VPN etc.) lowers this default security. Don't do it more then you have to achieve functionality you need.
...

Anonymous

Securing Down 6.0
« Reply #5 on: April 21, 2004, 01:13:43 PM »
Brian

POP3 & IMAP - NOT secure if external access enabled, local access only is OK

SSH - OK secure

HTTP - NOT secure if you use passwords and logins on ibays

HTTPS - OK secure

Webmail - use https ONLY for external

VPN - OK secure


Regs
Ray

Krisen

Is contribs.org taking security seriously?
« Reply #6 on: April 21, 2004, 05:34:06 PM »
For SSH doesn't it depend if you upgrade to latest openssh rpms?  There have been exploits announced in March. I have not seen any updates on the contribs.org site so I had to go to rpmfind.net.  I have also recently been hacked (rooted last week running sme5.6).  I'm not sure how the hacker got in, but am now paranoid about having the latest patches for all exploits for the basic SME services (apache, php, ssh, proftpd etc.).  

It seems to me that security has taken a backburner in this new contribs.org release.  Does anyone else feel this way?

Quote from: "Anonymous"
Brian

POP3 & IMAP - NOT secure if external access enabled, local access only is OK

SSH - OK secure

HTTP - NOT secure if you use passwords and logins on ibays

HTTPS - OK secure

Webmail - use https ONLY for external

VPN - OK secure


Regs
Ray

Offline Boris

  • *
  • 783
  • +0/-0
Re: Is contribs.org taking security seriously?
« Reply #7 on: April 21, 2004, 08:12:08 PM »
Quote from: "Krisen"
It seems to me that security has taken a backburner in this new contribs.org release.  Does anyone else feel this way?

If you check devinfo maillist you will have the same feeling about whole development.
Is it beginning of the end?
...

Anonymous

Re: Is contribs.org taking security seriously?
« Reply #8 on: April 23, 2004, 11:27:03 PM »
Quote from: "Boris"
Quote from: "Krisen"
It seems to me that security has taken a backburner in this new contribs.org release.  Does anyone else feel this way?

If you check devinfo maillist you will have the same feeling about whole development.
Is it beginning of the end?


Devinfo has been so quite recently, I dont know what to think.

Offline Brenno

  • *****
  • 208
  • +0/-0
Securing Down 6.0
« Reply #9 on: April 24, 2004, 06:29:43 PM »
Well, if this isn't a cause for concern, what is??!!

Now that I keep hearing about these boxes being hacked, I grow anxious.  One of my primary reasons for choosing e-smith, other than the cost, ease of use and reliability, was it's inherent security.  If the latter is no more, we're in trouble.

How can we be reassured that the security of these distros is still a primary goal?  I'd hate this software to go the way of Microsoft and let security take a back seat.

jcoleman

Securing Down 6.0
« Reply #10 on: April 24, 2004, 09:47:34 PM »
There are always concerns about boxes being hacked.  That is life.  

However, there are NO secuirty issues with 6.x to be fixed at the moment.

The SSH exploit is only on the older boxen, not on 6.x.    There have been NO reports of hack attempts where there was any information that could lead us to believe that an exploit was available under the current rev.

While Brian reported his box being hacked, remember that his hacked box was an older version with known exploits available.

BTW, if SME Server is dead, why are our usage stats on the website going up by an average of 300K hits per month?  We should get almost 3 million hits this month alone.

One of the issues that caused consternation in the community with the Mitel version was that they end-of-life'd their versions about evvery 6 months.  That caused great problems in the field with upgrading boxes to remain current.

SME Server is committed to giving a longer term life cycle to the distro than Mitel did.  Additionally, there have been no security releases because they haven't been required.

If it ain't broke, don't fix it.

Cheers,

-jeff

Anonymous

Securing Down 6.0
« Reply #11 on: April 25, 2004, 05:08:45 AM »
Thank-you

This was another pointless thread that should have slipped off the front page instead of getting bumped every so often - like I have just done.

To answer the original question - nothing, I do nothing to "lock it down". I am more than happy with the vanilla install. But Because I choose to add Hylafax, Asterisk and Tapeware and I diminish the security of the box then I run the server in server only mode hidden behind a dedicated firewall.

Brenno - there is no proof that a stock standard recent machine has been hacked.

6.0.1 is the best yet and I am not just talking cosmetics. The add-on stuff - clamav, mailfront, spamassassin etc that the Dev guys (you know the really quiet ones) have been putting out integrates exceptionally well with a minimum of fuss.

If your concerned about security - find the problem and fix it - roll the rpm and let us know. This is after all a community site. There is no reason to expect those that have built this great site, given there time and bandwidth for little in return to do everything.

Regards Duncan

duncan

Securing Down 6.0
« Reply #12 on: April 25, 2004, 05:12:35 AM »
I never remember log in.

Offline stancol

  • ****
  • 90
  • +0/-0
    • http://www.srcproductions.com
Talk
« Reply #13 on: April 25, 2004, 08:24:13 AM »
There has been a lot of talk on the boards about boxes being hacked. So far I've seen no proof of it. Just some body saying they were hacked with out any proof is like trying to convict someone without any evidence. If we are going to convict 6.0 then we should be seeing some proof. Proof like  "What contribs were you running?", What other types of software were you running on your HTTP server. All the posts I've seen list people that had extra contribs and programs added to those boxes. Don't forget that human enginering is still one of the best ways to break in. If several people know the root password your asking for trouble on any system.

So much goes into securing a box. Doesn't matter what kind of security you run if your machine is near an outside window where prying eyes can watch you.

If we were to take in all the evidence I've seen so far into a court room the judge would laugh us out of the building.

P.S. If you really do have some concerns with some evidence we shouldn't be discussing them in an open form for all the world to see. In other words don't post your evidence for every one to see.
What are the three dots for at the end of my signature file and why can't I get rid of them?These three dots right here >...

Anonymous

Securing Down 6.0
« Reply #14 on: April 25, 2004, 03:16:30 PM »
Agreed.

If you really have security concerns please post your issues to security@lists.contribs.org.

Enclose your suspicions, any evidence, logs, configs, etc.   So far, we have yet to find a real hack against 6.x.

-jeff

Offline Brenno

  • *****
  • 208
  • +0/-0
Securing Down 6.0
« Reply #15 on: April 25, 2004, 05:46:49 PM »
It's certainly comforting to hear administrators talk here of the security of this product.  Your confidence says a lot about this issue.

I've had no evidence of compromise on my 6.0b2 system at all.  The only funny thing I've seen in my logs is the occassional port scan or failed FTP authentication.

Overall, I must emphasize that I am extremely satisfied with SME, and will continue to use it for as long as continues to be the robust and simple to use product that it is.

Krisen

clarifaction re: security concerns
« Reply #16 on: April 26, 2004, 05:36:09 PM »
Jeff,

In my previous post I stated that my sme5.6 server was hacked.  I don't know if it was an SSH exploit but was concerned to see that there was no patches for it. I was not aware that 5.6 was not supported with latest security patches.  I am quite willing to upgrade to 6.x after your email stating that 6.x has no known security issues. Does this mean that any future exploits eg: apache, ssh,  kernel etc. will be given a priority fix.

I love my SME servers and the simplicity it provides, however, I've lost  credibility after my last hack and while I know that there isn't a 100% gaurantee against a hack, I need to ensure that I have the ability to at least patch known exploits.  And yes I am willing to pay for an update feature.

Krisen


Quote from: "jcoleman"
There are always concerns about boxes being hacked.  That is life.  

However, there are NO secuirty issues with 6.x to be fixed at the moment.

The SSH exploit is only on the older boxen, not on 6.x.    There have been NO reports of hack attempts where there was any information that could lead us to believe that an exploit was available under the current rev.

While Brian reported his box being hacked, remember that his hacked box was an older version with known exploits available.

BTW, if SME Server is dead, why are our usage stats on the website going up by an average of 300K hits per month?  We should get almost 3 million hits this month alone.

One of the issues that caused consternation in the community with the Mitel version was that they end-of-life'd their versions about evvery 6 months.  That caused great problems in the field with upgrading boxes to remain current.

SME Server is committed to giving a longer term life cycle to the distro than Mitel did.  Additionally, there have been no security releases because they haven't been required.

If it ain't broke, don't fix it.

Cheers,

-jeff

Ed

Re: clarifaction re: security concerns
« Reply #17 on: April 27, 2004, 09:10:04 PM »
Quote from: "Krisen"

I don't know if it was an SSH exploit but was concerned to see that there was no patches for it. I was not aware that 5.6 was not supported with latest security patches.  


What you mean that there are no patches for the 5.6.  I believe that the SSH exploit was patched in the Update6.

I still have several boxes running 5.6 and so if this is not true, tell me quick!  :-)

SME is very secure expecially if you are careful about what addon's / contribs you install.  

Ed

Krisen

Re: clarifaction re: security concerns
« Reply #18 on: April 28, 2004, 01:34:38 PM »
According to Jeff's post, 5.6 has known unpatch vulnerabilities and only 6.x is proven to have no security issues. see Jeff's posting in this thread.  I am considering upgrading to 6.x or switching to another distro that posts security fixes as exploits are discovered.

Quote from: "Ed"
Quote from: "Krisen"

I don't know if it was an SSH exploit but was concerned to see that there was no patches for it. I was not aware that 5.6 was not supported with latest security patches.  


What you mean that there are no patches for the 5.6.  I believe that the SSH exploit was patched in the Update6.

I still have several boxes running 5.6 and so if this is not true, tell me quick!  :-)

SME is very secure expecially if you are careful about what addon's / contribs you install.  

Ed

Krisen

Re: clarifaction re: security concerns
« Reply #19 on: April 28, 2004, 01:35:49 PM »
The SSH vulnerability was discovered in March after the update 6 was released for 5.x

Quote from: "Krisen"
According to Jeff's post, 5.6 has known unpatch vulnerabilities and only 6.x is proven to have no security issues. see Jeff's posting in this thread.  I am considering upgrading to 6.x or switching to another distro that posts security fixes as exploits are discovered.

Quote from: "Ed"
Quote from: "Krisen"

I don't know if it was an SSH exploit but was concerned to see that there was no patches for it. I was not aware that 5.6 was not supported with latest security patches.  


What you mean that there are no patches for the 5.6.  I believe that the SSH exploit was patched in the Update6.

I still have several boxes running 5.6 and so if this is not true, tell me quick!  :-)

SME is very secure expecially if you are careful about what addon's / contribs you install.  

Ed

Anonymous

Re: clarifaction re: security concerns
« Reply #20 on: April 28, 2004, 09:26:36 PM »
Quote from: "Krisen"
The SSH vulnerability was discovered in March after the update 6 was released for 5.x


I don't see it mentioned anywhere in the OpenSSH security pages

http://www.openssh.com/security.html

It says that OpenSSH 3.7.1 (Which was included in the Update6) is not affected by the reported problems.

Can anyone point to a specific advisory which says that OpenSSH 3.7.1  has security issues?

Thanks,
Ed

quattro

Still, lotsa old packages need to be updated
« Reply #21 on: April 30, 2004, 03:37:41 AM »
I have not really looked at the source code but briefly looking at SME6.0.1 I just install for testing purpose, php is *really* old, 4.1.2? I believe there was heap-based buffer overflow in php prior to 4.2.x Apache is 1.3.27 (date build was Sep 2002). All apache up to 1.3.29 has remote xploit issue. These alone could let crackers go right to your front door.

I hope my explanation above is all wrong. otherwise, all SME users are not secure at all with the current release. I just check out update mirror, the only I see there is initscripts? So, there has been no update for the above packages at all?

dreamcat

Securing Down 6.0
« Reply #22 on: April 30, 2004, 09:28:49 PM »
I would suggest a primary firewall in front of the SME server. My opinion of stock SME server security is low. I would suggest reading "Securing & Optimizing Linux: The Ultimate Solution" from The Linux Documentation Project. It is a little dated but almost all of it still applies in full.

Also, looking at the major version numbers is not always accurate on SME. SME uses a lot of Red Hat RPMS. RedHat does not change version numbers for several of the packages, instead they add a "-01", "-02", etc... suffix to the original version RPM. Many production distributions do this, instead of upgrading to new versions. They patch the security hole in the existing version which does not denote a change to the version number.



Securing & Optimizing Linux: The Ultimate Solution
http://www.tldp.org/LDP/solrhe/Securing-Optimizing-Linux-The-Ultimate-Solution-v2.0.pdf

quattro

Securing Down 6.0
« Reply #23 on: May 02, 2004, 12:17:06 AM »
Quote from: "dreamcat"
I would suggest a primary firewall in front of the SME server. My opinion of stock SME server security is low. I would suggest reading "Securing & Optimizing Linux: The Ultimate Solution" from The Linux Documentation Project. It is a little dated but almost all of it still applies in full.

Also, looking at the major version numbers is not always accurate on SME. SME uses a lot of Red Hat RPMS. RedHat does not change version numbers for several of the packages, instead they add a "-01", "-02", etc... suffix to the original version RPM. Many production distributions do this, instead of upgrading to new versions. They patch the security hole in the existing version which does not denote a change to the version number.



Securing & Optimizing Linux: The Ultimate Solution
http://www.tldp.org/LDP/solrhe/Securing-Optimizing-Linux-The-Ultimate-Solution-v2.0.pdf


Are you saying after they patched a rpm package, the build date is still in 2002? I'm no rpm expert but that does not sound right.

BTW, even when you have a firewall, the damage is still great if you run vulnerable application/software.

I'm so glad that contribs.org's here, but if it continues to use old/vulnerable software, it really hurts the users. Don't get me wrong, I love SME's capabilities, I even wrote an article about it with our LUG members. But I'm very worried about the current status of the old/vulnerable packages being used in its latest ISO and yet no updates. So that you know, I don't even use it right now but I like to see contribs to be alive, well known for a good GPL server suite.

jcoleman

Securing Down 6.0
« Reply #24 on: May 02, 2004, 12:57:16 AM »
Quote
I'm so glad that contribs.org's here, but if it continues to use old/vulnerable software, it really hurts the users.


Can you tell me which packages you believe to be vulnerable?  And what base features of the SME Server do you believe are inoperable due to age or security problems?

-jeff

quattro

Securing Down 6.0
« Reply #25 on: May 03, 2004, 05:52:16 AM »
Quote from: "jcoleman"
Quote
I'm so glad that contribs.org's here, but if it continues to use old/vulnerable software, it really hurts the users.


Can you tell me which packages you believe to be vulnerable?  And what base features of the SME Server do you believe are inoperable due to age or security problems?

-jeff


Jeff,

I believe the followings are vulnerable

1. Apache < 1.3.29 vulnerable multiple stack-based buffer overflows in mod_alias and mod_rewrite. See http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2003-0542
2. openssl see openssl.org
3. 6.0.1's kernel is vulnerable to do_brk bug. I tested on vmware and it rebooted the server as expected.
4. tcpdump
5. php: 6.0.1 still uses 4.1, IIRC, is vuln to cross site scripting.

mbachmann

Securing Down 6.0
« Reply #26 on: May 04, 2004, 01:14:10 PM »
I nessus'd against my SME 6.0.1-01 from internal network. It says:

"You are running OpenSSH 3.7p1 or 3.7.1p1. These verions are vulnerable to a flas in the way the handle PAM authentication and may allow an attacker to gain a shell on this host.

Note that Nessus did not detect wether PAM is being enabled in the remote ssh or not, so this might be a false positive.

Solution: Upgrade to OpenSSH 3.7.1p2 or diable PAM support in sshd_config."

Then there are holes on port netbios-ssn (139/tcp), port ldap (389/tcp), https (443/tcp), squid-http (3128).

As all previous mentioned services are configured to be available only to local networks there should be no problmes. Will Nessus from outside later that week.