Getting Data In

How to edit inputs.conf to search a log file for a specific thread on all servers?

rsingh
Explorer

i need help with adding this to my inputs.conf file on Splunk forwarder servers. i need Splunk to search this specific log file every 60 seconds and if a specific thread is found, to notify ASAP

Location of Log File = C:\ProgramData\Malwarebytes\MBAMService\logs\MBAMSERVICE.LOG

specific thread = ActionTaken=ARW_ACTION_KILL_THREAD

0 Karma

jkat54
SplunkTrust
SplunkTrust

First you have to create an inputs app for this... maybe calling it "MyOrg_MBAM_Inputs".

Then you have to put an inputs.conf in the default directory:

[monitor://C:\ProgramData\Malwarebytes\MBAMService\logs\MBAMSERVICE.LOG]
index=mbam
sourcetype=mbamservicelog

Next you need to create the "mbam" index on your indexer(s)

After that, you need to deploy the MyOrg_MBAM_Inputs app to your hosts via deployment server or other means.

Finally, you can create a search that runs every minute which looks like this:

     index=mbam sourcetype=mbamservicelog _index_earliest=-1m@m ActionTaken=ARW_ACTION_KILL_THREAD

However, searching for this every minute is not recommended as there is usually a lag between when the event happens and when it will make it to your indexers. Therefore I would advise running the search with a "trailing" 5 minute window like this:

    index=mbam sourcetype=mbamservicelog earliest=-10m@m latest=-5m@m ActionTaken=ARW_ACTION_KILL_THREAD 

and then run this search every 5 minutes.

Even better for your performance as a whole, would be to run this every 15 minutes and modify the search as follows:

    index=mbam sourcetype=mbamservicelog earliest=-15m@m ActionTaken=ARW_ACTION_KILL_THREAD 

Cheers and good luck!

Here's some links you might be interested in:

inputs.conf <- input settings
savedsearches.conf <- saved searches and alerting settings
serverclass.conf <- deployment server settings

rsingh
Explorer

this is how i placed it in my PC input file

[default]
host = NPC25


[monitor://C:\ProgramData\Malwarebytes\MBAMService\logs\MBAMSERVICE.LOG]
index=mbam
sourcetype=mbamservicelog
index=mbam sourcetype=mbamservicelog _index_earliest=-5m@m ActionTaken=ARW_ACTION_KILL_THREAD
index=mbam sourcetype=mbamservicelog earliest=-10m@m latest=-5m@m ActionTaken=ARW_ACTION_KILL_THREAD 
0 Karma

rsingh
Explorer

thanks jkat54 - i am not using a deployment server, splunk is a new setup so once i configure the correct input.conf file i will use something like xcopy to push to local servers

0 Karma

jkat54
SplunkTrust
SplunkTrust

ok but you will need to restart the forwarder too, which requires winrm or wmi queries to be able to restart the splunkforwarder service via scripting

0 Karma

rsingh
Explorer

ok got it thanks

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...