http://git-wip-us.apache.org/repos/asf/metron/blob/3381b853/site/current-book/use-cases/forensic_clustering/index.html
----------------------------------------------------------------------
diff --git a/site/current-book/use-cases/forensic_clustering/index.html 
b/site/current-book/use-cases/forensic_clustering/index.html
new file mode 100644
index 0000000..73a087e
--- /dev/null
+++ b/site/current-book/use-cases/forensic_clustering/index.html
@@ -0,0 +1,726 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2018-01-03
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20180103" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Metron &#x2013; Problem Statement</title>
+    <link rel="stylesheet" href="../../css/apache-maven-fluido-1.3.0.min.css" 
/>
+    <link rel="stylesheet" href="../../css/site.css" />
+    <link rel="stylesheet" href="../../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" 
src="../../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script type="text/javascript">$( document ).ready( function() { $( 
'.carousel' ).carousel( { interval: 3500 } ) } );</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://metron.apache.org/"; 
id="bannerLeft">
+                                                                               
                 <img src="../../images/metron-logo.png"  alt="Apache Metron" 
width="148px" height="48px"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                              <li class="">
+                    <a href="http://www.apache.org"; class="externalLink" 
title="Apache">
+        Apache</a>
+        </li>
+      <li class="divider ">/</li>
+            <li class="">
+                    <a href="http://metron.apache.org/"; class="externalLink" 
title="Metron">
+        Metron</a>
+        </li>
+      <li class="divider ">/</li>
+            <li class="">
+                    <a href="../../index.html" title="Documentation">
+        Documentation</a>
+        </li>
+      <li class="divider ">/</li>
+        <li class="">Problem Statement</li>
+        
+                
+                    
+                  <li id="publishDate" class="pull-right">Last Published: 
2018-01-03</li> <li class="divider pull-right">|</li>
+              <li id="projectVersion" class="pull-right">Version: 0.4.2</li>
+            
+                            </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">User Documentation</li>
+                                                                               
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                      
                                                                          
+      <li>
+    
+                          <a href="../../index.html" title="Metron">
+          <i class="icon-chevron-down"></i>
+        Metron</a>
+                    <ul class="nav nav-list">
+                      
+      <li>
+    
+                          <a href="../../Upgrading.html" title="Upgrading">
+          <i class="none"></i>
+        Upgrading</a>
+            </li>
+                                                                               
                                                                       
+      <li>
+    
+                          <a href="../../metron-analytics/index.html" 
title="Analytics">
+          <i class="icon-chevron-right"></i>
+        Analytics</a>
+                  </li>
+                      
+      <li>
+    
+                          <a 
href="../../metron-contrib/metron-docker/index.html" title="Docker">
+          <i class="none"></i>
+        Docker</a>
+            </li>
+                                                                               
                                                                                
                                                                                
                                                                                
                                                                             
+      <li>
+    
+                          <a href="../../metron-deployment/index.html" 
title="Deployment">
+          <i class="icon-chevron-right"></i>
+        Deployment</a>
+                  </li>
+                      
+      <li>
+    
+                          <a 
href="../../metron-interface/metron-alerts/index.html" title="Alerts">
+          <i class="none"></i>
+        Alerts</a>
+            </li>
+                      
+      <li>
+    
+                          <a 
href="../../metron-interface/metron-config/index.html" title="Config">
+          <i class="none"></i>
+        Config</a>
+            </li>
+                      
+      <li>
+    
+                          <a 
href="../../metron-interface/metron-rest/index.html" title="Rest">
+          <i class="none"></i>
+        Rest</a>
+            </li>
+                                                                               
                                                                                
                                                                                
                                     
+      <li>
+    
+                          <a href="../../metron-platform/index.html" 
title="Platform">
+          <i class="icon-chevron-right"></i>
+        Platform</a>
+                  </li>
+                                                                               
           
+      <li>
+    
+                          <a href="../../metron-sensors/index.html" 
title="Sensors">
+          <i class="icon-chevron-right"></i>
+        Sensors</a>
+                  </li>
+                      
+      <li>
+    
+                          <a 
href="../../metron-stellar/stellar-3rd-party-example/index.html" 
title="Stellar-3rd-party-example">
+          <i class="none"></i>
+        Stellar-3rd-party-example</a>
+            </li>
+                                                                        
+      <li>
+    
+                          <a 
href="../../metron-stellar/stellar-common/index.html" title="Stellar-common">
+          <i class="icon-chevron-right"></i>
+        Stellar-common</a>
+                  </li>
+                                                                               
                     
