# Task 1

## <mark style="color:purple;">Task 1</mark>

*Which TCP port is open on the machine?*

### <mark style="color:purple;">Answer</mark>

6379

### <mark style="color:purple;">Explanation</mark>

To know which four-digit port is open, we'll run a port scan.

```bash
sudo nmap -T5 -sCV -p0001-9999 -Pn <target_ip>
```

> -T5 is the aggressiveness level. 5 is the highest and 0 is the softest.
>
> -sCV refers to Nmap scripts. 'C' stands for the most commonly used scripts, while 'V' are the scripts that provide service information for each port.
>
> -p0001-9999 refers either which ports nmap will scan.
>
> -Pn is used to disable ping scanning and only scan ports.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcJyZMqANuQLkasVA6TpP-y7UsBbiJc07Y4uUQBNGW1nYz0JxTzFL8_QOQf09Y08DUk_iUgRJWODuJ1oP5kef9PFQJ6qPhp-8F_bt1V7qHMfTBCa9lWcSderzxLm8WOTPv1546wtw?key=-qUq2kbKk1Z2-i17di06zg71" alt=""><figcaption><p>scan ports</p></figcaption></figure>
