# NC Scan

### TCP CONNECT Scan

Try's to complete the 3 way handshake. If complete the port is listed as Open.\
&#x20;`#`<mark style="color:green;">`nc -nvv -w 1 -z 10.0.0.19 3388-3390`</mark>&#x20;

### UDP Scan

Send a UDP packet and if the port is closed we get back a ICMP packet. If no ICMP packet comes back then we assume the port is open or a FW/Win10 box is filtering the ICMP packet\
`#`<mark style="color:green;">`nc -unvv -w 1 -z <ip> <port-range>`</mark>

{% hint style="info" %}
There are many more things you can do with NC but Nmap will almost always be the easer/better option for external scans.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.hackbook.io/reconnaissance/active-scanning/nc-scan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