+      <li>
+    
+                          <a href="../../use-cases/index.html" 
title="Use-cases">
+          <i class="icon-chevron-down"></i>
+        Use-cases</a>
+                    <ul class="nav nav-list">
+                      
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Forensic_clustering</a>
+          </li>
+                      
+      <li>
+    
+                          <a 
href="../../use-cases/geographic_login_outliers/index.html" 
title="Geographic_login_outliers">
+          <i class="none"></i>
+        Geographic_login_outliers</a>
+            </li>
+              </ul>
+        </li>
+              </ul>
+        </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                             <a href="http://maven.apache.org/"; title="Built 
by Maven" class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" 
src="../../images/logos/maven-feather.png" />
+      </a>
+                  </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <h1>Problem Statement</h1>
+<p><a name="Problem_Statement"></a></p>
+<p>Having a forensic hash, such as <a class="externalLink" 
href="https://github.com/trendmicro/tlsh";>TLSH</a>, is a useful tool in 
cybersecurity. In short, the notion is that semantically similar documents 
should hash to a value which also similar. Contrast this with your standard 
cryptographic hashes, such as SHA and MD, where small deviations in the input 
data will yield large deviations in the hashes.</p>
+<p>The traditional use-case is to hash input documents or binaries and compare 
against a known blacklist of malicious hashes. A sufficiently similar hash will 
indicate a match. This will avoid malicious parties fuzzing input data to avoid 
detection.</p>
+<p>While this is interesting, it still requires metric-space searches in a 
blacklist. I envisioned a slightly more interesting streaming use-case of 
on-the-fly clustering of data. While the TLSH hashes created do not necessarily 
hash to precisely the same value on similar documents, more traditional 
non-forensic hashes <i>do</i> collide when sufficiently similar. Namely, the 
Hamming distance <a class="externalLink" 
href="https://en.wikipedia.org/wiki/Locality-sensitive_hashing#Bit_sampling_for_Hamming_distance";>LSH</a>
 applied to the TLSH hash would give us a way to bin semantic hashes such that 
similar hashes (by hamming distance) have the same hash.</p>
+<p>Inspired by a good <a class="externalLink" 
href="https://github.com/fluenda/dataworks_summit_iot_botnet/blob/master/dws-fucs-lopresto.pdf";>talk</a>
 by Andy LoPresto and Andre Fucs de Miranda from Apache NiFi, we will proceed 
