<?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: Regex to filter security events does'nt work, need help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-filter-security-events-does-nt-work-need-help/m-p/298353#M89967</link>
    <description>&lt;P&gt;The SEDCMD is used for data masking (or in some cases editing) before indexing. For other log types you would, to drop the whole events which matches your regular expression, you would use Transforms (&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.2/Forwarding/Routeandfilterdatad#Discard_specific_events_and_keep_the_rest"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.2/Forwarding/Routeandfilterdatad#Discard_specific_events_and_keep_the_rest&lt;/A&gt;), but for Event Logs, you could just use blacklist attribute in inputs.conf on the Universal forwarder. See these&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/152131/filter-windows-eventcode-using-blacklist-and-whitelist.html"&gt;https://answers.splunk.com/answers/152131/filter-windows-eventcode-using-blacklist-and-whitelist.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.0/Data/MonitorWindowseventlogdata#Create_advanced_filters_with_.27whitelist.27_and_.27blacklist.27"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.0/Data/MonitorWindowseventlogdata#Create_advanced_filters_with_.27whitelist.27_and_.27blacklist.27&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2017 18:39:58 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-10-05T18:39:58Z</dc:date>
    <item>
      <title>Regex to filter security events does'nt work, need help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-filter-security-events-does-nt-work-need-help/m-p/298352#M89966</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;

&lt;P&gt;We have UFs on our DCs and 2 indexers and on both indexers, to drop the unwanted text from events &lt;/P&gt;

&lt;P&gt;I tried using the following regex in the /opt/splunk/etc/slave-apps/Splunk_TA_windows/local/props.conf  &lt;/P&gt;

&lt;P&gt;[WinEventLog:Security] SEDCMD-shortern4624 = SEDCMD-shortern4624 = s/(?mis)(.&lt;EM&gt;EventCode=4624.&lt;/EM&gt;)This event is generated when a logon session.*$/\1/g&lt;/P&gt;

&lt;P&gt;it does not work&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:11:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-filter-security-events-does-nt-work-need-help/m-p/298352#M89966</guid>
      <dc:creator>hrithiktej</dc:creator>
      <dc:date>2020-09-29T16:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to filter security events does'nt work, need help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-filter-security-events-does-nt-work-need-help/m-p/298353#M89967</link>
      <description>&lt;P&gt;The SEDCMD is used for data masking (or in some cases editing) before indexing. For other log types you would, to drop the whole events which matches your regular expression, you would use Transforms (&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.2/Forwarding/Routeandfilterdatad#Discard_specific_events_and_keep_the_rest"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.2/Forwarding/Routeandfilterdatad#Discard_specific_events_and_keep_the_rest&lt;/A&gt;), but for Event Logs, you could just use blacklist attribute in inputs.conf on the Universal forwarder. See these&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/152131/filter-windows-eventcode-using-blacklist-and-whitelist.html"&gt;https://answers.splunk.com/answers/152131/filter-windows-eventcode-using-blacklist-and-whitelist.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.0/Data/MonitorWindowseventlogdata#Create_advanced_filters_with_.27whitelist.27_and_.27blacklist.27"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.0/Data/MonitorWindowseventlogdata#Create_advanced_filters_with_.27whitelist.27_and_.27blacklist.27&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 18:39:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-filter-security-events-does-nt-work-need-help/m-p/298353#M89967</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-10-05T18:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to filter security events does'nt work, need help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-filter-security-events-does-nt-work-need-help/m-p/298354#M89968</link>
      <description>&lt;P&gt;I do not want to drop the whole event i just want to drop the static text that gives the description about the event.&lt;/P&gt;

&lt;P&gt;I am referring to this link &lt;A href="https://www.splunk.com/blog/2012/09/21/the-splunk-app-for-active-directory-and-how-i-tamed-the-security-log.html"&gt;https://www.splunk.com/blog/2012/09/21/the-splunk-app-for-active-directory-and-how-i-tamed-the-security-log.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 19:02:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-filter-security-events-does-nt-work-need-help/m-p/298354#M89968</guid>
      <dc:creator>hrithiktej</dc:creator>
      <dc:date>2017-10-05T19:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to filter security events does'nt work, need help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-filter-security-events-does-nt-work-need-help/m-p/298355#M89969</link>
      <description>&lt;P&gt;Ok.. Try this (props.conf on your indexer, you may have to deploy it from cluster master instead of updating the slave-apps directly)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WinEventLog:Security] 
SEDCMD-shortern4624 = s/(?mis)(.*EventCode=4624.*)This event is generated when a logon session.*$/\1/g
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Oct 2017 19:11:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-filter-security-events-does-nt-work-need-help/m-p/298355#M89969</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-10-05T19:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to filter security events does'nt work, need help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-filter-security-events-does-nt-work-need-help/m-p/298356#M89970</link>
      <description>&lt;P&gt;yes i am already following the best practice of doing this in master apps and then deploying to slave-apps&lt;/P&gt;

&lt;P&gt;Thanks, i used a different regex and this time its working&lt;/P&gt;

&lt;P&gt;NOW following is wat i am using in my /opt/splunk/etc/slave-apps/splunk-TA-Windows/local&lt;/P&gt;

&lt;P&gt;in props.conf&lt;BR /&gt;
 # message shortener for windows event security&lt;BR /&gt;
 # removes text from message field starting with: This event is generated&lt;BR /&gt;
 [WinEventLog:Security]&lt;BR /&gt;
 TRANSFORM-windows_events = win_event_shortener&lt;/P&gt;

&lt;P&gt;in transforms.conf&lt;/P&gt;

&lt;P&gt;[win_event_shortener]&lt;BR /&gt;
 DEST_KEY = _raw&lt;BR /&gt;
 REGEX = ((.*+[\v])+)(?=This event is generated)&lt;BR /&gt;
 FORMAT = $1&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:11:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-filter-security-events-does-nt-work-need-help/m-p/298356#M89970</guid>
      <dc:creator>hrithiktej</dc:creator>
      <dc:date>2020-09-29T16:11:19Z</dc:date>
    </item>
  </channel>
</rss>

