> For the complete documentation index, see [llms.txt](https://riteshs4hu.gitbook.io/infosec-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://riteshs4hu.gitbook.io/infosec-notes/vulnerability-scanner/nikto.md).

# Nikto

`Nikto` is an open-source web server scanner that performs comprehensive tests against web servers. It checks for over **6700 potentially dangerous files/programs**, **outdated server software**, and **version-specific vulnerabilities**, along with **server misconfigurations**.

***

**Installation**

```bash
sudo apt update
sudo apt install nikto
```

Syntax

```bash
nikto -h <host> [options]
```

***

Examples

* **Basic scan against a website**

```bash
nikto -h http://example.com
```

* **Scan HTTPS target**

```bash
nikto -h https://example.com
```

* **Specify port**

```bash
nikto -h http://example.com -p 8080
```

* **Use a specific User-Agent**

```bash
nikto -h http://example.com -useragent "Mozilla/5.0 Custom"
```

* **Enable SSL (alternative to using `https`)**

```bash
nikto -h example.com -p 443 -ssl
```

* **Output results to a file (HTML format)**

```bash
nikto -h http://example.com -o result.html -Format html
```

* **Use a custom host header (useful for vhost testing)**

```bash
nikto -h http://1.2.3.4 -vhost example.com
```

* **Verbose output**

```bash
nikto -h http://example.com -Display V
```

* **Tuning scan to only check for interesting files (option 1)**

```bash
nikto -h http://example.com -Tuning 1
```

***

#### 🔧 Common Tuning Options (`-Tuning`)

| Code | Description                       |
| ---- | --------------------------------- |
| 1    | Interesting files / scripts       |
| 2    | Misconfigurations / default files |
| 3    | Information disclosure            |
| 4    | Injection vulnerabilities         |
| 5    | Remote file retrieval             |
| 6    | Denial of Service                 |
| 7    | Remote file upload                |
| 8    | Command execution                 |
| 9    | SQL injection                     |
| 0    | File inclusion                    |

> You can combine them: `-Tuning 123`