to take logs from the Cowrie honeypot and compute TLSH hashes and semantic bins 
so that users can easily find similarly malicious activity to known threats in 
logs.</p>
+<p>Consider the following excerpts from the Cowrie logs the authors above have 
shared:</p>
+
+<div class="source">
+<div class="source">
+<pre>{
+  &quot;eventid&quot;: &quot;cowrie.command.success&quot;
+, &quot;timestamp&quot;: &quot;2017-09-18T11:45:25.028091Z&quot;
+, &quot;message&quot;: &quot;Command found: /bin/busybox LSUCT&quot;
+, &quot;system&quot;: &quot;CowrieTelnetTransport,787,121.237.129.163&quot;
+, &quot;isError&quot;: 0
+, &quot;src_ip&quot;: &quot;121.237.129.163&quot;
+, &quot;session&quot;: &quot;21caf72c6358&quot;
+, &quot;input&quot;: &quot;/bin/busybox LSUCT&quot;
+, &quot;sensor&quot;: &quot;a927e8b28666&quot;
+}
+</pre></div></div>
+<p>and</p>
+
+<div class="source">
+<div class="source">
+<pre>{
+  &quot;eventid&quot;: &quot;cowrie.command.success&quot;
+, &quot;timestamp&quot;: &quot;2017-09-17T04:06:39.673206Z&quot;
+, &quot;message&quot;: &quot;Command found: /bin/busybox XUSRH&quot;
+, &quot;system&quot;: &quot;CowrieTelnetTransport,93,94.51.110.74&quot;
+, &quot;isError&quot;: 0
+, &quot;src_ip&quot;: &quot;94.51.110.74&quot;
+, &quot;session&quot;: &quot;4c047bbc016c&quot;
+, &quot;input&quot;: &quot;/bin/busybox XUSRH&quot;
+, &quot;sensor&quot;: &quot;a927e8b28666&quot;
+}
+</pre></div></div>
+<p>You will note the <tt>/bin/busybox</tt> call with a random selection 
afterwards.<br />Excerpting from an analysis of an IOT exploit <a 
class="externalLink" href="https://isc.sans.edu/diary/21543";>here</a>:</p>
+
+<div class="source">
+<div class="source">
+<pre>The use of the command &quot;busybox ECCHI&quot; appears to have two 
functions.
+First of all, cowrie, and more &quot;complete&quot; Linux distrubtions then
+commonly found on DVRs will respond with a help screen if a wrong module
+is used. So this way, &quot;ECCHI&quot; can be used to detect honeypots and
+irrelevant systems if the reply isn't simply &quot;ECCHI: applet not 
found&quot;.
+Secondly, the command is used as a market to indicate that the prior
+command finished. Later, the attacker adds &quot;/bin/busybox ECCHI&quot; at 
the
+end of each line, following the actual command to be executed.
+</pre></div></div>
+<p>We have a few options at our disposal:</p>
+
+<ul>
+  
+<li>If we were merely filtering and alerting on the execution of 
<tt>/bin/busybox</tt> we would include false positives.</li>
+  
+<li>If we looked at <tt>/bin/busybox XUSRH</tt>, we&#x2019;d miss many 
attempts with a <i>different</i> value as <tt>XUSRH</tt> is able to be swapped 
out for another random sequence to foil overly strict rules.</li>
+  
+<li>If we looked for <tt>/bin/busybox *</tt> then we&#x2019;d capture this 
scenario well, but it&#x2019;d be nice to be able to not be specific to 
detecting the <tt>/bin/busybox</tt> style of exploits.</li>
+</ul>
+<p>Indeed, this is precisely what semantic hashing and binning allows us, the 
ability to group by semantic similarity without being too specific about what 
we mean of as &#x201c;semantic&#x201d; or &#x201c;similar&#x201d;. We want to 
cast a wide net, but not pull back every fish in the sea.</p>
+<p>For this demonstration, we will </p>
+
+<ul>
+  
+<li>ingest some 400 cowrie records</li>
+  
+<li>tag records from an IP blacklist for known malicious actors</li>
+  
+<li>use the alerts UI to investigate and find similar attacks.</li>
+</ul>
+<div class="section">
+<h2><a name="Preliminaries"></a>Preliminaries</h2>
+<p>We assume that the following environment variables are set:</p>
+
+<ul>
+  
+<li><tt>METRON_HOME</tt> - the home directory for metron</li>
+  
+<li><tt>ZOOKEEPER</tt> - The zookeeper quorum (comma separated with port 
specified: e.g. <tt>node1:2181</tt> for full-dev)</li>
+  
+<li><tt>BROKERLIST</tt> - The Kafka broker list (comma separated with port 
specified: e.g. <tt>node1:6667</tt> for full-dev)</li>
+  
+<li><tt>ES_HOST</tt> - The elasticsearch master (and port) e.g. 
<tt>node1:9200</tt> for full-dev.</li>
+</ul>
+<p>Also, this does not assume that you are using a kerberized cluster. If you 
are, then the parser start command will adjust slightly to include the security 
protocol.</p>
+<p>Before editing configurations, be sure to pull the configs from zookeeper 
locally via</p>
+
+<div class="source">
+<div class="source">
+<pre>$METRON_HOME/bin/zk_load_configs.sh --mode PULL -z $ZOOKEEPER -o 
$METRON_HOME/config/zookeeper/ -f
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Setting_up_the_Data"></a>Setting up the Data</h2>
+<p>First we must set up the cowrie log data in our cluster&#x2019;s access 
node.</p>
+
+<ul>
+  
+<li>Download the data from the github repository for the talk mentioned above 
<a class="externalLink" 
href="https://github.com/fluenda/dataworks_summit_iot_botnet/blob/master/180424243034750.tar.gz";>here</a>.
 Ensure that&#x2019;s moved into your home directory on the metron node.</li>
