SlideShare a Scribd company logo
Copyright © 2011, Splunk Inc. Listen to your data.
11/4/2021
Daniel Wilson
Senior Security Engineer
Splunk your Configs to
Improve Security Posture
Copyright © 2011, Splunk Inc. Listen to your data.
Agenda
2
• Introductions
• What is a Config file?
• Preparing Splunk
• Use Cases
• Gotcha’s
• Q&A
Copyright © 2011, Splunk Inc. Listen to your data.
Summary
3
A quick security talk to discuss how and why you would want to
index your config files.
Copyright © 2011, Splunk Inc. Listen to your data.
Introductions – Daniel Wilson
4
• Security? IT guy? Hey you?
• Security more or less 8 years now
• Selling computers in ’97
• Speaks randomly Splunk User Group
• Formal Career and Skills development coach at StubHub/eBay
through Leader a Coach program and Jr talent development
Splunk Blogged About these features in 2007, that’s where I learned these tricks
https://www.splunk.com/en_us/blog/tips-and-tricks/dont-forget-to-index-your-config-files.html
Copyright © 2011, Splunk Inc. Listen to your data.
Introductions – Establish Credibility
5
40 Certs over the years….no idea what is expired
• Splunk Arch level 2, Splunk Admin, Splunk Power User
• AWS Security Specialist, MCSE Security, CCNA Sec, Security+, CySA+
• RHCSA, Cloud+, Linux+, CCNP Routing/Switching
• MTA Software Development, MTA Python
Other Stuffz
• Active defense, Cloud Security, Network/Systems Security and
Automation
• CIS and MITRE
• GDPR, PCI and SOX
• DevOps Culture
Copyright © 2011, Splunk Inc. Listen to your data.
Introduction Audience
6
• Who’s in the audience?
– Splunk Admins
– Security Folk
– Auditors
– ComplianceAuditors, Compliance
Copyright © 2011, Splunk Inc. Listen to your data.
What is a Config File
7
• Flat file generally containing key values
• Read by apps when they start/stop
• Often contain critical settings
• Example of a SSHD Config
• “ini” files on Windows
Copyright © 2011, Splunk Inc. Listen to your data.
Use Cases – Why Splunk?
8
• Monitoring your configs critical part of your File Integrity
Monitoring Strategy (FIM)
• Tools like AIDE tell you something changed
• Auditd, tells you who changed and when
• Both AIDE and Auditd lack content
• GIT managed Configs are great… security professionals have been
burned with lack of enforcement though.
Copyright © 2011, Splunk Inc. Listen to your data.
Use Case – Looking at configs!
9
• Make easy to use dashboard for auditors and non-technical users
• Tip: Rmcomments macro included to ease reading
Copyright © 2011, Splunk Inc. Listen to your data.
Use Case – Comparing Config
10
• Compare files manually
• Enrich your alerts with just the details
index=configs source=/etc/ssh/sshd_config
| head 2
| diff pos1=1 pos2=2
Copyright © 2011, Splunk Inc. Listen to your data.
Use Case – Alert on Login Script Changes
11
• Actual control I implemented that later caught our internal
RedTeam after getting p0wned.
• Add a input for all your login scripts for your platform
• Run this job every 15 minutes
index=configs source="/home/*/.bash*"
Copyright © 2011, Splunk Inc. Listen to your data.
Use Cases – Clear Text in Database
12
• Example of detecting of clear text passwords in PostGres
• Note inline search extractions, will not extract by default
• Tip: Add CIM fields like App to your results to improve
searches
index=configs sourcetype=config_file source=*pg_hba* " password"
| dedup host, source
| rex field=_raw "host.*(?<insecure>password)"
| eval message = "Clear text passwords accepted by PostGres"
| eval app = "Postgres"
| table host, source, _raw, app
Copyright © 2011, Splunk Inc. Listen to your data.
Use Case – SSHD Empty Passwords?
13
• Great Compliance Search right here, tweakable
• Not you might want to script the input in here
• Tip: Enrich your alerts with MITRE details
index=configs sourcetype=config_file source=/etc/ssh/sshd_config
earliest=-48h latest=now
| dedup index, sourcetype, host, source
| rex mode=sed "s/#PasswordAuthentication yes//g"
| search "PermitEmptyPasswords yes" OR "PermitEmptyPasswords Yes"
| eval vrisk_score = 100, domain="Endpoint", dest=host, dest_dns=host
| eval reason="Endpoint - SSH PermitEmptyPasswords yes set"
| eval MITRE="T1110"
| eval _time = now()
| table dest, vrisk_score, domain, reason, MITRE
Copyright © 2011, Splunk Inc. Listen to your data.
Use Case – Config Drift
14
• By using md5 function we can see the drift
• Consider sorting by your data gardens for compliance reports
Copyright © 2011, Splunk Inc. Listen to your data.
Splunk Admin
15
• Splunk_TA_nix does all this
• Props
• Inputs
• Indexes
• I put all this in an app called TA-configsdemo on Splunkbase to help
you play with these settings without dealing with Splunk_TA_nix
Copyright © 2011, Splunk Inc. Listen to your data.
Splunk – Props.conf
16
• Rather than creating events, Splunk create one event per file
• You can and should review your settings with btool
• I noticed 4 settings in props.conf that are worthy conversations
• Btool on your indexer and search head
AUTO_KV_JSON = true
CHECK_METHOD = modtime
DATETIME_CONFIG = NONE
KV_MODE = none
$ ./splunk cmd btool props list config_file
Copyright © 2011, Splunk Inc. Listen to your data.
Props - AUTO_KV_JSON
17
AUTO_KV_JSON = <boolean>
* Used for search-time field extractions only.
* Specifies whether to try json extraction automatically.
* Default: true
• Meaning if your file is well structured JSON you will get field
extraction by default.
• I used another sourcetype for this
Copyright © 2011, Splunk Inc. Listen to your data.
Props - CHECK_METHOD = modtime
18
File checksum configuration
* Set CHECK_METHOD to "endpoint_md5" to have Splunk software perform a checksum of the
first and last 256 bytes of a file. When it finds matches, Splunk software lists the file as already
indexed and indexes only new data, or ignores it if there is no new data.
* Set CHECK_METHOD to "modtime" to check only the modification time of the file.
• Super helpful on config files that are really small and don’t have enough characters to be
checked with the first and last 256. Avoid the “too small problem” in Splunk sourcetypes.
Copyright © 2011, Splunk Inc. Listen to your data.
Props - DATETIME_CONFIG = NONE
19
"NONE" leaves the event time set to whatever time was selected by the input layer
* For data sent by Splunk forwarders over the Splunk-to-Splunk protocol, the input layer is the
time that was selected on the forwarder by its input behavior (as below).
* For file-based inputs (monitor, batch) the time chosen is the modification timestamp on the file
being read.
* For other inputs, the time chosen is the current system time when the event is read from the
pipe/socket/etc.
* Both "CURRENT" and "NONE" explicitly disable the per-text timestamp identification, so the
default event boun
• In this case a config_file time stamped by your operating system like in centOS might be dated
6-7 years ago. You need to consider this in your indexer retention strategy.
Copyright © 2011, Splunk Inc. Listen to your data.
Props - KV_MODE = none
20
* none: if you want no field/value extraction to take place.
• You will NOT get field extractions by default from your Config files
• While a lot of your config_files are going to be key value they are
going to be large and this is going to be expensive to turn on.
Copyright © 2011, Splunk Inc. Listen to your data.
inputs.conf
21
[monitor:///etc/ssh/sshd_conf*]
index=configs
sourcetype=config_file
If you have Splunk_TA_Nix installed or configured your props.conf as
we mentioned the source will work.
Copyright © 2011, Splunk Inc. Listen to your data.
inputs.conf, cont
22
• Trick to cat a file in
• Time will be NOW
• Saved our auditor days
• MD5 identical
• Make sure the file is there!
…
do-execcat() {
# display config
if [ -f "$strConfigLocation" ]; then
cat $strConfigLocation
fi
}
…
[script://./bin/cat_sshd_config.sh]
index=osnixvcustom
sourcetype=config_file
source=/etc/ssh/sshd_config
interval=86400
Copyright © 2011, Splunk Inc. Listen to your data.
Indexer Stuff
23
• Very low sourcetype uniformity
• Don’t recommend you mix it with other types for this reason
• Ideally not a default index you would search either due to a large
set of characters and strings vs a traditional log
Copyright © 2011, Splunk Inc. Listen to your data.
Gotcha’s
24
• Config files are cheap
• Watch out for shared file systems
• Ensure your index permissions are well managed
• Don’t index any secrets you don’t want collected
Copyright © 2011, Splunk Inc. Listen to your data.
Thank You :)

More Related Content

PPTX
Getting Started with Splunk Breakout Session
PDF
October 2014 Webinar: Cybersecurity Threat Detection
PPTX
Workshop splunk 6.5-saint-louis-mo
PPTX
Leveraging DNS to Surface Attacker Activity
PDF
Splunk workshop-Machine Data 101
PDF
Advanced Splunk Administration
PPTX
Daten anonymisieren und pseudonymisieren in Splunk Enterprise
PPTX
Getting started with Splunk - Break out Session
Getting Started with Splunk Breakout Session
October 2014 Webinar: Cybersecurity Threat Detection
Workshop splunk 6.5-saint-louis-mo
Leveraging DNS to Surface Attacker Activity
Splunk workshop-Machine Data 101
Advanced Splunk Administration
Daten anonymisieren und pseudonymisieren in Splunk Enterprise
Getting started with Splunk - Break out Session

What's hot (20)

PPTX
SplunkLive! Getting Started with Splunk Enterprise
PPTX
Apache Spot
PDF
Deep Learning in Security—An Empirical Example in User and Entity Behavior An...
PPTX
Splunk Discovery: Warsaw 2018 - Getting Data In
PDF
Fighting cybersecurity threats with Apache Spot
PDF
NUTANIX and SPLUNK
PDF
Splunk Data Onboarding Overview - Splunk Data Collection Architecture
PDF
Machine Data 101
PPTX
Analyzing 1.2 Million Network Packets per Second in Real-time
PPTX
Machine Data 101: Turning Data Into Insight
PPTX
Threat Hunting
PPTX
Splunk live beginner training nyc
PPTX
SplunkLive 2011 Beginners Session
PPTX
Getting Started with Splunk Enterprise
PPTX
Advanced Use Cases for Analytics Breakout Session
PPTX
Data Onboarding Breakout Session
PPT
SplunkLive! Customer Presentation - Penn State Hershey Medical Center
PDF
What's Next for Google's BigTable
PPTX
Using Splunk for Information Security
PDF
Get full visibility and find hidden security issues
SplunkLive! Getting Started with Splunk Enterprise
Apache Spot
Deep Learning in Security—An Empirical Example in User and Entity Behavior An...
Splunk Discovery: Warsaw 2018 - Getting Data In
Fighting cybersecurity threats with Apache Spot
NUTANIX and SPLUNK
Splunk Data Onboarding Overview - Splunk Data Collection Architecture
Machine Data 101
Analyzing 1.2 Million Network Packets per Second in Real-time
Machine Data 101: Turning Data Into Insight
Threat Hunting
Splunk live beginner training nyc
SplunkLive 2011 Beginners Session
Getting Started with Splunk Enterprise
Advanced Use Cases for Analytics Breakout Session
Data Onboarding Breakout Session
SplunkLive! Customer Presentation - Penn State Hershey Medical Center
What's Next for Google's BigTable
Using Splunk for Information Security
Get full visibility and find hidden security issues
Ad

Similar to Splunking configfiles 20211208_daniel_wilson (20)

PPTX
dlux splunk>live! 2012 Beginners Session
PPTX
PowerShell - Be A Cool Blue Kid
PPTX
Apache HDFS Extended Attributes and Transparent Encryption
PDF
Splunk Insights
PPTX
Getting Started with Splunk Enterprise Hands-On Breakout Session
PPTX
Leveraging Structured Data To Reduce Disk, IO & Network Bandwidth
PDF
Cloud patterns applied
PDF
EnCase Enterprise Basic File Collection
PDF
Setup of EDA tools and workstation environment variables in NCTU 307 Lab. wor...
PDF
Mainframe Customer Education Webcast: New Ironstream Facilities for Enhanced ...
PDF
Splunk 6.X Fundamentals Part 1 (eLearning).pdf
PPTX
How to Make a Honeypot Stickier (SSH*)
PPTX
DevOpsDays InSpec Workshop
PPTX
DCRUG: Achieving Development-Production Parity
PPTX
How to Make a Honeypot Stickier (SSH*)
PPTX
InSpec For DevOpsDays Amsterdam 2017
PDF
The Latest, Ultimative Final Version, Current Release, Approved, Last Minute ...
PDF
The latest, ultimative final ver­sion, current release, approved, last minute...
PPTX
Windows 8 Forensics & Anti Forensics
PDF
Splunk best practices
dlux splunk>live! 2012 Beginners Session
PowerShell - Be A Cool Blue Kid
Apache HDFS Extended Attributes and Transparent Encryption
Splunk Insights
Getting Started with Splunk Enterprise Hands-On Breakout Session
Leveraging Structured Data To Reduce Disk, IO & Network Bandwidth
Cloud patterns applied
EnCase Enterprise Basic File Collection
Setup of EDA tools and workstation environment variables in NCTU 307 Lab. wor...
Mainframe Customer Education Webcast: New Ironstream Facilities for Enhanced ...
Splunk 6.X Fundamentals Part 1 (eLearning).pdf
How to Make a Honeypot Stickier (SSH*)
DevOpsDays InSpec Workshop
DCRUG: Achieving Development-Production Parity
How to Make a Honeypot Stickier (SSH*)
InSpec For DevOpsDays Amsterdam 2017
The Latest, Ultimative Final Version, Current Release, Approved, Last Minute ...
The latest, ultimative final ver­sion, current release, approved, last minute...
Windows 8 Forensics & Anti Forensics
Splunk best practices
Ad

More from Becky Burwell (17)

PDF
SFBA Splunk Usergroup meeting Nov 20, 2024
PDF
SFBA Splunk Usergroup meeting September 4, 2024
PDF
SFBA Splunk Usergroup Meeting, August 14, 2024
PDF
SFBA Splunk Usergroup meeting July 17, 2024
PDF
SFBA Splunk Usergroup meeting March 13, 2024
PDF
SFBA Splunk Usergroup meeting December 14, 2023
PDF
SFBA_SUG_2023-08-02.pdf
PDF
SFBA Splunk Usergroup meeting May 3, 2023
PDF
SFBA Splunk User Group Meeting February 2023
PDF
SFBA Splunk Usergroup meeting December 2022
PDF
SFBA Usergroup meeting November 2, 2022
PDF
SF Bay Area Splunk User Group Meeting October 5, 2022
PDF
SFBA Splunk User Group Meeting August 10, 2022
PDF
SFBA Splunk Usergroup meeting July 13, 2022
PDF
designing-resilient-cloud-native-splunk-arch-in-aws-austin-rose.pdf
PDF
Getting Started with Splunk Observability September 8, 2021
PDF
Advanced Outlier Detection and Noise Reduction with Splunk & MLTK August 11, ...
SFBA Splunk Usergroup meeting Nov 20, 2024
SFBA Splunk Usergroup meeting September 4, 2024
SFBA Splunk Usergroup Meeting, August 14, 2024
SFBA Splunk Usergroup meeting July 17, 2024
SFBA Splunk Usergroup meeting March 13, 2024
SFBA Splunk Usergroup meeting December 14, 2023
SFBA_SUG_2023-08-02.pdf
SFBA Splunk Usergroup meeting May 3, 2023
SFBA Splunk User Group Meeting February 2023
SFBA Splunk Usergroup meeting December 2022
SFBA Usergroup meeting November 2, 2022
SF Bay Area Splunk User Group Meeting October 5, 2022
SFBA Splunk User Group Meeting August 10, 2022
SFBA Splunk Usergroup meeting July 13, 2022
designing-resilient-cloud-native-splunk-arch-in-aws-austin-rose.pdf
Getting Started with Splunk Observability September 8, 2021
Advanced Outlier Detection and Noise Reduction with Splunk & MLTK August 11, ...

Recently uploaded (20)

PDF
Introduction to Business Data Analytics.
PDF
.pdf is not working space design for the following data for the following dat...
PPTX
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
PDF
Fluorescence-microscope_Botany_detailed content
PPTX
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
PPT
Chapter 3 METAL JOINING.pptnnnnnnnnnnnnn
PPTX
Computer network topology notes for revision
PDF
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
PPTX
Moving the Public Sector (Government) to a Digital Adoption
PPT
Chapter 2 METAL FORMINGhhhhhhhjjjjmmmmmmmmm
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PDF
Lecture1 pattern recognition............
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PPTX
Database Infoormation System (DBIS).pptx
PPTX
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
PDF
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
PPTX
IB Computer Science - Internal Assessment.pptx
PPTX
Business Ppt On Nestle.pptx huunnnhhgfvu
PPTX
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
PPTX
Introduction to Knowledge Engineering Part 1
Introduction to Business Data Analytics.
.pdf is not working space design for the following data for the following dat...
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
Fluorescence-microscope_Botany_detailed content
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
Chapter 3 METAL JOINING.pptnnnnnnnnnnnnn
Computer network topology notes for revision
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
Moving the Public Sector (Government) to a Digital Adoption
Chapter 2 METAL FORMINGhhhhhhhjjjjmmmmmmmmm
Introduction-to-Cloud-ComputingFinal.pptx
Lecture1 pattern recognition............
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
Database Infoormation System (DBIS).pptx
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
IB Computer Science - Internal Assessment.pptx
Business Ppt On Nestle.pptx huunnnhhgfvu
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
Introduction to Knowledge Engineering Part 1

Splunking configfiles 20211208_daniel_wilson

  • 1. Copyright © 2011, Splunk Inc. Listen to your data. 11/4/2021 Daniel Wilson Senior Security Engineer Splunk your Configs to Improve Security Posture
  • 2. Copyright © 2011, Splunk Inc. Listen to your data. Agenda 2 • Introductions • What is a Config file? • Preparing Splunk • Use Cases • Gotcha’s • Q&A
  • 3. Copyright © 2011, Splunk Inc. Listen to your data. Summary 3 A quick security talk to discuss how and why you would want to index your config files.
  • 4. Copyright © 2011, Splunk Inc. Listen to your data. Introductions – Daniel Wilson 4 • Security? IT guy? Hey you? • Security more or less 8 years now • Selling computers in ’97 • Speaks randomly Splunk User Group • Formal Career and Skills development coach at StubHub/eBay through Leader a Coach program and Jr talent development Splunk Blogged About these features in 2007, that’s where I learned these tricks https://www.splunk.com/en_us/blog/tips-and-tricks/dont-forget-to-index-your-config-files.html
  • 5. Copyright © 2011, Splunk Inc. Listen to your data. Introductions – Establish Credibility 5 40 Certs over the years….no idea what is expired • Splunk Arch level 2, Splunk Admin, Splunk Power User • AWS Security Specialist, MCSE Security, CCNA Sec, Security+, CySA+ • RHCSA, Cloud+, Linux+, CCNP Routing/Switching • MTA Software Development, MTA Python Other Stuffz • Active defense, Cloud Security, Network/Systems Security and Automation • CIS and MITRE • GDPR, PCI and SOX • DevOps Culture
  • 6. Copyright © 2011, Splunk Inc. Listen to your data. Introduction Audience 6 • Who’s in the audience? – Splunk Admins – Security Folk – Auditors – ComplianceAuditors, Compliance
  • 7. Copyright © 2011, Splunk Inc. Listen to your data. What is a Config File 7 • Flat file generally containing key values • Read by apps when they start/stop • Often contain critical settings • Example of a SSHD Config • “ini” files on Windows
  • 8. Copyright © 2011, Splunk Inc. Listen to your data. Use Cases – Why Splunk? 8 • Monitoring your configs critical part of your File Integrity Monitoring Strategy (FIM) • Tools like AIDE tell you something changed • Auditd, tells you who changed and when • Both AIDE and Auditd lack content • GIT managed Configs are great… security professionals have been burned with lack of enforcement though.
  • 9. Copyright © 2011, Splunk Inc. Listen to your data. Use Case – Looking at configs! 9 • Make easy to use dashboard for auditors and non-technical users • Tip: Rmcomments macro included to ease reading
  • 10. Copyright © 2011, Splunk Inc. Listen to your data. Use Case – Comparing Config 10 • Compare files manually • Enrich your alerts with just the details index=configs source=/etc/ssh/sshd_config | head 2 | diff pos1=1 pos2=2
  • 11. Copyright © 2011, Splunk Inc. Listen to your data. Use Case – Alert on Login Script Changes 11 • Actual control I implemented that later caught our internal RedTeam after getting p0wned. • Add a input for all your login scripts for your platform • Run this job every 15 minutes index=configs source="/home/*/.bash*"
  • 12. Copyright © 2011, Splunk Inc. Listen to your data. Use Cases – Clear Text in Database 12 • Example of detecting of clear text passwords in PostGres • Note inline search extractions, will not extract by default • Tip: Add CIM fields like App to your results to improve searches index=configs sourcetype=config_file source=*pg_hba* " password" | dedup host, source | rex field=_raw "host.*(?<insecure>password)" | eval message = "Clear text passwords accepted by PostGres" | eval app = "Postgres" | table host, source, _raw, app
  • 13. Copyright © 2011, Splunk Inc. Listen to your data. Use Case – SSHD Empty Passwords? 13 • Great Compliance Search right here, tweakable • Not you might want to script the input in here • Tip: Enrich your alerts with MITRE details index=configs sourcetype=config_file source=/etc/ssh/sshd_config earliest=-48h latest=now | dedup index, sourcetype, host, source | rex mode=sed "s/#PasswordAuthentication yes//g" | search "PermitEmptyPasswords yes" OR "PermitEmptyPasswords Yes" | eval vrisk_score = 100, domain="Endpoint", dest=host, dest_dns=host | eval reason="Endpoint - SSH PermitEmptyPasswords yes set" | eval MITRE="T1110" | eval _time = now() | table dest, vrisk_score, domain, reason, MITRE
  • 14. Copyright © 2011, Splunk Inc. Listen to your data. Use Case – Config Drift 14 • By using md5 function we can see the drift • Consider sorting by your data gardens for compliance reports
  • 15. Copyright © 2011, Splunk Inc. Listen to your data. Splunk Admin 15 • Splunk_TA_nix does all this • Props • Inputs • Indexes • I put all this in an app called TA-configsdemo on Splunkbase to help you play with these settings without dealing with Splunk_TA_nix
  • 16. Copyright © 2011, Splunk Inc. Listen to your data. Splunk – Props.conf 16 • Rather than creating events, Splunk create one event per file • You can and should review your settings with btool • I noticed 4 settings in props.conf that are worthy conversations • Btool on your indexer and search head AUTO_KV_JSON = true CHECK_METHOD = modtime DATETIME_CONFIG = NONE KV_MODE = none $ ./splunk cmd btool props list config_file
  • 17. Copyright © 2011, Splunk Inc. Listen to your data. Props - AUTO_KV_JSON 17 AUTO_KV_JSON = <boolean> * Used for search-time field extractions only. * Specifies whether to try json extraction automatically. * Default: true • Meaning if your file is well structured JSON you will get field extraction by default. • I used another sourcetype for this
  • 18. Copyright © 2011, Splunk Inc. Listen to your data. Props - CHECK_METHOD = modtime 18 File checksum configuration * Set CHECK_METHOD to "endpoint_md5" to have Splunk software perform a checksum of the first and last 256 bytes of a file. When it finds matches, Splunk software lists the file as already indexed and indexes only new data, or ignores it if there is no new data. * Set CHECK_METHOD to "modtime" to check only the modification time of the file. • Super helpful on config files that are really small and don’t have enough characters to be checked with the first and last 256. Avoid the “too small problem” in Splunk sourcetypes.
  • 19. Copyright © 2011, Splunk Inc. Listen to your data. Props - DATETIME_CONFIG = NONE 19 "NONE" leaves the event time set to whatever time was selected by the input layer * For data sent by Splunk forwarders over the Splunk-to-Splunk protocol, the input layer is the time that was selected on the forwarder by its input behavior (as below). * For file-based inputs (monitor, batch) the time chosen is the modification timestamp on the file being read. * For other inputs, the time chosen is the current system time when the event is read from the pipe/socket/etc. * Both "CURRENT" and "NONE" explicitly disable the per-text timestamp identification, so the default event boun • In this case a config_file time stamped by your operating system like in centOS might be dated 6-7 years ago. You need to consider this in your indexer retention strategy.
  • 20. Copyright © 2011, Splunk Inc. Listen to your data. Props - KV_MODE = none 20 * none: if you want no field/value extraction to take place. • You will NOT get field extractions by default from your Config files • While a lot of your config_files are going to be key value they are going to be large and this is going to be expensive to turn on.
  • 21. Copyright © 2011, Splunk Inc. Listen to your data. inputs.conf 21 [monitor:///etc/ssh/sshd_conf*] index=configs sourcetype=config_file If you have Splunk_TA_Nix installed or configured your props.conf as we mentioned the source will work.
  • 22. Copyright © 2011, Splunk Inc. Listen to your data. inputs.conf, cont 22 • Trick to cat a file in • Time will be NOW • Saved our auditor days • MD5 identical • Make sure the file is there! … do-execcat() { # display config if [ -f "$strConfigLocation" ]; then cat $strConfigLocation fi } … [script://./bin/cat_sshd_config.sh] index=osnixvcustom sourcetype=config_file source=/etc/ssh/sshd_config interval=86400
  • 23. Copyright © 2011, Splunk Inc. Listen to your data. Indexer Stuff 23 • Very low sourcetype uniformity • Don’t recommend you mix it with other types for this reason • Ideally not a default index you would search either due to a large set of characters and strings vs a traditional log
  • 24. Copyright © 2011, Splunk Inc. Listen to your data. Gotcha’s 24 • Config files are cheap • Watch out for shared file systems • Ensure your index permissions are well managed • Don’t index any secrets you don’t want collected
  • 25. Copyright © 2011, Splunk Inc. Listen to your data. Thank You :)