<?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: Event ID 4738 - How to alert when source user and target user are the same ? in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Event-ID-4738-How-to-alert-when-source-user-and-target-user-are/m-p/425809#M5426</link>
    <description>&lt;P&gt;Ah, yeah, the joy of those plain text windows events and their non-unique field names that get mapped to multi-valued fields in Splunk.&lt;/P&gt;

&lt;P&gt;So in that case Account_Name is multi-valued, right? Just split it using &lt;CODE&gt;mvindex&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; sourcetype=WinEventLog:Security EventCode=4738
| eval source_user = mvindex(Account_Name,0)
| eval target_user = mvindex(Account_Name,1)
| where source_user = target_user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But actually Splunk TA Windows already maps those 2 user names to &lt;CODE&gt;src_user&lt;/CODE&gt; and &lt;CODE&gt;user&lt;/CODE&gt; for CIM compatibility. So you should simply be able to do &lt;CODE&gt;| where src_user = user&lt;/CODE&gt;.&lt;/P&gt;</description>
    <pubDate>Thu, 31 May 2018 18:52:31 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2018-05-31T18:52:31Z</dc:date>
    <item>
      <title>Event ID 4738 - How to alert when source user and target user are the same ?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Event-ID-4738-How-to-alert-when-source-user-and-target-user-are/m-p/425806#M5423</link>
      <description>&lt;P&gt;Greetings all, &lt;/P&gt;

&lt;P&gt;I am currently using a simple Splunk query to return all changes to a user account. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;sourcetype=WinEventLog:Security EventCode=4738 Account_Name=USERNAME&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;An idea for an alert came to me and I have been having some issues getting it to work. How would I go about modifying this query to return only those entries where the source and target usernames are the same ?&lt;/P&gt;

&lt;P&gt;The purpose of this is to alert me when anyone makes changes to their own accounts in AD.&lt;/P&gt;

&lt;P&gt;Thanks in advance all ! &lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 17:26:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Event-ID-4738-How-to-alert-when-source-user-and-target-user-are/m-p/425806#M5423</guid>
      <dc:creator>fzuazo</dc:creator>
      <dc:date>2018-05-31T17:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Event ID 4738 - How to alert when source user and target user are the same ?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Event-ID-4738-How-to-alert-when-source-user-and-target-user-are/m-p/425807#M5424</link>
      <description>&lt;P&gt;You'd need to refresh my mind on the actual field names of source user and target user for these particular events, but the basic principle would be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=WinEventLog:Security EventCode=4738 | where source_user = target_user
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 May 2018 17:53:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Event-ID-4738-How-to-alert-when-source-user-and-target-user-are/m-p/425807#M5424</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-05-31T17:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Event ID 4738 - How to alert when source user and target user are the same ?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Event-ID-4738-How-to-alert-when-source-user-and-target-user-are/m-p/425808#M5425</link>
      <description>&lt;P&gt;This is where I am stuck. &lt;/P&gt;

&lt;P&gt;I have been trying to find the field names for the data but the way Splunk sees the event is below. I know it's impossible but the source and target seem to be the same. &lt;/P&gt;

&lt;P&gt;Subject:&lt;BR /&gt;
    Security ID:        DOMAIN\USERNAME&lt;BR /&gt;
    &lt;STRONG&gt;Account Name:&lt;/STRONG&gt;       USERNAME&lt;BR /&gt;
    Account Domain:     DOMAIN&lt;BR /&gt;
    Logon ID:       VALUE&lt;/P&gt;

&lt;P&gt;Target Account:&lt;BR /&gt;
    Security ID:        DOMAIN\USERNAME&lt;BR /&gt;
    &lt;STRONG&gt;Account Name:&lt;/STRONG&gt;       USERNAME&lt;BR /&gt;
    Account Domain:     DOMAIN&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 18:12:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Event-ID-4738-How-to-alert-when-source-user-and-target-user-are/m-p/425808#M5425</guid>
      <dc:creator>fzuazo</dc:creator>
      <dc:date>2018-05-31T18:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Event ID 4738 - How to alert when source user and target user are the same ?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Event-ID-4738-How-to-alert-when-source-user-and-target-user-are/m-p/425809#M5426</link>
      <description>&lt;P&gt;Ah, yeah, the joy of those plain text windows events and their non-unique field names that get mapped to multi-valued fields in Splunk.&lt;/P&gt;

&lt;P&gt;So in that case Account_Name is multi-valued, right? Just split it using &lt;CODE&gt;mvindex&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; sourcetype=WinEventLog:Security EventCode=4738
| eval source_user = mvindex(Account_Name,0)
| eval target_user = mvindex(Account_Name,1)
| where source_user = target_user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But actually Splunk TA Windows already maps those 2 user names to &lt;CODE&gt;src_user&lt;/CODE&gt; and &lt;CODE&gt;user&lt;/CODE&gt; for CIM compatibility. So you should simply be able to do &lt;CODE&gt;| where src_user = user&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 18:52:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Event-ID-4738-How-to-alert-when-source-user-and-target-user-are/m-p/425809#M5426</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-05-31T18:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Event ID 4738 - How to alert when source user and target user are the same ?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Event-ID-4738-How-to-alert-when-source-user-and-target-user-are/m-p/425810#M5427</link>
      <description>&lt;P&gt;Both of your recommendations worked for me. &lt;/P&gt;

&lt;P&gt;Thank you Frank. &lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 19:36:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Event-ID-4738-How-to-alert-when-source-user-and-target-user-are/m-p/425810#M5427</guid>
      <dc:creator>fzuazo</dc:creator>
      <dc:date>2018-05-31T19:36:08Z</dc:date>
    </item>
  </channel>
</rss>

