Building a Splunk-based Lumber Mill. Turning a bunch of logs into useful products

Similar documents
GRAVITYZONE HERE. Deployment Guide VLE Environment

Chapter 8 Monitoring and Logging

Guardian Digital WebTool Firewall HOWTO. by Pete O Hara

AlienVault Unified Security Management Solution Complete. Simple. Affordable Life Cycle of a log

VMware Identity Manager Connector Installation and Configuration

Syslog Configuration for Auditing

In Depth with Deployment Server Sanford Owings

NetFlow Analytics for Splunk

Deploying F5 with Microsoft Active Directory Federation Services

Rally Installation Guide

Remote Firewall Deployment

FortiGate Multi-Threat Security Systems I Administration, Content Inspection and SSL VPN Course #201

VPN Configuration Guide. Dealing with Identical Local and Remote Network Addresses

CipherMail Gateway Quick Setup Guide

Deploying the BIG-IP LTM with Microsoft Skype for Business

AlienVault Unified Security Management (USM) 4.x-5.x. Deployment Planning Guide

Server Installation Procedure - Load Balanced Environment

Chapter 9 Monitoring System Performance

Installation of the On Site Server (OSS)

User Manual. Onsight Management Suite Version 5.1. Another Innovation by Librestream

Firewalls. Pehr Söderman KTH-CSC

simplify monitoring Environment Prerequisites for Installation Simplify Monitoring 11.4 (v11.4) Document Date: January

How To Configure Syslog over VPN

Secure Web Appliance. Reverse Proxy

Step-By-Step Guide to Deploying Lync Server 2010 Enterprise Edition

ClockWork Enterprise 5

Penetration Testing LAB Setup Guide

Keeping Splunk in Check: Tools to BeGer Manage Your Investment

Installing and Configuring vcenter Support Assistant

VMware vcenter Log Insight Getting Started Guide

Web Application Firewall

Best Practices for Building Splunk Apps and Technology Add-ons

disect Systems Logging Snort alerts to Syslog and Splunk PRAVEEN DARSHANAM

How To Install Powerpoint 6 On A Windows Server With A Powerpoint 2.5 (Powerpoint) And Powerpoint On A Microsoft Powerpoint 4.5 Powerpoint (Powerpoints) And A Powerpoints 2

Introduction Installation firewall analyzer step by step installation Startup Syslog and SNMP setup on firewall side firewall analyzer startup

Savvius Insight Initial Configuration

Fortinet FortiGate App for Splunk

For Splunk Universal Forwarder and Splunk Cloud

How To Connect To Bloomerg.Com With A Network Card From A Powerline To A Powerpoint Terminal On A Microsoft Powerbook (Powerline) On A Blackberry Or Ipnet (Powerbook) On An Ipnet Box On

Configuring Logging. Information About Logging CHAPTER

10972-Administering the Web Server (IIS) Role of Windows Server

VPN Configuration Guide. Dell SonicWALL

BASIC FIREWALL SERVICES

VMware vcenter Log Insight Getting Started Guide

From Network Security To Content Filtering

Unless otherwise noted, all references to STRM refer to STRM, STRM Log Manager, and STRM Network Anomaly Detection.

DEPLOYMENT GUIDE Version 1.1. Deploying F5 with IBM WebSphere 7

Technical Note. ISP Protection against BlackListing. FORTIMAIL Deployment for Outbound Spam Filtering. Rev 2.2

Goliath Performance Monitor Prerequisites v11.6

MilsVPN VPN Tunnel Port Translation. Table of Contents Introduction VPN Tunnel Settings...2

MS-55115: Planning, Deploying and Managing Microsoft Project Server 2013

NEFSIS DEDICATED SERVER

WHMCS LUXCLOUD MODULE

Network Defense Tools

Deploying Secure Internet Connectivity

vshield Administration Guide

Articles Fighting SPAM in Lotus Domino

Configuring the Dolby Conference Phone with Cisco Unified Communications Manager

Millbeck Communications. Secure Remote Access Service. Internet VPN Access to N3. VPN Client Set Up Guide Version 6.0

