<?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: Windows security event log regex help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Windows-security-event-log-regex-help/m-p/16346#M2167</link>
    <description>&lt;P&gt;Are you looking for those values in specific fields, or just anywhere in the event?  If you are looking for them just anywhere in the event, then I would suggest that you don't use regex at all.  Simply do a search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=WinEventLog:Security EventCode=540 NOT ("SYSTEM" OR "ANONYMOUS LOGON" OR "$")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, that may be a bit too loose.   For example, the term "system" could occur else where in your event, and perhaps a clever hacker would attempt to hide logon attempts by using a "$" as part of their username,....  So perhaps it's would be better to be slightly more specific about what we want to filter out.  &lt;/P&gt;

&lt;P&gt;So, this may be a better search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=WinEventLog:Security "EventCode=540" NOT ("User=SYSTEM" OR "User=ANONYMOUS LOGON" OR USER="*$")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(Notice the usage of quotes around the entire expressions--this make splunk look for those literal terms in the index, rather than doing a field matching, which should result in a faster search)&lt;/P&gt;

&lt;P&gt;I'm not sure about the &lt;CODE&gt;USER="*$"&lt;/CODE&gt; part, that does give difference results than simply searching for "$", so you'll have to play around and see what results you really want.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Jun 2010 00:54:37 GMT</pubDate>
    <dc:creator>Lowell</dc:creator>
    <dc:date>2010-06-29T00:54:37Z</dc:date>
    <item>
      <title>Windows security event log regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Windows-security-event-log-regex-help/m-p/16344#M2165</link>
      <description>&lt;P&gt;I need a regex that can process all security events with eventid 540 that don't contain $, SYSTEM, or ANONYMOUS LOGON. I am genetically incapable of creating such a regex, so thanks for the help.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2010 23:41:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Windows-security-event-log-regex-help/m-p/16344#M2165</guid>
      <dc:creator>chowell</dc:creator>
      <dc:date>2010-06-28T23:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Windows security event log regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Windows-security-event-log-regex-help/m-p/16345#M2166</link>
      <description>&lt;P&gt;how about this?&lt;/P&gt;

&lt;P&gt;eventid="540" | regex _raw!="(\$|SYSTEM|ANONYMOUS LOGON)"&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2010 23:45:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Windows-security-event-log-regex-help/m-p/16345#M2166</guid>
      <dc:creator>rayfoo</dc:creator>
      <dc:date>2010-06-28T23:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Windows security event log regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Windows-security-event-log-regex-help/m-p/16346#M2167</link>
      <description>&lt;P&gt;Are you looking for those values in specific fields, or just anywhere in the event?  If you are looking for them just anywhere in the event, then I would suggest that you don't use regex at all.  Simply do a search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=WinEventLog:Security EventCode=540 NOT ("SYSTEM" OR "ANONYMOUS LOGON" OR "$")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, that may be a bit too loose.   For example, the term "system" could occur else where in your event, and perhaps a clever hacker would attempt to hide logon attempts by using a "$" as part of their username,....  So perhaps it's would be better to be slightly more specific about what we want to filter out.  &lt;/P&gt;

&lt;P&gt;So, this may be a better search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=WinEventLog:Security "EventCode=540" NOT ("User=SYSTEM" OR "User=ANONYMOUS LOGON" OR USER="*$")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(Notice the usage of quotes around the entire expressions--this make splunk look for those literal terms in the index, rather than doing a field matching, which should result in a faster search)&lt;/P&gt;

&lt;P&gt;I'm not sure about the &lt;CODE&gt;USER="*$"&lt;/CODE&gt; part, that does give difference results than simply searching for "$", so you'll have to play around and see what results you really want.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2010 00:54:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Windows-security-event-log-regex-help/m-p/16346#M2167</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-06-29T00:54:37Z</dc:date>
    </item>
  </channel>
</rss>

