<?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 to create inputs.conf blacklist with BOOLEAN in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-inputs-conf-blacklist-with-BOOLEAN/m-p/492814#M84246</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I want to create a blacklist in the universal forwarder or in my heavy forwarder with the following conditions:&lt;/P&gt;

&lt;P&gt;1)EventCode=4688&lt;BR /&gt;
2)splunk*.exe&lt;/P&gt;

&lt;P&gt;so I want the regex to be something like EventCode=4688 AND splunk*.&lt;BR /&gt;
 I tried many different combinations like this one:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?:.*\n){1,}EventCode=4688(?:.*\n){1,}.*splunk-.*\.exe(?:.*\n){1,}(?:.*\n)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The above regex matches the event but it's not working in the transforms.conf or inputs.conf.&lt;/P&gt;

&lt;P&gt;This is how the event looks like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;##########
10/03/2019 03:33:01 PM
LogName=Security
SourceName=Microsoft Windows security auditing.
EventCode=4688
EventType=0
Type=Information
ComputerName=Win1-New
TaskCategory=Process Creation
OpCode=Info
RecordNumber=2926293
Keywords=Audit Success
Message=A new process has been created.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Subject:&lt;BR /&gt;
    &lt;STRONG&gt;Security ID:      S-1-1-12&lt;BR /&gt;
    Account Name:       WIN$1&lt;BR /&gt;
    Account Domain:     LOCALGROUP&lt;BR /&gt;
    Logon ID:       0x3e7&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Process Information:&lt;BR /&gt;
    &lt;STRONG&gt;New Process ID:       0x143c&lt;BR /&gt;
    New Process Name:   C:\Program Files\SplunkUniversalForwarder\bin\splunk-winprintmon.exe&lt;BR /&gt;
    Token Elevation Type:   TokenElevationTypeDefault (1)&lt;BR /&gt;
    Creator Process ID: 0x1504&lt;BR /&gt;
    Process Command Line:   "C:\Program Files\SplunkUniversalForwarder\bin\splunk-winprintmon.exe"&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Token Elevation Type indicates the type of token that was assigned to the new process in accordance with User Account Control policy.&lt;/P&gt;

&lt;P&gt;Type 1 is a full token with no privileges removed or groups disabled.  A full token is only used if User Account Control is disabled or if the user is the built-in Administrator account or a service account.&lt;/P&gt;

&lt;P&gt;Type 2 is an elevated token with no privileges removed or groups disabled.  An elevated token is used when User Account Control is enabled and the user chooses to start the program using Run as administrator.  An elevated token is also used when an application is configured to always require administrative privilege or to always require maximum privilege, and the user is a member of the Administrators group.&lt;/P&gt;

&lt;P&gt;Type 3 is a limited token with administrative privileges removed and administrative groups disabled.  The limited token is used when User Account Control is enabled, the application does not require administrative privilege, and the user does not choose to start the program using Run as administrator.&lt;/P&gt;

&lt;P&gt;Any ideas how should I proceed?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Oct 2019 22:41:01 GMT</pubDate>
    <dc:creator>arsalanj</dc:creator>
    <dc:date>2019-10-03T22:41:01Z</dc:date>
    <item>
      <title>How to create inputs.conf blacklist with BOOLEAN</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-inputs-conf-blacklist-with-BOOLEAN/m-p/492814#M84246</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I want to create a blacklist in the universal forwarder or in my heavy forwarder with the following conditions:&lt;/P&gt;

&lt;P&gt;1)EventCode=4688&lt;BR /&gt;
2)splunk*.exe&lt;/P&gt;

&lt;P&gt;so I want the regex to be something like EventCode=4688 AND splunk*.&lt;BR /&gt;
 I tried many different combinations like this one:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?:.*\n){1,}EventCode=4688(?:.*\n){1,}.*splunk-.*\.exe(?:.*\n){1,}(?:.*\n)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The above regex matches the event but it's not working in the transforms.conf or inputs.conf.&lt;/P&gt;

&lt;P&gt;This is how the event looks like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;##########
10/03/2019 03:33:01 PM
LogName=Security
SourceName=Microsoft Windows security auditing.
EventCode=4688
EventType=0
Type=Information
ComputerName=Win1-New
TaskCategory=Process Creation
OpCode=Info
RecordNumber=2926293
Keywords=Audit Success
Message=A new process has been created.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Subject:&lt;BR /&gt;
    &lt;STRONG&gt;Security ID:      S-1-1-12&lt;BR /&gt;
    Account Name:       WIN$1&lt;BR /&gt;
    Account Domain:     LOCALGROUP&lt;BR /&gt;
    Logon ID:       0x3e7&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Process Information:&lt;BR /&gt;
    &lt;STRONG&gt;New Process ID:       0x143c&lt;BR /&gt;
    New Process Name:   C:\Program Files\SplunkUniversalForwarder\bin\splunk-winprintmon.exe&lt;BR /&gt;
    Token Elevation Type:   TokenElevationTypeDefault (1)&lt;BR /&gt;
    Creator Process ID: 0x1504&lt;BR /&gt;
    Process Command Line:   "C:\Program Files\SplunkUniversalForwarder\bin\splunk-winprintmon.exe"&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Token Elevation Type indicates the type of token that was assigned to the new process in accordance with User Account Control policy.&lt;/P&gt;

