<?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 can I detect a successful login after multiple failed logins? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282714#M85369</link>
    <description>&lt;P&gt;not sure if you have sorted this ... on the unix one, how about the below:  (assuming success comes within 90s)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search | stats list(action) AS Attempts, count(eval(match(action,"failed password"))) AS Failed, count(eval(match(action,"accepted password"))) AS Success by user,host,_time | transaction host user maxspan=90s | where mvcount(Attempts)&amp;gt;=2 AND mvcount(Success)&amp;gt;=1 AND mvcount(Failed)&amp;gt;=1 | table _time, host, user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;you can remove &lt;CODE&gt;|&lt;/CODE&gt; after 90s and check the events an change where clause accordingly.&lt;/P&gt;</description>
    <pubDate>Wed, 31 Aug 2016 22:24:09 GMT</pubDate>
    <dc:creator>lakshman239</dc:creator>
    <dc:date>2016-08-31T22:24:09Z</dc:date>
    <item>
      <title>How to detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282704#M85359</link>
      <description>&lt;P&gt;Hello, fellow splunkers!&lt;/P&gt;
&lt;P&gt;What I am trying to do is to detect a successful login after multiple failed attempts. I've been trying to get a working search for Windows and Linux but wasn't very successful.&lt;/P&gt;
&lt;P&gt;For Linux I found a search posted as answer to a similar question from 2011. I adapted it and at least it does something - but not quite what I want.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;"failed password" OR "accepted password"| stats  list(action) as list by host, user  | eval  list = mvjoin(list, " ")  | eval  alert = if(match(list, " (?:failure\s?){3,}"), "True", "False")
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It is supposed to write True in the last column, if there are 3 or more failed logins followed by a successful login. However, no matter what I try, the list it tries to match always contains two failures followed by one success, so that the matching condition is never met. (see screenshot for clarification)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="list"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1045i96C3830E1F762945/image-size/large?v=v2&amp;amp;px=999" role="button" title="list" alt="list" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;For Windows, I tried writing my own search by using transactions.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;(eventtype="win_logon_failed" OR eventtype="win_logon_success") AND (NOT user=HealthMailbox* NOT user=*$*)|stats count by Account_Name, src| where count &amp;gt; 5 | transaction Account_Name startswith=eval(EventCode=4625) endswith=eval(EventCode=4624)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The problem I am facing in this case, is that I can't seem to tell Splunk that there need to be a total of at least 6 Events (5 failed + 1 successful logins).&lt;/P&gt;
&lt;P&gt;Can anyone please tell me how to write such queries correctly?&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 17:15:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282704#M85359</guid>
      <dc:creator>janedoe887</dc:creator>
      <dc:date>2022-02-22T17:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282705#M85360</link>
      <description>&lt;P&gt;This is what I would do.&lt;/P&gt;

