Splunk Search

Need help forming my search query for linux_secure sourcetype

jcorkey
Explorer

I am receiving the /var/log/secure logs from my linux forwarder I am trying to create a search string that can detect when a user has added any user to sudo access. For example, I'd like to be able to detect when user1 adds user2 to the wheel group in order to give user2 sudo access.

0 Karma

mattymo
Splunk Employee
Splunk Employee

I used this to find my user using visudo to add a user to wheel. I am sure there a few different conditions that you'd hunt for...

index=* host=* source=/var/log/secure visudo OR usermod

alt text

Replace with your commands or logic accordingly.

I use the nix TA found here to ensure my field extractions (Splunk PS configs, you can use whatever you like): https://bitbucket.org/SPLServices/splunk_ta_nix/src

While on the topic of authentication and privilege, check out this wicked auth app by @dshpritz

https://splunkbase.splunk.com/app/3639/

- MattyMo
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...