Files
blue-team-tools/rules/windows/network_connection/net_connection_win_python.yml
T

41 lines
1.9 KiB
YAML
Raw Normal View History

2021-12-10 16:31:16 +01:00
title: Python Initiated Connection
id: bef0bc5a-b9ae-425d-85c6-7b2d705980c6
status: experimental
description: Adversaries may attempt to get a listing of services running on remote hosts, including those that may be vulnerable to remote software exploitation
references:
2022-07-11 14:11:53 +01:00
- 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/
2022-10-26 09:42:26 +02:00
author: frack113
2021-12-10 16:31:16 +01:00
date: 2021/12/10
2022-09-21 11:53:39 +02:00
modified: 2022/09/20
2022-10-26 09:42:26 +02:00
tags:
- attack.discovery
- attack.t1046
2021-12-10 16:31:16 +01:00
logsource:
2022-07-11 14:11:53 +01:00
category: network_connection
product: windows
2021-12-10 16:31:16 +01:00
detection:
2022-07-11 14:11:53 +01:00
selection:
Initiated: 'true'
Image|contains: python
2022-09-21 11:53:39 +02:00
filter_conda:
# Related to anaconda updates. Command example: "conda update conda"
# This filter will only work with aurora agent enriched data as Sysmon EID 3 doesn't contain CommandLine nor ParentImage
ParentImage: C:\ProgramData\Anaconda3\Scripts\conda.exe
CommandLine|contains|all:
- 'C:\ProgramData\Anaconda3\Scripts\conda-script.py'
- 'update'
filter_conda_jupyter_notebook:
# Related to anaconda opening an instance of Jupyter Notebook
# This filter will only work with aurora agent enriched data as Sysmon EID 3 doesn't contain CommandLine nor ParentImage
ParentImage: C:\ProgramData\Anaconda3\python.exe
2022-09-21 12:16:15 +02:00
CommandLine|contains: 'C:\ProgramData\Anaconda3\Scripts\jupyter-notebook-script.py'
2022-09-21 11:53:39 +02:00
filter_local_communication:
2022-09-21 11:59:12 +02:00
# This could be caused when launching an instance of Jupyter Notebook locally for example but can also be caused by other instances of python openning sockets locally etc. So comment this out if you want to monitor for those instances
2022-09-21 11:53:39 +02:00
DestinationIp: 127.0.0.1
SourceIp: 127.0.0.1
condition: selection and not 1 of filter_*
2021-12-10 16:31:16 +01:00
falsepositives:
2022-07-11 14:11:53 +01:00
- Legitimate python script
2022-08-17 09:14:13 +02:00
level: medium