T1057

Process Discovery

Description from ATT&CK

Adversaries may attempt to get information about running processes on a system. Information obtained could be used to gain an understanding of common software/applications running on systems within the network. Administrator or otherwise elevated access may provide better process details. Adversaries may use the information from Process Discovery during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions.

In Windows environments, adversaries could obtain details on running processes using the Tasklist utility via cmd or Get-Process via PowerShell. Information about processes can also be extracted from the output of Native API calls such as CreateToolhelp32Snapshot. In Mac and Linux, this is accomplished with the ps command. Adversaries may also opt to enumerate processes via /proc. ESXi also supports use of the ps command, as well as esxcli system process list.(Citation: Sygnia ESXi Ransomware 2025)(Citation: Crowdstrike Hypervisor Jackpotting Pt 2 2021)

On network devices, Network Device CLI commands such as show processes can be used to display current running processes.(Citation: US-CERT-TA18-106A)(Citation: show_processes_cisco_cmd)

Tests

Test #1 - Get all processes

Retrieves a list of all running processes on the system using System Events. This provides comprehensive process enumeration capabilities and may require TCC approval for System Events access.

⚠️ TCC Required
tell application "System Events" to get name of every process

Download Files

Download .scpt Download .swift Download Binary Download Application Bundle

Test #2 - Get all application processes (User facing applications)

Retrieves only user-facing application processes (excluding system processes and daemons). This focuses on applications that users typically interact with and may require TCC approval for System Events access.

⚠️ TCC Required
tell application "System Events"
  set runningApps to name of every application process
  repeat with appName in runningApps
    log appName
  end repeat
end tell

Download Files

Download .scpt Download .swift Download Binary Download Application Bundle

Test #3 - Get list of running processes using AppKit

Retrieves running applications using AppKit framework.

⚠️ TCC Required
use framework "AppKit"
use framework "Foundation"

set r to {}
set activeApps to current application's NSWorkspace's sharedWorkspace's runningApplications()
repeat with anApp in activeApps
    try
        set this_app to anApp's localizedName() as text
        if this_app is not missing value and this_app is not "" then
            set end of r to this_app
        end if
    on error
        -- Skip apps without names
    end try
end repeat
return r

Download Files

Download .scpt Download .swift Download Binary Download Application Bundle

References