<?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 Help explain Log4Shell baseline query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-explain-Log4Shell-baseline-query/m-p/578586#M201651</link>
    <description>&lt;P&gt;Hello all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was reading over the article at&amp;nbsp;&lt;A href="https://www.splunk.com/en_us/blog/security/log4shell-detecting-log4j-vulnerability-cve-2021-44228-continued.html" target="_blank" rel="noopener"&gt;https://www.splunk.com/en_us/blog/security/log4shell-detecting-log4j-vulnerability-cve-2021-44228-continued.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Specifically at the&amp;nbsp;New Outbound Traffic Detection with Baseline section.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone explain to me the appendpipe's subsearch (I split it into parts but its actually one search) purpose and how it works?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats summariesonly=false allow_old_summaries=true 
    earliest(_time) as earliest 
    latest(_time) as latest 
    values(All_Traffic.action) as action 
    values(All_Traffic.app) as app 
    values(All_Traffic.dest_ip) as dest_ip 
    values(All_Traffic.dest_port) as dest_port 
    values(sourcetype) as sourcetype count 
    from datamodel=Network_Traffic 
    where (NOT (All_Traffic.dest_category="internal" OR All_Traffic.dest_ip=10.0.0.0/8 OR All_Traffic.dest_ip=172.16.0.0/12 OR All_Traffic.dest_ip=192.168.0.0/16 OR All_Traffic.dest_ip=100.64.0.0/10))
    by All_Traffic.src_ip All_Traffic.dest_ip 
| rename "All_Traffic.*" as * 
| lookup egress_src_dest_tracker.csv dest_ip src_ip OUTPUT earliest AS previous_earliest latest AS previous_latest 
| eval earliest=min(earliest, previous_earliest), latest=max(latest, previous_latest) 
| fields - previous_*&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;| appendpipe 
    [
    | fields src_ip dest_ip latest earliest
    | stats min(earliest) as earliest max(latest) as latest by src_ip, dest_ip 
    | inputlookup append=t egress_src_dest_tracker.csv
    | stats min(earliest) as earliest max(latest) as latest by src_ip, dest_ip 
    | outputlookup egress_src_dest_tracker.csv
    | where a=b
        ] &lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;| eventstats max(latest) as maxlatest
| eval comparisonTime="-1h@h" 
| eval isOutlier=if(earliest &amp;gt;= relative_time(maxlatest, comparisonTime), 1, 0) 
| convert timeformat="%Y-%m-%dT%H:%M:%S" ctime(earliest),ctime(latest) ,ctime(maxlatest)
| where isOutlier=1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to understand what this appendpipe portion is doing. Here is my current thought process:&lt;/P&gt;&lt;P&gt;0) It would take the result from the previous set of commands&lt;/P&gt;&lt;P&gt;1) summarize: latest/earlist by src/dest.&lt;/P&gt;&lt;P&gt;2) append the lookup&lt;/P&gt;&lt;P&gt;3) get the earliest/latest by src/dest again. (would the result be the same if we skipped #1?)&lt;/P&gt;&lt;P&gt;4) save the results&lt;/P&gt;&lt;P&gt;5) what does this &lt;STRONG&gt;where&lt;/STRONG&gt; clause mean? There is no&amp;nbsp;&lt;STRONG&gt;a&lt;/STRONG&gt; or&amp;nbsp;&lt;STRONG&gt;b&amp;nbsp;&lt;/STRONG&gt; field that I can see.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Dec 2021 20:14:51 GMT</pubDate>
    <dc:creator>wlcv</dc:creator>
    <dc:date>2021-12-16T20:14:51Z</dc:date>
    <item>
      <title>Help explain Log4Shell baseline query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-explain-Log4Shell-baseline-query/m-p/578586#M201651</link>
      <description>&lt;P&gt;Hello all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was reading over the article at&amp;nbsp;&lt;A href="https://www.splunk.com/en_us/blog/security/log4shell-detecting-log4j-vulnerability-cve-2021-44228-continued.html" target="_blank" rel="noopener"&gt;https://www.splunk.com/en_us/blog/security/log4shell-detecting-log4j-vulnerability-cve-2021-44228-continued.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Specifically at the&amp;nbsp;New Outbound Traffic Detection with Baseline section.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone explain to me the appendpipe's subsearch (I split it into parts but its actually one search) purpose and how it works?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats summariesonly=false allow_old_summaries=true 
    earliest(_time) as earliest 
    latest(_time) as latest 
    values(All_Traffic.action) as action 
    values(All_Traffic.app) as app 
    values(All_Traffic.dest_ip) as dest_ip 
    values(All_Traffic.dest_port) as dest_port 
    values(sourcetype) as sourcetype count 
    from datamodel=Network_Traffic 
    where (NOT (All_Traffic.dest_category="internal" OR All_Traffic.dest_ip=10.0.0.0/8 OR All_Traffic.dest_ip=172.16.0.0/12 OR All_Traffic.dest_ip=192.168.0.0/16 OR All_Traffic.dest_ip=100.64.0.0/10))
    by All_Traffic.src_ip All_Traffic.dest_ip 
| rename "All_Traffic.*" as * 
| lookup egress_src_dest_tracker.csv dest_ip src_ip OUTPUT earliest AS previous_earliest latest AS previous_latest 
| eval earliest=min(earliest, previous_earliest), latest=max(latest, previous_latest) 
| fields - previous_*&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;| appendpipe 
    [
    | fields src_ip dest_ip latest earliest
    | stats min(earliest) as earliest max(latest) as latest by src_ip, dest_ip 
    | inputlookup append=t egress_src_dest_tracker.csv
    | stats min(earliest) as earliest max(latest) as latest by src_ip, dest_ip 
    | outputlookup egress_src_dest_tracker.csv
    | where a=b
        ] &lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;| eventstats max(latest) as maxlatest
| eval comparisonTime="-1h@h" 
| eval isOutlier=if(earliest &amp;gt;= relative_time(maxlatest, comparisonTime), 1, 0) 
| convert timeformat="%Y-%m-%dT%H:%M:%S" ctime(earliest),ctime(latest) ,ctime(maxlatest)
| where isOutlier=1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to understand what this appendpipe portion is doing. Here is my current thought process:&lt;/P&gt;&lt;P&gt;0) It would take the result from the previous set of commands&lt;/P&gt;&lt;P&gt;1) summarize: latest/earlist by src/dest.&lt;/P&gt;&lt;P&gt;2) append the lookup&lt;/P&gt;&lt;P&gt;3) get the earliest/latest by src/dest again. (would the result be the same if we skipped #1?)&lt;/P&gt;&lt;P&gt;4) save the results&lt;/P&gt;&lt;P&gt;5) what does this &lt;STRONG&gt;where&lt;/STRONG&gt; clause mean? There is no&amp;nbsp;&lt;STRONG&gt;a&lt;/STRONG&gt; or&amp;nbsp;&lt;STRONG&gt;b&amp;nbsp;&lt;/STRONG&gt; field that I can see.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 20:14:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-explain-Log4Shell-baseline-query/m-p/578586#M201651</guid>
      <dc:creator>wlcv</dc:creator>
      <dc:date>2021-12-16T20:14:51Z</dc:date>
    </item>
  </channel>
</rss>

