Scanning Multiple Apache VirtualHosts With Nessus
Web sites have a way of evading vulnerability scanners in the form of virtual hosting. It is a common practice to host multiple web-sites (and associated applications) on a single web server using only one IP addresses. This causes problems for vulnerability scanners, including Nessus, as they look for vulnerabilities on the single IP or hostname provided. The remote server directs this traffic to a specific virtual host or web application, leaving a considerable amount of virtual real-estate untouched. The problem is that Nessus has no easy way to enumerate the domain names or additional IP addresses associated with a given system. Scanning every hostname, domain name and IP address associated with the server could reveal additional vulnerabilities in the web applications or hosts associated with the given server. For example, when scanning just a single IP address in the lab, I received the following result:
In the plugin output above, we can see that the host is running PHPMyAdmin, a popular PHP application to manage MySQL databases. Few vulnerabilities are revealed until we expand our testing to include the domain names of the target associated with each virtual host in our scan as follows:
Tip |
By including the virtual host names, we find more information about the associated hosts, installed web applications and their vulnerabilities:
The plugin above detects if there are fields in the web application that accept a password and send it to the remote server without the protection of SSL encryption. If it finds any occurrences of this behavior, Nessus flags these as a vulnerability.
The CGI scanner found several scripts that it did not detect in the previous scan. In addition to PHPMyAdmin, it found "index.php" and a directory called "passwords" that warrants further investigation and manual inspection. By giving Nessus a little more information about the environment to be tested, we can greatly expand the results and find additional vulnerabilities. Be certain to enumerate the domain names and virtual hosts when performing vulnerability scans of web servers. This can be a simple task such as asking the customer or systems administrator for a list, or using various information gathering techniques.
Resources
Related Articles
- Nessus