> For the complete documentation index, see [llms.txt](https://106-sam.gitbook.io/ejptv2-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://106-sam.gitbook.io/ejptv2-notes/enumeration/http.md).

# HTTP

**HTTP IIS**

* Most common protocols ae HTTP.
* We would see this on an External and Internal Scan. Websites are a big part of the internet.

```
nmap <IP> -sV -O
```

* Open browser and navigate to the target ip address.

**WhatWeb**

```
whatweb <IP>
```

* Its going to find some information about the website

```
http <IP>
```

* it show header information.

**Dirb**

```
dirb <URL>
```

* Dirb enumerates the sites directories and files.

**Browsh**

```
browsh --startup-url http://<IP>/
```

* It will do website enumeration based on a URL in your command line

### HTTP IIS Nmap Scripts

* similar to running dirb&#x20;

```
nmap <IP> -p80 --script http-enum
```

* &#x20;information related to headers

```
nmap <IP> -p80 --script http-headers
```

* Information about the supported methods&#x20;

```
nmap <IP> -p80 --script http-methods --script-args http-methods.url-path=/webdav/
```

* webdav-scan - identify WebDAV installations, utilizing options and pop-line methods.

```
nmap <IP> -p80 --script http-webdav-scan --script-args http.methods.url-path=/webdav/
```

### HTTP Apache

* To enumerate the version of the website

```
nmap <IP> -sV -p80 --script banner
```

```
msfconsole -q 
> use auxiliary/scanner/http/http_version
> set rhosts <IP>
> exploit
```

```
curl <IP> | more
```

```
wget http://<IP>/
```

```
browsh --startup-url <IP>
```

**lynx**&#x20;

```
lynx http://<IP>/
```

```
msfconsole -q
> use auxiliary/scanner/http/brute_dirs
> set rhosts <IP>
> exploit
```

```
dirb http://<IP>/ /usr/share/metasploit-framework/wordlists/directory.txt
```

* check **robots.txt**

```
msfconsole -q 
> use auxiliary/http/robots_txt
> set rhosts <IP>
> run 
```

```
curl http://<IP>/cgi-bin | more 
```

* We have a 404, knowing that CGI-bin exists might be helpful. This case got 403 forbidden that could be potentially useful later for exploitation or for auditing.
