75 lines
2.4 KiB
Markdown
75 lines
2.4 KiB
Markdown
# T1049 - System Network Connections Discovery
|
|
## [Description from ATT&CK](https://attack.mitre.org/wiki/Technique/T1049)
|
|
<blockquote>Adversaries may attempt to get a listing of network connections to or from the compromised system they are currently accessing or from remote systems by querying for information over the network.
|
|
|
|
An adversary who gains access to a system that is part of a cloud-based environment may map out Virtual Private Clouds or Virtual Networks in order to determine what systems and services are connected. The actions performed are likely the same types of discovery techniques depending on the operating system, but the resulting information may include details about the networked cloud environment relevant to the adversary's goals. Cloud providers may have different ways in which their virtual networks operate.(Citation: Amazon AWS VPC Guide)(Citation: Microsoft Azure Virtual Network Overview)(Citation: Google VPC Overview)
|
|
|
|
### Windows
|
|
|
|
Utilities and commands that acquire this information include [netstat](https://attack.mitre.org/software/S0104), "net use," and "net session" with [Net](https://attack.mitre.org/software/S0039).
|
|
|
|
### Mac and Linux
|
|
|
|
In Mac and Linux, <code>netstat</code> and <code>lsof</code> can be used to list current connections. <code>who -a</code> and <code>w</code> can be used to show which users are currently logged in, similar to "net session".</blockquote>
|
|
|
|
## Atomic Tests
|
|
|
|
- [Atomic Test #1 - System Network Connections Discovery](#atomic-test-1---system-network-connections-discovery)
|
|
|
|
- [Atomic Test #2 - System Network Connections Discovery with PowerShell](#atomic-test-2---system-network-connections-discovery-with-powershell)
|
|
|
|
- [Atomic Test #3 - System Network Connections Discovery Linux & MacOS](#atomic-test-3---system-network-connections-discovery-linux--macos)
|
|
|
|
|
|
<br/>
|
|
|
|
## Atomic Test #1 - System Network Connections Discovery
|
|
Get a listing of network connections.
|
|
|
|
**Supported Platforms:** Windows
|
|
|
|
|
|
#### Run it with `command_prompt`!
|
|
```
|
|
netstat
|
|
net use
|
|
net sessions
|
|
```
|
|
|
|
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
## Atomic Test #2 - System Network Connections Discovery with PowerShell
|
|
Get a listing of network connections.
|
|
|
|
**Supported Platforms:** Windows
|
|
|
|
|
|
#### Run it with `powershell`!
|
|
```
|
|
Get-NetTCPConnection
|
|
```
|
|
|
|
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
## Atomic Test #3 - System Network Connections Discovery Linux & MacOS
|
|
Get a listing of network connections.
|
|
|
|
**Supported Platforms:** Linux, macOS
|
|
|
|
|
|
#### Run it with `sh`!
|
|
```
|
|
netstat
|
|
who -a
|
|
```
|
|
|
|
|
|
|
|
<br/>
|