&lt;P&gt;Linux (minor change to make sure there's a success taking place after your 3 or more failures):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=bar "failed password" OR "accepted password"
| stats  list(action) as list by host, user  
| eval  list = mvjoin(list, " ")  
| eval  alert = if(match(list, "(?:failure\s?){3,}(?:success)"), "True", "False")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Windows (same logic as above but using the eventtype field):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; (eventtype="win_logon_failed" OR eventtype="win_logon_success") AND (NOT user=HealthMailbox* NOT user=*$*)
| stats list(eventtype) as list by Account_Name, host
| eval  list = mvjoin(list, " ")  
| eval  alert = if(match(list, "(?:win_logon_failed\s?){3,}(?:win_logon_success)"), "True", "False")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Both will alert if there are 3 or more consecutive login failures and then a successful one for any given user name and host.&lt;BR /&gt;
Feel free to tweak it to match your requirements.&lt;/P&gt;

&lt;P&gt;Hope that helps.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2016 15:01:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282705#M85360</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-02-16T15:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282706#M85361</link>
      <description>&lt;P&gt;Thanks a lot for your answering so quickly! &lt;/P&gt;

&lt;P&gt;Unfortunately, the searches dont't work quite as expected:&lt;/P&gt;

&lt;P&gt;The linux one still does the same weird thing: I tried logging on with wrong credentials three times, the 4th time I used proper credentials and logged on. The resulting list contains:  success failure failure success when it should be failure, failure, failure, success. Therefore, the last column stays at False no matter what.&lt;/P&gt;

&lt;P&gt;The windows one is even worse: the list contains so many eventtypes that there is no way that win_logon_failed is followed by win_logon_success...&lt;/P&gt;

&lt;P&gt;One entry looks like this:&lt;BR /&gt;
msad-nt6-successful-user-logons msad-successful-user-logons windows_authentication_events windows_logon_success wineventlog_security wineventlog_windows winsec win_logon_combined win_logon_success msad-nt6-successful-user-logons msad-successful-user-logons windows_authentication_events windows_logon_success wineventlog_security wineventlog_windows winsec win_logon_combined win_logon_success msad-nt6-successful-user-logons msad-successful-user-logons windows_authentication_events windows_logon_success wineventlog_security wineventlog_windows winsec win_logon_combined win_logon_success msad-failed-user-logons msad-nt6-failed-user-logons nix_errors windows_authentication_events windows_logon_failure wineventlog_security wineventlog_windows winsec win_logon_combined win_logon_failed msad-failed-user-logons msad-nt6-failed-user-logons nix_errors windows_authentication_events windows_logon_failure wineventlog_security wineventlog_windows winsec win_logon_combined win_logon_failed msad-failed-user-logons msad-nt6-failed-user-logons nix_errors windows_authentication_events windows_logon_failure wineventlog_security wineventlog_windows winsec win_logon_combined win_logon_failed&lt;/P&gt;

&lt;P&gt;I am really at a loss...&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:45:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282706#M85361</guid>
      <dc:creator>janedoe887</dc:creator>
      <dc:date>2020-09-29T08:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282707#M85362</link>
      <description>&lt;P&gt;Try this (for windows; you will have to adjust for *NIX):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EventCode=4768 OR EventCode=4771 OR EventCode=4776

| eval TargetDomain=upper(coalesce(Supplied_Realm_Name, Service_Name, "-"))
| eval TargetObject=upper(coalesce(Account_Name, Logon_Account, "-"))
| rex mode=sed field=TargetDomain "s/\..*//"
| rex mode=sed field=TargetDomain "s%KRBTGT/%%"
| eval CombinedTarget = TargetDomain . "\\" . TargetObject

| eval LoginAttemptResult=if((action="failure" OR Keywords="Audit Failure" OR EventCode=4771), "FAILED", "SUCCESSFUL")
| streamstats count(eval(LoginAttemptResult="SUCCESSFUL")) AS LoginSessionID BY CombinedTarget
| eventstats latest(_time) AS mostRecentTime latest(LoginAttemptResult) AS mostRecentResult count(eval(LoginAttemptResult="FAILED")) AS NumFailuresBeforeSuccessOrAbandon by LoginSessionID CombinedTarget

| where mostRecentResult="SUCCESSFUL"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Feb 2016 16:10:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282707#M85362</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-02-16T16:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282708#M85363</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Sorry but I don't really have a lab to test your queries so for the Windows one I would use the one @woodcock answered below. The error you are getting about the rex command is probably here:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex mode=sed field=TargetDomain "s%KRBTGT/%%"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As it should be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex mode=sed field=TargetDomain "s/%KRBTGT/%%"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With regards to the linux query, try visualising your results in a table first and see if that makes any sense:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=bar "failed password" OR "accepted password"
| table _time, host, user, action
| sort -limit=0 host, user, _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There's no transformation taking place there so if you are generating 3 or 4 failures and then one success, you should be able to see it. Feel free to post the output here if you are not sure what's going on.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
J&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 11:08:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282708#M85363</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-02-17T11:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282709#M85364</link>
      <description>&lt;P&gt;You are incorrect about any mistake being in that command .  The &lt;CODE&gt;sed&lt;/CODE&gt; command can use other characters than &lt;CODE&gt;/&lt;/CODE&gt; for the &lt;CODE&gt;separator&lt;/CODE&gt;, including &lt;CODE&gt;%&lt;/CODE&gt;.  I double-checked and there is nothing at all wrong with that line of my solution.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 23:31:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282709#M85364</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-02-19T23:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282710#M85365</link>
      <description>&lt;P&gt;There was another tiny typo (&lt;CODE&gt;cont&lt;/CODE&gt; instead of &lt;CODE&gt;count&lt;/CODE&gt;) that I have now fixed by re-editing.  I stand completely by the above answer for Windows.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 23:36:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282710#M85365</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-02-19T23:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282711#M85366</link>
      <description>&lt;P&gt;Talking about tiny typos: there is another one: count(eval(LoginAttemptResult="SUCCESFUL"))  --&amp;gt; SUCCES*&lt;EM&gt;S&lt;/EM&gt;*FUL&lt;/P&gt;

&lt;P&gt;Also, could you please explain how this search works or what exactly it is looking for? I thought, EventCode=4624 marks a successful login and EventCode=4625 is a failed login. Your search, however, looks for 4771 and 4776 which are some Kerberos ticket events if I am not mistaken.&lt;BR /&gt;
How do you check for multiple failed logins followed by a successful one?  &lt;/P&gt;

&lt;P&gt;Basically, the search works now - as in, it returns  "something". I am not sure, if the results are what I am looking for because they contain both failed and successful logins which is the same as if I am searching for EventCode=4624 OR EventCode=4625. I am actually looking for a search that returns 1 Event if there were multipe failed logins followed by one successful login.&lt;BR /&gt;
Could you please explain what the search results mean? What is the difference to just searching for the mentioned EventCodes?&lt;/P&gt;

&lt;P&gt;I am sorry for asking so many questions but I would really like to understand the search in order to learn something new instead of just copying and pasting it.&lt;/P&gt;

&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:51:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282711#M85366</guid>
      <dc:creator>janedoe887</dc:creator>
      <dc:date>2020-09-29T08:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282712#M85367</link>
      <description>&lt;P&gt;Thanks for your input javiergn!&lt;/P&gt;

&lt;P&gt;The Linux query results something like:&lt;/P&gt;

&lt;P&gt;2016-02-16 14:01:30 splunk02    testuser failure&lt;BR /&gt;
2016-02-16 14:02:00 splunk02    testuser    failure&lt;BR /&gt;
2016-02-16 14:02:05 splunk02    testuser    success&lt;/P&gt;

&lt;P&gt;How would I manage to write a query that returns a single event if multiple failed logins (from one user on one machine) are  followed by a successful one?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 14:13:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282712#M85367</guid>
      <dc:creator>janedoe887</dc:creator>
      <dc:date>2016-02-22T14:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282713#M85368</link>
      <description>&lt;P&gt;Good catch on the typo; I went back and fixed it (re-edited).&lt;/P&gt;

&lt;P&gt;You can modify the events included (the very first search portion) and also the assignment of the values for &lt;CODE&gt;LoginAttemptResult&lt;/CODE&gt; to make sure that each event either has &lt;CODE&gt;FAILED&lt;/CODE&gt; or &lt;CODE&gt;SUCCESSFUL&lt;/CODE&gt; and then it should work for your particular events.  In my case, I was given the subset of events to qualify and did not question them (given to me by Windows Event SME) but perhaps I should have.  Please do update this with a comment when you figure out a final solution that works for you.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 18:45:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282713#M85368</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-02-22T18:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282714#M85369</link>
      <description>&lt;P&gt;not sure if you have sorted this ... on the unix one, how about the below:  (assuming success comes within 90s)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search | stats list(action) AS Attempts, count(eval(match(action,"failed password"))) AS Failed, count(eval(match(action,"accepted password"))) AS Success by user,host,_time | transaction host user maxspan=90s | where mvcount(Attempts)&amp;gt;=2 AND mvcount(Success)&amp;gt;=1 AND mvcount(Failed)&amp;gt;=1 | table _time, host, user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;you can remove &lt;CODE&gt;|&lt;/CODE&gt; after 90s and check the events an change where clause accordingly.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 22:24:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282714#M85369</guid>
      <dc:creator>lakshman239</dc:creator>
      <dc:date>2016-08-31T22:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282715#M85370</link>
      <description>&lt;P&gt;I might be wrong but in your query you either have to change the regex or ad a "| reverse" at the beginning of the query as the list command lists from youngest to oldest value resulting the rex in your sample to fail as the youngest result is a "success" no?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 14:09:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282715#M85370</guid>
      <dc:creator>claudio_manig</dc:creator>
      <dc:date>2017-11-30T14:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282716#M85371</link>
      <description>&lt;P&gt;Thanks alot for this. Had to redo some stuff to fit my use case but nice writeup nonetheless.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 13:27:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282716#M85371</guid>
      <dc:creator>christoffertoft</dc:creator>
      <dc:date>2018-01-16T13:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282717#M85372</link>
      <description>&lt;P&gt;@woodcock what is the purpose of mostRecentTime?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 13:46:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282717#M85372</guid>
      <dc:creator>christoffertoft</dc:creator>
      <dc:date>2018-01-16T13:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282718#M85373</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;

&lt;P&gt;Please find the updated query . This query will only alert if you have authentications like Login_Failure multiple times followed by Login activity&lt;/P&gt;

&lt;P&gt;index=citrix  citrix_netscaler_event_name=LOGIN_FAILED OR citrix_netscaler_event_name=LOGIN |eval Citrix_Browser=coalesce(Browser,Browser_type)| stats list(citrix_netscaler_event_name) as  action list(Citrix_Browser) as Citrix_Browser  by  _time Citrix_User | sort - _time   | stats list(_time) as time list(action) as action dc(action) as action_value list(Citrix_Browser) as Citrix_Browser by Citrix_User | convert ctime(time) |  eval  Action_Done = mvjoin(action," ")  |eval Alert = if(match(Action_Done, "(?:LOGIN_FAILED\s?){2,}(?:LOGIN)"), "True", "False") | sort - _time | where Alert="True" and  action_value &amp;gt; 1 | fields - action_value&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:13:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282718#M85373</guid>
      <dc:creator>renjujacob88</dc:creator>
      <dc:date>2020-09-29T18:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282719#M85374</link>
      <description>&lt;P&gt;@woodcock Thank you so so much . been fighting for this with Autoregress and other stuff . my requirement was to find 6th successfull login after 5 failed logins.&lt;/P&gt;

&lt;P&gt;I can use this just that i need to add a few other event codes 4625 for failed login and 4624 for success login&lt;/P&gt;

&lt;P&gt;Thank you so much.&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 07:52:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282719#M85374</guid>
      <dc:creator>suryaavinash</dc:creator>
      <dc:date>2018-05-09T07:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282720#M85375</link>
      <description>&lt;P&gt;Context.  After that &lt;CODE&gt;evenstats&lt;/CODE&gt; call, any/every event has the details of the matching "latest" event.  This allows many sorts of final logic (not necessarily needed for this one).&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 14:08:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/282720#M85375</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-05-09T14:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/522254#M147263</link>
      <description>&lt;P&gt;Putting these links here as they helped me greatly in creating a search to meet the question raised by OP.&lt;/P&gt;&lt;P&gt;&lt;A href="https://conf.splunk.com/files/2017/recordings/advanced-splunk-searching-for-security-hunting-and-alerting.mp4" target="_blank"&gt;https://conf.splunk.com/files/2017/recordings/advanced-splunk-searching-for-security-hunting-and-alerting.mp4&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Accompanying slides&lt;/P&gt;&lt;P&gt;&lt;A href="https://conf.splunk.com/files/2017/slides/advanced-splunk-searching-for-security-hunting-and-alerting.pdf" target="_blank"&gt;https://conf.splunk.com/files/2017/slides/advanced-splunk-searching-for-security-hunting-and-alerting.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Note that you just have to reverse the success / failure logic since the video used multiple successes followed by failure as an example.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 12:58:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/522254#M147263</guid>
      <dc:creator>pongc</dc:creator>
      <dc:date>2020-09-30T12:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I detect a successful login after multiple failed logins?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/586081#M204166</link>
      <description>&lt;P&gt;use maxevents command&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 16:38:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-detect-a-successful-login-after-multiple-failed-logins/m-p/586081#M204166</guid>
      <dc:creator>dilumajeed</dc:creator>
      <dc:date>2022-02-22T16:38:24Z</dc:date>
    </item>
  </channel>
</rss>

