<?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 Removing events with duplicate fields from transaction command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Removing-events-with-duplicate-fields-from-transaction-command/m-p/260185#M77979</link>
    <description>&lt;P&gt;Hi all, &lt;BR /&gt;
I am writing a query to detect brute force attempts, where the username is different in each request. &lt;BR /&gt;
index=syslog username!="NULL" | transaction clientip maxspan=60m maxpause=2m  | stats count by clientip | search count &amp;gt;5 | sort count desc&lt;/P&gt;

&lt;P&gt;This is giving me if someone has typed in same username within 2 mins, i want to avoid those. So i want to know if someone tried to login more than 5 times with different usernames from the same IP. &lt;/P&gt;

&lt;P&gt;I tried my luck with dedup,  but it doesn't seem to be working. &lt;BR /&gt;
index=syslog  username!="NULL" | transaction clientip maxspan=60m maxpause=2m | dedup username | stats count by clientip | search count &amp;gt;5 | sort count desc&lt;/P&gt;

&lt;P&gt;Thank You &lt;/P&gt;</description>
    <pubDate>Wed, 07 Oct 2015 03:40:53 GMT</pubDate>
    <dc:creator>dineshp</dc:creator>
    <dc:date>2015-10-07T03:40:53Z</dc:date>
    <item>
      <title>Removing events with duplicate fields from transaction command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Removing-events-with-duplicate-fields-from-transaction-command/m-p/260185#M77979</link>
      <description>&lt;P&gt;Hi all, &lt;BR /&gt;
I am writing a query to detect brute force attempts, where the username is different in each request. &lt;BR /&gt;
index=syslog username!="NULL" | transaction clientip maxspan=60m maxpause=2m  | stats count by clientip | search count &amp;gt;5 | sort count desc&lt;/P&gt;

&lt;P&gt;This is giving me if someone has typed in same username within 2 mins, i want to avoid those. So i want to know if someone tried to login more than 5 times with different usernames from the same IP. &lt;/P&gt;

&lt;P&gt;I tried my luck with dedup,  but it doesn't seem to be working. &lt;BR /&gt;
index=syslog  username!="NULL" | transaction clientip maxspan=60m maxpause=2m | dedup username | stats count by clientip | search count &amp;gt;5 | sort count desc&lt;/P&gt;

&lt;P&gt;Thank You &lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 03:40:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Removing-events-with-duplicate-fields-from-transaction-command/m-p/260185#M77979</guid>
      <dc:creator>dineshp</dc:creator>
      <dc:date>2015-10-07T03:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Removing events with duplicate fields from transaction command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Removing-events-with-duplicate-fields-from-transaction-command/m-p/260186#M77980</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I don't have logfiles to recreate your scenario, so I can't test this, but would this work?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=syslog username!="NULL" | transaction clientip maxspan=60m maxpause=2m | stats count as ipcount dc(username) as usercount by clientip | where ipcount&amp;gt;5 AND usercount&amp;gt;5
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That would only catch cases where each login was tried with a different username though, perhaps usercount&amp;gt;3 or something would be nice.&lt;/P&gt;

&lt;P&gt;Hth,&lt;BR /&gt;
Kai.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 10:12:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Removing-events-with-duplicate-fields-from-transaction-command/m-p/260186#M77980</guid>
      <dc:creator>knielsen</dc:creator>
      <dc:date>2015-10-07T10:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Removing events with duplicate fields from transaction command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Removing-events-with-duplicate-fields-from-transaction-command/m-p/260187#M77981</link>
      <description>&lt;P&gt;Pretty sure this will do what you want...&lt;/P&gt;

&lt;P&gt;index=syslog username!="NULL" | transaction clientip maxspan=60m maxpause=2m | stats dc(clientip) AS "Client IP" values(username) AS "User Name" dc(username) AS "usernames" by clientip | where usernames &amp;gt; 5 | table clientip, "User Name"&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 19:10:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Removing-events-with-duplicate-fields-from-transaction-command/m-p/260187#M77981</guid>
      <dc:creator>mydog8it</dc:creator>
      <dc:date>2015-10-07T19:10:32Z</dc:date>
    </item>
  </channel>
</rss>

