Moroz is a server for the Santa project.
Santa is a binary whitelisting/blacklisting system for macOS. It consists of a kernel extension that monitors for executions, a userland daemon that makes execution decisions based on the contents of a SQLite database, a GUI agent that notifies the user in case of a block decision and a command-line utility for managing the system and synchronizing the database with a server.
Santa is a project of Google's Macintosh Operations Team.
See this short video for a demo.
Moroz uses TOML rule files to specify configuration for Santa.
The path to the folder with the configurations can be specified with
Moroz expects a
global.toml file which contains a list of rules. The
global config can be overriden by providing a machine specific config. To do so, name the file for each host with the Santa
machine id configuration parameter. By default, this is the hardware UUID of the mac.
Below is a sample configuration file:
client_mode = "MONITOR" #blacklist_regex = "^(?:/Users)/.*" #whitelist_regex = "^(?:/Users)/.*" batch_size = 100 [[rules]] rule_type = "BINARY" policy = "BLACKLIST" sha256 = "2dc104631939b4bdf5d6bccab76e166e37fe5e1605340cf68dab919df58b8eda" custom_msg = "blacklist firefox" [[rules]] rule_type = "CERTIFICATE" policy = "BLACKLIST" sha256 = "e7726cf87cba9e25139465df5bd1557c8a8feed5c7dd338342d8da0959b63c8d" custom_msg = "blacklist dash app certificate"
Acceptable values for client mode:
MONITOR | LOCKDOWN
BINARY | CERTIFICATE
BLACKLIST | WHITELIST
santactl command to get the sha256 value:
santactl fileinfo /Applications/Firefox.app
The commands below assume you have
$GOPATH/bin in your path.
cd cmd/moroz; go build
moroz -h for a full list of options.
Usage of moroz: -configs string path to config folder (default "../../configs") -event-logfile string path to file for saving uploaded events (default "/tmp/santa_events") -http-addr string http address ex: -http-addr=:8080 (default ":8080") -tls-cert string path to TLS certificate (default "server.crt") -tls-key string path to TLS private key (default "server.key") -version print version information
moroz binary from the Releases page.
configs folder from the repo somewhere locally. It must have the
Generate a self-signed certificate which will be used by Santa clients and the server for communication.
Add the Santa CN to your hosts file.
sudo echo "127.0.0.1 santa" >> /etc/hosts
Add the self-signed cert to your system roots.
The latest version of Santa is available on the GitHub repo page: https://github.com/google/santa/releases
You will need to provide the
SyncBaseURL settings. See the Santa repo for a complete guide on all the client configuration options.
Assumes you have the
moroz -configs /path/to/configs/folder