<?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: Inputs.conf blacklist with a negative regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Inputs-conf-blacklist-with-a-negative-regex/m-p/498680#M138929</link>
    <description>&lt;P&gt;What makes you think you can't use a whitelist?  There is nothing in the documentation that says you can't use both white and black lists.&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jan 2020 13:41:12 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-01-31T13:41:12Z</dc:date>
    <item>
      <title>Inputs.conf blacklist with a negative regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputs-conf-blacklist-with-a-negative-regex/m-p/498679#M138928</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I need to create a whitelist with the blacklist. I mean... &lt;/P&gt;

&lt;P&gt;I have three blacklist in the windows security input:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WinEventLog://Security]
disabled=0
index = wineventlog
source = XmlWinEventLog:Security
sourcetype = XmlWinEventLog
...
...
...
blacklist = 4624,4625,2222
blacklist1 = EventCode="4688" $XmlRegex="&amp;lt;Data Name='NewProcessName'&amp;gt;(C:\\Program Files\\SplunkUniversalForwarder\\bin\\splunkd.exe)|(C:\\Program Files\\SplunkUniversalForwarder\\bin\\btool.exe)|(C:\\Program Files\\SplunkUniversalForwarder\\bin\\splunk.exe)|(C:\\Program Files\\SplunkUniversalForwarder\\bin\\splunk-MonitorNoHandle.exe)|(C:\\Program Files\\SplunkUniversalForwarder\\bin\\splunk-admon.exe)|(C:\\Program Files\\SplunkUniversalForwarder\\bin\\splunk-netmon.exe)&amp;lt;/Data&amp;gt;"
blacklist2 = EventCode="1111" $XmlRegex="&amp;lt;Data Name='CallerProcessName'&amp;gt;C:\\ProgramData\\random\\andom2\\dasdfa.exe&amp;lt;/Data&amp;gt;"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to add another blacklist like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;blacklist3 = EventCode="4663" $XmlRegex="&amp;lt;Data Name='ProcessName'&amp;gt;(C:\\Windows\\System32\\Taskmgr.exe)&amp;lt;/Data&amp;gt;"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This blacklist remove all 4663 events with the processname Taskmgr.exe (works). But actually, I want to remove all 4663 events except, 4663 events with the process name Taskmgr.exe&lt;/P&gt;

&lt;P&gt;I tried to use an expression like this, but it isn't work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;blacklist3 = EventCode="4663" $XmlRegex="&amp;lt;Data Name='ProcessName'&amp;gt;(?!C:\\Windows\\System32\\Taskmgr.exe)&amp;lt;/Data&amp;gt;"
blacklist3 = EventCode="4663" $XmlRegex="&amp;lt;Data Name='ProcessName'&amp;gt;?!(C:\\Windows\\System32\\Taskmgr.exe)&amp;lt;/Data&amp;gt;"
blacklist3 = EventCode="4663" $XmlRegex="&amp;lt;Data Name='ProcessName'&amp;gt;^((?!C:\\Windows\\System32\\Taskmgr.exe)[\s\S])*$&amp;lt;/Data&amp;gt;"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Has it a solution? I can't use a whitelist because I have blacklists.&lt;/P&gt;

&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 12:34:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputs-conf-blacklist-with-a-negative-regex/m-p/498679#M138928</guid>
      <dc:creator>rafadvega</dc:creator>
      <dc:date>2020-01-31T12:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf blacklist with a negative regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputs-conf-blacklist-with-a-negative-regex/m-p/498680#M138929</link>
      <description>&lt;P&gt;What makes you think you can't use a whitelist?  There is nothing in the documentation that says you can't use both white and black lists.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 13:41:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputs-conf-blacklist-with-a-negative-regex/m-p/498680#M138929</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-01-31T13:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf blacklist with a negative regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputs-conf-blacklist-with-a-negative-regex/m-p/498681#M138930</link>
      <description>&lt;P&gt;Thanks for answering. I tried this also:&lt;/P&gt;

&lt;P&gt;[WinEventLog://Security]&lt;BR /&gt;
 disabled=0&lt;BR /&gt;
 index = wineventlog&lt;BR /&gt;
 source = XmlWinEventLog:Security&lt;BR /&gt;
 sourcetype = XmlWinEventLog&lt;BR /&gt;
 ...&lt;BR /&gt;
 ...&lt;BR /&gt;
 ...&lt;BR /&gt;
 whitelist= EventCode="4663" $XmlRegex="(C:\Windows\System32\Taskmgr.exe)"&lt;BR /&gt;
 blacklist = 4624,4625,2222&lt;BR /&gt;
 blacklist1 = EventCode="4688" $XmlRegex="(C:\Program Files\SplunkUniversalForwarder\bin\splunkd.exe)|(C:\Program Files\SplunkUniversalForwarder\bin\btool.exe)|(C:\Program Files\SplunkUniversalForwarder\bin\splunk.exe)|(C:\Program Files\SplunkUniversalForwarder\bin\splunk-MonitorNoHandle.exe)|(C:\Program Files\SplunkUniversalForwarder\bin\splunk-admon.exe)|(C:\Program Files\SplunkUniversalForwarder\bin\splunk-netmon.exe)"&lt;BR /&gt;
 blacklist2 = EventCode="1111" $XmlRegex="C:\ProgramData\random\andom2\dasdfa.exe"&lt;/P&gt;

&lt;P&gt;But it isn't work. When I add the whitelist, all security events are filtered...&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 16:31:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputs-conf-blacklist-with-a-negative-regex/m-p/498681#M138930</guid>
      <dc:creator>rafadvega</dc:creator>
      <dc:date>2020-01-31T16:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf blacklist with a negative regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputs-conf-blacklist-with-a-negative-regex/m-p/498682#M138931</link>
      <description>&lt;P&gt;Try this regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;Data Name='ProcessName'&amp;gt;((?!C:\\Windows\\System32\\Taskmgr.exe).)*$
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Mar 2020 15:32:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputs-conf-blacklist-with-a-negative-regex/m-p/498682#M138931</guid>
      <dc:creator>xavierashe</dc:creator>
      <dc:date>2020-03-09T15:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf blacklist with a negative regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputs-conf-blacklist-with-a-negative-regex/m-p/553918#M157253</link>
      <description>&lt;P&gt;I got your regex to match by swapping "?!" for "!?",&amp;nbsp; adding a delimiter to ".exe", and removing a pair of parentheses:&lt;/P&gt;&lt;P&gt;&amp;lt;Data Name='ProcessName'&amp;gt;(!?(C:\\Windows\\System32\\Taskmgr\.exe)).*$&lt;/P&gt;&lt;P&gt;See&amp;nbsp;&lt;A href="https://regex101.com/r/vGIN1P/1" target="_blank"&gt;https://regex101.com/r/vGIN1P/1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 17:54:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputs-conf-blacklist-with-a-negative-regex/m-p/553918#M157253</guid>
      <dc:creator>vansicklj</dc:creator>
      <dc:date>2021-06-01T17:54:27Z</dc:date>
    </item>
  </channel>
</rss>

