-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Script blocking by SHA256 not working #245
Comments
First off thanks for filing an issue. The difficulty here with blocking On my test machine you'll see I have the same hash as you. $ santactl fileinfo /opt/homebrew/bin/brew
Path : /opt/homebrew/bin/brew
SHA-256 : 4373b5ede9b19e6829f1cf92826c66e872c4a13bfc8338382177b0bfe6106df6
SHA-1 : 62d10567abf9bed0e618ba776c651cfec4ae89fa
CDHash :
Type : Script
Code-signed : No
Rule : Allowed (Scope)
[ user@Mac ( 9:23AM) /opt/homebrew ]
$ head -8 /opt/homebrew/bin/brew
#!/bin/bash -pu
set -u
# Fail fast with concise message when not using bash
# Single brackets is needed here for POSIX compatibility
# shellcheck disable=SC2292
if [ -z "${BASH_VERSION:-}" ]
then We're going to be looking into improving script handling in the future but given the complexity it'll be a while. |
Is there anything I can do for now to try and block it for now with Santa |
@master-vodawagner you could potentially use the Before you do this I'd make sure you read https://northpole.dev/deployment/configuration.html and https://northpole.dev/concepts/scopes.html. |
@master-vodawagner Actually scratch that, I'm wrong the issue here is with the interpreter. So my suggestion won't work. |
As @pmarkowsky mentioned, there isn't much recourse right now for blocking a script. There are a couple things we'd like to do to improve this, but I wanted to make sure some things were clear about what script blocking means. On macOS, there isn't a great way to do this. Sure we can block by hash under certain scenarios (namely, someone executing the script directly, e.g. So while we plan on adding some basic controls, it's worth making clear that script blocking is advisory at best. |
Hello,
Just exploring the capabilities here and looking into blocking brew and I've created the static rule along with the TCC, System Extension and notification profiles pushed through Jamf MDM.
However when executing brew it doesn't get blocked, the logs show the following error
Failed to get code#fo for file /Users/test/bin/brew: The operation couldn't be completed (OSStatus error -67062.)
If I run
santactl rule --check --sha256 $(santactl fileinfo --key SHA-256 /Users/test/bin/brew)
that comes back with Blocked (Binary)The text was updated successfully, but these errors were encountered: