Security by obscurity

This guide will not actually help in a physical sense to secure your server but it help prevent against many automated attacks that attack based on version number. If a cracker is starting to probe your system for holes it is common to check all the version numbers for your services. This guide will disable some of the common system daemons from reporting what version they are. This is called security by obscurity and you should not rely on it! It is just one of the many little things that you can do to help lower your systems chance of getting hacked.

First we are going to hide the version information in apache.

-----command-----
pico /etc/httpd/conf/httpd.conf
-----command-----


Press control + w to search for "ServerSignature"
It should say On, change it to Off
This will remove the identification of apache from error pages

Right below that add a line that has the following:
" ServerTokens Prod"
This will identify apache simply as "apache" with no version numbers or OS information

Save out of the file and restart apache
-----command-----
service httpd restart
-----command-----

Next we will disable named from giving a version.
-----command-----
pico /etc/named.conf
-----command-----


Search for "query-source address * port 53;"
Add a line right below it with
version "Named";
Save and restart named

Next we will disable the version numbers in exim. If you are not running exim there is no need to do this section and if you try the /etc/exim.conf file will not be found.
-----command-----
pico /etc/exim.conf
-----command-----


Search for " smtp_banner = "${primary_hostname"
This is the welcome banner for the email server, anything can be set here. To quickly replace it just do something like the following

smtp_banner = "${primary_hostname} MailServer \n\
We do not authorize the use of this system to transport unsolicited, \n\
and/or bulk e-mail."

Then save out and restart exim.
-----command-----
service exim restart
-----command-----


Remeber this is just security though obscurity and you still need to keep the server updated! This is just going to stop some people from finding your server in the first place by automated scanning. It will not help at all if somebody is trying to actually hack the server.

Powered by Drupal - Theme created by Danger4k