Skip to content

armgit / AiSOC

Public Imported from GitHub
0

Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.

3.2 KB
Raw Blame
id: splunk-security-content-c4db14d9-7909-48b4-a054-aa14d89dbb19
name: Malicious PowerShell Process - Encoded Command
description: 'The following analytic detects the use of the EncodedCommand parameter
  in PowerShell processes.

  It leverages Endpoint Detection and Response (EDR) data to identify variations of
  the EncodedCommand parameter, including shortened forms and different command switch
  types.

  This activity can be significant because adversaries often use encoded commands
  to obfuscate malicious scripts, making detection harder.

  If confirmed malicious, this behavior could allow attackers to execute hidden code,
  potentially leading to unauthorized access, privilege escalation, or persistent
  threats within the environment.

  Review parallel events to determine legitimacy and tune based on known administrative
  scripts.'
severity: medium
enabled: false
tags:
  mitre:
  - T1027
  categories:
  - endpoint
references:
- https://regexr.com/662ov
- https://github.com/redcanaryco/AtomicTestHarnesses/blob/master/Windows/TestHarnesses/T1059.001_PowerShell/OutPowerShellCommandLineParameter.ps1
- https://ss64.com/ps/powershell.html
- https://twitter.com/M_haggis/status/1440758396534214658?s=20
- https://www.microsoft.com/security/blog/2022/01/15/destructive-malware-targeting-ukrainian-organizations/
- https://www.microsoft.com/en-us/security/blog/2023/05/24/volt-typhoon-targets-us-critical-infrastructure-with-living-off-the-land-techniques/
logsource:
  product: splunk
detection:
  splunk_spl: "| tstats `security_content_summariesonly`\n  count min(_time) as firstTime\n\
    \        max(_time) as lastTime\nfrom datamodel=Endpoint.Processes where\n`process_powershell`\n\
    by Processes.action Processes.dest Processes.original_file_name\n   Processes.parent_process\
    \ Processes.parent_process_exec\n   Processes.parent_process_guid Processes.parent_process_id\n\
    \   Processes.parent_process_name Processes.parent_process_path\n   Processes.process\
    \ Processes.process_exec Processes.process_guid\n   Processes.process_hash Processes.process_id\n\
    \   Processes.process_integrity_level Processes.process_name\n   Processes.process_path\
    \ Processes.user\n   Processes.user_id Processes.vendor_product\n| `drop_dm_object_name(Processes)`\n\
    | `security_content_ctime(firstTime)`\n| `security_content_ctime(lastTime)`\n\
    | where match(process,\"(?i)(?:^|\\\\s)(?:/(?!/)|--?|–{1,2}|—{1,2}|―{1,2})(?:ec|encodedcommand|encodedcomman|encodedcomma|encodedcomm|encodedcom|encodedco|encodedc|encoded|encode|encod|enco|enc|en|e(?=\\\
    \\s))\\\\s+['\\\\\\\"]?[A-Za-z0-9+/=]{5,}['\\\\\\\"]?\")\n| `malicious_powershell_process___encoded_command_filter`"
provenance:
  source: splunk/security_content
  source_id: c4db14d9-7909-48b4-a054-aa14d89dbb19
  source_commit: 4d4c7ee
  license: Apache-2.0
  license_url: https://github.com/splunk/security_content/blob/develop/LICENSE
  imported_at: '2026-05-04'
  imported_by: splunk_importer
  upstream_path: detections/endpoint/malicious_powershell_process___encoded_command.yml
notes:
  splunk_status: production
  splunk_data_source: []
  quarantine_reason: raw SPL — needs translation to AiSOC detection schema