<?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: I would like to find out failed login attempts with Event Code (4625) here the condition is failed login attempts with in one hour and if the failed attempts less than that what ever the event code present in the index will be displayed.? in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454101#M6377</link>
    <description>&lt;P&gt;one more thing if keep&lt;BR /&gt;
| stats count last(hourDay) as timestamp by user, HourDay, EventCode, Account_Domain, Account_Name, dvc_owner,dvc_bunit,dvc_ip, subject, dvc&lt;/P&gt;

&lt;P&gt;I am not able to see any statistics if I keep |fields -HourDay. if I remove |fields -HourDay and keep |stats as it is I am not able to see any statistics as well.&lt;/P&gt;

&lt;P&gt;If I move |stats to last line and remove |filelds -HourDay then I am getting statistics.so please suggest me how to do this.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 01:13:45 GMT</pubDate>
    <dc:creator>90509</dc:creator>
    <dc:date>2020-09-30T01:13:45Z</dc:date>
    <item>
      <title>I would like to find out failed login attempts with Event Code (4625) here the condition is failed login attempts with in one hour and if the failed attempts less than that what ever the event code present in the index will be displayed.?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454096#M6372</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I would like to find out failed login attempts with Event Code (4625) , here the condition is &lt;STRONG&gt;failed login attempts happen with in one hour which are &amp;gt;6 should represent with 4625 and if the failed login attempts less than 6&amp;lt; then what ever the event code which is presented in that index will be displayed&lt;/STRONG&gt;.I have got  first part of the condition but how could I display how many times a event code happens in that index if the user tried to access?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;the first part of the query:&lt;/STRONG&gt;&lt;BR /&gt;
index="..........." AND sourcetype=".........." AND tag=pci AND  NOT ((user=null) OR (tag=..........))  AND EventCode=4625 &lt;BR /&gt;
| fillnull value="N/A" &lt;BR /&gt;
| bin _time span=1hr as HourDay &lt;BR /&gt;
| eval hourDay=strftime(HourDay,"%m-%d-%y %H:%M:%S") &lt;BR /&gt;
| stats count last(hourDay) as timestamp by user, HourDay, EventCode, Account_Domain, Account_Name, dvc_owner,dvc_bunit,dvc_ip, subject, dvc&lt;BR /&gt;
| where count&amp;gt;6 &lt;BR /&gt;
| fields - HourDay &lt;BR /&gt;
| search NOT &lt;BR /&gt;
[| inputlookup PCI_service_accounts_list.csv &lt;BR /&gt;
| rename service_accounts as user]&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Second part of the Query:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;searchindex="..........." AND sourcetype=".........." AND tag=pci AND  NOT ((user=null) OR (tag=..........)) AND EventCode=4720 OR EventCode=4722 OR EventCode=4738&lt;BR /&gt;
| fillnull value="N/A" &lt;BR /&gt;
| bin _time span=1hr as HourDay &lt;BR /&gt;
| eval hourDay=strftime(HourDay,"%m-%d-%y %H:%M:%S") &lt;BR /&gt;
| stats count last(hourDay) as timestamp by user, HourDay, EventCode, Account_Domain, Account_Name, dvc_owner,dvc_bunit,dvc_ip, subject, dvc&lt;BR /&gt;
| where count&amp;gt;1 &lt;BR /&gt;
| fields - HourDay &lt;BR /&gt;
| search NOT &lt;BR /&gt;
[| inputlookup PCI_service_accounts_list.csv &lt;BR /&gt;
| rename service_accounts as user]&lt;/P&gt;

&lt;P&gt;please let me know how do i perform these two search in a single search bar with defined conditions. if it won't work please let me know best search method.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:09:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454096#M6372</guid>
      <dc:creator>90509</dc:creator>
      <dc:date>2020-09-30T01:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: I would like to find out failed login attempts with Event Code (4625) here the condition is failed login attempts with in one hour and if the failed attempts less than that what ever the event code present in the index will be displayed.?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454097#M6373</link>
      <description>&lt;OL&gt;
