macOS System Network Connection Discovery via who, w, last, lsof, or netstat

Flags macOS process executions of who/w/last/lsof/netstat used to discover network or session information.

FreeReviewedSigma · Informational · v2
Product
macos
Category
process_creation
Author
Daniil Yugoslavskiy, oscd.community (SigmaHQ), DRL 1.1
Published
2020-10-19
Updated
2026-07-31
title: macOS System Network Connection Discovery via who, w, last, lsof, or netstat
id: 3a183ea3-1a95-42e6-ba1d-dd4926490bed
status: test
description: "This rule identifies process executions on macOS where the command image name ends with one of: /who, /w, /last, /lsof, or /netstat. These utilities are commonly used to enumerate system users and active network connections, which can support discovery and reconnaissance prior to further activity. It relies on process creation telemetry capturing the process image path for the executed command."
references:
  - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1049/T1049.md
  - https://github.com/SigmaHQ/sigma/blob/master/rules/macos/process_creation/proc_creation_macos_system_network_connections_discovery.yml
author: Daniil Yugoslavskiy, oscd.community, Huntrule Team
date: 2020-10-19
modified: 2022-12-28
tags:
  - attack.discovery
  - attack.t1049
logsource:
  category: process_creation
  product: macos
detection:
  selection:
    Image|endswith:
      - /who
      - /w
      - /last
      - /lsof
      - /netstat
  condition: selection
falsepositives:
  - Legitimate activities
level: informational
license: DRL-1.1
related:
  - id: 9a7a0393-2144-4626-9bf1-7c2f5a7321db
    type: derived