+  
+<li>Create a directory called <tt>cowrie</tt> in ~ and untar the tarball into 
that  directory via:</li>
+</ul>
+
+<div class="source">
+<div class="source">
+<pre>mkdir ~/cowrie
+cd ~/cowrie
+tar xzvf ~/180424243034750.tar.gz
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Configuring_the_Parser"></a>Configuring the Parser</h2>
+<p>The Cowrie data is coming in as simple JSON blobs, so it&#x2019;s easy to 
parse. We really just need to adjust the timestamp and a few fields and we have 
valid data.</p>
+
+<ul>
+  
+<li>Create <tt>$METRON_HOME/config/zookeeper/parsers/cowrie.json</tt> with the 
following content:</li>
+</ul>
+
+<div class="source">
+<div class="source">
+<pre>{
+  
&quot;parserClassName&quot;:&quot;org.apache.metron.parsers.json.JSONMapParser&quot;,
+  &quot;sensorTopic&quot;:&quot;cowrie&quot;,
+  &quot;fieldTransformations&quot; : [
+    {
+    &quot;transformation&quot; : &quot;STELLAR&quot;
+   ,&quot;output&quot; : [ &quot;timestamp&quot;]
+   ,&quot;config&quot; : {
+      &quot;timestamp&quot; : &quot;TO_EPOCH_TIMESTAMP( timestamp, 
'yyyy-MM-dd\\'T\\'HH:mm:ss.SSS')&quot;
+               }
+    }
+                           ]
+
+}
+
+</pre></div></div>
+<p>Before we start, we will want to install ES mappings so ES knows how to 
interpret our fields:</p>
+
+<div class="source">
+<div class="source">
+<pre>curl -XPUT 'http://$ES_HOST/cowrie*/_mapping/cowrie_doc' -d '
+{
+        &quot;properties&quot; : {
+          &quot;adapter:stellaradapter:begin:ts&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;adapter:stellaradapter:end:ts&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;blacklisted&quot; : {
+            &quot;type&quot; : &quot;boolean&quot;
+          },
+          &quot;compCS&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;data&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;dst_ip&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;dst_port&quot; : {
+            &quot;type&quot; : &quot;long&quot;
+          },
+          &quot;duration&quot; : {
+            &quot;type&quot; : &quot;double&quot;
+          },
+          &quot;encCS&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;enrichmentjoinbolt:joiner:ts&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;enrichmentsplitterbolt:splitter:begin:ts&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;enrichmentsplitterbolt:splitter:end:ts&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;eventid&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;guid&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;input&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;isError&quot; : {
+            &quot;type&quot; : &quot;long&quot;
+          },
+          &quot;is_alert&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;kexAlgs&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;keyAlgs&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;macCS&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;message&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;original_string&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;password&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;sensor&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;session&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;similarity_bin&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;size&quot; : {
+            &quot;type&quot; : &quot;long&quot;
+          },
+          &quot;source:type&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;src_ip&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;src_port&quot; : {
+            &quot;type&quot; : &quot;long&quot;
+          },
+          &quot;system&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;threat:triage:rules:0:comment&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;threat:triage:rules:0:name&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;threat:triage:rules:0:reason&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;threat:triage:rules:0:score&quot; : {
+            &quot;type&quot; : &quot;long&quot;
+          },
+          &quot;threat:triage:score&quot; : {
+            &quot;type&quot; : &quot;double&quot;
+          },
+          &quot;threatinteljoinbolt:joiner:ts&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;threatintelsplitterbolt:splitter:begin:ts&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;threatintelsplitterbolt:splitter:end:ts&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;timestamp&quot; : {
+            &quot;type&quot; : &quot;long&quot;
+          },
+          &quot;tlsh&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;ttylog&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;username&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;version&quot; : {
+            &quot;type&quot; : &quot;string&quot;
+          },
+          &quot;alert&quot; : {
+            &quot;type&quot; : &quot;nested&quot;
+          }
+        }
+}
+'
+</pre></div></div>
+
+<ul>
+  
+<li>Create the <tt>cowrie</tt> kafka topic via:</li>
+</ul>
+
+<div class="source">
+<div class="source">
+<pre>/usr/hdp/current/kafka-broker/bin/kafka-topics.sh --zookeeper $ZOOKEEPER 
--create --topic cowrie --partitions 1 --replication-factor 1
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Import_the_Blacklist"></a>Import the Blacklist</h2>
+<p>Here, to build out a scenario, we will assume that we have a blacklist of 
known malicious hosts. For our purposes, we&#x2019;ll choose one particular 
host IP to be malicious.</p>
+
+<ul>
+  
+<li>Create <tt>~/blacklist.csv</tt> to contain the following:</li>
+</ul>
+
+<div class="source">
+<div class="source">
+<pre>94.51.110.74
+</pre></div></div>
+
+<ul>
+  
+<li>Create <tt>~/blacklist_extractor.json</tt> to contain the following:</li>
+</ul>
+
+<div class="source">
+<div class="source">
+<pre>{
+  &quot;config&quot; : {
+    &quot;columns&quot; : {
+       &quot;ip&quot; : 0
+    },
+    &quot;indicator_column&quot; : &quot;ip&quot;,
+    &quot;type&quot; : &quot;blacklist&quot;,
+    &quot;separator&quot; : &quot;,&quot;
+  },
+  &quot;extractor&quot; : &quot;CSV&quot;
+}
+</pre></div></div>
+
+<ul>
+  
+<li>Import the data <tt>$METRON_HOME/bin/flatfile_loader.sh -i ~/blacklist.csv 
-t threatintel -c t -e ~/blacklist_extractor.json</tt></li>
+</ul>
+<p>This will create a new enrichment type &#x201c;blacklist&#x201d; with a 
single entry &#x201c;94.51.110.74&#x201d;.</p></div>
+<div class="section">
+<h2><a name="Configure_Enrichments"></a>Configure Enrichments</h2>
+<p>We will want to do the following:</p>
+
+<ul>
+  
+<li>Add enrichments to faciliate binning
+  
+<ul>
+    
+<li>Construct what we consider to be a sufficient representation of the thing 
we want to cluster. For our purposes, this is centered around the input 
command, so that would be:
+    
+<ul>
+      
+<li>The <tt>message</tt> field</li>
+      
+<li>The <tt>input</tt> field</li>
+      
+<li>The <tt>isError</tt> field</li>
+    </ul></li>
+    
+<li>Compute the TLSH hash of this representation, called <tt>tlsh</tt></li>
+    
+<li>Compute the locality sensitive hash of the TLSH hash suitable for binning, 
called <tt>similarity_bin</tt></li>
+  </ul></li>
+  
+<li>Set up the threat intelligence to use the blacklist
+  
+<ul>
+    
+<li>Set an alert if the message is from an IP address in the threat 
intelligence blacklist.</li>
+    
+<li>Score blacklisted messages with <tt>10</tt>. In production, this would be 
more complex.</li>
+  </ul></li>
+</ul>
+<p>Now, we can create the enrichments thusly by creating 
<tt>$METRON_HOME/config/zookeeper/enrichments/cowrie.json</tt> with the 
following content:</p>
+
+<div class="source">
+<div class="source">
+<pre>{
+  &quot;enrichment&quot;: {
+    &quot;fieldMap&quot;: {
+      &quot;stellar&quot; : {
+        &quot;config&quot; : [
+          &quot;characteristic_rep := JOIN([ 'message', 
exists(message)?message:'', 'input', exists(input)?input:'', 'isError', 
exists(isError)?isError:''], '|')&quot;,
+          &quot;forensic_hashes := HASH(characteristic_rep, 'tlsh', { 'hashes' 
: 16, 'bucketSize' : 128 })&quot;,
+          &quot;similarity_bin := MAP_GET('tlsh_bin', forensic_hashes)&quot;,
+          &quot;tlsh := MAP_GET('tlsh', forensic_hashes)&quot;,
+          &quot;forensic_hashes := null&quot;,
+          &quot;characteristic_rep := null&quot;
+        ]
+      }
+   }
+  ,&quot;fieldToTypeMap&quot;: { }
+  },
+  &quot;threatIntel&quot;: {
+    &quot;fieldMap&quot;: {
+      &quot;stellar&quot; : {
+        &quot;config&quot; : [
+          &quot;blacklisted := ENRICHMENT_EXISTS( 'blacklist', src_ip, 
'threatintel', 't')&quot;,
+          &quot;is_alert := (exists(is_alert) &amp;&amp; is_alert) || 
blacklisted&quot;
+        ]
+      }
+
+    },
+    &quot;fieldToTypeMap&quot;: { },
+    &quot;triageConfig&quot; : {
+      &quot;riskLevelRules&quot; : [
+        {
+          &quot;name&quot; : &quot;Blacklisted Host&quot;,
+          &quot;comment&quot; : &quot;Determine if a host is blacklisted&quot;,
+          &quot;rule&quot; : &quot;blacklisted != null &amp;&amp; 
blacklisted&quot;,
+          &quot;score&quot; : 10,
+          &quot;reason&quot; : &quot;FORMAT('IP %s is blacklisted', 
src_ip)&quot;
+        }
+      ],
+      &quot;aggregator&quot; : &quot;MAX&quot;
+    }
+  }
+}
+</pre></div></div>
+<div class="section">
+<h3><a name="A_Note_About_Similarity_Hashes_and_TLSH"></a>A Note About 
Similarity Hashes and TLSH</h3>
+<p>Notice that we have specified a number of hash functions of <tt>16</tt> 
when constructing the similarity bin.<br />I arrived at that by trial and 
error, which is not always tenable, frankly. What is more sensible is likely to 
construct <i>multiple</i> similarity bins of size <tt>8</tt>, <tt>16</tt>, 
<tt>32</tt> at minimum.</p>
+
+<ul>
+  
+<li>The smaller the number of hashes, the more loose the notion of similarity 
(more possibly dissimilar things would get grouped together).</li>
+  
+<li>The larger the number of hashes, the more strict (similar things may not 
be grouped together).</li>
+</ul></div></div>
+<div class="section">
+<h2><a name="Create_the_Data_Loader"></a>Create the Data Loader</h2>
+<p>We want to pull a snapshot of the cowrie logs, so create 
<tt>~/load_data.sh</tt> with the following content:</p>
+
+<div class="source">
+<div class="source">
+<pre>COWRIE_HOME=~/cowrie
+for i in cowrie.1626302-1636522.json cowrie.16879981-16892488.json 
cowrie.21312194-21331475.json cowrie.698260-710913.json 
cowrie.762933-772239.json cowrie.929866-939552.json cowrie.1246880-1248235.json 
cowrie.19285959-19295444.json cowrie.16542668-16581213.json 
cowrie.5849832-5871517.json cowrie.6607473-6609163.json;do
+  echo $i
+  cat $COWRIE_HOME/$i | 
/usr/hdp/current/kafka-broker/bin/kafka-console-producer.sh --broker-list 
node1:6667 --topic cowrie
+  sleep 2
+done
+</pre></div></div>
+
+<ul>
+  
+<li>Set the <tt>+x</tt> bit on the executable via:</li>
+</ul>
+
+<div class="source">
+<div class="source">
+<pre>chmod +x ~/load_data.sh
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Execute_Demonstration"></a>Execute Demonstration</h2>
+<p>From here, we&#x2019;ve set up our configuration and can push the 
configs:</p>
+
+<ul>
+  
+<li>Push the configs to zookeeper via</li>
+</ul>
+
+<div class="source">
+<div class="source">
+<pre>$METRON_HOME/bin/zk_load_configs.sh --mode PUSH -z $ZOOKEEPER -i 
$METRON_HOME/config/zookeeper/
+</pre></div></div>
+
+<ul>
+  
+<li>Start the parser via:</li>
+</ul>
+
+<div class="source">
+<div class="source">
+<pre>$METRON_HOME/bin/start_parser_topology.sh -k $BROKERLIST -z $ZOOKEEPER -s 
cowrie
+</pre></div></div>
+
+<ul>
+  
+<li>Push cowrie data into the <tt>cowrie</tt> topic via</li>
+</ul>
+
+<div class="source">
+<div class="source">
+<pre>~/load_data.sh
+</pre></div></div>
+<p>Once this data is loaded, we can use the Alerts UI, starting from known 
malicious actors, to find others doing similar things.</p>
+
+<ul>
+  
+<li>
+<p>First we can look at the alerts directly and find an instance of our 
<tt>/bin/busybox</tt> activity: <img src="find_alerts.png" alt="Alerts" 
/></p></li>
+  
+<li>
+<p>We can now pivot and look for instances of messages with the same 
<tt>semantic_hash</tt> but who are <i>not</i> alerts: <img src="clustered.png" 
alt="Pivot" /></p></li>
+</ul>
+<p>As you can see, we have found a few more malicious actors:</p>
+
+<ul>
+  
+<li>177.239.192.172</li>
+  
+<li>180.110.69.182</li>
+  
+<li>177.238.236.21</li>
+  
+<li>94.78.80.45</li>
+</ul>
+<p>Now we can look at <i>other</i> things that they&#x2019;re doing to build 
and refine our definition of what an alert is without resorting to hard-coding 
of rules. Note that nothing in our enrichments actually used the string 
<tt>busybox</tt>, so this is a more general purpose way of navigating similar 
things.</p></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2018
+                        <a href="https://www.apache.org";>The Apache Software 
Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                          
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/metron/blob/3381b853/site/current-book/use-cases/geographic_login_outliers/index.html
----------------------------------------------------------------------
diff --git a/site/current-book/use-cases/geographic_login_outliers/index.html 
b/site/current-book/use-cases/geographic_login_outliers/index.html
index f1c3cff..4d0ff74 100644
--- a/site/current-book/use-cases/geographic_login_outliers/index.html
+++ b/site/current-book/use-cases/geographic_login_outliers/index.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-09-15
+ | Generated by Apache Maven Doxia at 2018-01-03
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20170915" />
+    <meta name="Date-Revision-yyyymmdd" content="20180103" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Metron &#x2013; Problem Statement</title>
     <link rel="stylesheet" href="../../css/apache-maven-fluido-1.3.0.min.css" 
