Page 1 of 1

Hardening Nagios XI VMware Appliance

Posted: Thu Feb 17, 2011 12:19 pm
by SeanFromIT
Of course your Nagios XI appliance should be behind a firewall, not accessible to the world, but in addition there are some ways to harden it:

(Qualys Lvl 3) In /etc/httpd/conf.d/ssl.conf, edit the following:
SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM

(Qualys Lvl 2) Disable directory browsing/listing. Edit /etc/httpd/conf/httpd.conf and AND /etc/httpd/conf.d/*.conf, remove "Indexes" from all Options declarations.

(Qualys Lvl 2) Edit /etc/httpd/conf/httpd.conf, add the following:
TraceEnable Off

(Qualys Lvl 1) Edit /etc/php.ini, change the following from On to Off:
expose_php=Off

There are some more Qualys hits, that maybe can be addressed in the next version of XI?

(Qualys Lvl 3)
QID 86728 Web Server Uses Plain-Text Form Based Authentication
Please contact the vendor of the hardware/software for a possible fix for the issue. For custom applications, ensure that data sent via HTML login forms is encrypted before being sent from the client to the host.
(Qualys Lvl 2) TCP Sequence Number Approximation Based Denial of Service
QID 82054
This vulnerability will permit a remote attacker to inject a SYN or RST packet into the session, causing it to be reset and effectively allowing for denial of service attacks. An attacker would exploit this issue by sending a packet to a receiving implementation with an approximated sequence number and a forged source IP address and TCP port.
Didn't see a quick fix for CentOS.
(Qualys Lvl 2)
QID 86729 AutoComplete Attribute Not Disabled for Password in Form Based Authentication
Contact the vendor to have the AutoComplete attribute disabled for the password field in all forms. The AutoComplete attribute should also be disabled for the user ID field.
(Qualys Lvl 2)
5 SSL Certificate hits. How do we update the self-signed certificate after changing the host name?

Re: Hardening Nagios XI VMware Appliance

Posted: Thu Feb 24, 2011 10:18 am
by tonyyarusso
Generally things should be sticking pretty close to a stock image of RHEL / CentOS I would think. How many of these are things that we have changed from that base and would just be reverting back, and which are changes from that default? In the case of the latter, what's the argument for why upstream hasn't implemented them?

Re: Hardening Nagios XI VMware Appliance

Posted: Thu Feb 24, 2011 10:38 am
by SeanFromIT
These could all be changed upstream except for the SSL cert, which is based on hostname so therefore must be done downstream after the customer changes the hostname. For my company this year, we only care about Qualys Lvl 3-5 hits. But once those are fixed you know they'll start going after lvl 1-2 hits next year or the year after. I haven't had time to dig around too much to figure out how to update the SSL cert, can you post here how you guys generated it on your end?

Re: Hardening Nagios XI VMware Appliance

Posted: Tue Mar 01, 2011 10:21 am
by tonyyarusso
What cert are you referring to?

Re: Hardening Nagios XI VMware Appliance

Posted: Tue Mar 01, 2011 10:28 am
by SeanFromIT
The one used by Apache to serve https copy of the site.

Re: Hardening Nagios XI VMware Appliance

Posted: Wed Mar 02, 2011 11:04 am
by tonyyarusso
Oh hey, there is one. Honestly, I'm not even sure that we generate that (I can't find anything about it in the installer scripts), so it may be a system default. Otherwise, there are directions on http://wiki.centos.org/HowTos/Https.

Re: Hardening Nagios XI VMware Appliance

Posted: Wed Mar 02, 2011 1:24 pm
by SeanFromIT
While you can't get around all Qualys hits without actually purchasing a cert (or disabling SSL), here's how to re-sign your cert and get past some of them:

Code: Select all

openssl genrsa -out localhost.key 1024 
openssl req -new -key localhost.key -out localhost.csr
(enter requested info. The important one here is "Common Name" this should be your server's new FQDN)

Code: Select all

openssl x509 -req -days 365 -in localhost.csr -signkey localhost.key -out localhost.crt
cp localhost.crt /etc/pki/tls/certs
cp localhost.key /etc/pki/tls/private/localhost.key
cp localhost.csr /etc/pki/tls/private/localhost.csr
service httpd restart

Re: Hardening Nagios XI VMware Appliance

Posted: Fri Mar 04, 2011 10:25 am
by rdedon
Thank you for this info Sean, very good to know.