<?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: Nested Splunk Query - Time of event within  consolidate events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Nested-Splunk-Query-Time-of-event-within-consolidate-events/m-p/367052#M165281</link>
    <description>&lt;P&gt;I usually search many failed logins to find a brute force attack.&lt;/P&gt;

&lt;P&gt;If instead you want to know which creadentials were stuffed, you can add a condition:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=your_index (MESSAGE="login" OR MESSAGE="FAILED")
 | stats count by USERNAME IPADDRESS
 | where count&amp;gt;5 AND MESSAGE="login"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Sun, 12 Nov 2017 11:11:42 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2017-11-12T11:11:42Z</dc:date>
    <item>
      <title>Nested Splunk Query - Time of event within  consolidate events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-Splunk-Query-Time-of-event-within-consolidate-events/m-p/367049#M165278</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;

&lt;P&gt;Sorry relativly new to splunk - and so this query may be a pile of garbage!  To sumerise, i have a query here which is looking for brute force attacks against my website.   The criteria is 5&amp;gt; Unique failed attempted Users, with 1+ Successful usernames over a given time period.  I would like to display as part of this query, the time at which that successful connection occurred.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;..... | dedup _raw,_time,source,host | dedup USERNAME,IPADDRESS | eval SuccessUSERNAME= if((MESSAGE="login"),USERNAME,"") | eval FailedUSERNAME= if((MESSAGE="FAILED"),USERNAME,"")      
|stats count(eval(MESSAGE="FAILED")) as FailedLogon, count(eval(MESSAGE="login")) as SuccessfulLogon, values(SuccessUSERNAME),   by IPADDRESS | search FailedLogon&amp;gt;5 SuccessfulLogon&amp;gt;=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Tried numerous things; suspect that a nested query would be required, but as my knowledge of splunk is very limited, and any help would be much appreciated! &lt;/P&gt;</description>
      <pubDate>Sun, 12 Nov 2017 10:39:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-Splunk-Query-Time-of-event-within-consolidate-events/m-p/367049#M165278</guid>
      <dc:creator>JgTheGreat</dc:creator>
      <dc:date>2017-11-12T10:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Splunk Query - Time of event within  consolidate events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-Splunk-Query-Time-of-event-within-consolidate-events/m-p/367050#M165279</link>
      <description>&lt;P&gt;Hi  JgTheGreat,&lt;BR /&gt;
why don't your try something more easy,:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=your_index (MESSAGE="login" OR MESSAGE="FAILED")
| stats count by USERNAME IPADDRESS
| where count&amp;gt;5
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You coulr run this search as an alarm every 5 minutes (or a smaller period).&lt;BR /&gt;
In this way you're alerted both if there are five logfailed and one login or 5 logfailed&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Sun, 12 Nov 2017 10:50:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-Splunk-Query-Time-of-event-within-consolidate-events/m-p/367050#M165279</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-11-12T10:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Splunk Query - Time of event within  consolidate events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-Splunk-Query-Time-of-event-within-consolidate-events/m-p/367051#M165280</link>
      <description>&lt;P&gt;Not sure that i've fully explained the query.  I'm after the number of unique accounts that are seen attempting to login over that time period.   &lt;/P&gt;

&lt;P&gt;The query is specifically looking for credential stuffing, where the credentials were correct.  Make sense?&lt;/P&gt;</description>
      <pubDate>Sun, 12 Nov 2017 11:00:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-Splunk-Query-Time-of-event-within-consolidate-events/m-p/367051#M165280</guid>
      <dc:creator>JgTheGreat</dc:creator>
      <dc:date>2017-11-12T11:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Splunk Query - Time of event within  consolidate events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-Splunk-Query-Time-of-event-within-consolidate-events/m-p/367052#M165281</link>
      <description>&lt;P&gt;I usually search many failed logins to find a brute force attack.&lt;/P&gt;

&lt;P&gt;If instead you want to know which creadentials were stuffed, you can add a condition:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=your_index (MESSAGE="login" OR MESSAGE="FAILED")
 | stats count by USERNAME IPADDRESS
 | where count&amp;gt;5 AND MESSAGE="login"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Sun, 12 Nov 2017 11:11:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-Splunk-Query-Time-of-event-within-consolidate-events/m-p/367052#M165281</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-11-12T11:11:42Z</dc:date>
    </item>
  </channel>
</rss>

