<?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: Active Directory Group Membership Alerts? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Active-Directory-Group-Membership-Alerts/m-p/192350#M3293</link>
    <description>&lt;P&gt;You can do this over the Windows Log. &lt;BR /&gt;
&lt;A href="http://www.morgantechspace.com/2013/08/active-directory-change-audit-events.html"&gt;Eventcodes&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Mar 2015 15:46:39 GMT</pubDate>
    <dc:creator>PPape</dc:creator>
    <dc:date>2015-03-23T15:46:39Z</dc:date>
    <item>
      <title>Active Directory Group Membership Alerts?</title>
      <link>https://community.splunk.com/t5/Alerting/Active-Directory-Group-Membership-Alerts/m-p/192349#M3292</link>
      <description>&lt;P&gt;Using the built-in Splunk admon indexing, is there a way to monitor additions or removals to AD groups?&lt;/P&gt;

&lt;P&gt;I'm using the following to pull latest membership and format each member as a record;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ad_* objectCategory="CN=Group,CN=Schema,CN=Configuration,DC=foo,DC=bar,DC=com" | dedup cn | eval splitted=split(member, "|") | mvexpand splitted | table cn splitted _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This gives the following output;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Group_cn_1,member1,_time1
Group_cn_1,member2,_time1
Group_cn_1,member3,_time1
Group_cn_2,member1,_time2
Group_cn_2,member2,_time2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My first thought was to compare two time windows as;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;set diff [ latest(_time)] [ _time &amp;lt; _time - 24h]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However it appears the admon input is on a rising tail mechanism and latest(_time) varies on the last update of the group.  I feel like I'm over thinking this.  Perhaps I just create an alert to show any group with an _time within the last 24 hours, then somehow compare that to the previous record?&lt;/P&gt;

&lt;P&gt;Any advice?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2015 14:04:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Active-Directory-Group-Membership-Alerts/m-p/192349#M3292</guid>
      <dc:creator>mcrawford44</dc:creator>
      <dc:date>2015-03-23T14:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory Group Membership Alerts?</title>
      <link>https://community.splunk.com/t5/Alerting/Active-Directory-Group-Membership-Alerts/m-p/192350#M3293</link>
      <description>&lt;P&gt;You can do this over the Windows Log. &lt;BR /&gt;
&lt;A href="http://www.morgantechspace.com/2013/08/active-directory-change-audit-events.html"&gt;Eventcodes&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2015 15:46:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Active-Directory-Group-Membership-Alerts/m-p/192350#M3293</guid>
      <dc:creator>PPape</dc:creator>
      <dc:date>2015-03-23T15:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory Group Membership Alerts?</title>
      <link>https://community.splunk.com/t5/Alerting/Active-Directory-Group-Membership-Alerts/m-p/192351#M3294</link>
      <description>&lt;P&gt;Well aware of this, however I'd rather use the built in AD monitoring over deploying a forwarder on multiple domain controllers.&lt;/P&gt;

&lt;P&gt;I've made some progress in that I can now compare deltas of the latest event vs. the prior event;&lt;/P&gt;

&lt;P&gt;This grabs the event prior to the latest:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ad_* objectCategory="CN=Group,CN=Schema,CN=Configuration,DC=foo,DC=bar,DC=com" | table cn _time | eventstats latest(_time) AS lasttime | where _time &amp;lt; lasttime | dedup cn
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm now formatting a 'set diff' query to compare the two.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2015 17:46:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Active-Directory-Group-Membership-Alerts/m-p/192351#M3294</guid>
      <dc:creator>mcrawford44</dc:creator>
      <dc:date>2015-03-23T17:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory Group Membership Alerts?</title>
      <link>https://community.splunk.com/t5/Alerting/Active-Directory-Group-Membership-Alerts/m-p/192352#M3295</link>
      <description>&lt;P&gt;I have something working as a scheduled alert;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ad_* objectCategory="CN=Group,CN=Schema,CN=Configuration,DC=foo,DC=bar,DC=com" | fields - _raw | dedup cn | eval splitted=split(member, "|") | mvexpand splitted | eval Zone="Latest" | table cn splitted Zone _time

| append [ | search index=ad_* objectCategory="CN=Group,CN=Schema,CN=Configuration,DC=foo,DC=bat,DC=com" | fields - _raw | eventstats latest(_time) AS latest_timestamp by cn | eval prev_timestamp = strftime(_time, "%Y-%m-%d %I:%M:%S %p") | where _time &amp;lt; latest_timestamp | dedup cn | eval splitted=split(member, "|") | mvexpand splitted | eval Zone="Previous" | table cn splitted Zone _time latest_timestamp ]

| stats values(cn) AS cn, values(Zone) as Zone, values(_time) as Timestamp, values(latest_timestamp) AS latest_timestamp by splitted

| nomv Zone

| search Zone="Previous"

| eval t=now()
| eval t_earliest = (t - 86400 * 1)

| where latest_timestamp&amp;gt;t_earliest
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It can likely be cleaned up, but this is working for both removals and additions of accounts.  The query as is only pulls removals with the "Zone" field set to "Previous".  It's set as a scheduled alert around 6am, and if results are &amp;gt; 0.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2015 18:41:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Active-Directory-Group-Membership-Alerts/m-p/192352#M3295</guid>
      <dc:creator>mcrawford44</dc:creator>
      <dc:date>2015-03-27T18:41:39Z</dc:date>
    </item>
  </channel>
</rss>

