Hide Your Version of Apache and the OS

There's plenty of script kiddies out there using pre-made Dorks to find your website, to test if it is vulnerable, etc. Another good amount of information an attacker may look for is the version of Apache you are running. Once they are in the site and have uploaded a shell, you're fighting privilege escalation issues and probably *hoping* that you're secure enough.

As mentioned, there's a lot of kids using Dorks to search Google to look for vulnerable websites for SQL Injection attacks - these are the compromised and defaced websites you see most often. More serious attackers will use the same tactic but aim to take over the system rather than just bomb your website. One thing I like to do is hide my version of Apache so that 404 errors (or others) do not give it away so easily.

There is a line in your default /etc/httpd/conf/httpd.conf called "ServerSignature". This is what leaves your servers host name, port access, version of Apache, and name of the OS at the bottom of the stock/default 404 error pages. By default, it is on but it is probably best to turn it off.

ServerSignature Off

Although as I said before, if they are able to upload a shell then you have bigger problems and from the shell (as shown in the screen shot I took earlier) you can still get the version of apache and other services via command line.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *