SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
ELK: IT'S BIG LOG SEASON
LOGGING FROM A TO Z
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
WHO WE ARE
• Brian Wilson
• Information Security Manager at SAS
• UNIX Sys Admin, Network Engineer, Infosec Engineer
• Family, Mac/Linux, Coding, Automation, Long walks on the beach
• @brianwilson / https://github.com/bdwilson
• Eric Luellen
• Sr. Information Security Engineer at SAS
• Open source technologies, network security monitoring, active defenses
• Snowboarding, volleyball, basketball, anything away from a computer
• @ericl42 / https://github.com/ericl42
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
WHY DO WE CARE ABOUT LOGS?
• Regulatory & compliance requirements
• HIPAA, SOX, PCI
• Troubleshooting
• Incident Response
• Proactive resource planning
• Logs are the building blocks of other projects
• Prove value of log data for future technology investment!
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
SO WHY HAVEN’T WE DONE ANYTHING
• Resources – Time, Money, & People
• Volume of data
• Disparate sources, formatting issues
• Application logs don’t follow same standard as OS logs
• Cooperation from other groups
• Unsure how to obtain and locate sources
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
WHAT ARE THE REQUIREMENTS?
• Simple to use
• The goal is to reduce the reaction time and make it easier to track down a
problem, resolve an incident, or search for some data point.
• Scalable
• As log sources and events/second grow, your solution has to scale as well.
• Expandable
• Easy to incorporate or feed into other systems.
• Notifications/Alerting
• Know when your log sources are deviating from defined criteria.
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
LOGISTICAL PREPARATION
• Identify the data sources
• Authentication Failures/Success
• UNIX, Windows, DLP, Anti-Virus, Web,
Applications…
• Configure sources for proper logging
• Determine location of syslog collector(s)
• DMZ, Cloud...
• Open firewall port(s)
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
ARCHITECTURE
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
HOW DO WE GET THE LOGS THERE?
• UNIX
• Local syslog settings
• auth.*;authpriv.* @syslog.domain.net
• Agent based (Nxlog)
• Windows
• Agent based (Nxlog)
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
NXLOG EXAMPLE
<Input in>
Module im_msvistalog
ReadFromLastTrue
Query <QueryList>
<Query Id="0">
<Select Path="Security">*[System[(EventID='4624')]]</Select>
<Select Path="Security">*[System[(EventID='4625')]]</Select>
</Query>
</QueryList>
Exec to_syslog_bsd();
Exec if $raw_event =~ /Account Name:s+S+$s+Account Domain:/ drop(); 
else if $raw_event =~ /^(.+)Detailed Authentication Information:/ $raw_event = $1; if $raw_event =~ s/t/ /g {}
</Input>
<Output out>
Module om_udp
Host X.X.X.X
Port 2514
</Output>
<Route 1>
Path in => out
</Route>
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
• Basic aggregation of logs
• Filters and funnels logs as needed
• Ability to send to various locations
• Configured using syslog-ng.conf file
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
SYSLOG-NG CONFIGURATION
source s_remote_logs_unix {
udp(port(514) so_rcvbuf(67108864)); };
destination d_hosts_unix {
file("/mnt/logs/UNIX/$YEAR-$MONTH-$DAY-sys01.log"
dir_owner(root) dir_group(root) dir_perm(0777) owner(root) group(root) perm(0664) create_dirs(yes)); };
destination d_remote_server {
udp("192.168.1.20" port(1234) spoof_source(yes) ); };
filter f_trash { (match("some specific expression")
or match("asdfjkl;")
or host("server1.domain.net") and match("xxx") ); };
log { source(s_remote_logs_unix); filter(f_trash); destination(d_junk); flags(final); };
log { source(s_remote_logs_unix); destination(d_remote_server); };
log { source(s_remote_logs_unix); destination(d_hosts_unix); };
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
• Inputs
Processes logs of all shapes and sizes
• Filters
• Allows you to parse and transform the logs
• Can easily support custom log formats
• Outputs
• Send the new “pretty” logs wherever you want
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
CUSTOM LOGSTASH CONFIG
input {
file {
type => "video-syslog"
exclude => ["*.gz"]
start_position => "end"
path => [ "/mnt/logs/video/*.log"] } }
filter {
grok {
overwrite => [ "message", "host" ]
match => [
"message", "%{DATESTAMP:timestamp} %{PROG:program} %{WORD:status} %{NUMBER:priority:float} %{GREEDYDATA:creation} %{INT:bytes}
%{INT:hitcount} %{GREEDYDATA:url} /disk%{GREEDYDATA:location}",
"message", "%{HOST:host} %{GREEDYDATA:url} %{INT:bytes_sent} %{INT:obj_size} %{INT:bytes_recvd} %{WORD:method} %{INT:status}
[%{DATA:time_recvd}+0000] %{INT:time_to_serve}“ ]
add_tag => [ "bytes", "hitcount", "url", "location" ]
tag_on_failure => [] } }
output {
elasticsearch {
protocol => "node"
host => "es-server1.domain.net,es-server2.domain.net,es-server3.domain.net"
cluster => "my-elasticsearch-cluster"
index => "video-%{+YYYY.MM.dd}“ } }
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
NETFLOW LOGSTASH CONFIG
input {
udp {
port => 9996
codec => netflow {
definitions => "/etc/logstash/logstash-1.4.2/lib/logstash/codecs/netflow/netflow.yaml" } } }
output {
stdout { codec => rubydebug }
if ( [host] =~ "10..*" or [host] =~ "1.1.1.1") {
elasticsearch {
embedded => "false"
protocol => "node"
host => "es-server1.domain.net,es-server2.domain.net,es-server3.domain.net"
cluster => "my-elasticsearch-cluster"
index => "netflow-hq-%{+YYYY.MM.dd}" } }
else {
elasticsearch {
embedded => "false"
protocol => "node"
host => "es-server1.domain.net,es-server2.domain.net,es-server3.domain.net"
cluster => "my-elasticsearch-cluster"
index => "netflow-remote-%{+YYYY.MM.dd}" } } }
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
• Architecture
• Easily scalable
• High availability
• Multi-tenancy
• Searching
• Based off of Lucene
• Real time search and analytics engine
• RESTful API
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
• Graphical representation of the logs
• Provides the user’s “pretty” interface
• Customizable dashboards
• Connects directly to Elasticsearch
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
HTTPD CONFIG
<Directory /var/www/html/kibana>
SSLRequireSSL
</Directory>
ProxyRequests off
ProxyPass /elasticsearch/ http://192.168.1.10:9200/
<Location /elasticsearch/>
ProxyPassReverse /
SSLRequireSSL
</Location>
<AuthnProviderAlias ldap ldap-domain>
AuthLDAPURL
"ldap://domain:3268/DC=XX,DC=YYY,DC=com?sAMAccountName??(!(user
AccountControl:1.2.840.113556.1.4.803:=2))"
AuthLDAPBindDN "cn=Bind_Name,cn=Users,dc=XX,dc=YYY,dc=com"
AuthLDAPBindPassword ThisIsthePassword
</AuthnProviderAlias>
<Location /kibana-helpdesk>
AuthType Basic
AuthName "USE WINDOWS PASSWORD"
AuthBasicProvider ldap-domain
AuthLDAPRemoteUserAttribute sAMAccountName
AuthLDAPBindDN "cn=Bind_Name,cn=Users,dc=XX,dc=YYY,dc=com"
AuthLDAPBindPassword ThisIsthePassword
AuthLDAPURL
"ldap://domain:3268/DC=XX,DC=YYY,DC=com?sAMAccountName"
Require ldap-group CN=Help Desk,OU=Groups,DC=XX,DC=YYY,DC=com
Require ldap-group CN=Security
Team,OU=Groups,DC=XX,DC=YYY,DC=com
order allow,deny
allow from all
Copyright © 2015, SAS Institute Inc. All rights reserv ed. http://blogs.cisco.com/security/step-by-step-setup-of-elk-for-netflow-analytics
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
• Meant to be a HIDS solution
• Log analysis
• File integrity checking
• Policy monitoring
• Rootkit detection
• Real-time alerting & active response
• Has it’s own web UI
• Uses basic logic to correlate and alert on specific events
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
OSSEC RULE EXAMPLE
<rule id="100100" level="0">
<decoded_as>aaa-logins</decoded_as>
<description>Group of AAA rules.</description>
</rule>
<rule id="100101" level="5">
<if_sid>100100</if_sid>
<match>Failed-Attempt|Authen failed</match>
<description>AAA authentication failures.</description>
</rule>
<rule id="100102" level="10" frequency="10" timeframe="120">
<if_matched_sid>100101</if_matched_sid>
<same_user />
<description>Multiple AAA authentication failures.</description>
</rule>
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
MAINTENANCE & UPKEEP
• Syslog-ng
• Bash scripts for combining and aging
out files
• Elasticsearch
• Curator, Elastic HQ, curl scripts
• Logstash
• Logrotate, init.d scripts to launch instances
• OSSEC
• Stay up-to-date on rules and create custom rules as needed
Copyright © 2015, SAS Institute Inc. All rights reserv ed.
WHERE DO WE GO FROM HERE?
• Everyone has logs and a need to deal with them
• Share your solution with the groups that provided logs and
support orgs – may require custom pages to limit info
• Develop your work plan to review visual and OSSEC alerts
• Build response & monitoring capabilities
• Show value of logs to the org for future tools
Copyright © 2015, SAS Institute Inc. All rights reserv ed.

