← Back to SOC feed Coverage →

Detect Mach-O file produced by pyinstaller

yara LOW Yara-Rules
community
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Yara-Rules →
Retrieved: 2026-06-28T23:00:00Z · Confidence: medium

Hunt Hypothesis

This hypothesis posits that adversaries are utilizing PyInstaller to package malicious Python scripts into executable Mach-O binaries, thereby evading traditional script-based detection mechanisms. Proactive hunting for these artifacts in Azure Sentinel is critical because legitimate use of this tooling can mask the initial execution phase of fileless or obfuscated attacks within macOS environments.

YARA Rule

rule MachO_File_pyinstaller
{
    meta:
        author = "KatsuragiCSL (https://katsuragicsl.github.io)"
        description = "Detect Mach-O file produced by pyinstaller"
    strings:
        $a = "pyi-runtime-tmpdir"
        $b = "pyi-bootloader-ignore-signals"
    condition:
        any of them
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 2 string patterns in its detection logic.

False Positive Guidance

Here are 5 specific false positive scenarios for the Detect Mach-O file produced by pyinstaller rule in an enterprise macOS environment:

Original source: https://github.com/Yara-Rules/rules/blob/main/malware/MALW_Pyinstaller_OSX.yar