NetSpective Global Proxy Configuration Guide

Administering the Web Server (IIS) Role of Windows Server

1 Basic Configuration of Cisco 2600 Router. Basic Configuration Cisco 2600 Router

Acano solution. Third Party Call Control Guide. March E

Active Directory Integration: Install and Setup Guide. Insights

VIRTUOZZO TM FOR LINUX 2.6.1

VPN Configuration Guide. Linksys (Belkin) LRT214 / LRT224 Gigabit VPN Router

Centralized Logging in a Decentralized World

Deploying the BIG-IP System with Microsoft IIS

Parallels. for your Linux or Windows Server. Small Business Panel. Getting Started Guide. Parallels Small Business Panel // Linux & Windows Server

NETWRIX EVENT LOG MANAGER

Course 55115: Planning, Deploying and Managing Microsoft Project Server 2013

VIA CONNECT PRO Deployment Guide

INTRODUCTION TO FIREWALL SECURITY

How To - Configure Virtual Host using FQDN How To Configure Virtual Host using FQDN

Cisco IT Validates Rigorous Identity and Policy Enforcement in Its Own Wired and Wireless Networks

Building Your Firewall Rulebase Lance Spitzner Last Modified: January 26, 2000

Interworks. Interworks Cloud Platform Installation Guide

CallRecorder User Guide

insync Installation Guide

RSA Authentication Manager 7.1 Basic Exercises

Simplified Forwarder Deployment and Deployment Server Techniques

MMLIST Listserv User's Guide for ICORS.ORG

Hillstone StoneOS User Manual Hillstone Unified Intelligence Firewall Installation Manual

MS 10972A Administering the Web Server (IIS) Role of Windows Server

The Cisco IOS Firewall feature set is supported on the following platforms: Cisco 2600 series Cisco 3600 series

CS312 Solutions #6. March 13, 2015

Planning, Deploying and Managing Microsoft Project Server 2013

VPN Configuration Guide SonicWALL with SonicWALL Simple Client Provisioning

Deploying BIG-IP LTM with Microsoft Lync Server 2010 and 2013

Pre-Installation Instructions

Basic ESXi Networking

Network Load Balancing

Test Case 3 Active Directory Integration

$99.95 per user. SQL Server 2005 Database Administration CourseId: 152 Skill level: Run Time: 30+ hours (158 videos)

DEPLOYMENT GUIDE CONFIGURING THE BIG-IP LTM SYSTEM WITH FIREPASS CONTROLLERS FOR LOAD BALANCING AND SSL OFFLOAD

Step-by-Step Configuration

Log Insight Manager. Deployment Guide

Transcription:

Building a Splunk-based Lumber Mill Turning a bunch of logs into useful products

About us - Bob Bregant - Senior IT Security Engineer - Takes top billing when he can - Joe Barnes - Interim CISO - Puts up with me

Prerequisites Central logging Can t do anything interesting with the data that you don t have Or at least somewhat central Splunk can help us out here

Central Logging Mostly a couple of big sources Total of 430 GB/day Bro (275 GB), Firewalls (90 GB), DNS (30 GB), Exchange (10GB), AD (10 GB) Everything else (Shibboleth, VPN, networking devices, servers): 15 GB That s a thousand devices that take less than 150GB of space (over 90 days, 10:1 zip ratio)

Going Splunking Alternatives Open Source Commercial Why we went this route Access control Flexible fields Nice API

Splunk Architecture Indexers One per 150-250 GB Search Heads Can pool, split for performance Cluster? Other Stuff DB, Syslog (Heavy) Forwarder

Syslog Integration Syslog forwarder is important Splunk can grab data from DB s, flat files Syslog provides vendor-neutral backup Can always import data from archive Heavy forwarder required for syslog Not perfect, but it gets the job done Configs in Appendix B

