<?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: Inputlookup Not matching Data in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Inputlookup-Not-matching-Data/m-p/377435#M3799</link>
    <description>&lt;P&gt;This works great thanks. &lt;/P&gt;</description>
    <pubDate>Mon, 20 May 2019 09:37:28 GMT</pubDate>
    <dc:creator>swright_rl</dc:creator>
    <dc:date>2019-05-20T09:37:28Z</dc:date>
    <item>
      <title>Inputlookup Not matching Data</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Inputlookup-Not-matching-Data/m-p/377433#M3797</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to make a whitelist for encoded commands which IT Support use and I'm having a problem getting an inputlookup to match against a particular entry in the csv.&lt;/P&gt;

&lt;P&gt;The query which I'm using is&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=wineventlog sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) process=*powershell* (CommandLine="*-EncodedCommand*" OR CommandLine="*-enc*") 
| search NOT 
    [| inputlookup CommandLine_whitelist.csv ] 
| stats count min(_time) as firstTime max(_time) as lastTime by dest, user, process, CommandLine 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I'm trying to exclude this CommandLine (this is exactly how it appears in the logs):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -noninteractive -noprofile -encodedCommand RwBlAHQALQBJAHQAZQBtAFAAcgBvAHAAZQByAHQAeQAgAEgASwBMAE0AOgBcAFMAbwBmAHQAdwBhAHIAZQBcAE0AaQBjAHIAbwBzA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wBpAG8AbgA9AHsAJABfAC4ARABpAHMAcABsAGEAeQBWAGUAcgBzAGkAbwBuAH0AfQAsAGAADQAKACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAQAB7AE4AYQBtAGUAPQAYIEkAbgBzAHQAYQBsAGwAZQBkACAATwBuABkgOwBFAHgAcAByAGUAcwBzAGkAbwBuAD0AewAkAF8ALgBJAG4AcwB0AGEAbABsAEQAYQB0AGUAfQB9ACAAfAAgAFMAbwByAHQAIAAnAEEAcABwACAATgBhAG0AZQAnAA== -inputFormat xml -outputFormat xml
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;We have other / longer commands which work without a problem, but for the life of me, I cannot get this to work. I'm guessing it has something to do with something in the encoded string which is breaking matching on it, but I don't know what it is, or how to fix it.&lt;/P&gt;

&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2019 15:07:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Inputlookup-Not-matching-Data/m-p/377433#M3797</guid>
      <dc:creator>swright_rl</dc:creator>
      <dc:date>2019-05-17T15:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup Not matching Data</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Inputlookup-Not-matching-Data/m-p/377434#M3798</link>
      <description>&lt;P&gt;Doing windows logs with lots of escaping is a pain. consider doing an md5 hash of the. command string and don't inputlookup. Use a lookup as a lookup. Just make sure you lookup is of the hash values.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=wineventlog sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) process=*powershell* (CommandLine="*-EncodedCommand*" OR CommandLine="*-enc*") 
| eval command_hash=md5(CommandLine) 
| lookup CommandLine_whitelist command_hash OUTPUTNEW command_hash  AS isFound 
| where isnull(command_hash)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 May 2019 15:55:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Inputlookup-Not-matching-Data/m-p/377434#M3798</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2019-05-17T15:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup Not matching Data</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Inputlookup-Not-matching-Data/m-p/377435#M3799</link>
      <description>&lt;P&gt;This works great thanks. &lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 09:37:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Inputlookup-Not-matching-Data/m-p/377435#M3799</guid>
      <dc:creator>swright_rl</dc:creator>
      <dc:date>2019-05-20T09:37:28Z</dc:date>
    </item>
  </channel>
</rss>

