Scan your target by running: **[[sudo nmap -sV -p 445 -O 172.17.2.23]]**
**Note1**: I already ran [[sudo nmap -O 172.17.2.23]] to get details about the OS. After that, I searched for potential vulnerabilities on that OS and dug deeper to focus on a vulnerability that is related to the service on port 445.
That is why I ran [[sudo nmap -sV -p 445 -O 172.17.2.23]]
- **-sV (Service Version Detection)**: This option attempts to detect the versions of services running on open ports. It sends probes to services on those ports to determine their version numbers.
- **-O (OS Detection)**: This option attempts to identify the operating system of the target machine based on responses from the network stack and other characteristics.
**Note 2**: The **[[-O]]** option can take longer to execute because it involves more sophisticated techniques to determine the OS (such as sending specific probes to infer details about the TCP/IP stack). In some cases, this may slow down the scan, especially if you're scanning many systems or if stealth is important (since -O can make the scan more noticeable).
Port **445** is primarily used for **Microsoft Directory Services** and **Microsoft Server Message Block (SMB)** over TCP/IP. It's an essential port for various Windows services and is often associated with **Windows file and printer sharing**, **Active Directory**, and other network services.
Port 445 is often targeted by attackers because it provides remote access to systems, especially when SMB vulnerabilities are exploited. Famous attacks, such as **WannaCry** (which exploited the **EternalBlue** vulnerability in SMB) and **NotPetya**, took advantage of open port 445 to spread malware across networks. It's recommended to block port 445 from being publicly exposed to the internet to prevent such attacks, as open SMB ports on internet-facing machines make them highly vulnerable to exploitation.