/>
@@ -61,8 +61,8 @@
         
                 
                     
-                  <li id="publishDate" class="pull-right">Last Published: 
2017-09-15</li> <li class="divider pull-right">|</li>
-              <li id="projectVersion" class="pull-right">Version: 0.4.1</li>
+                  <li id="publishDate" class="pull-right">Last Published: 
2018-01-03</li> <li class="divider pull-right">|</li>
+              <li id="projectVersion" class="pull-right">Version: 0.4.2</li>
             
                             </ul>
       </div>
@@ -103,7 +103,7 @@
           <i class="none"></i>
         Docker</a>
             </li>
-                                                                               
                                                                                
                                                                                
                                                                                
                                                                                
                                 
+                                                                               
                                                                                
                                                                                
                                                                                
                                                                             
       <li>
     
                           <a href="../../metron-deployment/index.html" 
title="Deployment">
@@ -131,20 +131,27 @@
           <i class="none"></i>
         Rest</a>
             </li>
-                                                                               
                                                                                
                                                                                
                   
+                                                                               
                                                                                
                                                                                
                                     
       <li>
     
                           <a href="../../metron-platform/index.html" 
title="Platform">
           <i class="icon-chevron-right"></i>
         Platform</a>
                   </li>
-                                                                               
                             
+                                                                               
           
       <li>
     
                           <a href="../../metron-sensors/index.html" 
