text code block:library where host.os.type == "macos" and event.action == "load" and dll.path like "/Users/*" and process.name like "python*" and not dll.name like ("*.so", "*.dylib", "Python", "*.*_extension", "*.dylib.*") and not dll.path like ("*/site-packages/*/Qt*/lib/Qt*.framework/Versions/*/Qt*", "/Users/*/.pyenv/versions/*/lib/python*/site-packages/*")
Install detection rules in Elastic Security
Detect Unusual Library Load via Python in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).