<?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 Multisearch - Brute Force Attempts for both Linux and Windows in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Multisearch-Brute-Force-Attempts-for-both-Linux-and-Windows/m-p/324379#M5770</link>
    <description>&lt;P&gt;I am trying to create an alert to monitor for brute force attempt behavior for both linux and windows systems using a multisearch to stack my queries.  I currently use the following query for Linux but do not have a goto windows alert that works and had a hard time finding one on answers...&lt;/P&gt;

&lt;P&gt;Linux system Brute Force query : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="linux_secure" process=sshd "password for" | rex field=_raw "(?&amp;lt;result&amp;gt;Accepted|Failed) password for (?&amp;lt;user&amp;gt;\w+) from (?&amp;lt;src&amp;gt;[0-9A-Fa-f:\.]+)" |eval success=if(result=="Failed",0,1), fail=if(result=="Failed",1,0) |stats range(_time) as range_secs sum(success) as success, sum(fail) as fail by host src |where fail!=0 |eval fail_rate_in_seconds=round(range_secs/fail,2) |where fail&amp;gt;10 AND success&amp;gt;0 | iplocation src |table host src success fail fail_rate_in_seconds Country
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 24 Oct 2017 02:23:17 GMT</pubDate>
    <dc:creator>johnward4</dc:creator>
    <dc:date>2017-10-24T02:23:17Z</dc:date>
    <item>
      <title>Multisearch - Brute Force Attempts for both Linux and Windows</title>
      <link>https://community.splunk.com/t5/Alerting/Multisearch-Brute-Force-Attempts-for-both-Linux-and-Windows/m-p/324379#M5770</link>
      <description>&lt;P&gt;I am trying to create an alert to monitor for brute force attempt behavior for both linux and windows systems using a multisearch to stack my queries.  I currently use the following query for Linux but do not have a goto windows alert that works and had a hard time finding one on answers...&lt;/P&gt;

&lt;P&gt;Linux system Brute Force query : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="linux_secure" process=sshd "password for" | rex field=_raw "(?&amp;lt;result&amp;gt;Accepted|Failed) password for (?&amp;lt;user&amp;gt;\w+) from (?&amp;lt;src&amp;gt;[0-9A-Fa-f:\.]+)" |eval success=if(result=="Failed",0,1), fail=if(result=="Failed",1,0) |stats range(_time) as range_secs sum(success) as success, sum(fail) as fail by host src |where fail!=0 |eval fail_rate_in_seconds=round(range_secs/fail,2) |where fail&amp;gt;10 AND success&amp;gt;0 | iplocation src |table host src success fail fail_rate_in_seconds Country
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Oct 2017 02:23:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Multisearch-Brute-Force-Attempts-for-both-Linux-and-Windows/m-p/324379#M5770</guid>
      <dc:creator>johnward4</dc:creator>
      <dc:date>2017-10-24T02:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Multisearch - Brute Force Attempts for both Linux and Windows</title>
      <link>https://community.splunk.com/t5/Alerting/Multisearch-Brute-Force-Attempts-for-both-Linux-and-Windows/m-p/324380#M5771</link>
      <description>&lt;P&gt;Hi johnward4,&lt;BR /&gt;
I suggest to use eventtype or tags: &lt;BR /&gt;
create an eventtype for windows (e.g. win_log_fail tag=LOGFAIL)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wineventlog sourcetype=WinEventLog:Security (EventCode=4625 OR EventCode=529)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and an eventtype for linux (e.g. linux_log_fail tag=LOGFAIL)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=linux sourcetype=linux "error: PAM: Authentication failure for "
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;so you can have in the same search both the results and you can count failures for each host without distinction between linux and windows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag=LOGFAIL
| ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to extract a field, you can do this for each sourcetype and then correlate them using coalesce function in eval command.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:24:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Multisearch-Brute-Force-Attempts-for-both-Linux-and-Windows/m-p/324380#M5771</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-29T16:24:16Z</dc:date>
    </item>
  </channel>
</rss>

