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.

2.7 KB
Raw Blame
id: splunk-security-content-1a382c6c-7c2e-11eb-ac69-acde48001122
name: Nishang PowershellTCPOneLine
description: The following analytic detects the use of the Nishang Invoke-PowerShellTCPOneLine
  utility, which initiates a callback to a remote Command and Control (C2) server.
  It leverages Endpoint Detection and Response (EDR) data, focusing on PowerShell
  processes that include specific .NET classes like Net.Sockets.TCPClient and System.Text.ASCIIEncoding.
  This activity is significant as it indicates potential remote control or data exfiltration
  attempts by an attacker. If confirmed malicious, this could lead to unauthorized
  remote access, data theft, or further compromise of the affected system.
severity: medium
enabled: false
tags:
  mitre:
  - T1059.001
  categories:
  - endpoint
references:
- https://github.com/samratashok/nishang/blob/master/Shells/Invoke-PowerShellTcpOneLine.ps1
- https://www.volexity.com/blog/2021/03/02/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities/
- https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers/
- https://www.rapid7.com/blog/post/2021/03/03/rapid7s-insightidr-enables-detection-and-response-to-microsoft-exchange-0-day/
logsource:
  product: splunk
detection:
  splunk_spl: "| tstats `security_content_summariesonly` count min(_time) as firstTime\
    \ max(_time) as lastTime FROM datamodel=Endpoint.Processes\n  WHERE `process_powershell`\
    \ (Processes.process=*Net.Sockets.TCPClient*\n    AND\n    Processes.process=*System.Text.ASCIIEncoding*)\n\
    \  BY Processes.action Processes.dest Processes.original_file_name\n     Processes.parent_process\
    \ Processes.parent_process_exec Processes.parent_process_guid\n     Processes.parent_process_id\
    \ Processes.parent_process_name Processes.parent_process_path\n     Processes.process\
    \ Processes.process_exec Processes.process_guid\n     Processes.process_hash Processes.process_id\
    \ Processes.process_integrity_level\n     Processes.process_name 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\
    | `nishang_powershelltcponeline_filter`"
provenance:
  source: splunk/security_content
  source_id: 1a382c6c-7c2e-11eb-ac69-acde48001122
  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/nishang_powershelltcponeline.yml
notes:
  splunk_status: production
  splunk_data_source: []
  quarantine_reason: raw SPL — needs translation to AiSOC detection schema