Giter VIP home page Giter VIP logo

moroz's Introduction

moroz

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.

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"
#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"

Creating rules

Acceptable values for client mode:

MONITOR | LOCKDOWN

Values for rule_type:

BINARY | CERTIFICATE

Values for policy:

BLACKLIST | WHITELIST

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.

moroz's People

Contributors

adunham-stripe avatar csv-stripe avatar groob avatar michael-myers avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.