• Stars
    star
    130
  • Rank 277,575 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created over 7 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Moroz is a Santa server

moroz

Moroz is a server for the Santa project.

Santa is a binary allowlisting/blocklisting 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.

Configurations

Moroz uses TOML rule files to specify configuration for Santa. The path to the folder with the configurations can be specified with -configs /path/to/configs.

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"
#blocklist_regex = "^(?:/Users)/.*"
#allowlist_regex = "^(?:/Users)/.*"
batch_size = 100

[[rules]]
rule_type = "BINARY"
policy = "BLOCKLIST"
sha256 = "2dc104631939b4bdf5d6bccab76e166e37fe5e1605340cf68dab919df58b8eda"
custom_msg = "blocklist firefox"

[[rules]]
rule_type = "CERTIFICATE"
policy = "BLOCKLIST"
sha256 = "e7726cf87cba9e25139465df5bd1557c8a8feed5c7dd338342d8da0959b63c8d"
custom_msg = "blocklist dash app certificate"

[[rules]]
rule_type = "TEAMID"
policy = "ALLOWLIST"
identifier = "EQHXZ8M8AV"
custom_msg = "allow google team id"

[[rules]]
rule_type = "SIGNINGID"
policy = "ALLOWLIST"
identifier = "EQHXZ8M8AV:com.google.Chrome"
custom_msg = "allow google chrome signing id"

Creating rules

Acceptable values for client mode:

MONITOR | LOCKDOWN

Values for rule_type:

BINARY | CERTIFICATE | TEAMID | SIGNINGID

Values for policy:

BLOCKLIST | ALLOWLIST | ALLOWLIST_COMPILER | REMOVE

Use the santactl command to get the sha256 value:

santactl fileinfo /Applications/Firefox.app

Build

The commands below assume you have $GOPATH/bin in your path.

cd cmd/moroz; go build

Run

moroz
See 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

Quickstart

Download the moroz binary from the Releases page. Copy the configs folder from the repo somewhere locally. It must have the global.toml file.

Generate a self-signed certificate which will be used by Santa clients and the server for communication.

./tools/dev/certificate/create

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.

./tools/dev/certificate/add-trusted-cert

Install Santa:

The latest version of Santa is available on the GitHub repo page: https://github.com/google/santa/releases

Configure Santa:

You will need to provide the SyncBaseURL settings. See the Santa repo for a complete guide on all the client configuration options.

Start moroz:

Assumes you have the ./server.crt and ./server.key files.

moroz -configs /path/to/configs/folder

moroz icon by Souvik Bhattacharjee from the Noun Project.

More Repositories

1

goviz-frameworks

pretty pictures of web frameworks and applications
236
star
2

radigast

Slack Bot with configurable plugins
Go
86
star
3

plist

Go Plist library
Go
49
star
4

mackit

Go
22
star
5

autopkgd

Continuous and concurrent autopkg checker with options.
Go
22
star
6

yo-yo

Like outset for yo.
Go
20
star
7

osquery-condition

Go
17
star
8

mac-scep-playground

just here for reference.
Go
17
star
9

imagr-server

JavaScript
10
star
10

docker-reposado

Docker container to run reposado and serve softwareupdates using nginx
10
star
11

racoon

loop through a munki manifest
Go
10
star
12

pngalpha

Go
8
star
13

upseed

Go
8
star
14

elm-videos

Elm
7
star
15

ape

munki api... experiment
Go
7
star
16

caching_exporter

OS X Caching Server metrics for prometheus.
Go
6
star
17

simian-import

Go
5
star
18

exec-template

Do useful things with go templates.
Go
5
star
19

docker-munkiwebadmin

Docker container to deploy munkiwebadmin.
Python
5
star
20

tclient

utility to create a PEM certificate chain by connecting to a tls server.
Go
5
star
21

coreos-etcd-secure-demo

CoreOS, etcd2, DigitalOcean and Terraform.
Shell
4
star
22

sal-docker

Dockerfile for Sal
Python
4
star
23

vquery

Return Veracross saved Query as JSON. It's an API!
Go
3
star
24

docker-caddy

docker image for https://github.com/mholt/caddy
3
star
25

docker-webdav

generic webdav share container using apache
Shell
3
star
26

go-simian

Go
3
star
27

docker-git-sync

Sync a git repo(with git LFS enabled)
Shell
2
star
28

pmextractor

I wasted a silly amount of time doing this.
Go
2
star
29

macadmin-vids

All the MacAdmin videos in one place.
Elm
2
star
30

pkcsscan

Go
2
star
31

groob.io

Go
2
star
32

map-to-struct

Go
2
star
33

pkgbuild

Go
2
star
34

munkiimport-server

JavaScript
2
star
35

jsonplistjson

Go
1
star
36

gosal

A Sal client written in Go
Go
1
star
37

docker-munki

Docker container with nginx and Munki Repo.
1
star
38

elm-nyc-stringsvc

Go
1
star
39

elm-new

easy start
Elm
1
star
40

slackinfo

A little utility for slack admins. Prints slack channel list, creator, purpose, date and members.
Go
1
star
41

CommPhone

CommPortal web scraper
Go
1
star
42

puppet-mac_profile

common macOS profiles managed by puppet...
HTML
1
star
43

docker-certified

Docker image for https://github.com/rcrowley/certified
Shell
1
star
44

osquery-effigy

Go
1
star
45

finalizer

Go
1
star
46

ulidgen

CLI utility to generate an ULID https://github.com/oklog/ulid
Go
1
star
47

docker-papercut

Papercut-NG server
Shell
1
star