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.0 KB
Raw Blame
id: sigmahq-sigma-bef0bc5a-b9ae-425d-85c6-7b2d705980c6
name: Python Initiated Connection
description: Detects a Python process initiating a network connection. While this
  often relates to package installation, it can also indicate a potential malicious
  script communicating with a C&C server.
severity: medium
enabled: false
tags:
  mitre:
  - T1046
  categories:
  - endpoint
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1046/T1046.md#atomic-test-4---port-scan-using-python
- https://pypi.org/project/scapy/
logsource:
  category: network_connection
  product: windows
  definition: 'Requirements: Field enrichment is required for the filters to work.
    As field such as CommandLine and ParentImage are not available by default on this
    event type'
detection:
  selection:
    Initiated: 'true'
    Image|contains|all:
    - \python
    - .exe
  filter_optional_conda:
    ParentImage: C:\ProgramData\Anaconda3\Scripts\conda.exe
    CommandLine|contains|all:
    - :\ProgramData\Anaconda3\Scripts\conda-script.py
    - update
  filter_optional_conda_jupyter_notebook:
    ParentImage: C:\ProgramData\Anaconda3\python.exe
    CommandLine|contains: C:\ProgramData\Anaconda3\Scripts\jupyter-notebook-script.py
  filter_main_local_communication:
    DestinationIp: 127.0.0.1
    SourceIp: 127.0.0.1
  filter_main_pip:
    CommandLine|contains|all:
    - pip.exe
    - install
  condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
provenance:
  source: SigmaHQ/sigma
  source_id: bef0bc5a-b9ae-425d-85c6-7b2d705980c6
  source_commit: df5c6a6
  license: DRL-1.1
  license_url: https://github.com/SigmaHQ/Detection-Rule-License
  imported_at: '2026-05-04'
  imported_by: sigma_importer
  upstream_path: rules/windows/network_connection/net_connection_win_python.yml
falsepositives:
- Legitimate python scripts using the socket library or similar will trigger this.
  Apply additional filters and perform an initial baseline before deploying.
notes:
  quarantine_reason: 'upstream status: test'