Contenu connexe

Tendances

Why favor Icinga over Nagios @ DebConf15
Why favor Icinga over Nagios @ DebConf15Why favor Icinga over Nagios @ DebConf15
Why favor Icinga over Nagios @ DebConf15Icinga
 
Icinga lsm 2015 copy
Icinga lsm 2015 copyIcinga lsm 2015 copy
Icinga lsm 2015 copyNETWAYS
 
Vault - Secret and Key Management
Vault - Secret and Key ManagementVault - Secret and Key Management
Vault - Secret and Key ManagementAnthony Ikeda
 
ChatOps with Icinga and StackStorm
ChatOps with Icinga and StackStormChatOps with Icinga and StackStorm
ChatOps with Icinga and StackStormIcinga
 
OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...
OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...
OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...Andrejs Vorobjovs
 
Issuing temporary credentials for my sql using hashicorp vault
Issuing temporary credentials for my sql using hashicorp vaultIssuing temporary credentials for my sql using hashicorp vault
Issuing temporary credentials for my sql using hashicorp vaultOlinData
 
Shield talk elasticsearch meetup Zurich 27.05.2015
Shield talk elasticsearch meetup Zurich 27.05.2015Shield talk elasticsearch meetup Zurich 27.05.2015
Shield talk elasticsearch meetup Zurich 27.05.2015em_mu
 
Azure Low Lands 2019 - Building secure cloud applications with Azure Key Vault
Azure Low Lands 2019 - Building secure cloud applications with Azure Key VaultAzure Low Lands 2019 - Building secure cloud applications with Azure Key Vault
Azure Low Lands 2019 - Building secure cloud applications with Azure Key VaultTom Kerkhove
 
Hadoop and Kerberos: the Madness Beyond the Gate: January 2016 edition
Hadoop and Kerberos: the Madness Beyond the Gate: January 2016 editionHadoop and Kerberos: the Madness Beyond the Gate: January 2016 edition
Hadoop and Kerberos: the Madness Beyond the Gate: January 2016 editionSteve Loughran
 
Secret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s VaultSecret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s VaultAWS Germany
 
MySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features SummaryMySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features SummaryOlivier DASINI
 
Introduction to Shield and kibana
Introduction to Shield and kibanaIntroduction to Shield and kibana
Introduction to Shield and kibanaKnoldus Inc.
 
Why favour Icinga over Nagios @ FrOSCon 2015
Why favour Icinga over Nagios @ FrOSCon 2015Why favour Icinga over Nagios @ FrOSCon 2015
Why favour Icinga over Nagios @ FrOSCon 2015Icinga
 
Az 104 session 8 azure monitoring
Az 104 session 8 azure monitoringAz 104 session 8 azure monitoring
Az 104 session 8 azure monitoringAzureEzy1
 
Azure key vault - Brisbane User Group
Azure key vault  - Brisbane User GroupAzure key vault  - Brisbane User Group
Azure key vault - Brisbane User GroupRahul Nath
 
