<?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 for Windows Event from Syslog agent in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-Windows-Event-from-Syslog-agent/m-p/327670#M97540</link>
    <description>&lt;P&gt;I am working on that one, but from a Change Analysis DM view point, to fill the object_attrs field with the name of the attributes that where changed. &lt;/P&gt;

&lt;P&gt;If you just want all the fields you can just create a regex for it. &lt;BR /&gt;
I think you have 3 options for that&lt;BR /&gt;
1) create 1 regex that will extract every field available using the &amp;lt;_KEY_1&amp;gt; and &amp;lt;_VAL_1&amp;gt; options ( read the transforms.conf documentation REGEX part)&lt;BR /&gt;
2) create a regex for every field you want to extract&lt;BR /&gt;
3) create 1 regex that will get all the "Changed Attributes" field, Note that this will not "hit" if one field is missing&lt;/P&gt;

&lt;P&gt;I whould go for option 1 because it is the most flexible, despite the fact that it will give me some additional fields without a value ( for example Changed_Attributes)&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 15:44:14 GMT</pubDate>
    <dc:creator>aholzel</dc:creator>
    <dc:date>2020-09-29T15:44:14Z</dc:date>
    <item>
      <title>Regex for Windows Event from Syslog agent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-Windows-Event-from-Syslog-agent/m-p/327667#M97537</link>
      <description>&lt;P&gt;Hi, I'm trying to get the Target Account ID from the Windows Event parsed from a syslog agent. I'm trying to capture the Target Account Name, and Domain. The Account Name appeared in the below samples:&lt;/P&gt;

&lt;P&gt;91275674&lt;BR /&gt;
DEVOP0030&lt;BR /&gt;
TEST. STUADMGR&lt;BR /&gt;
dev.devmgr&lt;/P&gt;

&lt;P&gt;When using Splunk regex, I could not capture all the above variations. Will love to know how can I do this extraction properly.&lt;/P&gt;

&lt;P&gt;2017-08-30 13:37:40 Kernel.Notice   172.21.197.99   Aug 30 13:37:56 DVDMZDCPRD01.dmz.devops.edu.my MSWinEventLog    5   Security    2548728 Wed Aug 30 13:37:50 2017    4738    Microsoft-Windows-Security-Auditing     N/A Audit Success   DVDMZDCPRD01.dmz.devops.edu.my  13824   A user account was changed.&lt;BR /&gt;
Subject:&lt;BR /&gt;
    Security ID:        S-1-5-21-3530313057-30343534556-3718217427-2613&lt;BR /&gt;
    Account Name:       svc.vendor_guest&lt;BR /&gt;
    Account Domain:     DMZ&lt;BR /&gt;
    Logon ID:       0x2524625D&lt;BR /&gt;
Target Account:&lt;BR /&gt;
    Security ID:        S-1-5-21-3530313057-3021056205-3718217427-25067&lt;BR /&gt;
    ||Account Name:     91275674||&lt;BR /&gt;
    ||Account Domain:       DMZ||&lt;BR /&gt;
Changed Attributes:&lt;BR /&gt;
    SAM Account Name:   -&lt;BR /&gt;
    Display Name:       -&lt;BR /&gt;
    User Principal Name:    -&lt;BR /&gt;
    Home Directory:     -&lt;BR /&gt;
    Home Drive:     -&lt;BR /&gt;
    Script Path:        -&lt;BR /&gt;
    Profile Path:       -&lt;BR /&gt;
    User Workstations:  -&lt;BR /&gt;
    Password Last Set:  8/30/2017 1:37:50 PM&lt;BR /&gt;
    Account Expires:        -&lt;BR /&gt;
    Primary Group ID:   -&lt;BR /&gt;
    AllowedToDelegateTo:    -&lt;BR /&gt;
    Old UAC Value:      -&lt;BR /&gt;
    New UAC Value:      -&lt;BR /&gt;
    User Account Control:   -&lt;BR /&gt;
    User Parameters:    -&lt;BR /&gt;
    SID History:        -&lt;BR /&gt;
    Logon Hours:        -&lt;BR /&gt;
Additional Information:&lt;BR /&gt;
    Privileges:     -&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 07:20:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-Windows-Event-from-Syslog-agent/m-p/327667#M97537</guid>
      <dc:creator>leonheart78</dc:creator>
      <dc:date>2017-09-11T07:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for Windows Event from Syslog agent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-Windows-Event-from-Syslog-agent/m-p/327668#M97538</link>
      <description>&lt;P&gt;I use this regex to make the Windows Eventlog Security CIM compliant for the Change Analysis and Authentication datamodel. It works with all the events I have encounterd that have 2 accounts in the event (subject and target)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?s)Subject\:.*?Account\s*Name\:\s*(?&amp;lt;src_user&amp;gt;[^\n]*)\n\s*Account\s*Domain\:\s*(?&amp;lt;src_nt_domain&amp;gt;[^\n]*).*?Account\s*Name\:\s*(?&amp;lt;user&amp;gt;[^\n]*)(?:\n\s*Account\s*Domain\:\s*(?&amp;lt;dest_nt_domain&amp;gt;[^\n]*)|\n)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I assumed you put the "|" around the Account Name and Domain Name to make clear what you were looking for....&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 07:33:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-Windows-Event-from-Syslog-agent/m-p/327668#M97538</guid>
      <dc:creator>aholzel</dc:creator>
      <dc:date>2017-09-11T07:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for Windows Event from Syslog agent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-Windows-Event-from-Syslog-agent/m-p/327669#M97539</link>
      <description>&lt;P&gt;Thanks for the regex. May I know were you able to extract the Change Attributes as well?&lt;BR /&gt;
Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 08:34:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-Windows-Event-from-Syslog-agent/m-p/327669#M97539</guid>
      <dc:creator>leonheart78</dc:creator>
      <dc:date>2017-09-11T08:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: Regex for Windows Event from Syslog agent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-for-Windows-Event-from-Syslog-agent/m-p/327670#M97540</link>
      <description>&lt;P&gt;I am working on that one, but from a Change Analysis DM view point, to fill the object_attrs field with the name of the attributes that where changed. &lt;/P&gt;

&lt;P&gt;If you just want all the fields you can just create a regex for it. &lt;BR /&gt;
I think you have 3 options for that&lt;BR /&gt;
1) create 1 regex that will extract every field available using the &amp;lt;_KEY_1&amp;gt; and &amp;lt;_VAL_1&amp;gt; options ( read the transforms.conf documentation REGEX part)&lt;BR /&gt;
2) create a regex for every field you want to extract&lt;BR /&gt;
3) create 1 regex that will get all the "Changed Attributes" field, Note that this will not "hit" if one field is missing&lt;/P&gt;

&lt;P&gt;I whould go for option 1 because it is the most flexible, despite the fact that it will give me some additional fields without a value ( for example Changed_Attributes)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:44:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-for-Windows-Event-from-Syslog-agent/m-p/327670#M97540</guid>
      <dc:creator>aholzel</dc:creator>
      <dc:date>2020-09-29T15:44:14Z</dc:date>
    </item>
  </channel>
</rss>

