<?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: Filter Windows EventCode using blacklist and Whitelist in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191569#M38129</link>
    <description>&lt;P&gt;I needed to filter event code like the shown below where   (Process Name:       C:\Windows\System32\services.exe)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Subject:
    Security ID:        SYSTEM
    Account Name:       RBAL-T430S$
    Account Domain:     SPLUNK
    Logon ID:       0x3e7

Logon Type:         5

New Logon:
    Security ID:        SYSTEM
    Account Name:       SYSTEM
    Account Domain:     NT AUTHORITY
    Logon ID:       0x3e7
    Logon GUID:     {00000000-0000-0000-0000-000000000000}

Process Information:
    Process ID:     0x314
    Process Name:       C:\Windows\System32\services.exe

Network Information:
    Workstation Name:   
    Source Network Address: -
    Source Port:        -

Detailed Authentication Information:
    Logon Process:      Advapi  
    Authentication Package: Negotiate
    Transited Services: -
    Package Name (NTLM only):   -
    Key Length:     0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;The following filter was used in inputs.conf of the forwarder  and thsos worked well for me.&lt;/P&gt;

&lt;P&gt;---UP ---&lt;BR /&gt;
input has &lt;BR /&gt;
[WinEventLog://Security]&lt;BR /&gt;
blacklist1= Message="Process Name:\s+.*services.exe"&lt;/P&gt;</description>
    <pubDate>Fri, 06 Feb 2015 23:26:04 GMT</pubDate>
    <dc:creator>rbal_splunk</dc:creator>
    <dc:date>2015-02-06T23:26:04Z</dc:date>
    <item>
      <title>Filter Windows EventCode using blacklist and Whitelist</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191565#M38125</link>
      <description>&lt;P&gt;I have  installed Splunk  Universal Forwarder Version 6.1.1 and Indexer also on 6.1.1. I am trying to understand the various option to filter EventCode with these version of Splunk.  I think Splunk has introduced some new capability to have whitelist and black list in the Universal Forwarder input stanza .&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2014 06:40:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191565#M38125</guid>
      <dc:creator>sat94541</dc:creator>
      <dc:date>2014-08-22T06:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Windows EventCode using blacklist and Whitelist</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191566#M38126</link>
      <description>&lt;P&gt;I have test using Splunk  Universal Forwarder Version 6.1.1 and Splunk Indexer 6.1.1.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Test 1:&lt;/STRONG&gt; On the Universal Forwarder  added whitelist1 and only these EventCode got forwarded to Indexer.&lt;/P&gt;

&lt;P&gt;[WinEventLog://Security]&lt;BR /&gt;
whitelist1 = 5058,5061&lt;/P&gt;

&lt;P&gt;Refer : &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.1/Admin/Inputsconf" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.1/Admin/Inputsconf&lt;/A&gt;   and 9 whitelist can be specified.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Test 2:&lt;/STRONG&gt;  On the Universal Forwarder  added blacklist1 and all the Eventcode blacklisted were filtered.&lt;/P&gt;

&lt;P&gt;[WinEventLog://Security]&lt;BR /&gt;
disabled = 0 &lt;BR /&gt;
evt_resolve_ad_obj = 0&lt;BR /&gt;
blacklist1 = 1100,1101,4608,4616,4624,4634,4647,4648,4672,4731,4732,4733,4735,4902,4904,4905,4907,5024,5033,5038,5056,5058,5061&lt;/P&gt;

&lt;P&gt;Refer : &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.1/Admin/Inputsconf" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.1/Admin/Inputsconf&lt;/A&gt;   and 9 blacklist1 can be specified..&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Test 3:&lt;/STRONG&gt; The old tradition approach(Prior 6.1.1)  still works worked where all the events on the Universal Forwarder are ingested and nullqueue filters is applied on Indexer to filter.&lt;/P&gt;

&lt;P&gt;For example :&lt;/P&gt;

&lt;P&gt;1)Add the following stanza to  props.conf  on indexer&lt;/P&gt;

&lt;P&gt;[WinEventLog:Security]&lt;BR /&gt;
TRANSFORMS-set = delete&lt;/P&gt;

&lt;P&gt;2) Add the following stanza to transforms.conf   on indexer&lt;BR /&gt;
[delete]&lt;BR /&gt;
REGEX = (.&lt;EM&gt;EventCode=1100.&lt;/EM&gt;|.&lt;EM&gt;EventCode=1101.&lt;/EM&gt;|.&lt;EM&gt;EventCode=4608.&lt;/EM&gt;|.&lt;EM&gt;EventCode=4616.&lt;/EM&gt;|.&lt;EM&gt;EventCode=4624.&lt;/EM&gt;|.&lt;EM&gt;EventCode=4634.&lt;/EM&gt;|.&lt;EM&gt;EventCode=4647.&lt;/EM&gt;|.&lt;EM&gt;EventCode=4648.&lt;/EM&gt;|.&lt;EM&gt;EventCode=4672.&lt;/EM&gt;|.&lt;EM&gt;EventCode=4731.&lt;/EM&gt;|.&lt;EM&gt;EventCode=4732.&lt;/EM&gt;|.&lt;EM&gt;EventCode=4733.&lt;/EM&gt;|.&lt;EM&gt;EventCode=4735.&lt;/EM&gt;|.&lt;EM&gt;EventCode=4902.&lt;/EM&gt;|.&lt;EM&gt;EventCode=4904.&lt;/EM&gt;|.&lt;EM&gt;EventCode=4905.&lt;/EM&gt;|.&lt;EM&gt;EventCode=4907.&lt;/EM&gt;|.&lt;EM&gt;EventCode=5024.&lt;/EM&gt;|.&lt;EM&gt;EventCode=5033.&lt;/EM&gt;|.&lt;EM&gt;EventCode=5038.&lt;/EM&gt;|.&lt;EM&gt;EventCode=5056.&lt;/EM&gt;|.&lt;EM&gt;EventCode=5058.&lt;/EM&gt;|.&lt;EM&gt;EventCode=5061.&lt;/EM&gt;|.&lt;EM&gt;EventCode=6281.&lt;/EM&gt;)&lt;BR /&gt;
DEST_KEY=queue &lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;All the EvnetCode listed were filtered and not  indexed.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:22:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191566#M38126</guid>
      <dc:creator>rbal_splunk</dc:creator>
      <dc:date>2020-09-28T17:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Windows EventCode using blacklist and Whitelist</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191567#M38127</link>
      <description>&lt;P&gt;In 6.0 one could filter on just the event code on windows event log modular input. In 6.1 Splunk introduced a regular expression filtering capability. A good blog post can be found here: &lt;A href="http://blogs.splunk.com/2014/05/23/controlling-4662-messages-in-the-windows-security-event-log/"&gt;http://blogs.splunk.com/2014/05/23/controlling-4662-messages-in-the-windows-security-event-log/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2014 17:42:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191567#M38127</guid>
      <dc:creator>wcolgate_splunk</dc:creator>
      <dc:date>2014-08-22T17:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Windows EventCode using blacklist and Whitelist</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191568#M38128</link>
      <description>&lt;P&gt;Here are some examples based on my test with Universal Forwarder -VERSION=6.1.3  and Index 6.2.1&lt;/P&gt;

&lt;P&gt;**  Test 1:  Data For EventCode=4672    NOT Filtered**&lt;/P&gt;

&lt;P&gt;[WinEventLog://Security]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
blacklist1=EventCode=4672   &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Test 2: The EventCode 4672 was filtered out&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;[WinEventLog://Security]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
blacklist1=EventCode=”4672”   &lt;/P&gt;

&lt;P&gt;**  Test 3: Filter events code 4672 with  any message:**&lt;/P&gt;

&lt;P&gt;[WinEventLog://Security]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
blacklist1=EventCode=”4672”  Message="*"    &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Test 4: Another example to see if it will Filter events code 4672 with  any message&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;[WinEventLog://Security]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
blacklist1=EventCode=4672  Message="*"  &lt;/P&gt;

&lt;P&gt;Result :: Data NOT Filtered&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Test 5: In the example below Eventcode 4672 with Message starting with “Special” got filtered.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;[WinEventLog://Security]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
blacklist1=EventCode="4672" Message="Special*"  &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Data Filtered&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Test 6:  Here EventCode 4672 with Message starting with “Special” got filtered. In addition all event for code 4624 an 4648 also got filtered.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;[WinEventLog://Security]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
blacklist1= EventCode="4672" Message="Special*"&lt;BR /&gt;
blacklist2= 4624,4648&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jan 2015 06:48:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191568#M38128</guid>
      <dc:creator>rbal_splunk</dc:creator>
      <dc:date>2015-01-16T06:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Windows EventCode using blacklist and Whitelist</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191569#M38129</link>
      <description>&lt;P&gt;I needed to filter event code like the shown below where   (Process Name:       C:\Windows\System32\services.exe)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Subject:
    Security ID:        SYSTEM
    Account Name:       RBAL-T430S$
    Account Domain:     SPLUNK
    Logon ID:       0x3e7

Logon Type:         5

New Logon:
    Security ID:        SYSTEM
    Account Name:       SYSTEM
    Account Domain:     NT AUTHORITY
    Logon ID:       0x3e7
    Logon GUID:     {00000000-0000-0000-0000-000000000000}

Process Information:
    Process ID:     0x314
    Process Name:       C:\Windows\System32\services.exe

Network Information:
    Workstation Name:   
    Source Network Address: -
    Source Port:        -

Detailed Authentication Information:
    Logon Process:      Advapi  
    Authentication Package: Negotiate
    Transited Services: -
    Package Name (NTLM only):   -
    Key Length:     0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;The following filter was used in inputs.conf of the forwarder  and thsos worked well for me.&lt;/P&gt;

&lt;P&gt;---UP ---&lt;BR /&gt;
input has &lt;BR /&gt;
[WinEventLog://Security]&lt;BR /&gt;
blacklist1= Message="Process Name:\s+.*services.exe"&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2015 23:26:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191569#M38129</guid>
      <dc:creator>rbal_splunk</dc:creator>
      <dc:date>2015-02-06T23:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Windows EventCode using blacklist and Whitelist</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191570#M38130</link>
      <description>&lt;P&gt;Also tested &lt;/P&gt;

&lt;P&gt;I just test this in my environment.&lt;BR /&gt;
I have Windows Event Code = with details like following&lt;BR /&gt;
An account was successfully logged on.&lt;/P&gt;

&lt;P&gt;**&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Subject:
    Security ID:        SYSTEM
    Account Name:       RBAL-W540$
    Account Domain:     SPLUNK
    Logon ID:       0x3e7
Logon Type:         7
New Logon:
    Security ID:        SPLUNK\rbal
    Account Name:       rbal
    Account Domain:     SPLUNK
    Logon ID:       0x89edb5c5
    Logon GUID:     {3d3aefbf-9375-dbcc-f004-cce3f3ddbbd3}
Process Information:
    Process ID:     0x358
    Process Name:       C:\Windows\System32\lsass.exe
Network Information:
    Workstation Name:   RBAL-W540
    Source Network Address: -
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;**&lt;/P&gt;

&lt;P&gt;To filter such event I ad to add blacklist like&lt;BR /&gt;
---------$SPLUNk_HOME/etc/system/local/inputs.conf----------&lt;BR /&gt;
[WinEventLog://Security]&lt;BR /&gt;
blacklist1=EventCode="4624" Message="Workstation Name:\s+.&lt;EM&gt;RBAL.&lt;/EM&gt;"&lt;/P&gt;

&lt;P&gt;Note the “(quote) around the message and another around EventCode to be filteres.&lt;BR /&gt;
In addition – I checked the regex that I wrote for Messages using -- &lt;A href="http://regexr.com/v1/"&gt;http://regexr.com/v1/&lt;/A&gt;&lt;BR /&gt;
And another thing to check will to ensure that blacklist to inputs need to be added – where data is ingested from.&lt;/P&gt;

&lt;P&gt;Another thing to Watch out for is &amp;gt; if data is ingested on Universal Forwarder you need to add blacklist to input stanza on Splunk Universal Forwarder.&lt;BR /&gt;
If the Data directly ingested from indexer in that case input with blacklist will go to indexer.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2015 21:09:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191570#M38130</guid>
      <dc:creator>rbal_splunk</dc:creator>
      <dc:date>2015-09-04T21:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Windows EventCode using blacklist and Whitelist</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191571#M38131</link>
      <description>&lt;P&gt;I am trying to configure blacklist on my windows events similar to the Scenario that you have put in "Test 5" above.&lt;BR /&gt;
Your blacklist: &lt;BR /&gt;
[WinEventLog://Security]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
blacklist1=EventCode="4672" Message="Special*" &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Data Filtered&lt;/P&gt;

&lt;P&gt;My Blacklist:&lt;BR /&gt;
[WinEventLog://Security]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
blacklist1=EventCode="4776" Message="&lt;EM&gt;0x0&lt;/EM&gt;" &lt;/P&gt;

&lt;P&gt;My Sample data is as below:&lt;BR /&gt;
Event to be filtered:&lt;BR /&gt;
02/04/201604:55:19 AM LogName=SecuritySourceName=Microsoft Windows security auditing. EventCode=4776EventType=0 Type=Information ComputerName=computer1 TaskCategory=Credential Validation OpCode=Info RecordNumber=18834479Keywords=Audit Success Message=The computer attemptedto validate thecredentials for anaccount. Authentication Package: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0 Logon Account: SPFARM Source Workstation: WCHWPF464Error Code: 0x0&lt;/P&gt;

&lt;P&gt;Event not to be filtered:&lt;BR /&gt;
02/04/201604:55:19 AM LogName=SecuritySourceName=Microsoft Windows security auditing. EventCode=4776EventType=0 Type=Information ComputerName=computer2 TaskCategory=Credential Validation OpCode=Info RecordNumber=18304483Keywords=Audit Failure Message=The computer attemptedto validate thecredentials for anaccount. Authentication Package: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0 Logon Account: Source Workstation: Error Code: 0xc0000064&lt;/P&gt;

&lt;P&gt;But following the example in "Test 5" use case, my filter does not work and instead it blacklists the entire events under EventCode=4776. Do you have any thoughts on this?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:41:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191571#M38131</guid>
      <dc:creator>vsingla1</dc:creator>
      <dc:date>2020-09-29T08:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Windows EventCode using blacklist and Whitelist</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191572#M38132</link>
      <description>&lt;P&gt;FWIW, I tested multiple versions of all this, to no avail. I even read a Splunk blog that's often cited by similar questions... I love it when you read "accepted answers" for your questions, and docs, and blogs, and NONE of what they say work until you experiment on your own and stumble upon a solution, happens more times than I want to admit. &lt;/P&gt;

&lt;P&gt;Here's what finally worked for me (your mileage may vary):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WinEventLog://Security]
disabled = 0
start_from = oldest
current_only = 0
evt_resolve_ad_obj = 1
checkpointInterval = 5
blacklist1 = EventCode="5156" Message="*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Using a deployment server (6.5.1) and Universal Forwarders (6.5.1.). Don't know if all that other cruft is necessary, but it works for me. Oh, and make sure you don't have more than one [WinEventLog://Security] stanza.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2017 16:04:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191572#M38132</guid>
      <dc:creator>Michael</dc:creator>
      <dc:date>2017-04-05T16:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Windows EventCode using blacklist and Whitelist</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191573#M38133</link>
      <description>&lt;P&gt;Hello;&lt;/P&gt;

&lt;P&gt;I am already collecting and forwarding all logs from my servers into WEC, WEC then whitelisting and resending into Splunk only the Security Events ID's I am interested in.&lt;/P&gt;

&lt;P&gt;I would like to additionally resend into Splunk a "whitelisted" "System" logs, but only for "error" and "critical"; i.e., not EventID based as I am not sure what they are, plus do not wish to index informational garbage.&lt;/P&gt;

&lt;P&gt;Does anyone know how to white-list based on level vs. ID?&lt;/P&gt;

&lt;P&gt;Thank you in advance,&lt;/P&gt;

&lt;P&gt;-mi&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 23:05:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-Windows-EventCode-using-blacklist-and-Whitelist/m-p/191573#M38133</guid>
      <dc:creator>nychawk</dc:creator>
      <dc:date>2018-01-22T23:05:01Z</dc:date>
    </item>
  </channel>
</rss>