Extracting Data Search-time extraction Can change fields at any time, retroactive Aliases for democratic field naming Get good at PCRE http://docs.splunk.com/documentation/splunk/latest/knowledge/ AboutSplunkregularexpressions (?i)^\s+\s\s+\srt_flow:\s(rt_flow_session_create):\s(session created) \s([0-9.]+)/([0-9]+)->([0-9.]+)/([0-9]+)\s(\s+)\s([0-9.]+)/([0-9]+)->([0-9.]+)/([0-9]+)\s(\s+) \s(\s+)\s(\d+)\s(\s+)\s(\s+)\s(\s+)\s(\d+)(?:\s([^\(]+)\(([^\)]+)\)\s(\s+))? Don t let that scare you!

Extracting Data Computed fields Great for normalization Example - MAC normalization: lower(replace(replace(src_mac,"([- \.:])",""),"(\w\w)(\w\w)(\w\w)(\w\w)(\w\w)(\w \w)","\1:\2:\3:\4:\5:\6"))

Extracting Data

Searching Data Map looks like what you want It s not. (It works, but not well) Subsearch Correlation index=wireless [some search that returns a list of macs] other stuff that you want to do, maybe a lookup table of AP locations

Some actual searches, part 1 Basic search to show how we chain commands and manipulate data: What percentage of our users login to the VPN with two-factor authentication? index=vpn login_result= Success Only care about successful logins to the VPN