title="Sensors">
           <i class="icon-chevron-right"></i>
         Sensors</a>
                   </li>
+                      
+      <li>
+    
+                          <a 
href="../../metron-stellar/stellar-3rd-party-example/index.html" 
title="Stellar-3rd-party-example">
+          <i class="none"></i>
+        Stellar-3rd-party-example</a>
+            </li>
                                                                         
       <li>
     
@@ -152,7 +159,7 @@
           <i class="icon-chevron-right"></i>
         Stellar-common</a>
                   </li>
-                                                                               
   
+                                                                               
                     
       <li>
     
                           <a href="../../use-cases/index.html" 
title="Use-cases">
@@ -160,6 +167,13 @@
         Use-cases</a>
                     <ul class="nav nav-list">
                       
+      <li>
+    
+                          <a 
href="../../use-cases/forensic_clustering/index.html" 
title="Forensic_clustering">
+          <i class="none"></i>
+        Forensic_clustering</a>
+            </li>
+                      
       <li class="active">
     
             <a href="#"><i class="none"></i>Geographic_login_outliers</a>
@@ -443,7 +457,7 @@ if __name__ == '__main__':
 
 <div class="source">
 <div class="source">
-<pre>$METRON_HOME/bin/zk_load_configs.sh --mode PUSH -z node1:2181 -i 
$METRON_HOME/config/zookeeper/
+<pre>$METRON_HOME/bin/zk_load_configs.sh --mode PUSH -z $ZOOKEEPER -i 
$METRON_HOME/config/zookeeper/
 </pre></div></div>
 
 <ul>
