<?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 Re: Detecting outliers query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Detecting-outliers-query/m-p/486153#M136022</link>
    <description>&lt;P&gt;&lt;CODE&gt;4 *stdevperhost&lt;/CODE&gt; → &lt;CODE&gt;3  * stdevperhost&lt;/CODE&gt; (99.7%)&lt;BR /&gt;
I think this is good enough for me. &lt;/P&gt;</description>
    <pubDate>Sun, 03 May 2020 23:52:12 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-05-03T23:52:12Z</dc:date>
    <item>
      <title>Detecting outliers query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Detecting-outliers-query/m-p/486149#M136018</link>
      <description>&lt;P&gt;Hi everyone &lt;BR /&gt;
I was reading through "endpoint security analyst with Splunk (online experience)" which you can find here:&lt;BR /&gt;
&lt;A href="http://si_usecase_02.splunkoxygen.com/en-US/app/OLE_Security_Endpoint/sec_search_01?tour=gs_main_intro"&gt;http://si_usecase_02.splunkoxygen.com/en-US/app/OLE_Security_Endpoint/sec_search_01?tour=gs_main_intro&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This is a four exercises tutorial that will show you how to detect and prevent advanced malware,&lt;BR /&gt;
anyway I was moving along with the tutorial step by step and this statement caught my attention:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Any process activities with a command line command length that is more than four times the average and standard deviation command line command lengths for each host is an outlier&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;My question is why?&lt;BR /&gt;
is this a standard formula?&lt;BR /&gt;
an axiom?&lt;BR /&gt;
where did this come from?&lt;/P&gt;

&lt;P&gt;Here is the query that was used in this tutorial:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=xmlwineventlog:microsoft-windows-sysmon/operational EventCode=1
| eval cmdlen=len(CommandLine)
| eventstats avg(cmdlen) as avg, stdev(cmdlen) as stdev by host
| stats max(cmdlen) as maxlen, values(avg) as avgperhost, values(stdev) as stdevperhost by host, CommandLine
| eval threshold = 4 * ( stdevperhost + avgperhost )
| where maxlen &amp;gt; threshold 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here you can see it in the second eval command (in the line before the last).&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2020 21:54:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Detecting-outliers-query/m-p/486149#M136018</guid>
      <dc:creator>muradghazzawi</dc:creator>
      <dc:date>2020-05-03T21:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting outliers query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Detecting-outliers-query/m-p/486150#M136019</link>
      <description>&lt;P&gt;My question is why?: &lt;EM&gt;These are the techniques and best practices how to detect and prevent ransomware infections.&lt;/EM&gt;&lt;BR /&gt;
is this a standard formula?: &lt;EM&gt;no&lt;/EM&gt;&lt;BR /&gt;
an axiom?: &lt;EM&gt;no&lt;/EM&gt;&lt;BR /&gt;
where did this come from? &lt;EM&gt;best practices&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://www.splunk.com/en_us/form/security-investigation-online-experience-endpoint.html"&gt;https://www.splunk.com/en_us/form/security-investigation-online-experience-endpoint.html&lt;/A&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Once ransomware hits, you have a very short window of time to detect it and respond, before critical business data is encrypted and therefore no longer accessible to you, your business, or your customers. This sandbox environment guides you, in a safe environment with "live threats," through techniques and best practices on how to detect and prevent ransomware infections.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;How about this as an example of a long string of commands?&lt;/P&gt;

&lt;P&gt;&lt;A href="http://unit42.elegance.work/unit42-pulling-back-the-curtains-on-encodedcommand-powershell-attacks/"&gt;http://unit42.elegance.work/unit42-pulling-back-the-curtains-on-encodedcommand-powershell-attacks/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2020 23:26:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Detecting-outliers-query/m-p/486150#M136019</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-03T23:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting outliers query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Detecting-outliers-query/m-p/486151#M136020</link>
      <description>&lt;P&gt;This doesn't make much sense, and the threshold is too relaxed for anomaly detection. Statistically speaking, if &lt;A href="https://www.zmescience.com/science/what-5-sigma-means-0423423/"&gt;it is 3-sigma or 4-sigma&lt;/A&gt; away from the mean/average, it is considered an outlier/anomaly. I think it was a typo in the tutorial, and it should be like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; sourcetype=xmlwineventlog:microsoft-windows-sysmon/operational EventCode=1
 | eval cmdlen=len(CommandLine)
 | eventstats avg(cmdlen) as avg, stdev(cmdlen) as stdev by host
 | stats max(cmdlen) as maxlen, values(avg) as avgperhost, values(stdev) as stdevperhost by host, CommandLine
 | eval threshold = avgperhost + 4 *stdevperhost 
 | where maxlen &amp;gt; threshold 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note I changed the the 5th line of the search to &lt;CODE&gt;| eval threshold = avgperhost + 4 *stdevperhost&lt;/CODE&gt; .&lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2020 23:39:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Detecting-outliers-query/m-p/486151#M136020</guid>
      <dc:creator>tauliang</dc:creator>
      <dc:date>2020-05-03T23:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting outliers query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Detecting-outliers-query/m-p/486152#M136021</link>
      <description>&lt;P&gt;OK. I found &lt;A href="https://www.splunk.com/en_us/resources/videos/splunk-for-security-investigation-ransomware.html"&gt;something published on Splunk website&lt;/A&gt;,  pay attention to 5m40s mark of the video tutorial. &lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2020 23:41:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Detecting-outliers-query/m-p/486152#M136021</guid>
      <dc:creator>tauliang</dc:creator>
      <dc:date>2020-05-03T23:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting outliers query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Detecting-outliers-query/m-p/486153#M136022</link>
      <description>&lt;P&gt;&lt;CODE&gt;4 *stdevperhost&lt;/CODE&gt; → &lt;CODE&gt;3  * stdevperhost&lt;/CODE&gt; (99.7%)&lt;BR /&gt;
I think this is good enough for me. &lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2020 23:52:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Detecting-outliers-query/m-p/486153#M136022</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-03T23:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting outliers query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Detecting-outliers-query/m-p/486154#M136023</link>
      <description>&lt;P&gt;Thank you, both of you @tauliang @to4kawa &lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 11:46:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Detecting-outliers-query/m-p/486154#M136023</guid>
      <dc:creator>muradghazzawi</dc:creator>
      <dc:date>2020-05-04T11:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting outliers query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Detecting-outliers-query/m-p/486155#M136024</link>
      <description>&lt;P&gt;@muralikoppula you are most welcome. If it answers your question, could you please accept it as an answer? Thanks. &lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 15:58:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Detecting-outliers-query/m-p/486155#M136024</guid>
      <dc:creator>tauliang</dc:creator>
      <dc:date>2020-05-04T15:58:13Z</dc:date>
    </item>
  </channel>
</rss>

