Skip to content

Commit 4f5fdbf

Browse files
author
marci
committed
Füge deutsche und englische Informationsseiten für den Netstat-Befehl unter Windows hinzu
1 parent 37ac2f3 commit 4f5fdbf

File tree

2 files changed

+259
-0
lines changed

2 files changed

+259
-0
lines changed
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
---
2+
title: Netstat unter Windows
3+
date: 2025-07-27T10:17:10.288Z
4+
categories:
5+
- Netzwerk
6+
- Tutorials
7+
- Windows
8+
tags:
9+
- cmd
10+
- netzwerk
11+
- tutorials
12+
- windows
13+
- powershell
14+
description: Wie funktioniert Netstat unter Windows? Netstat-Befehle einfach erklärt
15+
menu:
16+
sidebar:
17+
name: Netstat unter Windows in der Übersicht
18+
identifier: netstat-de
19+
parent: windows
20+
lastmode: 2025-07-27T10:19:50.194Z
21+
keywords:
22+
- netstat
23+
preview: ../../../assets/images/posts/windows/netstat-help.png
24+
hero: /images/posts/windows/netstat-help.png
25+
---
26+
27+
## Mit netstat TCP Verbindungen, Ports unter Windows anzeigen
28+
29+
In diesem Artikel möchte ich euch den Befehl / Werkzeug **netstat** unter Windows vorstellen und euch zeigen wie ihr mit diesem Befehl aktive TCP-Verbindungen, offene Ports sowie andere Statistiken wie zum Beispiel eine IPv4 Übersicht der Internetprotokolle IP, TCP, ICMP und UDP-Protokolle überprüfen beziehungsweise anzeigen lassen.
30+
31+
### Wozu nutze ich die Netstat-Befehle?
32+
33+
Für die Analyse der Sicherheit eines Betriebssystems ist es natürlich wichtig zu wissen, welche Verbindungen das Betriebssystem beziehungsweise die installierte Software zu Diensten im Internet aufbaut. Des Weiteren kann mit der Anzeige von lauschenden Ports auch schnell Malware erkannt werden. Um nun diese Verbindungen und lauschenden Ports aufzulisten kann der Befehl netstat genutzt werden.
34+
35+
### Was kann ich nun mit dem Befehl Netstat anstellen?
36+
37+
Diese dann gewonnenen Erkenntnisse könnt ihr natürlich auch nutzen, um Verbindungsprobleme zu analysieren die von eurer Firewall, Server-Instanz oder UTM verursacht werden. Denn auch legitime Programme brauchen für verschiedene Dienste eine Verbindung mit dem Internet, werden zum Beispiel aber von eurer Soft- / Hardware-Firewall blockiert.
38+
Wichtig ist für die Beurteilung über die Sicherheit eines Systems zu wissen, dass die meisten Angriffe auf ein System über die Erstellung einer Reverse Shell durchgeführt werden. Da die meisten Standard-Firewalls nur den Verkehr / Anfragen von außen nach innen überwachen und Verbindungen von innen nach außen grundsätzlich Vertrauen, ist der Angriff über eine Reverse Shell einer der meist genutzten Angriffsszenarien.
39+
40+
### Wie funktioniert netstat?
41+
42+
Um **netstat** nutzen zu können müsst ihr zuerst entweder die Kommandozeile öffnen oder aber eine Powershell Instanz starten.
43+
44+
#### Kommandozeile öffnen:
45+
46+
Die Kommandozeile öffnet ihr, indem ihr unter Windows die `Windows-Taste + s` drückt, in das Suchfeld „**cmd**“ eingibt, **dann mit dem Mauszeiger + Rechtsklick** auf die Auswahl „Eingabeauforderung“ geht und hier mit „**Als Administrator ausführen**“ auswählt.
47+
48+
#### Powershell öffnen:
49+
50+
Um die Powershell-Konsole zu öffnen nutzt ihr auch die Tastenkombination `Windows-Taste + s` und gibt dann „**powershell**“ ein und wählt dann hier auch per Rechtsklick die App „**Powershell als Administrator**" ausführen aus.
51+
52+
## Übersicht der Funktionen von **netstat**
53+
54+
Eine Übersicht der Funktionen und Parameter von **netstat** erhaltet ihr durch die Eingabe in das Konsolenfenster des folgenden Befehls:
55+
56+
```msdos
57+
netstat help
58+
```
59+
60+
![netstat help](/images/posts/windows/netstat-help.png)
61+
netstat help
62+
63+
64+
In der Übersicht seht ihr nun die zu verfügend stehenden Funktionen und Parameter die mit **netstat** kombiniert werden können. Die Parameter können auch miteinander kombiniert werden.
65+
66+
### Aktive Verbindungen anzeigen lassen
67+
68+
Nach dem Öffnen eurer Konsole könnt ihr durch die Eingabe das Befehls,
69+
70+
```msdos
71+
netstat -a
72+
```
73+
74+
alle aktiven Verbindungen eures Rechners anzeigen lassen.
75+
76+
77+
![netstat windows](/images/posts/windows/netstat.png)
78+
79+
netstat windows
80+
81+
82+
Die Tabellenansicht ist hier in vier Spalten aufgeteilt.
83+
84+
#### Protokoll
85+
86+
Die erste Spalte zeigt das verwendete Protokoll der Verbindung an.
87+
88+
#### IP-Adresse lokal
89+
90+
Die zweite Spalte zeigt die lokal verwendete IP-Adresse und den verwendeten Port an, wobei hier die Adresse 127.0.0.1 für lokale Prozesse (auf dem gleichen Rechner) steht, die auf interne Verbindungen lauscht und externe Verbindungen (Internet und andere externe Netzwerke) ausschließt.
91+
Die IP-Adresse 0.0.0.0 in Verbindung mit einem angezeigten Port lauscht auf alle Anfragen aller Netzwerk-Schnittstellen und akzeptiert diese Verbindungen.
92+
93+
#### IP-Adresse Remote
94+
95+
In der dritten Spalte wird euch wiederum die IP-Adresse und der genutzte Port der Remote-Adresse angezeigt.
96+
97+
#### Status
98+
99+
Zu guter Letzt wird euch in der vierten Spalte der aktuelle Status dieser Verbindung angezeigt. Dieser Status wird in den Zuständen „ABHÖREN, WARTEND, HERGESTELLT und SCHLIESSEN\_WARTEN“ angezeigt.
100+
101+
### Routing-Tabellen anzeigen
102+
103+
Ebenso wichtig ist es, dass Routing von IP-Paketen nachvollziehen zu können.
104+
Mit dem folgenden Befehl ist es möglich, euch die konfigurierte Routing-Tabelle anzeigen zu lassen.
105+
106+
```msdos
107+
netstat -r
108+
```
109+
So habt ihr eine Übersicht, in welche Subnetze IP-Pakete zum Beispiel von eurem Rechner genutzten Subnet, in andere Subnets (z.B. andere Subdomains, Internet-Gateway, etc.) geroutet werden können.
110+
111+
### Netzwerk-Schnittstellen anzeigen
112+
113+
Hier habt ihr die Möglichkeit, die einzelnen vorhandenen Netzwerk-Schnittstellen von eurem Windows-Gerät anzeigen zu lassen und zum Beispiel ob und welche Schnittstelle aktiv ist (Status).
114+
115+
Um das Beschriebene nun anzeigen zu lassen, nutzt ihr diesen Befehl.
116+
117+
```msdos
118+
netstat -i
119+
```
120+
121+
## Übersicht: netstat-Befehle unter Windows
122+
</br>
123+
124+
| Befehl | Beschreibung |
125+
|---------------------------|--------------------------------------------------------------------------------------------|
126+
| netstat | Zeigt alle aktiven TCP-Verbindungen an |
127+
| netstat -a | Zeigt alle aktiven TCP-Verbindungen und die TCP/UDP-Ports, auf denen der Rechner lauscht |
128+
| netstat -n | Gibt Verbindungen mit numerischen IP-Adressen und Ports aus, ohne Namensauflösung |
129+
| netstat -o | Zeigt aktive TCP-Verbindungen inkl. Prozess-ID (PID) |
130+
| netstat -e | Zeigt Ethernet-Statistiken wie Bytes und Pakete gesendet/empfangen |
131+
| netstat -s | Zeigt Statistiken je Protokoll (z.B. TCP, UDP, ICMP, IP) |
132+
| netstat -p <Protokoll> | Zeigt Verbindungen für das angegebene Protokoll (z.B. TCP, UDP, ICMP) |
133+
| netstat -r | Zeigt die Routing-Tabelle an (ähnlich wie „route print“) |
134+
| netstat -b | Zeigt die ausgehenden/incoming Verbindungen und zugehörige Programme/Dateipfade |
135+
| netstat -f | Zeigt vollständige Domänennamen für Fremdadressen |
136+
| netstat -x | Zeigt NetworkDirect-Verbindungen (Windows-spezifisch) |
137+
| netstat -q | Zeigt abhörende und nicht abhörende Ports |
138+
| netstat -t | Zeigt den Offload-Status der aktuellen Verbindungen |
139+
| netstat -y | Zeigt Verbindungs-Template-Informationen |
140+
| netstat /? | Zeigt alle verfügbaren Parameter und eine Hilfeübersicht |
141+
| netstat [Intervall] | Wiederholt die Anzeige im angegebenen Sekundenintervall (z.B. netstat -n 5) |
142+
</br>
143+
144+
145+
> - Viele Parameter können **kombiniert** werden, z.B. `netstat -ano` zeigt alle Verbindungen mit PID und ohne Namensauflösung.
146+
>
147+
> - Einige Optionen sind spezifisch für bestimmte Protokolle oder Netzwerkumgebungen; für Details empfiehlt sich die Hilfeseite (`netstat /?`).
148+
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
---
2+
title: Netstat under Windows
3+
date: 2025-07-27T10:17:10.288Z
4+
categories:
5+
- Network
6+
- Tutorials
7+
- Windows
8+
tags:
9+
- cmd
10+
- network
11+
- tutorials
12+
- windows
13+
description: How does Netstat work on Windows? Netstat commands explained simply.
14+
menu:
15+
sidebar:
16+
name: Netstat on Windows at a glance
17+
identifier: netstat-en
18+
parent: windows
19+
lastmode: 2025-07-27T10:19:50.194Z
20+
keywords:
21+
- netstat
22+
preview: ../../../assets/images/posts/windows/netstat-help.png
23+
hero: /images/posts/windows/netstat-help.png
24+
---
25+
## Display TCP connections and ports in Windows with netstat
26+
In this article, I would like to introduce you to the command/tool **netstat** in Windows and show you how you can use this command to check or display active TCP connections, open ports, and other statistics such as an IPv4 overview of the Internet protocols IP, TCP, ICMP, and UDP.
27+
### What do I use the Netstat commands for?
28+
When analyzing the security of an operating system, it is of course important to know which connections the operating system or installed software establishes to services on the Internet. Furthermore, malware can also be quickly detected by displaying listening ports. The netstat command can be used to list these connections and listening ports.
29+
### What can I do with the netstat command?
30+
You can also use the information obtained in this way to analyze connection problems caused by your firewall, server instance, or UTM. This is because even legitimate programs need a connection to the Internet for various services but are blocked by your software or hardware firewall, for example.
31+
When assessing the security of a system, it is important to know that most attacks on a system are carried out by creating a reverse shell. Since most standard firewalls only monitor traffic/requests from the outside to the inside and generally trust connections from the inside to the outside, attacks via a reverse shell are one of the most commonly used attack scenarios.
32+
### How does netstat work?
33+
To use **netstat**, you must first open the command line or start a Powershell instance.
34+
#### Open the command line:
35+
You can open the command line by pressing the `Windows key + s` in Windows, entering “cmd**” in the search field, **then right-clicking with the mouse pointer** on the “Command Prompt” selection and selecting “Run as administrator**.”
36+
#### Open Powershell:
37+
To open the Powershell console, use the key combination `Windows key + s`, enter “**powershell**,” and then right-click and select “Run **Powershell as administrator**.”
38+
## Overview of **netstat** functions
39+
You can get an overview of the functions and parameters of **netstat** by entering the following command in the console window:
40+
41+
```msdos
42+
netstat help
43+
```
44+
![netstat help](/images/posts/windows/netstat-help.png)
45+
netstat help
46+
47+
The overview now shows the available functions and parameters that can be combined with **netstat**. The parameters can also be combined with each other.
48+
### Display active connections
49+
After opening your console, you can display all active connections on your computer by entering the command
50+
51+
```msdos
52+
netstat -a
53+
```
54+
to display all active connections on your computer.
55+
56+
![netstat windows](/images/posts/windows/netstat.png)
57+
netstat windows
58+
59+
The table view is divided into four columns.
60+
#### Protocol
61+
The first column shows the protocol used for the connection.
62+
#### Local IP address
63+
The second column shows the locally used IP address and the port used, where the address 127.0.0.1 stands for local processes (on the same computer) that listen for internal connections and exclude external connections (Internet and other external networks).
64+
65+
The `IP address 0.0.0.0` in conjunction with a displayed port listens for all requests from all network interfaces and accepts these connections.
66+
#### Remote IP address
67+
The third column shows the IP address and port used by the remote address.
68+
#### Status
69+
Finally, the fourth column shows the current status of this connection. This status is displayed in the states “LISTENING, WAITING, ESTABLISHED, and CLOSE\_WAITING.”
70+
### Display routing tables
71+
It is equally important to be able to track the routing of IP packets.
72+
The following command allows you to display the configured routing table.
73+
74+
```msdos
75+
netstat -r
76+
```
77+
This gives you an overview of which subnets IP packets can be routed to, for example, from the subnet used by your computer to other subnets (e.g., other subdomains, Internet gateway, etc.).
78+
### Display network interfaces
79+
Here you can display the individual network interfaces available on your Windows device and, for example, whether and which interface is active (status).
80+
To display the information described above, use this command.
81+
82+
```msdos
83+
netstat -i
84+
```
85+
## Overview: netstat commands in Windows
86+
</br>
87+
88+
| Command |Description |
89+
|---------------------------|--------------------------------------------------------------------------------------------|
90+
| netstat | Displays all active TCP connections |
91+
| netstat -a | Displays all active TCP connections and the TCP/UDP ports on which the computer is listening |
92+
| netstat -n | Displays connections with numeric IP addresses and ports without name resolution |
93+
| netstat -o | Displays active TCP connections including process ID (PID) |
94+
| netstat -e | Displays Ethernet statistics such as bytes and packets sent/received |
95+
| netstat -s | Displays statistics per protocol (e.g., TCP, UDP, ICMP, IP) |
96+
| netstat -p <protocol> | Displays connections for the specified protocol (e.g., TCP, UDP, ICMP) |
97+
| netstat -r | Displays the routing table (similar to “route print”) |
98+
| netstat -b | Displays outgoing/incoming connections and associated programs/file paths |
99+
| netstat -f | Displays full domain names for foreign addresses |
100+
| netstat -x | Displays NetworkDirect connections (Windows-specific) |
101+
| netstat -q | Displays listening and non-listening ports |
102+
| netstat -t | Displays the offload status of current connections |
103+
| netstat -y | Displays connection template information |
104+
| netstat /? | Displays all available parameters and a help overview |
105+
| netstat [interval] | Repeats the display at the specified interval in seconds (e.g., netstat -n 5) |
106+
</br>
107+
108+
> - **Many parameters** can be **combined**, e.g. `netstat -ano` shows all connections with PID and without name resolution.
109+
>
110+
> - Some options are specific to certain protocols or network environments; **for details, refer to the help page** (`netstat /?`).
111+

0 commit comments

Comments
 (0)