@@ -463,7 +477,8 @@ if __name__ == '__main__':
 
 <div class="source">
 <div class="source">
-<pre>python ~/gen_data.py | 
/usr/hdp/current/kafka-broker/bin/kafka-console-producer.sh --broker-list 
node1:6667 --topic auth
+<pre>python ~/gen_data.py |
+/usr/hdp/current/kafka-broker/bin/kafka-console-producer.sh --broker-list 
$BROKERLIST --topic auth
 </pre></div></div>
 
 <ul>
@@ -518,7 +533,7 @@ if __name__ == '__main__':
 
     <footer>
             <div class="container-fluid">
-              <div class="row span12">Copyright &copy;                    2017
+              <div class="row span12">Copyright &copy;                    2018
                         <a href="https://www.apache.org";>The Apache Software 
Foundation</a>.
             All Rights Reserved.      
                     

http://git-wip-us.apache.org/repos/asf/metron/blob/3381b853/site/current-book/use-cases/index.html
----------------------------------------------------------------------
diff --git a/site/current-book/use-cases/index.html 
b/site/current-book/use-cases/index.html
index 7db5f99..e8c6b28 100644
--- a/site/current-book/use-cases/index.html
+++ b/site/current-book/use-cases/index.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-09-15
+ | Generated by Apache Maven Doxia at 2018-01-03
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20170915" />
+    <meta name="Date-Revision-yyyymmdd" content="20180103" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Metron &#x2013; Worked Examples</title>
     <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
@@ -61,8 +61,8 @@
         
                 
                     
-                  <li id="publishDate" class="pull-right">Last Published: 
2017-09-15</li> <li class="divider pull-right">|</li>
-              <li id="projectVersion" class="pull-right">Version: 0.4.1</li>
+                  <li id="publishDate" class="pull-right">Last Published: 
2018-01-03</li> <li class="divider pull-right">|</li>
+              <li id="projectVersion" class="pull-right">Version: 0.4.2</li>
             
                             </ul>
       </div>
@@ -103,7 +103,7 @@
           <i class="none"></i>
         Docker</a>
             </li>
-                                                                               
                                                                                
                                                                                
                                                                                
                                                                                
                                 
+                                                                               
                                                                                
                                                                                
                                                                                
                                                                             
       <li>
     
                           <a href="../metron-deployment/index.html" 
