
Hello everyone, in this article we will see what a VHOST is, the uses of using VHOST, and the enumeration techniques to find VHOST.
Now, before talking about VHOST enumeration. Let’s discuss what is VHOST and what are its uses.
What is VHOST?
VHOST is actually termed a Virtual Host. Virtual Host is used to hosting more than a single website ( test1.example.com, test2.example.com, test3.example.com) in a single machine.
In simple words, hosting different websites on a single machine.
Here example.com >> is the main domain or main website.
test1.example.com >> it is a website of the main website. or you can say it is a subdomain of the main domain.
test2.example.com >> subdomain of the main domain (example.com).
test3.example.com >> subdomain of the main domain (example.com).

virtual host
I hope you had got the information, about what VHOST is.
Ok! we had learned what a VHOST is.
What are the uses of using Virtual Hosting?
The main use of using Virtual Hosting is:
- It will allow the companies to host multiple websites on a single server.
- The cost of hosting multiple websites in a single server will reduce the cost to the companies.
Ok! we had learned what is VHOST and what are the uses of VHOST. But how does a VHOST works?
How does a VHOST works?
Virtual Hosts are of three types:
- IP based.
- Name-based.
IP-based:
In IP-based virtual hosting, we create different IP addresses for each domain(website). The Multiple IPs wills actually point to the server’s unique domain and there would be a single IP for a single domain. Virtual hosting is achieved by creating multiple IP addresses for a single server.
Name-based:
Name-based virtual hosting is the technique that is used today. The name-based virtual hosting will use a single IP address for all the domains on the given server. When the browser is trying to connect to the server, it will send a message to the server with information about the domain name to which is trying to connect. Then the server checks the host configuration and thereby returns the request with the correct website.
These are mainly, how the virtual hosting work.
OK, these are how the virtual host works.
How to enumerate VHOST?
Till now we had discussed, what VHOST is, and How does VHOST works?
Now, how to enumerate VHOSTs.
Well, Here is a simple python script to enumerate these VHOSTs.
The GitHub tool link: https://github.com/SpiderLabs/HostHunter
This tool is built on Python. And this takes a list of IP Addresses and finds the hostnames.
Let me show you, how the tool works.
- Clone the GitHub repository to your machine. Using git clone command we can clone the repository.

- Now, After completing this process. Open the folder. Using cd <repo-name> we can easily go into the folder or directory.

going into the folder
3. Now, after going into the directory, there are some requirements for this python file. So in order to use the python file completely we need to install those requirements. Using the pip3 install -r requirements.txt command we can install all those requirements. The above command may be different to different tools, but here the requirements file is mentioned as requirements.txt.

4. After installing the requirements, now you are good to use to the tool.

5. Now, using this command python3 hosthunter.py <filename_of_ip_addresses>. Here before running this tool, you need to save the IP address into a txt file. I took example.com for demonstration purposes. And had saved the IP addresses for example.com in the ip_address.txt file.

6. Now, just wait for the output to come.

7. The hostnames had been enumerated.
Using the same process, you can enumerate the VHOST names using this tool.
Here is another tool that can be used for enumeration purposes.
The tool link is: https://github.com/Sudneo/vhost-enum
the tool mentioned above is also written in python.
I hope I had provided all the information. And if you want more information about this topic, please let us know in the comment section. So that we can make another article on it.
Thank You.