> For the complete documentation index, see [llms.txt](https://0xss0rz.gitbook.io/0xss0rz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://0xss0rz.gitbook.io/0xss0rz/pentest/recon/virtual-host.md).

# Virtual Host

{% embed url="<https://pentest-tools.com/information-gathering/find-virtual-hosts>" %}

The key difference between VHosts and sub-domains is that a VHost is basically a 'sub-domain' served on the same server and has the same IP, such that a single IP could be serving two or more different websites.

{% hint style="info" %}
*`VHosts may or may not have public DNS records.`*
{% endhint %}

```shell-session
$ curl -s http://192.168.10.10 -H "Host: randomtarget.com"

<html>
    <head>
        <title>Welcome to randomtarget.com!</title>
    </head>
    <body>
        <h1>Success! The randomtarget.com server block is working!</h1>
    </body>
</html>
```

## Wordlists

### Seclists

`/opt/useful/SecLists/Discovery/DNS/namelist.txt`

### Avileox

{% embed url="<https://gist.githubusercontent.com/Avileox/941f5eb742bad690d04c16b78ac41b57/raw/7405075123c5fc6dba15dee09b876b7d3bdaeb3c/wl-vhost.txt>" %}

### Assetnote

{% embed url="<https://wordlists-cdn.assetnote.io/data/automated/httparchive_subdomains_2024_01_28.txt>" %}

## Gobuster

```
gobuster vhost -u http://domain.htb:8008 -w /usr/share/seclists/Discovery/DNS/namelist.txt --append-domain | grep -v "301"
```

Shorter list:

```
gobuster vhost -u http://inlanefreight.htb:81 -w /usr/share/SecLists/Discovery/DNS/subdomains-top1million-110000.txt --append-domain
```

## Custom vHost List

```shell-session
app
blog
dev-admin
forum
help
m
my
shop
some
store
support
www
```

## Fuzzing

```shell-session
cat ./vhosts | while read vhost;do echo "\n********\nFUZZING: ${vhost}\n********";curl -s -I http://192.168.10.10 -H "HOST: ${vhost}.randomtarget.com" | grep "Content-Length: ";done
```

## Ffuf

### Exclude redirect 302

```
ffuf -u http://permx.htb -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt -H "Host: FUZZ.permx.htb" -fs 0 -mc all -fc 302
```

### Filter by size

```shell-session
ffuf -w ./vhosts -u http://192.168.10.10 -H "HOST: FUZZ.randomtarget.com" -fs 612
```

* `-w`: Path to our wordlist
* `-u`: URL we want to fuzz
* `-H "HOST: FUZZ.randomtarget.com"`: This is the `HOST` Header, and the word `FUZZ` will be used as the fuzzing point.
* `-fs 612`: Filter responses with a size of 612, default response size in this case.

<figure><img src="/files/c7LOTGxkELAQvTBXtzdV" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/YTzZcvvfSGKdDKfZMFv6" alt=""><figcaption></figcaption></figure>

```
ffuf -w /usr/share/wordlists/seclists/Discovery/DNS/namelist.txt -u http://10.129.221.4 -H "HOST: FUZZ.inlanefreight.htb" -fs 10918
```

<figure><img src="/files/54IEmdLfkrlk0ox9rjuj" alt=""><figcaption></figcaption></figure>

```shell-session
ffuf -w /opt/useful/SecLists/Discovery/DNS/subdomains-top1million-5000.txt:FUZZ -u http://academy.htb:PORT/ -H 'Host: FUZZ.academy.htb'
```

## [Earn Free Crypto / BTC with Cointiply](https://cointiply.com/r/pkZxp)

[**Play Games Earn Cash Rewards**](https://cointiply.com/r/pkZxp)

<figure><img src="/files/a876wNYE568SJIfTZVxL" alt=""><figcaption></figcaption></figure>

## Resources

{% embed url="<https://www.thehacker.recipes/web/recon/virtual-host-fuzzing>" %}

{% embed url="<https://www.freecodecamp.org/news/virtual-host-enumeration-tutorial/>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://0xss0rz.gitbook.io/0xss0rz/pentest/recon/virtual-host.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
