T1057

Process Discovery

Discovery Last updated:

Adversaries may attempt to get information about running processes on a system. Information obtained could be used to gain an understanding of common software and applications running on systems within the network. In Windows environments, adversaries use tools such as tasklist.exe, wmic process, and PowerShell Get-Process to enumerate running processes. On Linux and macOS, the ps command and /proc filesystem are used. ESXi supports ps and esxcli system process list. This technique is frequently used during post-exploitation to identify security tools, determine if analysis environments (sandboxes, AV) are present, find target processes for injection, and shape follow-on actions. Threat actors including Volt Typhoon, Turla, and numerous RAT families (WarzoneRAT, FELIXROOT) perform process discovery as a standard reconnaissance step.

What is T1057 Process Discovery?

Process Discovery (T1057) maps to the Discovery tactic — the adversary is trying to figure out your environment in MITRE ATT&CK.

This page provides production-ready detection logic for Process Discovery, covering the data sources and telemetry it touches: Process: Process Creation, Command: Command Execution, Microsoft Defender for Endpoint. The queries below are rated low severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Discovery
Technique
T1057 Process Discovery
Canonical reference
https://attack.mitre.org/techniques/T1057/
Microsoft Sentinel / Defender
kusto
let ProcessDiscoveryTools = dynamic(["tasklist.exe", "pslist.exe", "proclist.exe", "tlist.exe"]);
let WmicProcessPatterns = dynamic(["process get", "process list", "process where", "win32_process"]);
let SuspiciousParents = dynamic([
  "cmd.exe", "powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe",
  "mshta.exe", "rundll32.exe", "regsvr32.exe", "msbuild.exe", "installutil.exe",
  "certutil.exe", "bitsadmin.exe", "wmic.exe"
]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where (
    FileName in~ (ProcessDiscoveryTools)
    or (FileName =~ "wmic.exe" and ProcessCommandLine has_any (WmicProcessPatterns))
    or (FileName in~ ("powershell.exe", "pwsh.exe") and ProcessCommandLine has_any ("Get-Process", "get-process", "ps ", "gps ", "Get-WmiObject Win32_Process", "Get-CimInstance Win32_Process", "[System.Diagnostics.Process]::GetProcesses"))
    or (FileName =~ "ps" and InitiatingProcessFileName has_any ("bash", "sh", "zsh", "python", "python3", "perl", "ruby"))
)
| extend IsKnownBadParent = InitiatingProcessFileName has_any (SuspiciousParents)
| extend IsPowerShellDiscovery = FileName in~ ("powershell.exe", "pwsh.exe") and ProcessCommandLine has_any ("Get-Process", "Get-WmiObject Win32_Process", "Get-CimInstance Win32_Process")
| extend IsWmicDiscovery = FileName =~ "wmic.exe" and ProcessCommandLine has_any (WmicProcessPatterns)
| extend IsTasklistExec = FileName in~ (ProcessDiscoveryTools)
| extend HasVerboseFlag = ProcessCommandLine has_any ("/v", "/fo", "/svc", "ExecutablePath", "CommandLine")
| project
    Timestamp, DeviceName, AccountName, AccountDomain,
    FileName, ProcessCommandLine,
    InitiatingProcessFileName, InitiatingProcessCommandLine,
    InitiatingProcessParentFileName,
    IsKnownBadParent, IsPowerShellDiscovery, IsWmicDiscovery, IsTasklistExec, HasVerboseFlag
| sort by Timestamp desc

Detects process discovery activity using Microsoft Defender for Endpoint DeviceProcessEvents. Monitors for execution of tasklist.exe, wmic.exe with Win32_Process queries, PowerShell Get-Process/Get-WmiObject/Get-CimInstance cmdlets, and process enumeration launched from suspicious parent processes. Flags additional context indicators including verbose output flags (/v, /svc, ExecutablePath) that suggest adversaries seeking detailed process information for security tool detection or injection target selection.

low severity medium confidence

Data Sources

Process: Process Creation Command: Command Execution Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents

False Positives

  • IT administrators running tasklist or wmic process get for inventory, troubleshooting, or performance monitoring
  • Endpoint Detection and Response (EDR) agents, antivirus software, and monitoring tools (Datadog, SolarWinds, Nagios) that periodically enumerate processes as part of their normal operation
  • Software installers and update mechanisms that check for conflicting processes before installation or during version upgrades
  • Help desk and remote support tools (TeamViewer, ConnectWise, SolarWinds N-central) that use tasklist or WMI to display running applications to remote support agents
  • Developer tools, IDEs (Visual Studio, JetBrains), and build pipelines that enumerate processes as part of debugging, profiling, or test orchestration
  • Vulnerability scanners and asset management platforms running authenticated scans against endpoints

Sigma rule & cross-platform mapping

The detection logic for Process Discovery (T1057) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  category: process_creation
  product: windows

Browse the community-maintained Sigma rules for this technique:


Testing Methodology

Validate this detection against 5 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Tasklist Verbose Process Enumeration

    Expected signal: Sysmon Event ID 1: Process Create with Image=tasklist.exe, CommandLine='tasklist /v /fo csv'. Security Event ID 4688 (if command line auditing enabled). Sysmon Event ID 11: File Create for %TEMP%\proc_list.csv. Parent process will be cmd.exe or the shell running the test.

  2. Test 2WMIC Process Discovery with Executable Path

    Expected signal: Sysmon Event ID 1: Process Create with Image=wmic.exe, CommandLine containing 'process get' and 'ExecutablePath'. WMI-Activity/Operational Event ID 5857/5861 for WMI query execution. Sysmon Event ID 11: File Create for %TEMP%\wmic_proc.csv.

  3. Test 3PowerShell Process Enumeration via Get-Process

    Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Get-Process'. PowerShell ScriptBlock Log Event ID 4104 with full script content. Sysmon Event ID 11: File Create for the CSV output.

  4. Test 4Process Discovery via WMI CIM Instance (PowerShell)

    Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Get-CimInstance Win32_Process'. PowerShell ScriptBlock Log Event ID 4104 showing the full query including security product name filter. WMI-Activity/Operational logs for CIM query execution.

  5. Test 5Linux Process Enumeration via ps with Full Detail

    Expected signal: Auditd execve records (if configured with EXECVE audit rules): syscall=execve with argv containing 'ps', 'aux'. Linux syslog/auth.log may capture activity if PAM logging is enabled. On macOS, Unified Log entries with process=ps. Parent process will be the shell (bash/sh/zsh) used to run the test.


Response Playbook

Triage

  1. Identify the initiating process — what spawned the process discovery command? Office applications (WINWORD.EXE, EXCEL.EXE), browser processes, or scripting engines (wscript.exe, mshta.exe) as parents are high-priority indicators of post-exploitation activity
  2. Examine the command line for verbose or targeted flags — 'tasklist /v', 'tasklist /svc', 'wmic process get Name,ExecutablePath,CommandLine,ProcessId' or enumerating specific security products (e.g., querying for av.exe, defender, sentinel) suggests adversary profiling rather than routine admin activity
  3. Check the user account context — is this a standard user, domain admin, or service account? Standard users on endpoints running wmic process queries are unusual; verify whether this account would typically run such commands
  4. Review the timeline: was this process discovery preceded by initial access indicators (phishing open, macro execution, script host activation) within the last 1-4 hours? Correlate with DeviceLogonEvents and DeviceFileEvents for the same host
  5. Look for discovery chaining — adversaries rarely stop at process enumeration. Check if the same process/user also ran whoami, ipconfig/ifconfig, net user, net localgroup administrators, systeminfo, or nltest within the same session window (±15 minutes)
  6. Check for security tool enumeration — search the command output or command line arguments for references to EDR/AV process names (MsMpEng.exe, CSFalconService.exe, SentinelAgent.exe, CarbonBlack). This indicates the adversary is fingerprinting defensive tools
  7. On Linux: if ps was invoked from a web server process (apache2, nginx, httpd, php-fpm, tomcat), treat as critical and initiate IR — this pattern is consistent with web shell post-exploitation

Containment

  1. If process discovery was spawned by a known-malicious parent (Office macro, web shell, exploit payload): immediately isolate the endpoint using EDR network isolation or emergency VLAN change to prevent C2 communication and lateral movement
  2. If the enumeration was performed by a compromised user account: disable the account in Active Directory, revoke active sessions and tokens (including OAuth/SAML), and force password reset for the account and any service accounts accessible from the same host
  3. If security tool enumeration is confirmed (adversary queried for AV/EDR process names): escalate immediately — the adversary is profiling defenses and a targeted kill or bypass attempt is likely imminent; engage IR team and consider additional endpoint isolation
  4. Preserve volatile forensic state before taking containment actions: capture running process list, active network connections (netstat -ano), and memory image if possible from an isolated snapshot or via EDR
  5. Block any external IPs observed in concurrent network connections from the same endpoint or user session at perimeter firewall and DNS

Evidence Collection

  1. Process Creation Events — Sysmon Event ID 1 or Security Event ID 4688 (requires 'Audit Process Creation' policy with command line auditing enabled via GPO: Computer Configuration > Windows Settings > Security Settings > Advanced Audit Policy > Detailed Tracking)
  2. PowerShell ScriptBlock Logging — Event ID 4104 from Microsoft-Windows-PowerShell/Operational; captures full deobfuscated Get-Process and WMI query content including any filtering or output parsing logic
  3. WMI Activity Logs — Microsoft-Windows-WMI-Activity/Operational Event ID 5861 for WMI process queries; includes the caller process PID and query text
  4. Security Event ID 4688 from the Windows Security log — process creation with command line if Audit Process Creation is enabled (required for non-Sysmon environments)
  5. EDR process tree snapshot — retrieve the full parent-child chain from the EDR console to identify all processes involved in the attack chain, not just the discovery command itself
  6. Prefetch files — C:\Windows\Prefetch\TASKLIST.EXE-*.pf, WMIC.EXE-*.pf — execution timestamps and counts help establish frequency and timeline
  7. Linux: bash/sh history files (~/.bash_history, /home/*/.bash_history, /root/.bash_history), auditd logs for execve syscalls if auditd is configured with process execution rules
  8. Linux /proc filesystem contents at time of enumeration: /proc/*/cmdline, /proc/*/status — capture these if a web shell or implant was used to read /proc directly rather than spawning ps

Escalation Criteria

  • ! Process discovery spawned by a scripting engine (wscript.exe, cscript.exe, mshta.exe), Office application, or a non-administrative user on a standard endpoint — this pattern is consistent with malware post-exploitation
  • ! Adversary explicitly queried for or filtered results to identify security tool processes (AV/EDR/XDR names) — defensive fingerprinting precedes tool kill or bypass, indicating an advanced and deliberate threat actor
  • ! Process discovery is one of 3+ discovery techniques (T1033, T1016, T1069, T1082, T1007) executed within a 30-minute window on the same host — discovery chaining at scale is a strong IR trigger
  • ! Process discovery observed on multiple endpoints within a short time window (possible automated lateral movement or worm-like propagation) — query DeviceProcessEvents for the same pattern across all devices
  • ! Discovery executed by a service account or machine identity (e.g., SYSTEM, NT AUTHORITY\NETWORK SERVICE) from an unexpected process — may indicate credential theft and service account compromise

Investigation Guide

Forensic Artifacts

  • > Windows Prefetch: C:\Windows\Prefetch\TASKLIST.EXE-*.pf — execution count and timestamps; each run increments the counter, allowing estimation of enumeration frequency
  • > Windows Prefetch: C:\Windows\Prefetch\WMIC.EXE-*.pf — wmic.exe execution history
  • > Registry: HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RunMRU — if discovery commands were run interactively via the Run dialog
  • > Event Log: Microsoft-Windows-WMI-Activity/Operational (Event ID 5857, 5858, 5861) — WMI process query activity with calling process PID
  • > Event Log: Microsoft-Windows-PowerShell/Operational (Event ID 4103, 4104) — Get-Process and WMI cmdlet execution with full script block content
  • > Event Log: Security (Event ID 4688) — process creation with command line (requires audit policy); correlate PPID with parent process to build execution chain
  • > Sysmon Event ID 1 logs — full command line, hash, parent process image path, and process GUID enabling full chain reconstruction
  • > Linux: /var/log/audit/audit.log — auditd execve records for ps, cat /proc, and related commands if EXECVE rules are configured
  • > Linux: ~/.bash_history and /root/.bash_history — command history with timestamps if HISTTIMEFORMAT is set
  • > macOS: Unified Log (log show --predicate 'process == "ps"') — process execution with parent PID in macOS Unified Logging System
  • > Memory artifacts: if CreateToolhelp32Snapshot or NtQuerySystemInformation were called directly from a malicious process, these API calls appear in memory forensics and ETW traces (Microsoft-Windows-Kernel-Process provider)

Tuning Guidance

Process discovery generates significant noise in enterprise environments due to legitimate administrative activity. The primary tuning strategy is allowlisting by parent process: establish a baseline of which parent processes legitimately spawn tasklist.exe or wmic process queries in your environment (SCCM/ConfigMgr, monitoring agents, installer frameworks) and filter those combinations. For PowerShell Get-Process, focus on unusual initiating processes rather than suppressing by command pattern alone. Consider raising severity thresholds by requiring co-occurrence with other discovery techniques — solo process enumeration by an admin is common; three discovery techniques in 20 minutes is not. For wmic.exe, filter on the specific query patterns: 'wmic process get Name' from a monitoring agent is different from 'wmic process get Name,ExecutablePath,CommandLine' which provides attacker-useful detail. On Linux, tune by the parent of ps: if a web server process (apache2, nginx, php-fpm) spawns ps, alert immediately regardless of arguments. On Windows servers, process discovery by service accounts tied to known monitoring platforms should be excluded; however, do not create broad exclusions by account — use account+parent+hostname combinations. Enable Security Event 4688 command line auditing if not already present, as it provides a second source independent of Sysmon for coverage validation.


Hunting Queries

Hunt for hosts and accounts performing repeated process discovery over 7 days. A high execution count from the same user/host combination may indicate persistent implant activity, automated reconnaissance scripts, or an attacker who has maintained access and periodically re-enumerates the environment. Legitimate admin use is typically infrequent and targeted.

Hunting — KQL
kql
DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName in~ ("tasklist.exe", "wmic.exe")
    or (FileName in~ ("powershell.exe", "pwsh.exe") and ProcessCommandLine has_any ("Get-Process", "Get-WmiObject", "Get-CimInstance"))
| summarize
    DiscoveryCount = count(),
    Commands = make_set(ProcessCommandLine, 10),
    Parents = make_set(InitiatingProcessFileName, 5),
    FirstSeen = min(Timestamp),
    LastSeen = max(Timestamp)
  by DeviceName, AccountName
| where DiscoveryCount >= 5
| extend DaysActive = datetime_diff('day', LastSeen, FirstSeen)
| sort by DiscoveryCount desc
Hunting — SPL
spl
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
  (Image="*\\tasklist.exe" OR Image="*\\wmic.exe"
   OR ((Image="*\\powershell.exe" OR Image="*\\pwsh.exe") AND (CommandLine="*Get-Process*" OR CommandLine="*Win32_Process*")))
| stats
    count as DiscoveryCount,
    values(CommandLine) as Commands,
    values(ParentImage) as Parents,
    earliest(_time) as FirstSeen,
    latest(_time) as LastSeen
  by host, User
| where DiscoveryCount >= 5
| eval ActiveDays=round((LastSeen - FirstSeen) / 86400, 1)
| sort - DiscoveryCount

Hunt for discovery chaining: multiple different discovery tools executed by the same account on the same host within a 20-minute window. Adversaries typically run several discovery techniques in rapid succession during the initial post-exploitation recon phase. Three or more distinct discovery tools within 20 minutes is a strong behavioral indicator of active intrusion versus routine administration.

Hunting — KQL
kql
let DiscoveryWindow = 20min;
DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName in~ ("tasklist.exe", "net.exe", "whoami.exe", "ipconfig.exe", "hostname.exe", "systeminfo.exe", "nltest.exe", "wmic.exe")
    or (FileName in~ ("powershell.exe", "pwsh.exe") and ProcessCommandLine has_any ("Get-Process", "Get-LocalUser", "Get-LocalGroup", "ipconfig", "Get-NetAdapter", "Get-WmiObject", "Get-CimInstance"))
| summarize
    TechniquesUsed = dcount(FileName),
    CommandsRun = make_set(ProcessCommandLine, 15),
    ToolsSeen = make_set(FileName, 10)
  by DeviceName, AccountName, bin(Timestamp, DiscoveryWindow)
| where TechniquesUsed >= 3
| sort by TechniquesUsed desc, Timestamp desc
Hunting — SPL
spl
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
  (Image="*\\tasklist.exe" OR Image="*\\whoami.exe" OR Image="*\\ipconfig.exe"
   OR Image="*\\hostname.exe" OR Image="*\\systeminfo.exe" OR Image="*\\nltest.exe"
   OR Image="*\\wmic.exe" OR Image="*\\net.exe"
   OR ((Image="*\\powershell.exe" OR Image="*\\pwsh.exe") AND (CommandLine="*Get-Process*" OR CommandLine="*Get-LocalUser*" OR CommandLine="*Get-NetAdapter*")))
| bin _time span=20m
| stats
    dc(Image) as TechniquesUsed,
    values(Image) as ToolsSeen,
    values(CommandLine) as CommandsRun
  by _time, host, User
| where TechniquesUsed >= 3
| sort - TechniquesUsed

Hunt for process discovery explicitly targeting security product process names. Adversaries enumerate processes specifically looking for AV/EDR agents (Defender, CrowdStrike, SentinelOne, Carbon Black, Cylance, Tanium) before attempting to kill, blind, or bypass them. This targeted enumeration is a direct precursor to T1562.001 (Impair Defenses) and represents high-fidelity attacker behavior with minimal legitimate use cases.

Hunting — KQL
kql
DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName =~ "wmic.exe"
| where ProcessCommandLine has_any (
    "MsMpEng", "SentinelAgent", "CSFalconService", "CarbonBlack",
    "cb.exe", "bdagent", "kavfs", "klnagent", "cylancesvc",
    "taniumclient", "xagt", "qualysagent", "nessus",
    "antivirus", "defender", "endpoint", "security"
  )
  or (FileName in~ ("powershell.exe", "pwsh.exe")
    and ProcessCommandLine has_any (
      "MsMpEng", "SentinelAgent", "CSFalconService", "CarbonBlack",
      "bdagent", "cylancesvc", "taniumclient", "xagt"
    ))
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine
| sort by Timestamp desc
Hunting — SPL
spl
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
  (Image="*\\wmic.exe" OR Image="*\\tasklist.exe" OR Image="*\\powershell.exe" OR Image="*\\pwsh.exe")
  (CommandLine="*MsMpEng*" OR CommandLine="*SentinelAgent*" OR CommandLine="*CSFalconService*"
   OR CommandLine="*CarbonBlack*" OR CommandLine="*cylancesvc*" OR CommandLine="*bdagent*"
   OR CommandLine="*taniumclient*" OR CommandLine="*xagt*" OR CommandLine="*qualysagent*"
   OR CommandLine="*antivirus*" OR CommandLine="*defender*")
| table _time, host, User, Image, CommandLine, ParentImage, ParentCommandLine
| sort - _time

Atomic Red Team Tests

Test 1 Tasklist Verbose Process Enumeration
windows

Executes tasklist.exe with the /v (verbose) and /fo csv flags to enumerate all running processes with full detail including window titles, memory usage, and session IDs. This matches the technique used by the Turla group's Epic malware ('tasklist /v') and Zebrocy. The /fo csv output format makes the results easy to parse and exfiltrate programmatically.

Command

powershell
tasklist /v /fo csv > %TEMP%\proc_list.csv

Cleanup

powershell
del %TEMP%\proc_list.csv

Expected Telemetry

Sysmon Event ID 1: Process Create with Image=tasklist.exe, CommandLine='tasklist /v /fo csv'. Security Event ID 4688 (if command line auditing enabled). Sysmon Event ID 11: File Create for %TEMP%\proc_list.csv. Parent process will be cmd.exe or the shell running the test.

Expected Detection

KQL: IsTasklistExec=true, HasVerboseFlag=true. SPL: IsTasklist=1, VerboseEnum=1, RiskScore >= 2. The /v flag triggers the VerboseEnum indicator in both queries.

Test 2 WMIC Process Discovery with Executable Path
windows

Uses wmic.exe to query Win32_Process and retrieve the Name, ProcessId, ExecutablePath, and CommandLine for all running processes. This is the exact technique used by Zebrocy ('wmic process get Capture, ExecutablePath') and Volt Typhoon. Retrieving ExecutablePath and CommandLine provides attackers with full details needed to identify security tools and select injection targets.

Command

powershell
wmic process get Name,ProcessId,ExecutablePath,CommandLine /format:csv > %TEMP%\wmic_proc.csv

Cleanup

powershell
del %TEMP%\wmic_proc.csv

Expected Telemetry

Sysmon Event ID 1: Process Create with Image=wmic.exe, CommandLine containing 'process get' and 'ExecutablePath'. WMI-Activity/Operational Event ID 5857/5861 for WMI query execution. Sysmon Event ID 11: File Create for %TEMP%\wmic_proc.csv.

Expected Detection

KQL: IsWmicDiscovery=true, HasVerboseFlag=true. SPL: IsWmicProcess=1, VerboseEnum=1, RiskScore >= 2. Both WmicProcessPatterns ('process get') and VerboseFlag ('executablepath') match.

Test 3 PowerShell Process Enumeration via Get-Process
windows

Uses PowerShell's Get-Process cmdlet to enumerate all running processes and output to a CSV file. This simulates the reconnaissance behavior seen in numerous RAT families and post-exploitation frameworks. The Select-Object expansion to include Path and CPU mimics attacker enumeration of full process details.

Command

powershell
powershell.exe -NoProfile -Command "Get-Process | Select-Object Name,Id,Path,CPU,Description | Export-Csv -Path $env:TEMP\ps_proc.csv -NoTypeInformation"

Cleanup

powershell
Remove-Item $env:TEMP\ps_proc.csv -ErrorAction SilentlyContinue

Expected Telemetry

Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Get-Process'. PowerShell ScriptBlock Log Event ID 4104 with full script content. Sysmon Event ID 11: File Create for the CSV output.

Expected Detection

KQL: IsPowerShellDiscovery=true. SPL: IsPSGetProcess=1, RiskScore >= 1. The 'Get-Process' pattern matches in both detection queries.

Test 4 Process Discovery via WMI CIM Instance (PowerShell)
windows

Uses PowerShell Get-CimInstance (the modern replacement for Get-WmiObject) to query the Win32_Process class, filtering for processes with names matching common security tool patterns. This simulates an adversary scripting targeted security tool discovery before attempting to kill or blind defenses.

Command

powershell
powershell.exe -NoProfile -Command "Get-CimInstance Win32_Process | Select-Object Name,ProcessId,ExecutablePath,CommandLine | Where-Object {$_.Name -match 'defender|sentinel|falcon|carbon|cylance|tanium'} | Format-List"

Expected Telemetry

Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Get-CimInstance Win32_Process'. PowerShell ScriptBlock Log Event ID 4104 showing the full query including security product name filter. WMI-Activity/Operational logs for CIM query execution.

Expected Detection

KQL: IsPowerShellDiscovery=true. SPL: IsPSGetProcess=1. Additionally matches the security tool hunting query targeting SentinelAgent, CSFalconService, CarbonBlack patterns in the command line.

Test 5 Linux Process Enumeration via ps with Full Detail
linux

Executes ps with aux flags on Linux/macOS to enumerate all running processes with user, CPU, memory, and full command line arguments. This is the standard post-exploitation reconnaissance step on Unix-like systems as documented in LoudMiner and FruitFly malware behavior. The output is piped to grep to simulate adversaries filtering for specific targets.

Command

bash
ps aux --sort=-%mem | head -50 > /tmp/proc_enum.txt && ps -ef | grep -E '(apache|nginx|docker|containerd|java|python|node)' >> /tmp/proc_enum.txt

Cleanup

bash
rm -f /tmp/proc_enum.txt

Expected Telemetry

Auditd execve records (if configured with EXECVE audit rules): syscall=execve with argv containing 'ps', 'aux'. Linux syslog/auth.log may capture activity if PAM logging is enabled. On macOS, Unified Log entries with process=ps. Parent process will be the shell (bash/sh/zsh) used to run the test.

Expected Detection

Matches the SPL query extension for Linux syslog if auditd is forwarding execve events with sourcetype=linux_secure or auditd. The parent-child relationship (shell spawning ps) is the primary signal; elevated suspicion if parent is a web server process.

Related Detections

Tactic Hub