Some actual searches, part 1 What percentage of our users login to the VPN with two-factor authentication? index=vpn login_result= Success stats count(_raw) as total, count(eval(auth_ip= 1.2.3.4")) as duo We need both the total and the number who logged in with Duo to get the percent (subbing in the real Duo IP for 1.2.3.4 ).

Some actual searches, part 1 What percentage of our users login to the VPN with two-factor authentication? index=vpn login_result= Success stats count(_raw) as total, count(eval(auth_ip= 1.2.3.4")) as duo eval duo_pct=(duo/(total-duo))*100 Calculating the actual percentage here

Some actual searches, part 1 What percentage of our users login to the VPN with two-factor authentication? index=vpn login_result= Success stats count(_raw) as total, count(eval(auth_ip= 1.2.3.4")) as duo eval duo_pct=(duo/(total-duo))*100 table duo_pct And now a quick table to show off the result

Some actual searches, part 1

Some actual searches, part 2 Actual Correlation: Simplified Copyright Attribution index=firewall nat_src_ip=$src_ip$ AND nat_src_port=$src_port$ head 1 fields src_ip Quick bit of flow verification and NAT translation

Some actual searches, part 2 Actual Correlation: Simplified Copyright Attribution index=dhcp action=dhcpack [search index=firewall nat_src_ip=$src_ip$ AND nat_src_port=$src_port $ head 1 fields src_ip] head 1 fields src_mac DHCP lookup, since we need a MAC to search some authentication logs

Some actual searches, part 2 Actual Correlation: Simplified Copyright Attribution (index=radius AND login_result="auth OK") OR (index=quickconnect AND action="login") [search index=dhcp action=dhcpack [search index=firewall nat_src_ip=$src_ip$ AND nat_src_port=$src_port $ head 1 fields src_ip] head 1 fields src_mac] dedup user fields user Now we use that MAC to find the user

Some actual searches, part 2 Yes, the IP is anonymized, but there were real logs behind that search

Users and Permissions AD authentication and authorization Help Desk, for example srchfilter = event_id=644 OR event_id=4740 Summary indices For secure C-level view Apps also provide some separation

Bringing in new data Central Logging Inefficient, but reliable Splunk Agents/Splunk DB Can be dangerous Use Splunk to syslog

Lessons Learned Have a plan for fields (Splunk Common Information Model, Apps) http://docs.splunk.com/documentation/cim Private IP space isn t your friend Deployment server is your friend Users will want apps Be prepared to be popular

Selling the Dream Disclaimer Know Your Audience Address Needs Success Stories Tell Everyone

Disclaimer The following statements apply to Splunk as our logging frontend. After exploring and building a central logging environment in a heterogeneous, decentralized environment like the University of Illinois at Urbana-Champaign, Splunk was selected because it met our needs with respect to creating a scalable, manageable, and easily distributable platform that could be used to combine, correlate, and share data with functional groups so they can more effectively make decisions to their appropriate area. Regardless of the tool or solution you are currently utilizing, trying to expand, or just considering piloting, the remaining advice should be used as a guide for gaining support across your organization.

Know Your Audience Just because you know a tool can provide IT security intelligence to those who need it and that excites you, that is mostly meaningless to others. Just because you know a tool can provide IT operational intelligence to those who need it and that excites some, that is still mostly meaningless to others. Just because you know a tool can provide business intelligence to those who need it and that excites some, that is still mostly meaningless to others.

Know Your Audience Just because you know a tool can enhance research efforts to those who need it and that excites some, that is still mostly meaningless to others. Just because you know a tool can help fight crime and ensure public safety efforts and that excites some, that is still surprising meaningless to some.

The Point All valid uses of Splunk What s in it for them? Put yourself in their shoes Everyone cares about something different There will never be a single selling point Lead with what they care about Follow up with additional bonuses

Address Needs Know your Audience è Determine their Needs How can Splunk make their life s easier? Missing some metrics? Reduce efforts around repetitive or manual tasks? Clarity to questions that involve complex actions? Justify current or projected funding needs?

Success Stories You can never have enough Have multiple for each audience type Always be on the lookout for more Know them by heart Keep it simple and meaningful Borrow from others (as needed)

Tell Everyone Tell anyone and everyone who will listen If you aren t sure if you ve told someone about it, tell them again If they don t listen or don t seem to care keep trying You know you re being successful when others start selling the dream for you At times you may feel like you oversold, don t worry about that, just make sure you manage expectations.

Questions

Appendix A: Log Architecture

Appendix B: Splunk Configs Splunk2syslog config General input configs

Appendix B: Splunk Configs Splunk to Syslog outputs.conf (on heavy forwarder): [syslog] defaultgroup = syslog-forwarders [syslog:syslog-forwarders] server = your.central.log.server:514 type = tcp timestampformat = %b %e %H:%M:%S

Appendix B: Splunk Configs Splunk to Syslog props.conf (on heavy forwarder): [default] TRANSFORMS-routing=syslogRouting SEDCMD= s/[\n\r]/ /g

Appendix B: Splunk Configs Splunk to Syslog outputs.conf (on agents): [tcpout] defaultgroup = syslog-relay,indexers maxqueuesize = 128MB maxconnectionsperindexer = 10 [tcpout:syslog-relay] server = your.splunk.to.syslog.heavy.forwarder:8514 useack = true [tcpout:indexers] server = cname.for.all.of.your.indexers:8514 useack = true autolb = true

Appendix B: Splunk Configs General Input props.conf (on forwarders/indexers): [your_sourcetype] TIME_PREFIX = \stext_preceding_timestamp:\s TIME_FORMAT = %s.%6n MAX_TIMESTAMP_LOOKAHEAD = 125 SHOULD_LINEMERGE = False LINE_BREAKER = ([\n\r]+) TRUNCATE = 10240

Appendix B: Splunk Configs General Input inputs.conf (on agent): [monitor:///var/central_logs/bro.local/.../bro_http*] disabled = false sourcetype=bro_http followtail = 0 host_segment = 5 index = bro ignoreolderthan = 5d followsymlink = false blacklist = \.(gz bz2 z zip tar\.gz tgz tbz tbz2)

Appendix C: Syslog Configs Bro Manager Configuration (an example endpoint) Forwarder Configuration Central Log Archive Configuration Template to allow resolved names in forwarded messages

Appendix C: Syslog Configs Example Rsyslog Endpoint: #### MODULES #### module(load="imuxsock") # provides support for local system logging (e.g. via logger command) module(load="imklog") # provides kernel logging support (previously done by rklogd) #module(load="immark") # provides --MARK-- message capability #module(load="imfile") module(load="omrelp ) #### GLOBAL DIRECTIVES #### $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat # Use default timestamp format $RepeatedMsgReduction off # "the previous message was repeated n times" is expensive $PreserveFQDN on # Always use full names $WorkDirectory /var/rsyslog # default location for work (spool) files $MainMsgQueueDequeueBatchSize 1024

Appendix C: Syslog Configs Example Rsyslog Endpoint (continued): #### Inputs #### input(type="imfile \ File="/var/log/application/somelog.log \ Tag= some_log: \ StateFile="state-some_log \ Severity="info \ Facility="local1") # Repeat as many times as needed

Appendix C: Syslog Configs Example Rsyslog Endpoint (continued): #### Security Syslog Forwarding #### $ActionQueueType LinkedList # use asynchronous processing $ActionQueueFileName this_servers_queue # set file name, also enables disk mode $ActionQueueDequeueBatchSize 1024 *.* :omrelp:forwarder1:514;rsyslog_forwardformat $ActionExecOnlyWhenPreviousIsSuspended on & :omrelp:forwarder2:514;rsyslog_forwardformat $ActionExecOnlyWhenPreviousIsSuspended off local1.* stop

Appendix C: Syslog Configs Example Rsyslog Forwarder: ##General Options## $AbortOnUncleanConfig on $RepeatedMsgReduction off $PreserveFQDN on $EscapeControlCharacterTab off $WorkDirectory /var ##Load Modules## module(load= /var/lib/rsyslog/impstats" interval="60" severity="7") module(load="/var/lib/rsyslog/imrelp") module(load="/var/lib/rsyslog/imudp") module(load="/var/lib/rsyslog/imtcp") module(load="/var/lib/rsyslog/omrelp")

Appendix C: Syslog Configs Example Rsyslog Forwarder (continued): ##Stats Output## if $syslogfacility-text == 'syslog' and $syslogseverity-text == 'debug' then { action(type="omfile" dynafile="statsfile") #DynaFile Templates must be defined elsewhere $ActionQueueType LinkedList $ActionQueueFileName stats_forward_queue $ActionQueueDequeueBatchSize 1024 *.* :omrelp:archive.server.address:514;rsyslog_forwardformat stop } ##Log the rsyslog messages somewhere useful## if $syslogfacility-text == 'syslog' then { action(type="omfile" file= /var/log/rsyslog.log") stop }

Appendix C: Syslog Configs Example Rsyslog Forwarder (continued): ##Forward all the logs## ruleset(name= standard_forward" queue.type="linkedlist" queue.dequeuebatchsize="1024") { if $fromhost startswith mail' then { $ActionQueueType LinkedList $ActionQueueFileName mail_forward_queue } $ActionQueueDequeueBatchSize 1024 *.* :omrelp:archive.server.address:514;rsyslog_forwardformat stop } else { $ActionQueueType LinkedList $ActionQueueFileName standard_forward_queue $ActionQueueDequeueBatchSize 1024 *.* :omrelp:archive.server.address:514;resolvedfwdformat stop } stop

Appendix C: Syslog Configs Example Rsyslog Forwarder (continued): ##RELP Input on port 1514## input(type="imrelp" port="1514" ruleset="networking_forward") ##UDP Input on port 1514## input(type="imudp" port="1514" ruleset="networking_forward") ##RELP Input on port 1515## input(type="imrelp" port="1515" ruleset="standard_forward") ##UDP Input on port 1515## input(type="imudp" port="1515" ruleset="standard_forward")

Appendix C: Syslog Configs Example Central Archive: Very much the same as a forwarder (rulesets, if/ thens, and inputs), except instead of forwarding we write out the logs: action(type="omfile" name="shiblogs" dynafile="hourlyfile" fileowner="syslog" filegroup= syslog dirowner="syslog" dirgroup= syslog" dircreatemode="0755" filecreatemode="0644" queue.dequeuebatchsize="1024")

Appendix C: Syslog Configs Template for resolved names in forwarded logs (is used instead of RSYSLOG_ForwardFormat on Forwarder): # Format to use resolved hostname template(name="resolvedfwdformat" type="list") { constant(value="<") property(name="pri") constant(value=">") property(name="timestamp" dateformat="rfc3339") constant(value=" ") property(name="fromhost") constant(value=" ") property(name="syslogtag" position.from="1" position.to="32") constant(value=" ") property(name="msg" spifno1stsp="on") property(name="msg" droplastlf="on" ) constant(value="\n") }