Securing Big Data at rest with encryption for Hadoop, Cassandra and MongoDB o...
Securing Big Data at rest with encryption for Hadoop, Cassandra and MongoDB o...Securing Big Data at rest with encryption for Hadoop, Cassandra and MongoDB o...
Securing Big Data at rest with encryption for Hadoop, Cassandra and MongoDB o...Big Data Spain
 

Tendances (20)

Hashicorp Vault ppt
Hashicorp Vault pptHashicorp Vault ppt
Hashicorp Vault ppt
 
Why favor Icinga over Nagios @ DebConf15
Why favor Icinga over Nagios @ DebConf15Why favor Icinga over Nagios @ DebConf15
Why favor Icinga over Nagios @ DebConf15
 
Icinga lsm 2015 copy
Icinga lsm 2015 copyIcinga lsm 2015 copy
Icinga lsm 2015 copy
 
Vault - Secret and Key Management
Vault - Secret and Key ManagementVault - Secret and Key Management
Vault - Secret and Key Management
 
ChatOps with Icinga and StackStorm
ChatOps with Icinga and StackStormChatOps with Icinga and StackStorm
ChatOps with Icinga and StackStorm
 
OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...
OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...
OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...
 
Issuing temporary credentials for my sql using hashicorp vault
Issuing temporary credentials for my sql using hashicorp vaultIssuing temporary credentials for my sql using hashicorp vault
Issuing temporary credentials for my sql using hashicorp vault
 
Shield talk elasticsearch meetup Zurich 27.05.2015
Shield talk elasticsearch meetup Zurich 27.05.2015Shield talk elasticsearch meetup Zurich 27.05.2015
Shield talk elasticsearch meetup Zurich 27.05.2015
 
Azure Low Lands 2019 - Building secure cloud applications with Azure Key Vault
Azure Low Lands 2019 - Building secure cloud applications with Azure Key VaultAzure Low Lands 2019 - Building secure cloud applications with Azure Key Vault
Azure Low Lands 2019 - Building secure cloud applications with Azure Key Vault
 
Hadoop and Kerberos: the Madness Beyond the Gate: January 2016 edition
Hadoop and Kerberos: the Madness Beyond the Gate: January 2016 editionHadoop and Kerberos: the Madness Beyond the Gate: January 2016 edition
Hadoop and Kerberos: the Madness Beyond the Gate: January 2016 edition
 
Secret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s VaultSecret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s Vault
 
HashiCorp's Vault - The Examples
HashiCorp's Vault - The ExamplesHashiCorp's Vault - The Examples
HashiCorp's Vault - The Examples
 
MySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features SummaryMySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features Summary
 
Introduction to Shield and kibana
Introduction to Shield and kibanaIntroduction to Shield and kibana
Introduction to Shield and kibana
 
Why favour Icinga over Nagios @ FrOSCon 2015
Why favour Icinga over Nagios @ FrOSCon 2015Why favour Icinga over Nagios @ FrOSCon 2015
Why favour Icinga over Nagios @ FrOSCon 2015
 
Az 104 session 8 azure monitoring
Az 104 session 8 azure monitoringAz 104 session 8 azure monitoring
Az 104 session 8 azure monitoring
 
Azure key vault - Brisbane User Group
Azure key vault  - Brisbane User GroupAzure key vault  - Brisbane User Group
Azure key vault - Brisbane User Group
 
Securing Big Data at rest with encryption for Hadoop, Cassandra and MongoDB o...
Securing Big Data at rest with encryption for Hadoop, Cassandra and MongoDB o...Securing Big Data at rest with encryption for Hadoop, Cassandra and MongoDB o...
Securing Big Data at rest with encryption for Hadoop, Cassandra and MongoDB o...
 
Introducing Vault
Introducing VaultIntroducing Vault
Introducing Vault
 
Vault 101
Vault 101Vault 101
Vault 101
 

Similaire à Elk its big log season

Managing Your Security Logs with Elasticsearch
Managing Your Security Logs with ElasticsearchManaging Your Security Logs with Elasticsearch
Managing Your Security Logs with ElasticsearchVic Hargrave
 
The top 10 security issues in web applications
The top 10 security issues in web applicationsThe top 10 security issues in web applications
The top 10 security issues in web applicationsDevnology
 
Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek PROIDEA
 
Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackJakub Hajek
 
Instrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaInstrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaMark Leith
 
Try {stuff} Catch {hopefully not} - Evading Detection & Covering Tracks
Try {stuff} Catch {hopefully not} - Evading Detection & Covering TracksTry {stuff} Catch {hopefully not} - Evading Detection & Covering Tracks
Try {stuff} Catch {hopefully not} - Evading Detection & Covering TracksYossi Sassi
 
Real time monitoring-alerting: storing 2Tb of logs a day in Elasticsearch
Real time monitoring-alerting: storing 2Tb of logs a day in ElasticsearchReal time monitoring-alerting: storing 2Tb of logs a day in Elasticsearch
Real time monitoring-alerting: storing 2Tb of logs a day in ElasticsearchAli Kheyrollahi
 
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiInSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiYossi Sassi
 
Being HAPI! Reverse Proxying on Purpose
Being HAPI! Reverse Proxying on PurposeBeing HAPI! Reverse Proxying on Purpose
Being HAPI! Reverse Proxying on PurposeAman Kohli
 
AWS re:Invent 2016: Life Without SSH: Immutable Infrastructure in Production ...
AWS re:Invent 2016: Life Without SSH: Immutable Infrastructure in Production ...AWS re:Invent 2016: Life Without SSH: Immutable Infrastructure in Production ...
AWS re:Invent 2016: Life Without SSH: Immutable Infrastructure in Production ...Amazon Web Services
 
From zero to hero - Easy log centralization with Logstash and Elasticsearch
From zero to hero - Easy log centralization with Logstash and ElasticsearchFrom zero to hero - Easy log centralization with Logstash and Elasticsearch
From zero to hero - Easy log centralization with Logstash and ElasticsearchRafał Kuć
 
From Zero to Hero - Centralized Logging with Logstash & Elasticsearch
From Zero to Hero - Centralized Logging with Logstash & ElasticsearchFrom Zero to Hero - Centralized Logging with Logstash & Elasticsearch
From Zero to Hero - Centralized Logging with Logstash & ElasticsearchSematext Group, Inc.
 
KoprowskiT_SQLRelayBirmingham_SQLSecurityInTheClouds
KoprowskiT_SQLRelayBirmingham_SQLSecurityInTheCloudsKoprowskiT_SQLRelayBirmingham_SQLSecurityInTheClouds
KoprowskiT_SQLRelayBirmingham_SQLSecurityInTheCloudsTobias Koprowski
 
KoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheClouds
KoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheCloudsKoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheClouds
KoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheCloudsTobias Koprowski
 
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014Amazon Web Services
 
Introduction to Apache NiFi 1.11.4
Introduction to Apache NiFi 1.11.4Introduction to Apache NiFi 1.11.4
Introduction to Apache NiFi 1.11.4Timothy Spann
 
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...Andrey Devyatkin
 
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...Andrey Devyatkin
 

Similaire à Elk its big log season (20)

Managing Your Security Logs with Elasticsearch
Managing Your Security Logs with ElasticsearchManaging Your Security Logs with Elasticsearch
Managing Your Security Logs with Elasticsearch
 
Rails Security
Rails SecurityRails Security
Rails Security
 
The top 10 security issues in web applications
The top 10 security issues in web applicationsThe top 10 security issues in web applications
The top 10 security issues in web applications
 
Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek
 
Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic Stack
 
Instrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaInstrumenting plugins for Performance Schema
Instrumenting plugins for Performance Schema
 
Try {stuff} Catch {hopefully not} - Evading Detection & Covering Tracks
Try {stuff} Catch {hopefully not} - Evading Detection & Covering TracksTry {stuff} Catch {hopefully not} - Evading Detection & Covering Tracks
Try {stuff} Catch {hopefully not} - Evading Detection & Covering Tracks
 
Real time monitoring-alerting: storing 2Tb of logs a day in Elasticsearch
Real time monitoring-alerting: storing 2Tb of logs a day in ElasticsearchReal time monitoring-alerting: storing 2Tb of logs a day in Elasticsearch
Real time monitoring-alerting: storing 2Tb of logs a day in Elasticsearch
 
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiInSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
 
