<?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: Password Spraying alert from Windows Event Logs in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Password-Spraying-alert-from-Windows-Event-Logs/m-p/266977#M51133</link>
    <description>&lt;P&gt;Having a bit of trouble picturing this all the way through, but you probably have a few options (typically the case with Splunk).  Maybe you could use eventstats to get a distinct count of users.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="WinEventLog:Security" EventCode=4625 src_ip!="127.0.0.1" src_ip!="::1" user!="$"
| lookup dnslookup clientip as src_ip 
| stats count as EvtCounts by user, clienthost
| eventstats dc(user) as userCount by clienthost
| where EvtCounts &amp;lt;= 10 AND userCount &amp;gt; 1
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or maybe use mvcount a little later in your search to filter on that mv user field?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="WinEventLog:Security" EventCode=4625 src_ip!="127.0.0.1" src_ip!="::1" user!="$"
| lookup dnslookup clientip as src_ip 
| stats count as EvtCounts by user, clienthost
| where EvtCounts &amp;lt;= 10 
| sort -EvtCounts 
| eval EvtCatCnt = user." (".EvtCounts.")" 
| stats sum(EvtCounts) as Total_Events, values(EvtCatCnt) as user by clienthost 
| where mvcount(user) &amp;gt; 1
...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 22 Oct 2016 12:49:45 GMT</pubDate>
    <dc:creator>maciep</dc:creator>
    <dc:date>2016-10-22T12:49:45Z</dc:date>
    <item>
      <title>Password Spraying alert from Windows Event Logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Password-Spraying-alert-from-Windows-Event-Logs/m-p/266976#M51132</link>
      <description>&lt;P&gt;I am attempting to set an alert to monitor for possible password spraying in my AD environment.&lt;/P&gt;

&lt;P&gt;I am using windows security event logs and specifically eventcode 4625.&lt;/P&gt;

&lt;P&gt;I have created the following search string that does give me a count of events by host, by userid so I can see which hosts are generating failed login events.  &lt;/P&gt;

&lt;P&gt;sourcetype="WinEventLog:Security" EventCode=4625   src_ip!="127.0.0.1"  src_ip!="::1"  user!="&lt;EM&gt;$&lt;/EM&gt;"&lt;BR /&gt;
| lookup  dnslookup clientip as src_ip &lt;BR /&gt;
| stats count as EvtCounts by user, clienthost&lt;BR /&gt;
| where EvtCounts &amp;lt;= 10 &lt;BR /&gt;
| sort -EvtCounts &lt;BR /&gt;
| eval EvtCatCnt = user." (".EvtCounts.")" &lt;BR /&gt;
| stats sum(EvtCounts) as Total_Events, values(EvtCatCnt) as user by clienthost &lt;BR /&gt;
| sort -Total_Events&lt;BR /&gt;&lt;BR /&gt;
| eval clienthost = clienthost." (".Total_Events.")" &lt;BR /&gt;
| table clienthost, user&lt;/P&gt;

&lt;P&gt;I am now trying to limit the results to only show host that have more than 1 user with failed login events.  I am not sure how to limit the initial search with a stats count by host, user where count &amp;gt;= 2 and count &amp;lt; 10 then pass those results to another stats count.&lt;/P&gt;

&lt;P&gt;Any suggestions would be appreciated. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:30:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Password-Spraying-alert-from-Windows-Event-Logs/m-p/266976#M51132</guid>
      <dc:creator>pdumblet</dc:creator>
      <dc:date>2020-09-29T11:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Password Spraying alert from Windows Event Logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Password-Spraying-alert-from-Windows-Event-Logs/m-p/266977#M51133</link>
      <description>&lt;P&gt;Having a bit of trouble picturing this all the way through, but you probably have a few options (typically the case with Splunk).  Maybe you could use eventstats to get a distinct count of users.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="WinEventLog:Security" EventCode=4625 src_ip!="127.0.0.1" src_ip!="::1" user!="$"
| lookup dnslookup clientip as src_ip 
| stats count as EvtCounts by user, clienthost
| eventstats dc(user) as userCount by clienthost
| where EvtCounts &amp;lt;= 10 AND userCount &amp;gt; 1
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or maybe use mvcount a little later in your search to filter on that mv user field?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="WinEventLog:Security" EventCode=4625 src_ip!="127.0.0.1" src_ip!="::1" user!="$"
| lookup dnslookup clientip as src_ip 
| stats count as EvtCounts by user, clienthost
| where EvtCounts &amp;lt;= 10 
| sort -EvtCounts 
| eval EvtCatCnt = user." (".EvtCounts.")" 
| stats sum(EvtCounts) as Total_Events, values(EvtCatCnt) as user by clienthost 
| where mvcount(user) &amp;gt; 1
...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 22 Oct 2016 12:49:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Password-Spraying-alert-from-Windows-Event-Logs/m-p/266977#M51133</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2016-10-22T12:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Password Spraying alert from Windows Event Logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Password-Spraying-alert-from-Windows-Event-Logs/m-p/266978#M51134</link>
      <description>&lt;P&gt;Using your first suggestion worked.  Now I am only seeing hosts with more than a single user account login failure.    Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 12:57:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Password-Spraying-alert-from-Windows-Event-Logs/m-p/266978#M51134</guid>
      <dc:creator>pdumblet</dc:creator>
      <dc:date>2016-10-24T12:57:07Z</dc:date>
    </item>
  </channel>
</rss>

