<?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: How do i get the result based on the logon type 3 with no preceding logon type 10 or 2 in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-do-i-get-the-result-based-on-the-logon-type-3-with-no/m-p/441964#M11617</link>
    <description>&lt;P&gt;I had a typo and re-edited to fix it.  You can try this one again or my new one which I think will work better for you.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jul 2019 17:22:53 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-07-08T17:22:53Z</dc:date>
    <item>
      <title>How do i get the result based on the logon type 3 with no preceding logon type 10 or 2</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-i-get-the-result-based-on-the-logon-type-3-with-no/m-p/441960#M11613</link>
      <description>&lt;P&gt;From windows explorer, If i \ in to a server with my admin credentials, that would be log on type 3 that i want to see in my results .&lt;/P&gt;

&lt;P&gt;How can i configure that alert in such a way that there is only type 3 logon with no preceding logon type 10 because when i RDP in to the server i get results for both logon type 3 and preceding logon type 10.&lt;/P&gt;

&lt;P&gt;If i remove the ! from the last statement, i get results whenever i RDP into server:&lt;/P&gt;

&lt;P&gt;| transaction maxspan=2s startswith=Logon_Type="3" endswith= (Logon_Type="10" or Logon_Type="2")&lt;/P&gt;

&lt;P&gt;but i am looking to get results when i "\"  into the server. Any help is appreciated&lt;/P&gt;

&lt;P&gt;EventCode=4624&lt;BR /&gt;
| rex "(?ms)Logon Type:...(?\w+)"&lt;BR /&gt;
| rex "(?ms)New Logon:\s+Security ID:..(?[AEW]+.\w+.\w+)"&lt;BR /&gt;
| where (like (Login_Security_ID,"%mtaqi.a%"))&lt;BR /&gt;
| where Logon_GUID!="{00000000-0000-0000-0000-000000000000}"&lt;BR /&gt;
| transaction maxspan=15s startswith=Logon_Type="3" endswith=(Logon_Type!="10" OR Logon_Type!="2")&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:22:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-i-get-the-result-based-on-the-logon-type-3-with-no/m-p/441960#M11613</guid>
      <dc:creator>massumtaqi</dc:creator>
      <dc:date>2020-09-30T00:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the result based on the logon type 3 with no preceding logon type 10 or 2</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-i-get-the-result-based-on-the-logon-type-3-with-no/m-p/441961#M11614</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=win* EventCode=4624
| rex "(?ms)Logon Type:[\r\n\s]+(?&amp;lt;Logon_Type&amp;gt;\w+)" 
| rex "(?ms)New Logon:[\r\n\s]+Security ID:[\r\n\s]+(?&amp;lt;Login_Security_ID&amp;gt;\S+)"
| streamstats count(eval(Logon_Type=="3")) AS sessionID BY Login_Security_ID
| stats list(*) AS * list(_time) AS time values(Logon_Type) AS LTs BY sessionID Login_Security_ID
| where NOT (LTs IN("2", "10"))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 May 2019 01:35:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-i-get-the-result-based-on-the-logon-type-3-with-no/m-p/441961#M11614</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-05-08T01:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the result based on the logon type 3 with no preceding logon type 10 or 2</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-i-get-the-result-based-on-the-logon-type-3-with-no/m-p/441962#M11615</link>
      <description>&lt;P&gt;Thanks for your response. however, it did not work.&lt;/P&gt;

&lt;P&gt;It shows both events:&lt;/P&gt;

&lt;P&gt;1) when I rdp into the server (logon type 3 with preceding logon type 10)&lt;BR /&gt;
2) when I \ into the server (logon type 3 with no preceding logon type 10)&lt;/P&gt;

&lt;P&gt;How do i accomplish just number 2) ?&lt;/P&gt;

&lt;P&gt;I already accomplished 1) by using this: | transaction maxspan=15s startswith=Logon_Type="3" endswith=(Logon_Type="10" OR Logon_Type="2")&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:23:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-i-get-the-result-based-on-the-logon-type-3-with-no/m-p/441962#M11615</guid>
      <dc:creator>massumtaqi</dc:creator>
      <dc:date>2020-09-30T00:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the result based on the logon type 3 with no preceding logon type 10 or 2</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-i-get-the-result-based-on-the-logon-type-3-with-no/m-p/441963#M11616</link>
      <description>&lt;P&gt;First of all, you don't need to do the &lt;CODE&gt;rex&lt;/CODE&gt; if you have &lt;CODE&gt;Splunk_TA_windows&lt;/CODE&gt; installed so do that first then try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=win* AND EventCode=4624
 | streamstats count(eval(Logon_Type=="3")) AS sessionID BY Security_ID
 | stats list(*) AS * list(_time) AS time values(Logon_Type) AS LTs last(Logon_Type) AS last_Logon_Type BY sessionID Security_ID
 | where (last_Logon_Type=="10" OR last_Logon_Type=="2")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Jul 2019 17:17:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-i-get-the-result-based-on-the-logon-type-3-with-no/m-p/441963#M11616</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-08T17:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the result based on the logon type 3 with no preceding logon type 10 or 2</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-i-get-the-result-based-on-the-logon-type-3-with-no/m-p/441964#M11617</link>
      <description>&lt;P&gt;I had a typo and re-edited to fix it.  You can try this one again or my new one which I think will work better for you.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 17:22:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-i-get-the-result-based-on-the-logon-type-3-with-no/m-p/441964#M11617</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-08T17:22:53Z</dc:date>
    </item>
  </channel>
</rss>