&lt;P&gt;Type 1 is a full token with no privileges removed or groups disabled.  A full token is only used if User Account Control is disabled or if the user is the built-in Administrator account or a service account.&lt;/P&gt;

&lt;P&gt;Type 2 is an elevated token with no privileges removed or groups disabled.  An elevated token is used when User Account Control is enabled and the user chooses to start the program using Run as administrator.  An elevated token is also used when an application is configured to always require administrative privilege or to always require maximum privilege, and the user is a member of the Administrators group.&lt;/P&gt;

&lt;P&gt;Type 3 is a limited token with administrative privileges removed and administrative groups disabled.  The limited token is used when User Account Control is enabled, the application does not require administrative privilege, and the user does not choose to start the program using Run as administrator.&lt;/P&gt;

&lt;P&gt;Any ideas how should I proceed?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 22:41:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-inputs-conf-blacklist-with-BOOLEAN/m-p/492814#M84246</guid>
      <dc:creator>arsalanj</dc:creator>
      <dc:date>2019-10-03T22:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to create inputs.conf blacklist with BOOLEAN</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-inputs-conf-blacklist-with-BOOLEAN/m-p/492815#M84247</link>
      <description>&lt;P&gt;Blacklists for Windows events are not free-form regex.  You can use a list of event codes, which won't work for you, or a number &lt;CODE&gt;key=regex&lt;/CODE&gt; pairs.  The latter probably is what you want.  Pairs are automatically ANDed.  Unfortunately, the &lt;CODE&gt;key&lt;/CODE&gt; portion of the blacklist is limited to certain fields and Process_Command_Line is not one of them.&lt;/P&gt;

&lt;P&gt;See &lt;STRONG&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.2/Admin/Inputsconf#Event_Log_whitelist_and_blacklist_formats" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.2/Admin/Inputsconf#Event_Log_whitelist_and_blacklist_formats&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:23:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-inputs-conf-blacklist-with-BOOLEAN/m-p/492815#M84247</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-09-30T02:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to create inputs.conf blacklist with BOOLEAN</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-inputs-conf-blacklist-with-BOOLEAN/m-p/492816#M84248</link>
      <description>&lt;P&gt;Appreciate your response @richgalloway&lt;/P&gt;

&lt;P&gt;I thought it deals with the raw data. &lt;BR /&gt;
I see that it only works on  Category, CategoryString, ComputerName, EventCode, EventType, Keywords,&lt;BR /&gt;
    LogName, Message, OpCode, RecordNumber, Sid, SidType, SourceName,&lt;BR /&gt;
    TaskCategory, Type, User.&lt;/P&gt;

&lt;P&gt;The keyword that I wanted to AND with was "splunk-" and I used the Message field.&lt;BR /&gt;
I could make it work, thanks so much.&lt;/P&gt;

&lt;P&gt;Could you please tell me what format should I use if I want to drop them in transforms.conf?&lt;BR /&gt;
I tried a few regexes that again worked in regex editors but splunk ignored it.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 02:12:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-inputs-conf-blacklist-with-BOOLEAN/m-p/492816#M84248</guid>
      <dc:creator>arsalanj</dc:creator>
      <dc:date>2019-10-04T02:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to create inputs.conf blacklist with BOOLEAN</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-inputs-conf-blacklist-with-BOOLEAN/m-p/492817#M84249</link>
      <description>&lt;P&gt;I don't understand the new question.  You have it working, right?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 15:45:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-inputs-conf-blacklist-with-BOOLEAN/m-p/492817#M84249</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-10-04T15:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to create inputs.conf blacklist with BOOLEAN</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-inputs-conf-blacklist-with-BOOLEAN/m-p/492818#M84250</link>
      <description>&lt;P&gt;Yes, I do. I could make it work by creating a blacklist in inputs.conf&lt;/P&gt;

&lt;P&gt;The question was, how can I filter such events in transforms.conf. &lt;BR /&gt;
How can I AND things in the (REGEX = ) field.&lt;BR /&gt;
Because my regex matches the multiline logs but Splunk is not dropping them.&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
[source::WinEventLog:Security]&lt;BR /&gt;
TRANSFORMS-null = drop1 &lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
[drop1]&lt;BR /&gt;
REGEX = (EventCode=4688)(?:.*\n){1,}(New Process Name:\s+.*splunk-.*exe)&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:29:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-inputs-conf-blacklist-with-BOOLEAN/m-p/492818#M84250</guid>
      <dc:creator>arsalanj</dc:creator>
      <dc:date>2020-09-30T02:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to create inputs.conf blacklist with BOOLEAN</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-inputs-conf-blacklist-with-BOOLEAN/m-p/492819#M84251</link>
      <description>&lt;P&gt;I don't know that.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 11:32:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-inputs-conf-blacklist-with-BOOLEAN/m-p/492819#M84251</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-10-07T11:32:34Z</dc:date>
    </item>
  </channel>
</rss>

