Skip to content

Detections against malicious Python package activities - #4205

Merged
nasbench merged 13 commits into
developfrom
python_malicious_install
Aug 21, 2026
Merged

Detections against malicious Python package activities#4205
nasbench merged 13 commits into
developfrom
python_malicious_install

Conversation

@onurmerdogan

Copy link
Copy Markdown
Contributor

Details

This PR contains detections against malicious activities during Python package installations.

Stories

  • Malicious Python Package Installation: New story in order to track malicious activities during Python package installations. Covers both installation and build related activities.

Detections

  • Python Network Traffic during Package Build: Detects a Python process making an outbound network connection during package installation.
  • Python PTH File Creation during Package Installation: detects the creation of a Python path configuration (.pth) file in conjunction with a package installation process.
  • Python PYTHONPATH Modification During Package Installation: Detects modification of the PYTHONPATH environment variable in conjunction with a package installation process.
  • Python Site Hooks Creation during Package Installation: Detects the creation of a Python site hook file within a packages directory in conjunction with a package installation process.

@nasbench nasbench added this to the v6.5.0 milestone Aug 12, 2026
Comment thread detections/endpoint/python_network_traffic_during_package_build.yml Outdated
Comment thread detections/endpoint/python_network_traffic_during_package_build.yml Outdated
Comment thread detections/endpoint/python_network_traffic_during_package_build.yml Outdated
Comment thread detections/endpoint/python_network_traffic_during_package_build.yml Outdated
Comment thread detections/endpoint/python_network_traffic_during_package_build.yml Outdated
Comment thread detections/endpoint/python_network_traffic_during_package_build.yml Outdated
Comment thread detections/endpoint/python_network_traffic_during_package_build.yml Outdated
Comment thread detections/endpoint/python_pth_file_creation_during_package_installation.yml Outdated
Comment thread detections/endpoint/python_pth_file_creation_during_package_installation.yml Outdated
Comment thread detections/endpoint/python_pth_file_creation_during_package_installation.yml Outdated
@onurmerdogan
onurmerdogan requested a review from nasbench August 19, 2026 15:23

@nasbench nasbench left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I made a couple of changes to the output format via table to make the results consistent.

And in the Python Network Traffic During Package Build since there is a bug in EID 3 mapping of dest (it maps it to the actual dest from the event instead of the host). I made some changes to make it usable in the by clause.

@nasbench
nasbench merged commit b21862c into develop Aug 21, 2026
6 checks passed
@nasbench
nasbench deleted the python_malicious_install branch August 21, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants