<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to alert on command execution over pwd by users in Linux? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-command-execution-over-pwd-by-users-in-Linux/m-p/277541#M83684</link>
    <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I'm trying to monitor command execution over certain directories in linux. To do that, I've made a report that displays that data in a table format, something like this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;USER    COMMAND    PWD          _time
usr1    cat        /opt         time1
usr2    less       /example1    time2
usr3    visudo     /example2    time3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But now, I wan't something more complex. I've created a whitelist (CSV file) with user, allowedCommands, directory(PWD) to alert not only when a user outside this whitelist is executing something, but also whitelisted users outside their allowed commands by directory.&lt;/P&gt;

&lt;P&gt;I've been playing with lookups/inputlookups, but I couldn't make it work.&lt;/P&gt;

&lt;P&gt;Any ideas ? &lt;/P&gt;

&lt;P&gt;KR.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Oct 2015 18:41:58 GMT</pubDate>
    <dc:creator>alemarzu</dc:creator>
    <dc:date>2015-10-20T18:41:58Z</dc:date>
    <item>
      <title>How to alert on command execution over pwd by users in Linux?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-command-execution-over-pwd-by-users-in-Linux/m-p/277541#M83684</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I'm trying to monitor command execution over certain directories in linux. To do that, I've made a report that displays that data in a table format, something like this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;USER    COMMAND    PWD          _time
usr1    cat        /opt         time1
usr2    less       /example1    time2
usr3    visudo     /example2    time3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But now, I wan't something more complex. I've created a whitelist (CSV file) with user, allowedCommands, directory(PWD) to alert not only when a user outside this whitelist is executing something, but also whitelisted users outside their allowed commands by directory.&lt;/P&gt;

&lt;P&gt;I've been playing with lookups/inputlookups, but I couldn't make it work.&lt;/P&gt;

&lt;P&gt;Any ideas ? &lt;/P&gt;

&lt;P&gt;KR.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 18:41:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-command-execution-over-pwd-by-users-in-Linux/m-p/277541#M83684</guid>
      <dc:creator>alemarzu</dc:creator>
      <dc:date>2015-10-20T18:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to alert on command execution over pwd by users in Linux?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-command-execution-over-pwd-by-users-in-Linux/m-p/277542#M83685</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;P&gt;Step1: Add a field, say flag="Y" in your whitelist lookup file. This will used as return value for matches.&lt;BR /&gt;
Step2: update your search like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your current search giving table with fields USER COMMAND PWD _time | lookup YourWhitelistTable user as USER allowedCommands as COMMAND OUTPUT flag as commandFlag | lookup YourWhitelistTable user as USER directory as PWD OUTPUT flag as pwdFlag | where commandFlag!="Y" OR pwdFlag!="Y" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Oct 2015 19:02:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-command-execution-over-pwd-by-users-in-Linux/m-p/277542#M83685</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-10-20T19:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to alert on command execution over pwd by users in Linux?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-command-execution-over-pwd-by-users-in-Linux/m-p/277543#M83686</link>
      <description>&lt;P&gt;It's working! &lt;/P&gt;

&lt;P&gt;Any idea why "commandFlag" field ends up with more than one "Y" per event in some cases?&lt;/P&gt;

&lt;P&gt;Thx mate.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2015 15:04:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-alert-on-command-execution-over-pwd-by-users-in-Linux/m-p/277543#M83686</guid>
      <dc:creator>alemarzu</dc:creator>
      <dc:date>2015-10-23T15:04:22Z</dc:date>
    </item>
  </channel>
</rss>

