Splunk Search

splunk query to list if anyone removed logs from unix server(syslog servers)?

pavanae
Builder

Base query :- sourcetype=syslog

How can I or where can I find if anyone removed any log files on unix syslog server?
what are the sample unix commands that used to remove any log files?

Any inputs would be highly appriciated.

0 Karma
1 Solution

koshyk
Super Champion

Your question is very broad.

  1. The system logrotation itself can remove/rotate logs. So it makes it difficult to detect who actually removed the log files
  2. You can implement audit in Linux systems and ensure the relevant files are monitored. You need to print-out auid, uid and all relevant information to detect who actually did modification or delete. Then you can onboard these audit data into Splunk
  3. You can employ a professional software (File Integrity monitor) software to check actions for specific file
  4. A cheap option is to detect file changes by writing a simple shell script and packaging this as a "scripted inputs" app to find file modified time, file creation time etc. A sample script is provided in this link and onboard into Splunk

View solution in original post

koshyk
Super Champion

Your question is very broad.

  1. The system logrotation itself can remove/rotate logs. So it makes it difficult to detect who actually removed the log files
  2. You can implement audit in Linux systems and ensure the relevant files are monitored. You need to print-out auid, uid and all relevant information to detect who actually did modification or delete. Then you can onboard these audit data into Splunk
  3. You can employ a professional software (File Integrity monitor) software to check actions for specific file
  4. A cheap option is to detect file changes by writing a simple shell script and packaging this as a "scripted inputs" app to find file modified time, file creation time etc. A sample script is provided in this link and onboard into Splunk
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...