<?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 do i find base64 strings within a field: eg URI=/something1/something2/something3_base64_string etc in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-find-base64-strings-within-a-field-eg-URI-something1/m-p/384311#M112238</link>
    <description>&lt;P&gt;hello,&lt;/P&gt;

&lt;P&gt;i'm trying to list URIs with base64 strings in them of at least 24 characters (i havent got to the length bit of the search):&lt;/P&gt;

&lt;P&gt;search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=logdata1 uri=* | fields uri | regex uri="[a-z-A-Z0-9+/]{4}|[a-z-A-Z0-9+/]{3}=|[a-z-A-Z0-9+/]{2}==" | stats count by uri
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This brings back pretty much EVERY URI, LOL. &lt;/P&gt;

&lt;P&gt;Please can we identify a way to say the base64 length is no less than 24 characters?&lt;/P&gt;</description>
    <pubDate>Tue, 18 Sep 2018 02:49:19 GMT</pubDate>
    <dc:creator>leotoa</dc:creator>
    <dc:date>2018-09-18T02:49:19Z</dc:date>
    <item>
      <title>How do i find base64 strings within a field: eg URI=/something1/something2/something3_base64_string etc</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-find-base64-strings-within-a-field-eg-URI-something1/m-p/384311#M112238</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;

&lt;P&gt;i'm trying to list URIs with base64 strings in them of at least 24 characters (i havent got to the length bit of the search):&lt;/P&gt;

&lt;P&gt;search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=logdata1 uri=* | fields uri | regex uri="[a-z-A-Z0-9+/]{4}|[a-z-A-Z0-9+/]{3}=|[a-z-A-Z0-9+/]{2}==" | stats count by uri
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This brings back pretty much EVERY URI, LOL. &lt;/P&gt;

&lt;P&gt;Please can we identify a way to say the base64 length is no less than 24 characters?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2018 02:49:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-find-base64-strings-within-a-field-eg-URI-something1/m-p/384311#M112238</guid>
      <dc:creator>leotoa</dc:creator>
      <dc:date>2018-09-18T02:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do i find base64 strings within a field: eg URI=/something1/something2/something3_base64_string etc</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-find-base64-strings-within-a-field-eg-URI-something1/m-p/384312#M112239</link>
      <description>&lt;P&gt;Does this help you get closer?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=5 
| streamstats count 
| eval uri = CASE ( count==1,"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",count==2,"bbbbbbbbbb",count==3,"ccccccccccccccccccccccccccccccccccc",count==4,"dddddd",count==5,"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ) 
| fields uri
| regex uri="[a-z-A-Z0-9+/]{4}|[a-z-A-Z0-9+/]{3}=|[a-z-A-Z0-9+/]{2}==" 
| eval uri_len = len(uri) 
| where uri_len &amp;gt; 24 
| stats count by uri
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm using some self contained SPL to generate the data so this will need to be tweaked for your example&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2018 06:51:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-find-base64-strings-within-a-field-eg-URI-something1/m-p/384312#M112239</guid>
      <dc:creator>msivill_splunk</dc:creator>
      <dc:date>2018-09-19T06:51:45Z</dc:date>
    </item>
  </channel>
</rss>

