# Ports Open/Close

{% hint style="info" %}
With **BOLD** is the attacker/client send flags
{% endhint %}

### TCP Connect&#x20;

open: **SYN**, SYN/ACK, ACK, **RST**&#x20;

close: **SYN**, RST

### Stealth Scan(Half Open)&#x20;

open: **SYN**, SYN/ACK, **RST**&#x20;

close: **SYN**, RST

### Inverse TCP flag&#x20;

open: **FIN/URG/PSH/NULL**, No Response&#x20;

close: **FIN/URG/PSH/NULL**, RST/ACK

### Xmas Scan&#x20;

open: **FIN+URG+PSH**, No Response&#x20;

close: **FIN+URG+PSH**, RST/ACK

### Null Scan&#x20;

open: No Response&#x20;

close: RST

### ACK flag Probe Scanning&#x20;

Attacker/client sends only ACK package. If he receives on **RST** flag that means the port is there and **open**. Also on "NO RESPONSE" means that a stateful firewall is present. On a RST flag means no firewall is in place.

### IDLE Scan(sends packets from IDLE zombie)

### UDP Scanning(No flags sent, No 3-way Handshake made)&#x20;

open: No Response&#x20;

close: ICMP port unreadable UDP port scanning is often unreliable, as firewalls and routers may drop ICMP packets. This can lead to false positives in your scan, and you will regularly see UDP port scans showing all UDP ports open on a scanned machine. People often forget to scan for UDP services, and stick only to TCP scanning, thereby seeing only half of the equation.

###

### FIN Scanning&#x20;

open: No Response&#x20;

close: RST

###

### ACK Scanning&#x20;

open: RST&#x20;

close: No Response


---

# 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://ed4m4s.blog/master-1/ports-open-close.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.
