<?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: Correlate userid to username in Security</title>
    <link>https://community.splunk.com/t5/Security/Correlate-userid-to-username/m-p/443160#M10385</link>
    <description>&lt;P&gt;Thanks. So, in the Lockout Event, the Account Name: abc1234, will that match to either the name, cn, or sAMAccountName?&lt;/P&gt;

&lt;P&gt;If yes, you can do a join and then a sub query.&lt;/P&gt;</description>
    <pubDate>Thu, 12 Jul 2018 16:41:18 GMT</pubDate>
    <dc:creator>jodyfsu</dc:creator>
    <dc:date>2018-07-12T16:41:18Z</dc:date>
    <item>
      <title>Correlate userid to username</title>
      <link>https://community.splunk.com/t5/Security/Correlate-userid-to-username/m-p/443157#M10382</link>
      <description>&lt;P&gt;Splunkers,&lt;/P&gt;

&lt;P&gt;The following search returns user lockouts:&lt;/P&gt;

&lt;P&gt;index=winevents EventCode=4740&lt;/P&gt;

&lt;P&gt;I have a user field which is "abc1234".&lt;/P&gt;

&lt;P&gt;The following search returns a target_user field "First Last (userid)"&lt;/P&gt;

&lt;P&gt;index=msad sourcetype=ActiveDirectory&lt;BR /&gt;
| eval target_user = givenName." ".sn." (".sAMAccountName.")"&lt;/P&gt;

&lt;P&gt;How can I combine these searches to produce a field that would let me display:&lt;/P&gt;

&lt;P&gt;First Last (userid) and Account Lockouts in a single table?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 15:44:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Correlate-userid-to-username/m-p/443157#M10382</guid>
      <dc:creator>matthew_foos</dc:creator>
      <dc:date>2018-07-12T15:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate userid to username</title>
      <link>https://community.splunk.com/t5/Security/Correlate-userid-to-username/m-p/443158#M10383</link>
      <description>&lt;P&gt;Do you have some example events we can look at? You may need to do a join.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 16:22:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Correlate-userid-to-username/m-p/443158#M10383</guid>
      <dc:creator>jodyfsu</dc:creator>
      <dc:date>2018-07-12T16:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate userid to username</title>
      <link>https://community.splunk.com/t5/Security/Correlate-userid-to-username/m-p/443159#M10384</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Lockout event:&lt;/STRONG&gt; - I've taken out the irrelevant data&lt;/P&gt;

&lt;P&gt;07/12/2018 11:16:16 AM&lt;BR /&gt;
LogName=Security&lt;BR /&gt;
SourceName=Microsoft Windows security auditing.&lt;BR /&gt;
EventCode=4740&lt;BR /&gt;
Message=A user account was locked out.&lt;/P&gt;

&lt;P&gt;Account That Was Locked Out:&lt;BR /&gt;
    Account Name:       abc1234&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;MSAD Event&lt;/STRONG&gt; - I've taken out the irrelevant data&lt;/P&gt;

&lt;P&gt;07/12/2018 11:31:04.229&lt;BR /&gt;
Names:&lt;BR /&gt;
    name=kfp1234&lt;BR /&gt;
    displayName=Kenny Powers&lt;BR /&gt;
    distinguishedName=CN=kfp1234&lt;BR /&gt;
    givenName=Kenny&lt;BR /&gt;
    sn=Powers&lt;BR /&gt;
    cn=kfp1234&lt;BR /&gt;
Object Details:&lt;BR /&gt;
        sAMAccountName=kfp1234&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 16:36:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Correlate-userid-to-username/m-p/443159#M10384</guid>
      <dc:creator>matthew_foos</dc:creator>
      <dc:date>2018-07-12T16:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate userid to username</title>
      <link>https://community.splunk.com/t5/Security/Correlate-userid-to-username/m-p/443160#M10385</link>
      <description>&lt;P&gt;Thanks. So, in the Lockout Event, the Account Name: abc1234, will that match to either the name, cn, or sAMAccountName?&lt;/P&gt;

&lt;P&gt;If yes, you can do a join and then a sub query.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 16:41:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Correlate-userid-to-username/m-p/443160#M10385</guid>
      <dc:creator>jodyfsu</dc:creator>
      <dc:date>2018-07-12T16:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate userid to username</title>
      <link>https://community.splunk.com/t5/Security/Correlate-userid-to-username/m-p/443161#M10386</link>
      <description>&lt;P&gt;It appears that way.  Could you help me with the SPL?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 16:44:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Correlate-userid-to-username/m-p/443161#M10386</guid>
      <dc:creator>matthew_foos</dc:creator>
      <dc:date>2018-07-12T16:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate userid to username</title>
      <link>https://community.splunk.com/t5/Security/Correlate-userid-to-username/m-p/443162#M10387</link>
      <description>&lt;P&gt;See if this will work&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=winevents EventCode=4740
| rename "Account Name" as cn
| join cn
    [search index=msad sourcetype=ActiveDirectory]
| table _time givenName sn cn Message
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm renaming Account Name to cn so the join will work. &lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 16:55:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Correlate-userid-to-username/m-p/443162#M10387</guid>
      <dc:creator>jodyfsu</dc:creator>
      <dc:date>2018-07-12T16:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate userid to username</title>
      <link>https://community.splunk.com/t5/Security/Correlate-userid-to-username/m-p/443163#M10388</link>
      <description>&lt;P&gt;Pseudocode for that is as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(your search that gets the lockout events)
OR
(your search that gets the MSAD events)
| fields ... list all (and ONLY) the fields you need from either type of record...

| rename COMMENT as "set up a single named key to match the records, and create the target_user data" 
| eval cn=concatenate(cn,"Account Name")
| eval target_user = givenName." ".sn." (".sAMAccountName.")"

| rename COMMENT as "roll the target_user data from the MSAD to the lockout records, then drop the MSAD records" 
| eventstats values(target_user) as target_user by cn
| where (the record is a lockout record)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Jul 2018 18:06:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Correlate-userid-to-username/m-p/443163#M10388</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-07-12T18:06:16Z</dc:date>
    </item>
  </channel>
</rss>