Being HAPI! Reverse Proxying on Purpose
Being HAPI! Reverse Proxying on PurposeBeing HAPI! Reverse Proxying on Purpose
Being HAPI! Reverse Proxying on Purpose
 
AWS re:Invent 2016: Life Without SSH: Immutable Infrastructure in Production ...
AWS re:Invent 2016: Life Without SSH: Immutable Infrastructure in Production ...AWS re:Invent 2016: Life Without SSH: Immutable Infrastructure in Production ...
AWS re:Invent 2016: Life Without SSH: Immutable Infrastructure in Production ...
 
From zero to hero - Easy log centralization with Logstash and Elasticsearch
From zero to hero - Easy log centralization with Logstash and ElasticsearchFrom zero to hero - Easy log centralization with Logstash and Elasticsearch
From zero to hero - Easy log centralization with Logstash and Elasticsearch
 
From Zero to Hero - Centralized Logging with Logstash & Elasticsearch
From Zero to Hero - Centralized Logging with Logstash & ElasticsearchFrom Zero to Hero - Centralized Logging with Logstash & Elasticsearch
From Zero to Hero - Centralized Logging with Logstash & Elasticsearch
 
KoprowskiT_SQLRelayBirmingham_SQLSecurityInTheClouds
KoprowskiT_SQLRelayBirmingham_SQLSecurityInTheCloudsKoprowskiT_SQLRelayBirmingham_SQLSecurityInTheClouds
KoprowskiT_SQLRelayBirmingham_SQLSecurityInTheClouds
 
KoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheClouds
KoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheCloudsKoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheClouds
KoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheClouds
 
Figaro
FigaroFigaro
Figaro
 
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
 
Introduction to Apache NiFi 1.11.4
Introduction to Apache NiFi 1.11.4Introduction to Apache NiFi 1.11.4
Introduction to Apache NiFi 1.11.4
 
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...
 
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
 

