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) Similarly, adversaries who gain access to network devices may also perform similar discovery activities to gather information about connected systems and services.

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). In Mac and Linux, [netstat](https://attack.mitre.org/software/S0104) 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". Additionally, built-in features native to network devices and [Network Device CLI](https://attack.mitre.org/techniques/T1059/008) may be used (e.g. <code>show ip sockets</code>, <code>show tcp brief</code>).(Citation: US-CERT-TA18-106A)
System Network Connections Discovery
source_name: mitre-attack  url: https://attack.mitre.org/techniques/T1049  external_id: T1049     source_name: Amazon AWS VPC Guide  description: Amazon. (n.d.). What Is Amazon VPC?. Retrieved October 6, 2019.  url: https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html     source_name: Microsoft Azure Virtual Network Overview  description: Annamalai, N., Casey, C., Almeida, M., et. al.. (2019, June 18). What is Azure Virtual Network?. Retrieved October 6, 2019.  url: https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview     source_name: Google VPC Overview  description: Google. (2019, September 23). Virtual Private Cloud (VPC) network overview. Retrieved October 6, 2019.  url: https://cloud.google.com/vpc/docs/vpc     source_name: US-CERT-TA18-106A  description: US-CERT. (2018, April 20). Alert (TA18-106A) Russian State-Sponsored Cyber Actors Targeting Network Infrastructure Devices. Retrieved October 19, 2020.  url: https://www.us-cert.gov/ncas/alerts/TA18-106A     