<?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 Correlation search not returning correct results in Installation</title>
    <link>https://community.splunk.com/t5/Installation/Correlation-search-not-returning-correct-results/m-p/554702#M7490</link>
    <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I have recently enabled a new correlation search in my Splunk ES. This search looks for possible Ransomware file based on their extension. I have Splunk 8.1.4 running on Windows 2016 and Splunk ES 6.4.1. ES Content Update (the app where the search is defined) is at version 3.20.0.&lt;BR /&gt;The original search was working good and it detected a suspicious file on one server. Since such file is expected, I put a whitelist in the correlation search just redefining a macro already available.&lt;BR /&gt;This is the search:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime values(Filesystem.user) as user values(Filesystem.dest) as dest values(Filesystem.file_path) as file_path from datamodel=Endpoint.Filesystem by Filesystem.file_name 
| `drop_dm_object_name(Filesystem)` 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| rex field=file_name "(?&amp;lt;file_extension&amp;gt;\.[^\.]+)$" 
| `ransomware_extensions` 
| `common_ransomware_extensions_filter`&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I redefined the last macro as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;search NOT [ | inputlookup ransomware_ext_file_wl ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The lookup defined contains only one column (file_name) and one row (the file name I want to white-list).&lt;/P&gt;&lt;P&gt;If I run this search in a search panel, I got no results and this is the expected behavior. But when the search is executed by the scheduler, I always get a result (and a notable event) for such file that I put into whitelist.&lt;BR /&gt;It's like the macro is not expanded correctly or the lookup is empty.&lt;/P&gt;&lt;P&gt;Does anybody have any idea about the reason of getting different results?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Jun 2021 14:24:53 GMT</pubDate>
    <dc:creator>lpino</dc:creator>
    <dc:date>2021-06-07T14:24:53Z</dc:date>
    <item>
      <title>Correlation search not returning correct results</title>
      <link>https://community.splunk.com/t5/Installation/Correlation-search-not-returning-correct-results/m-p/554702#M7490</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I have recently enabled a new correlation search in my Splunk ES. This search looks for possible Ransomware file based on their extension. I have Splunk 8.1.4 running on Windows 2016 and Splunk ES 6.4.1. ES Content Update (the app where the search is defined) is at version 3.20.0.&lt;BR /&gt;The original search was working good and it detected a suspicious file on one server. Since such file is expected, I put a whitelist in the correlation search just redefining a macro already available.&lt;BR /&gt;This is the search:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime values(Filesystem.user) as user values(Filesystem.dest) as dest values(Filesystem.file_path) as file_path from datamodel=Endpoint.Filesystem by Filesystem.file_name 
| `drop_dm_object_name(Filesystem)` 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| rex field=file_name "(?&amp;lt;file_extension&amp;gt;\.[^\.]+)$" 
| `ransomware_extensions` 
| `common_ransomware_extensions_filter`&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I redefined the last macro as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;search NOT [ | inputlookup ransomware_ext_file_wl ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The lookup defined contains only one column (file_name) and one row (the file name I want to white-list).&lt;/P&gt;&lt;P&gt;If I run this search in a search panel, I got no results and this is the expected behavior. But when the search is executed by the scheduler, I always get a result (and a notable event) for such file that I put into whitelist.&lt;BR /&gt;It's like the macro is not expanded correctly or the lookup is empty.&lt;/P&gt;&lt;P&gt;Does anybody have any idea about the reason of getting different results?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 14:24:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Correlation-search-not-returning-correct-results/m-p/554702#M7490</guid>
      <dc:creator>lpino</dc:creator>
      <dc:date>2021-06-07T14:24:53Z</dc:date>
    </item>
  </channel>
</rss>

