> For the complete documentation index, see [llms.txt](https://derek-johnson-1.gitbook.io/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://derek-johnson-1.gitbook.io/welcome/projects/metasploit.md).

# Metasploit

https\://www\.youtube.com/watch?v=QynUOJanNqo

#### Run this command to start msfconsole

```
sudo msfconsole
```

#### The first step is to scan a target for vulnerable ports

```
nmap -sS -p [PORT_RANGE] [TARGET_IP] -oN /dev/null
```

This will show us if we can use any open ports to compromise the system.

#### Next run a silent nmap command that shows all the running services of a target

```
nmap -sV -sT -p- [TARGET_IP] -oN /dev/null
```
