Zentral london mac_ad_uk_2017

85
journeys from logging towards manage clients for incident response zentral

Transcript of Zentral london mac_ad_uk_2017

Page 1: Zentral london mac_ad_uk_2017

journeys from logging towards manage clients for incident response

zentral

Page 2: Zentral london mac_ad_uk_2017

@head_min

Henry Stamerjohann consultant, systems engineer Apfelwerk GmbH & Co. KG, Germany

whoami

Page 3: Zentral london mac_ad_uk_2017

where are we going• logging • events • tools • zentral ?

Page 4: Zentral london mac_ad_uk_2017

• central • centrally • pivotal • polar

[zen-t-ral], adj.zentral

Page 5: Zentral london mac_ad_uk_2017
Page 6: Zentral london mac_ad_uk_2017
Page 7: Zentral london mac_ad_uk_2017

open source tool to gather, process, and monitor events

Page 8: Zentral london mac_ad_uk_2017

basics

Page 9: Zentral london mac_ad_uk_2017

Client management

Events

Computer Admin

Filter Action

Tools

log controlaudit

Page 10: Zentral london mac_ad_uk_2017

aggregate system state, logs, and enforce management

Page 11: Zentral london mac_ad_uk_2017

collect records, store event data • system • user • applications

logging

Page 12: Zentral london mac_ad_uk_2017

• know about errors • early warning of suspicious activity • evidence to find what went wrong • reduce event data with filtering • aggregate/forward logs from multiple sources

logging

Page 13: Zentral london mac_ad_uk_2017

• examine system.log & other log files • Apple System Logging facility (ASL), Syslog APIs • error or status events • system processes

logging (pre Sierra)

Page 14: Zentral london mac_ad_uk_2017

tools like tail, grep for keyword search

Page 15: Zentral london mac_ad_uk_2017

syslog NOTE: Most system logs have moved to a new logging system. See log(1) for more information.

Page 16: Zentral london mac_ad_uk_2017

• new Unified Logging • very little goes to system.log file now • new Console.app and command line tool "log" • logs stored in a compressed binary format • different persistent settings configurable

logging (in Sierra)

Page 17: Zentral london mac_ad_uk_2017

log shipping not (yet) implemented

Page 18: Zentral london mac_ad_uk_2017

why ?

Page 19: Zentral london mac_ad_uk_2017

events are everything, and everything is events

Page 20: Zentral london mac_ad_uk_2017

Google Santa

Page 21: Zentral london mac_ad_uk_2017

• binary black-/whitelisting system for macOS • keeps track of binaries in macOS • event logging (hint: log aggregation) • local-only rules or sync with server • developed by Google

https://github.com/ google/santa

Google Santa

Page 22: Zentral london mac_ad_uk_2017

• client mode MONITOR • client mode LOCKDOWN (defaults deny) • WhitelistRegex/BlacklistRegex for paths • Zentral is a log & configuration server for Santa

Google Santa

Page 23: Zentral london mac_ad_uk_2017

full audit trail on binary executions

Page 24: Zentral london mac_ad_uk_2017

osquery

Page 25: Zentral london mac_ad_uk_2017

• ask questions about infrastructure • query system state with simple SQL syntax • low-level operating system analytics • multi platform support (mac, linux, windows) • developed by Facebook

https://osquery.io

osquery

Page 26: Zentral london mac_ad_uk_2017

• distributed queries • file integrity monitoring • osquery Packs

• import as feeds to Zentral • Zentral is a log & configuration server for osquery

osquery

Page 27: Zentral london mac_ad_uk_2017

customize audit trail

Page 28: Zentral london mac_ad_uk_2017
Page 29: Zentral london mac_ad_uk_2017

• log data aggregated from infrastructure • traditional log collection (modernized aproach) • shipped to Logstash, ingested by Zentral • multi platform support (mac, linux, windows) • Logstash, Beats by Elastic

https://elastic.co

ELK / Logstash + Beats

Page 30: Zentral london mac_ad_uk_2017

• Logstash ecosystem available • ElasticSearch is the datastore for events in Zentral • Kibana is used for event visualization • full ELK stack is integrated in Zentral

ELK / Logstash + Beats

Page 31: Zentral london mac_ad_uk_2017

centralized log events from infrastucture

Page 32: Zentral london mac_ad_uk_2017
Page 33: Zentral london mac_ad_uk_2017

• robust infrastructure monitoring • traditional server monitoring • uptime, downtime, and performance • Nagios instances push host & service events

to Zentral (event handlers)

Nagios / Icinga

Page 34: Zentral london mac_ad_uk_2017

infrastructure state monitoring

Page 35: Zentral london mac_ad_uk_2017

Inventory

Page 36: Zentral london mac_ad_uk_2017

Inventoryto link events with clients • multiple inventory sources • background sync • push / pull

Page 37: Zentral london mac_ad_uk_2017

Push inventory Pull inventory

Munki

osquery

Santa

Zentral

?

Page 38: Zentral london mac_ad_uk_2017

ActionsEventsgather, process,

and monitor events

Page 39: Zentral london mac_ad_uk_2017

Actions

Email

Events

osquery

Santa

Munkigather, process,

and monitor events

