mirror of
https://github.com/google/santa.git
synced 2026-04-24 03:00:12 -04:00
* WIP Major modernization effort for many of the Santa docs * Update IPC concept doc and diagram * WIP - Apply suggestions from code review Only some of the comments are included in this first commit. Co-authored-by: Kathryn May <44557882+kathancox@users.noreply.github.com> Co-authored-by: Russell Hancox <russellhancox@users.noreply.github.com> * WIP - Part 2 - Apply suggestions from code review Adding some more suggestions. Still more to go through. Co-authored-by: Kathryn May <44557882+kathancox@users.noreply.github.com> Co-authored-by: Russell Hancox <russellhancox@users.noreply.github.com> * WIP Adding more PR suggestions * WIP - Apply suggestions from code review More commits from reviewers Co-authored-by: Kathryn May <44557882+kathancox@users.noreply.github.com> Co-authored-by: Russell Hancox <russellhancox@users.noreply.github.com> Co-authored-by: Pete Markowsky <pmarkowsky@users.noreply.github.com> * WIP - Apply suggestions from code review More PR suggestions Co-authored-by: Pete Markowsky <pmarkowsky@users.noreply.github.com> Co-authored-by: Kathryn May <44557882+kathancox@users.noreply.github.com> * WIP addressed more PR feedback * WIP - More PR feedback * WIP - More PR feedback on bundle identification. Link updates * WIP - Clarify bundle events * WIP - clarify how to request bundle binary events * Update santad setup tasks * Fix doc link * Update docs/binaries/santa-gui.md Co-authored-by: Pete Markowsky <pmarkowsky@users.noreply.github.com> --------- Co-authored-by: Kathryn May <44557882+kathancox@users.noreply.github.com> Co-authored-by: Russell Hancox <russellhancox@users.noreply.github.com> Co-authored-by: Pete Markowsky <pmarkowsky@users.noreply.github.com>
3.6 KiB
3.6 KiB
title, parent, redirect_from
| title | parent | redirect_from | |
|---|---|---|---|
| Binary Authorization | Intro |
|
Binary Authorization Overview
Background
santad subscribes to appropriate
Endpoint Security
(ES) framework events to authorize new executions in its
authorizer client. This framework ensures
that santad has the opportunity to allow or deny the execution of a binary
before any code in that binary is executed.
Flow of a New Execution
- The
santadES client subscribes to theES_EVENT_TYPE_AUTH_EXECto begin receiving and authorizing all new executions on the system. - When a binary is executed (e.g., via
execve(2)orposix_spawn(2)), the ES framework gathers some information about the execution and holds up the new image until ES either receives a response fromsantador a timeout occurs.- Note: ES supports authorization result caching that
santadattempts to take advantage of when possible. This cache resides within the ES subsystem in the kernel. When a result is already available, ES uses that result immediately without collecting event information or waiting for a new result. This can greatly reduce performance impact.
- Note: ES supports authorization result caching that
- The
authorizer client's callback is called by the ES framework with the event information. santadfirst checks if the event from another ES client on the system and, if configured to do so, immediately allows the event and stops all further processing for this event.- Some final checks on the event are made before continuing to handle
the event asynchronously on a concurrent dispatch queue.
- Note: A second asynchronous dispatch block is also submitted to execute
immediately before the event's deadline with the configured default
response. This helps prevent
santadfrom missing an ES response deadline which would result in thesantadprocess being killed.
- Note: A second asynchronous dispatch block is also submitted to execute
immediately before the event's deadline with the configured default
response. This helps prevent
santadthen checks its local authorization cache to determine if full evaluation is necessary.- If a cached result already exists, the
authorizer clientresponds to the ES subsystem immediately and no more event processing occurs.
- If a cached result already exists, the
- When
santadhas no local cache entry and must perform a full evaluation, it first inserts a placeholder value in its auth cache. If a second event for the same binary is received while the first is being processed, it will wait for the original event to be processed and result placed into the cache instead of performing duplicate processing. - Next,
santadextracts relevant file and code signing information from the event. It computes the file's hash and verifies the binary's code signature.- IMPORTANT: If code signature validation fails,
santadwill not attempt to lookup rules for any properties validated by the code signature (currently TeamID, SigningID and CDHash). This means only file hash and file scope rules apply.
- IMPORTANT: If code signature validation fails,
- The extracted information is then used to lookup any matching rules and make a decision.
- The decision is then posted back to the ES subsystem and local caches are updated.
- If the binary was blocked, the
Santa GUIwill display a message, if configured to do so.