title="Deployment">
@@ -131,20 +131,27 @@
           <i class="none"></i>
         Rest</a>
             </li>
-                                                                               
                                                                                
                                                                                
                   
+                                                                               
                                                                                
                                                                                
                                     
       <li>
     
                           <a href="../metron-platform/index.html" 
title="Platform">
           <i class="icon-chevron-right"></i>
         Platform</a>
                   </li>
-                                                                               
                             
+                                                                               
           
       <li>
     
                           <a href="../metron-sensors/index.html" 
title="Sensors">
           <i class="icon-chevron-right"></i>
         Sensors</a>
                   </li>
+                      
+      <li>
+    
+                          <a 
href="../metron-stellar/stellar-3rd-party-example/index.html" 
title="Stellar-3rd-party-example">
+          <i class="none"></i>
+        Stellar-3rd-party-example</a>
+            </li>
                                                                         
       <li>
     
@@ -152,7 +159,7 @@
           <i class="icon-chevron-right"></i>
         Stellar-common</a>
                   </li>
-                                                                            
+                                                                               
               
       <li class="active">
     
             <a href="#"><i class="icon-chevron-down"></i>Use-cases</a>
@@ -160,6 +167,13 @@
                       
       <li>
     
+                          <a 
href="../use-cases/forensic_clustering/index.html" title="Forensic_clustering">
+          <i class="none"></i>
+        Forensic_clustering</a>
+            </li>
+                      
+      <li>
+    
                           <a 
href="../use-cases/geographic_login_outliers/index.html" 
title="Geographic_login_outliers">
           <i class="none"></i>
         Geographic_login_outliers</a>
@@ -199,7 +213,7 @@
 
     <footer>
             <div class="container-fluid">
-              <div class="row span12">Copyright &copy;                    2017
+              <div class="row span12">Copyright &copy;                    2018
                         <a href="https://www.apache.org";>The Apache Software 
Foundation</a>.
             All Rights Reserved.      
                     

http://git-wip-us.apache.org/repos/asf/metron/blob/3381b853/site/documentation/index.md
----------------------------------------------------------------------
diff --git a/site/documentation/index.md b/site/documentation/index.md
index 723e548..6b38ed6 100644
--- a/site/documentation/index.md
+++ b/site/documentation/index.md
@@ -74,24 +74,24 @@ title: Apache Metron Documentation
 <section class="events-section info-block darken" id="releases">
     <div class="wrapper downloads">
         <div class="text-center">
-            <h4>Current Release: 0.4.1</h4>
+            <h4>Current Release: 0.4.2</h4>
         </div>
         <div class="content-960 hover-btn text-center">
             <ul>
                 <li>
-                <a 
href="http://www.apache.org/dyn/closer.cgi/metron/0.4.1/apache-metron-0.4.1.tar.gz";
 target="new">
-                    apache-metron-0.4.1.tar.gz
+                <a 
href="http://www.apache.org/dyn/closer.cgi/metron/0.4.2/apache-metron-0.4.2.tar.gz";
 target="new">
+                    apache-metron-0.4.2.tar.gz
                 </a>
-                 [ <a 
href="https://dist.apache.org/repos/dist/release/metron/0.4.1/apache-metron-0.4.1.tar.gz.asc";
 target="new">
+                 [ <a 
href="https://dist.apache.org/repos/dist/release/metron/0.4.2/apache-metron-0.4.2.tar.gz.asc";
 target="new">
                     PGP
                  </a>]
-                 [ <a 
href="https://dist.apache.org/repos/dist/release/metron/0.4.1/apache-metron-0.4.1.tar.gz.sha1";
 target="new">
+                 [ <a 
href="https://dist.apache.org/repos/dist/release/metron/0.4.2/apache-metron-0.4.2.tar.gz.sha1";
 target="new">
                     SHA
                  </a>]
-                 [ <a 
href="https://dist.apache.org/repos/dist/release/metron/0.4.1/apache-metron-0.4.1.tar.gz.sha512";
 target="new">
+                 [ <a 
href="https://dist.apache.org/repos/dist/release/metron/0.4.2/apache-metron-0.4.2.tar.gz.sha512";
 target="new">
                     SHA512
                  </a>]
-                 [ <a 
href="https://dist.apache.org/repos/dist/release/metron/0.4.1/apache-metron-0.4.1.tar.gz.md5";
 target="new">
+                 [ <a 
href="https://dist.apache.org/repos/dist/release/metron/0.4.2/apache-metron-0.4.2.tar.gz.md5";
 target="new">
                     MD5
                   </a>]
                  [ <a href="/current-book/index.html" target="new"> Book </a>]

Reply via email to