Dernier

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Dernier (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Elk its big log season

  • 1. Copyright © 2015, SAS Institute Inc. All rights reserv ed. ELK: IT'S BIG LOG SEASON LOGGING FROM A TO Z
  • 2. Copyright © 2015, SAS Institute Inc. All rights reserv ed. WHO WE ARE • Brian Wilson • Information Security Manager at SAS • UNIX Sys Admin, Network Engineer, Infosec Engineer • Family, Mac/Linux, Coding, Automation, Long walks on the beach • @brianwilson / https://github.com/bdwilson • Eric Luellen • Sr. Information Security Engineer at SAS • Open source technologies, network security monitoring, active defenses • Snowboarding, volleyball, basketball, anything away from a computer • @ericl42 / https://github.com/ericl42
  • 3. Copyright © 2015, SAS Institute Inc. All rights reserv ed. WHY DO WE CARE ABOUT LOGS? • Regulatory & compliance requirements • HIPAA, SOX, PCI • Troubleshooting • Incident Response • Proactive resource planning • Logs are the building blocks of other projects • Prove value of log data for future technology investment!
  • 4. Copyright © 2015, SAS Institute Inc. All rights reserv ed. SO WHY HAVEN’T WE DONE ANYTHING • Resources – Time, Money, & People • Volume of data • Disparate sources, formatting issues • Application logs don’t follow same standard as OS logs • Cooperation from other groups • Unsure how to obtain and locate sources
  • 5. Copyright © 2015, SAS Institute Inc. All rights reserv ed. WHAT ARE THE REQUIREMENTS? • Simple to use • The goal is to reduce the reaction time and make it easier to track down a problem, resolve an incident, or search for some data point. • Scalable • As log sources and events/second grow, your solution has to scale as well. • Expandable • Easy to incorporate or feed into other systems. • Notifications/Alerting • Know when your log sources are deviating from defined criteria.
  • 6. Copyright © 2015, SAS Institute Inc. All rights reserv ed. LOGISTICAL PREPARATION • Identify the data sources • Authentication Failures/Success • UNIX, Windows, DLP, Anti-Virus, Web, Applications… • Configure sources for proper logging • Determine location of syslog collector(s) • DMZ, Cloud... • Open firewall port(s)
  • 7. Copyright © 2015, SAS Institute Inc. All rights reserv ed. ARCHITECTURE
  • 8. Copyright © 2015, SAS Institute Inc. All rights reserv ed. HOW DO WE GET THE LOGS THERE? • UNIX • Local syslog settings • auth.*;authpriv.* @syslog.domain.net • Agent based (Nxlog) • Windows • Agent based (Nxlog)
  • 9. Copyright © 2015, SAS Institute Inc. All rights reserv ed. NXLOG EXAMPLE <Input in> Module im_msvistalog ReadFromLastTrue Query <QueryList> <Query Id="0"> <Select Path="Security">*[System[(EventID='4624')]]</Select> <Select Path="Security">*[System[(EventID='4625')]]</Select> </Query> </QueryList> Exec to_syslog_bsd(); Exec if $raw_event =~ /Account Name:s+S+$s+Account Domain:/ drop(); else if $raw_event =~ /^(.+)Detailed Authentication Information:/ $raw_event = $1; if $raw_event =~ s/t/ /g {} </Input> <Output out> Module om_udp Host X.X.X.X Port 2514 </Output> <Route 1> Path in => out </Route>
  • 10. Copyright © 2015, SAS Institute Inc. All rights reserv ed. • Basic aggregation of logs • Filters and funnels logs as needed • Ability to send to various locations • Configured using syslog-ng.conf file
  • 11. Copyright © 2015, SAS Institute Inc. All rights reserv ed. SYSLOG-NG CONFIGURATION source s_remote_logs_unix { udp(port(514) so_rcvbuf(67108864)); }; destination d_hosts_unix { file("/mnt/logs/UNIX/$YEAR-$MONTH-$DAY-sys01.log" dir_owner(root) dir_group(root) dir_perm(0777) owner(root) group(root) perm(0664) create_dirs(yes)); }; destination d_remote_server { udp("192.168.1.20" port(1234) spoof_source(yes) ); }; filter f_trash { (match("some specific expression") or match("asdfjkl;") or host("server1.domain.net") and match("xxx") ); }; log { source(s_remote_logs_unix); filter(f_trash); destination(d_junk); flags(final); }; log { source(s_remote_logs_unix); destination(d_remote_server); }; log { source(s_remote_logs_unix); destination(d_hosts_unix); };
  • 12. Copyright © 2015, SAS Institute Inc. All rights reserv ed. • Inputs Processes logs of all shapes and sizes • Filters • Allows you to parse and transform the logs • Can easily support custom log formats • Outputs • Send the new “pretty” logs wherever you want
  • 13. Copyright © 2015, SAS Institute Inc. All rights reserv ed. CUSTOM LOGSTASH CONFIG input { file { type => "video-syslog" exclude => ["*.gz"] start_position => "end" path => [ "/mnt/logs/video/*.log"] } } filter { grok { overwrite => [ "message", "host" ] match => [ "message", "%{DATESTAMP:timestamp} %{PROG:program} %{WORD:status} %{NUMBER:priority:float} %{GREEDYDATA:creation} %{INT:bytes} %{INT:hitcount} %{GREEDYDATA:url} /disk%{GREEDYDATA:location}", "message", "%{HOST:host} %{GREEDYDATA:url} %{INT:bytes_sent} %{INT:obj_size} %{INT:bytes_recvd} %{WORD:method} %{INT:status} [%{DATA:time_recvd}+0000] %{INT:time_to_serve}“ ] add_tag => [ "bytes", "hitcount", "url", "location" ] tag_on_failure => [] } } output { elasticsearch { protocol => "node" host => "es-server1.domain.net,es-server2.domain.net,es-server3.domain.net" cluster => "my-elasticsearch-cluster" index => "video-%{+YYYY.MM.dd}“ } }
  • 14. Copyright © 2015, SAS Institute Inc. All rights reserv ed. NETFLOW LOGSTASH CONFIG input { udp { port => 9996 codec => netflow { definitions => "/etc/logstash/logstash-1.4.2/lib/logstash/codecs/netflow/netflow.yaml" } } } output { stdout { codec => rubydebug } if ( [host] =~ "10..*" or [host] =~ "1.1.1.1") { elasticsearch { embedded => "false" protocol => "node" host => "es-server1.domain.net,es-server2.domain.net,es-server3.domain.net" cluster => "my-elasticsearch-cluster" index => "netflow-hq-%{+YYYY.MM.dd}" } } else { elasticsearch { embedded => "false" protocol => "node" host => "es-server1.domain.net,es-server2.domain.net,es-server3.domain.net" cluster => "my-elasticsearch-cluster" index => "netflow-remote-%{+YYYY.MM.dd}" } } }
  • 15. Copyright © 2015, SAS Institute Inc. All rights reserv ed. • Architecture • Easily scalable • High availability • Multi-tenancy • Searching • Based off of Lucene • Real time search and analytics engine • RESTful API
  • 16. Copyright © 2015, SAS Institute Inc. All rights reserv ed. • Graphical representation of the logs • Provides the user’s “pretty” interface • Customizable dashboards • Connects directly to Elasticsearch
  • 17. Copyright © 2015, SAS Institute Inc. All rights reserv ed. HTTPD CONFIG <Directory /var/www/html/kibana> SSLRequireSSL </Directory> ProxyRequests off ProxyPass /elasticsearch/ http://192.168.1.10:9200/ <Location /elasticsearch/> ProxyPassReverse / SSLRequireSSL </Location> <AuthnProviderAlias ldap ldap-domain> AuthLDAPURL "ldap://domain:3268/DC=XX,DC=YYY,DC=com?sAMAccountName??(!(user AccountControl:1.2.840.113556.1.4.803:=2))" AuthLDAPBindDN "cn=Bind_Name,cn=Users,dc=XX,dc=YYY,dc=com" AuthLDAPBindPassword ThisIsthePassword </AuthnProviderAlias> <Location /kibana-helpdesk> AuthType Basic AuthName "USE WINDOWS PASSWORD" AuthBasicProvider ldap-domain AuthLDAPRemoteUserAttribute sAMAccountName AuthLDAPBindDN "cn=Bind_Name,cn=Users,dc=XX,dc=YYY,dc=com" AuthLDAPBindPassword ThisIsthePassword AuthLDAPURL "ldap://domain:3268/DC=XX,DC=YYY,DC=com?sAMAccountName" Require ldap-group CN=Help Desk,OU=Groups,DC=XX,DC=YYY,DC=com Require ldap-group CN=Security Team,OU=Groups,DC=XX,DC=YYY,DC=com order allow,deny allow from all
  • 18. Copyright © 2015, SAS Institute Inc. All rights reserv ed. http://blogs.cisco.com/security/step-by-step-setup-of-elk-for-netflow-analytics
  • 19. Copyright © 2015, SAS Institute Inc. All rights reserv ed.
  • 20. Copyright © 2015, SAS Institute Inc. All rights reserv ed. • Meant to be a HIDS solution • Log analysis • File integrity checking • Policy monitoring • Rootkit detection • Real-time alerting & active response • Has it’s own web UI • Uses basic logic to correlate and alert on specific events
  • 21. Copyright © 2015, SAS Institute Inc. All rights reserv ed. OSSEC RULE EXAMPLE <rule id="100100" level="0"> <decoded_as>aaa-logins</decoded_as> <description>Group of AAA rules.</description> </rule> <rule id="100101" level="5"> <if_sid>100100</if_sid> <match>Failed-Attempt|Authen failed</match> <description>AAA authentication failures.</description> </rule> <rule id="100102" level="10" frequency="10" timeframe="120"> <if_matched_sid>100101</if_matched_sid> <same_user /> <description>Multiple AAA authentication failures.</description> </rule>
  • 22. Copyright © 2015, SAS Institute Inc. All rights reserv ed. MAINTENANCE & UPKEEP • Syslog-ng • Bash scripts for combining and aging out files • Elasticsearch • Curator, Elastic HQ, curl scripts • Logstash • Logrotate, init.d scripts to launch instances • OSSEC • Stay up-to-date on rules and create custom rules as needed
  • 23. Copyright © 2015, SAS Institute Inc. All rights reserv ed. WHERE DO WE GO FROM HERE? • Everyone has logs and a need to deal with them • Share your solution with the groups that provided logs and support orgs – may require custom pages to limit info • Develop your work plan to review visual and OSSEC alerts • Build response & monitoring capabilities • Show value of logs to the org for future tools
  • 24. Copyright © 2015, SAS Institute Inc. All rights reserv ed.