Page 40: Zentral london mac_ad_uk_2017

Configuration

osquery

Santa

Munki

osquery

Santa

Inventory

Munki

Munki

Events

osquery Santa

gather, process, and monitor

events

Email

Actions

Page 41: Zentral london mac_ad_uk_2017

Zentral is a open hub for your deployed tools

Page 42: Zentral london mac_ad_uk_2017

DemoObjective:connect inventory to Zentral

Inventory Events

Page 43: Zentral london mac_ad_uk_2017

Scenario• Filebeat log shipping already configured • configure and use Jamf Webhooks • create Events Probe w/ filter • inspect client events & server logs

Page 44: Zentral london mac_ad_uk_2017
Page 45: Zentral london mac_ad_uk_2017
Page 46: Zentral london mac_ad_uk_2017
Page 47: Zentral london mac_ad_uk_2017

scope of work goes beyond a single host there are tons of engineering and security considerations

Summary• Jamf Pro connects with Zentral

• Jamf Webhooks push events to Zentral

• Filebeat aggregates logfile data from JSS

• Probe filters scope to specific events

Page 48: Zentral london mac_ad_uk_2017

combine endpoint events & server logs

Page 49: Zentral london mac_ad_uk_2017

Munki: • Munki events from endpoints • Logfile from MunkiRepo web-server

Jamf Pro: • Logfiles from Jamf distribution points

Variations

Page 50: Zentral london mac_ad_uk_2017

Probes

Page 51: Zentral london mac_ad_uk_2017

Probes are • filters • configuration • actions

Page 52: Zentral london mac_ad_uk_2017

DemoObjective:osquery audit / compliance

Events Configuration Actions

Page 53: Zentral london mac_ad_uk_2017

Scenario• remove MDM profile • osquery Probe for change detection • automate remediation • review event history

Page 54: Zentral london mac_ad_uk_2017
Page 55: Zentral london mac_ad_uk_2017
Page 56: Zentral london mac_ad_uk_2017
Page 57: Zentral london mac_ad_uk_2017
Page 58: Zentral london mac_ad_uk_2017

Summary• osquery detect config change on client

• Probe is triggered back by osquery

• Jamf group change action trigger by Zentral

• Jamf policy scoped for mitigation, re-installs MDM profile

Page 59: Zentral london mac_ad_uk_2017

audit trail for management frameworks

Page 60: Zentral london mac_ad_uk_2017

Incident response

Page 61: Zentral london mac_ad_uk_2017

the quality of response can make a difference

• find weak spots • search for more information • not only focus on things that are broken • look also at the big picture • review change events over time

because incidents happen…

Page 62: Zentral london mac_ad_uk_2017

@llauren

To protect ourselves against the incompetent and the malignant…

Be a sysadmin. What a life.

Page 63: Zentral london mac_ad_uk_2017

DemoObjective:Control privileged accounts

Events Configuration Actions

Page 64: Zentral london mac_ad_uk_2017

Scenario• User with admin privileges • Santa in LOCKDOWN mode • binary execution: defaults deny

Page 65: Zentral london mac_ad_uk_2017
Page 66: Zentral london mac_ad_uk_2017
Page 67: Zentral london mac_ad_uk_2017
Page 68: Zentral london mac_ad_uk_2017
Page 69: Zentral london mac_ad_uk_2017
Page 70: Zentral london mac_ad_uk_2017
Page 71: Zentral london mac_ad_uk_2017

Summary• Santa config controlled by Zentral

• Santa blocks unknown binaries by default

• developer tools are usable and behave well

• admin privileges with security belt

Page 72: Zentral london mac_ad_uk_2017

control and monitor endpoints

Page 73: Zentral london mac_ad_uk_2017

Client Enrollment • Settings • download .pkg

Page 74: Zentral london mac_ad_uk_2017

Zentral

Page 75: Zentral london mac_ad_uk_2017

combine powerful existing tools to meet your operational requirements

Page 76: Zentral london mac_ad_uk_2017

deployment

Page 77: Zentral london mac_ad_uk_2017

simple Zentral all-in-one • Amazon AWS (prod. / eval.) • GoogleCloudServices (prod. / eval.) • Vagrant box (evaluation) • VMware .ova (evaluation) • docker-compose (dev. / eval.)

deployment

Page 78: Zentral london mac_ad_uk_2017

support options

Page 79: Zentral london mac_ad_uk_2017

(free) community support via github paid support contract on request: [email protected]

• SaaS (cloud based service) • professional services, custom development • integration support (on premise) • Munki manifests management (on request)

support options

Page 80: Zentral london mac_ad_uk_2017

info & doku

Page 81: Zentral london mac_ad_uk_2017

GitHub: https://github.com/zentralopensource Website: https://zentral.io

Tutorials: goo.gl/qsIVkl Ebook: https://leanpub.com/zentral

info & doku

Page 82: Zentral london mac_ad_uk_2017

We run 1/2 day workshops at some MacAdmin meetups in Europe during Q1/Q2 2017

talk to us

workshops

Page 83: Zentral london mac_ad_uk_2017

thank you !

Page 84: Zentral london mac_ad_uk_2017

Q & A

Page 85: Zentral london mac_ad_uk_2017