> For the complete documentation index, see [llms.txt](https://ceh-practical.cavementech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ceh-practical.cavementech.com/module-3.-scanning-networks/3.-perform-os-discovery.md).

# 3. Perform OS Discovery

Identifying the OS used on the target system allows you to assess the system’s vulnerabilities and the exploits that might work on the system to perform additional attacks.

<figure><img src="https://2218819509-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrUBnODuUX4EQ8P27uc5D%2Fuploads%2FRLWzsVzF8gWcDigq113C%2Fimage.png?alt=media&amp;token=5548225e-407a-4e93-b1a2-1dd08335b5cf" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2218819509-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrUBnODuUX4EQ8P27uc5D%2Fuploads%2FzAsQPtI4DrB6T4PKOchI%2Fimage.png?alt=media&amp;token=b2eaca9a-c881-404b-be7b-c5034c48ee24" alt=""><figcaption></figcaption></figure>

## <mark style="color:red;">1. Identify OS with TTL in wireshark</mark>

Follow TCP stream in wireshark. Check the ICMP reply after pinging. If TTL is around 128, its Windows, if around 64, its Linux

## 2. Perform OS Discovery using NSE scripting Engine

```
sudo nmap -O 192.168.18.110
sudo nmap -A 192.168.18.110
```

Enumerating OS details with nmap script over smb

```
sudo nmap --script smb-os-discovery.nse 192.168.18.110
```

<figure><img src="https://2218819509-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrUBnODuUX4EQ8P27uc5D%2Fuploads%2Fu0vqHzLbG4CgxdOvmk5j%2Fimage.png?alt=media&amp;token=7fc8683e-cc65-484f-b097-4fa1f668054b" alt=""><figcaption></figcaption></figure>

## <mark style="color:red;">3. Unicornscan</mark>

{% embed url="<https://www.kali.org/tools/unicornscan/>" %}

```
unicornscan 192.168.18.100 - Iv
```

-I is for immediate scan and v  is for verbose scan.

{% embed url="<https://www.udemy.com/course/ethical-hacker-practical/?referralCode=289CF01CF51246BCAD6C>" %}