&lt;LI&gt;If you're filtering out anything, it's best to do it as early as possible.  By filtering out users at the end instead of the base search you're spending computation time on results you're going to then remove. I moved the last ("search NOT [| inputlookup ...." to your base search to avoid this.&lt;/LI&gt;
&lt;LI&gt;I also changed the "AND NOT ((user=null) ..." , the NOT operator is less efficient and since the user field should exist in all the events it can be used here. Use the "NOT" operator where you want to include events where a field doesn't exist.  I left the NOT operator in for the tags, since tags may not always exist in some events.&lt;/LI&gt;
&lt;LI&gt;The search command "user!=null" or "NOT user=null" will filter out any events where the user is literally named "null".  If you have an account named null and you want to exclude it, this will work.  If you want to only include fields where "user" is a field that exists, you can just search with "user=*" instead.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;You can combine the searches and just use the search command with the OR operator to account for both conditions:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="..........." AND sourcetype=".........." AND tag=pci AND user!=null NOT (tag=..........) (EventCode=4720 OR EventCode=4722 OR EventCode=4738 OR EventCode=4625)  NOT [| inputlookup PCI_service_accounts_list.csv | rename service_accounts as user]
| fillnull value="N/A" user, dvc_owner, dvc_bunit, dvc_ip, subject, dvc
| bin _time span=1hr as HourDay
| eval hourDay=strftime(HourDay,"%m-%d-%y %H:%M:%S") 
| stats count last(hourDay) as timestamp by user, HourDay, EventCode, Account_Domain, Account_Name, dvc_owner,dvc_bunit,dvc_ip, subject, dvc 
| search (EventCode=4625 count&amp;gt;6) OR (EventCode!=4625 count&amp;gt;1)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Jul 2019 16:21:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454097#M6373</guid>
      <dc:creator>wenthold</dc:creator>
      <dc:date>2019-07-02T16:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: I would like to find out failed login attempts with Event Code (4625) here the condition is failed login attempts with in one hour and if the failed attempts less than that what ever the event code present in the index will be displayed.?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454098#M6374</link>
      <description>&lt;P&gt;searchindex="..........." AND sourcetype=".........." AND tag=pci AND NOT ((user=null) OR (tag=..........)) AND EventCode=4720 OR EventCode=4722 OR EventCode=4738 OR EventCode=4625 NOT [| inputlookup PCI_service_accounts_list.csv | rename service_accounts as user]&lt;BR /&gt;
| fillnull value="N/A" &lt;BR /&gt;
| bin _time span=1hr as HourDay &lt;BR /&gt;
| eval hourDay=strftime(HourDay,"%m-%d-%y %H:%M:%S") &lt;BR /&gt;
| eval failed_login_count=if(searchmatch("EventCode=4625"),1,0)&lt;BR /&gt;
| eventstats sum(failed_login_count) as total_failed_login_count&lt;BR /&gt;
| eval other_event_count=if(searchmatch("EventCode!=4625"),1,0)&lt;BR /&gt;
| eventstats sum(other_event_count) as total_other_event_count&lt;BR /&gt;
| stats count last(hourDay) as timestamp by user, HourDay, EventCode, Account_Domain, Account_Name, dvc_owner,dvc_bunit,dvc_ip, subject, dvc&lt;BR /&gt;
| where total_failed_login_count&amp;gt;6 OR  total_other_event_count&amp;gt;1 AND total_other_event_count&amp;lt;6&lt;BR /&gt;
| fields - HourDay  &lt;/P&gt;

&lt;P&gt;Try this and let me know if you have any problem with it.&lt;BR /&gt;
Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:09:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454098#M6374</guid>
      <dc:creator>sandeepmakkena</dc:creator>
      <dc:date>2020-09-30T01:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: I would like to find out failed login attempts with Event Code (4625) here the condition is failed login attempts with in one hour and if the failed attempts less than that what ever the event code present in the index will be displayed.?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454099#M6375</link>
      <description>&lt;P&gt;Thanks for your assistance but the code only showing &amp;lt;6 failed attempts  and which is only showing 4625 I am not able to see remaining event codes, so how could we overcome this. &lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 12:41:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454099#M6375</guid>
      <dc:creator>90509</dc:creator>
      <dc:date>2019-07-03T12:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: I would like to find out failed login attempts with Event Code (4625) here the condition is failed login attempts with in one hour and if the failed attempts less than that what ever the event code present in the index will be displayed.?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454100#M6376</link>
      <description>&lt;P&gt;Thanks for your assistance but the code only showing &amp;lt;6 failed attempts  and which is only showing 4625 I am not able to see remaining event codes, so how could we overcome this. &lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 12:41:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454100#M6376</guid>
      <dc:creator>90509</dc:creator>
      <dc:date>2019-07-03T12:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: I would like to find out failed login attempts with Event Code (4625) here the condition is failed login attempts with in one hour and if the failed attempts less than that what ever the event code present in the index will be displayed.?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454101#M6377</link>
      <description>&lt;P&gt;one more thing if keep&lt;BR /&gt;
| stats count last(hourDay) as timestamp by user, HourDay, EventCode, Account_Domain, Account_Name, dvc_owner,dvc_bunit,dvc_ip, subject, dvc&lt;/P&gt;

&lt;P&gt;I am not able to see any statistics if I keep |fields -HourDay. if I remove |fields -HourDay and keep |stats as it is I am not able to see any statistics as well.&lt;/P&gt;

&lt;P&gt;If I move |stats to last line and remove |filelds -HourDay then I am getting statistics.so please suggest me how to do this.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:13:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454101#M6377</guid>
      <dc:creator>90509</dc:creator>
      <dc:date>2020-09-30T01:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: I would like to find out failed login attempts with Event Code (4625) here the condition is failed login attempts with in one hour and if the failed attempts less than that what ever the event code present in the index will be displayed.?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454102#M6378</link>
      <description>&lt;P&gt;| stats count last(hourDay) as timestamp by user, HourDay, EventCode, Account_Domain, Account_Name, dvc_owner,dvc_bunit,dvc_ip, subject, dvc&lt;/P&gt;

&lt;P&gt;if I move |stats to last line  then I am getting statistics.so please suggest me best way.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:13:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454102#M6378</guid>
      <dc:creator>90509</dc:creator>
      <dc:date>2020-09-30T01:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: I would like to find out failed login attempts with Event Code (4625) here the condition is failed login attempts with in one hour and if the failed attempts less than that what ever the event code present in the index will be displayed.?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454103#M6379</link>
      <description>&lt;P&gt;I don't think you need this |filelds -HourDay.&lt;/P&gt;

&lt;P&gt;| where total_failed_login_count&amp;gt;6 OR total_other_event_count&amp;gt;1 can you just this condition. I am sorry, I don't have relevant data to test it.&lt;BR /&gt;&lt;BR /&gt;
Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:13:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454103#M6379</guid>
      <dc:creator>sandeepmakkena</dc:creator>
      <dc:date>2020-09-30T01:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: I would like to find out failed login attempts with Event Code (4625) here the condition is failed login attempts with in one hour and if the failed attempts less than that what ever the event code present in the index will be displayed.?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454104#M6380</link>
      <description>&lt;P&gt;I had set the last search command criteria wrong.&lt;/P&gt;

&lt;P&gt;I had set it to "| search (EventCode=4625 count&amp;gt;6) OR (EventCode!=4625 count&amp;gt;2)" but looking back at your original post, your second search was filtering with "| where count&amp;gt;1".&lt;/P&gt;

&lt;P&gt;I've updated my response to change it to " "| search (EventCode=4625 count&amp;gt;6) OR (EventCode!=4625 count&amp;gt;1)"&lt;/P&gt;

&lt;P&gt;If you still don't get results, simplify the search to look for what isn't there to see if you can find out why.  To test, remove the 4625 event criteria from the base search, and remove the filter looking for count&amp;gt;1 and see if you get anything:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="..........." AND sourcetype=".........." AND tag=pci AND user!=null NOT (tag=..........)  (EventCode=4720 OR EventCode=4722 OR EventCode=4738)  NOT  [| inputlookup PCI_service_accounts_list.csv | rename service_accounts as user]
 | fillnull value="N/A" user, dvc_owner, dvc_bunit, dvc_ip, subject, dvc
 | bin _time span=1hr as HourDay
 | eval hourDay=strftime(HourDay,"%m-%d-%y %H:%M:%S") 
 | stats count last(hourDay) as timestamp by user, HourDay, EventCode, Account_Domain, Account_Name, dvc_owner,dvc_bunit,dvc_ip, subject, dvc 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you do see the kind of results you expect then add the count&amp;gt;1 back in:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="..........." AND sourcetype=".........." AND tag=pci AND user!=null NOT (tag=..........)  (EventCode=4720 OR EventCode=4722 OR EventCode=4738)  NOT [| inputlookup PCI_service_accounts_list.csv | rename service_accounts as user]
 | fillnull value="N/A" user, dvc_owner, dvc_bunit, dvc_ip, subject, dvc
 | bin _time span=1hr as HourDay
 | eval hourDay=strftime(HourDay,"%m-%d-%y %H:%M:%S") 
 | stats count last(hourDay) as timestamp by user, HourDay, EventCode, Account_Domain, Account_Name, dvc_owner,dvc_bunit,dvc_ip, subject, dvc 
 | search count&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and if that works, then the (updated) full search I provided should work.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 13:51:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/I-would-like-to-find-out-failed-login-attempts-with-Event-Code/m-p/454104#M6380</guid>
      <dc:creator>wenthold</dc:creator>
      <dc:date>2019-07-03T13:51:46Z</dc:date>
    </item>
  </channel>
</rss>

