# Vulnerability Scanning

## #Metasploit <a href="#bluekeep" id="bluekeep"></a>

> \#[**metasploit-autopwn**](https://github.com/hahwul/metasploit-autopwn) - a Metasploit plugin for easy exploit & vulnerability attack.
>
> * *takes a look at the Metasploit database and provides a list of exploit modules to use for the already enumerated services*

* On a Kali terminal

```
wget https://raw.githubusercontent.com/hahwul/metasploit-autopwn/master/db_autopwn.rb
sudo mv db_autopwn.rb /usr/share/metasploit-framework/plugins/
```

* On `msfconsole`

```
load db_autopwn
```

```
db_autopwn -p -t
# Enumerates exploits for each of the open ports
```

```
db_autopwn -p -t -PI 445
# Limit to only the 445 port
```

<figure><img src="https://2323754756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqOzKV4VHdQXzOvQKF5XH%2Fuploads%2FwNrnKWY5YMVCpAK8m7pa%2Fimage.png?alt=media&#x26;token=079cf544-9454-47b9-a342-b9d7dffd6bc0" alt="" width="516"><figcaption></figcaption></figure>

* On `msfconsole` use the **`analyze`** command to auto analyze the contents of the MSFdb (hosts & services)

```
analyze
```

<figure><img src="https://2323754756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqOzKV4VHdQXzOvQKF5XH%2Fuploads%2FKKTNape07681dbPvLXKj%2Fimage.png?alt=media&#x26;token=d4f576d1-3139-42c5-a3c4-727d5232dbd1" alt=""><figcaption></figcaption></figure>

```
vulns
```

<figure><img src="https://2323754756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqOzKV4VHdQXzOvQKF5XH%2Fuploads%2FujhaMuXjfEs1O75BsRfa%2Fimage.png?alt=media&#x26;token=4ec87184-effd-4d0c-bfbf-3257c9aee9cd" alt=""><figcaption></figcaption></figure>
