<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Brute Force Detection</title>
	<atom:link href="http://www.rfxn.com/projects/brute-force-detection/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rfxn.com</link>
	<description> Linux Software &#38; Blog</description>
	<lastBuildDate>Thu, 26 Jan 2012 07:01:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Ryan M.</title>
		<link>http://www.rfxn.com/projects/brute-force-detection/#comment-21972</link>
		<dc:creator>Ryan M.</dc:creator>
		<pubDate>Mon, 09 Jan 2012 10:32:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfxn.com/?page_id=51#comment-21972</guid>
		<description>Use the absolute path to the command in the BAN_COMMAND value, such as /sbin/ip instead of just ip.</description>
		<content:encoded><![CDATA[<p>Use the absolute path to the command in the BAN_COMMAND value, such as /sbin/ip instead of just ip.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan M.</title>
		<link>http://www.rfxn.com/projects/brute-force-detection/#comment-21971</link>
		<dc:creator>Ryan M.</dc:creator>
		<pubDate>Mon, 09 Jan 2012 10:30:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfxn.com/?page_id=51#comment-21971</guid>
		<description>Thank you for your contribution, added to 1.5 release that is now live, credit included in CHANGELOG. I removed the escape on the -F &#039;\[&#039; as it was being treated as just &#039;[&#039; anyways and awk would throw a warning about it under RHEL awk versions.</description>
		<content:encoded><![CDATA[<p>Thank you for your contribution, added to 1.5 release that is now live, credit included in CHANGELOG. I removed the escape on the -F &#8216;\[&#8216; as it was being treated as just &#8216;[&#8216; anyways and awk would throw a warning about it under RHEL awk versions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BFD Rules for Asterisk &#124; Sean Siegel</title>
		<link>http://www.rfxn.com/projects/brute-force-detection/#comment-21438</link>
		<dc:creator>BFD Rules for Asterisk &#124; Sean Siegel</dc:creator>
		<pubDate>Tue, 03 Jan 2012 08:02:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfxn.com/?page_id=51#comment-21438</guid>
		<description>[...] a regular user of APF and BFD by RF Networks, I decided to make my own BFD scripts. I did find some very similar scripts on the [...]</description>
		<content:encoded><![CDATA[<p>[...] a regular user of APF and BFD by RF Networks, I decided to make my own BFD scripts. I did find some very similar scripts on the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Salvatore LaMendola</title>
		<link>http://www.rfxn.com/projects/brute-force-detection/#comment-20993</link>
		<dc:creator>Salvatore LaMendola</dc:creator>
		<pubDate>Thu, 29 Dec 2011 09:04:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfxn.com/?page_id=51#comment-20993</guid>
		<description>Found an error in &#039;postfix&#039; that would cause invalid addresses when the hostname had numbers (kept the numbers and dots so it usually looked something like 207..123.45.67.89. Here is the new and improved postfix script, which works with numbered hostnames:

-- BEGIN /usr/local/bfd/rules/postfix --

# failed logins from a single address before ban
# uncomment to override conf.bfd trig value
#TRIG=&quot;50&quot;

# file must exist for rule to be active
REQ=&quot;/usr/sbin/postfix&quot;

if [ -f &quot;$REQ&quot; ]; then
LP=&quot;/var/log/mail.log&quot;
TLOG_TF=&quot;postfix&quot;

## Postfix dictionary attacks
ARG_VAL=`$TLOG_PATH $LP $TLOG_TF &#124; grep -iwE &quot;SASL LOGIN authentication failed:&#124;SASL PLAIN authentication failed:&quot; &#124; grep -E &#039;[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+&#039; &#124; awk -F &#039;\[&#039; &#039;{ print $3 }&#039; &#124; tr -d &#039;[a-z][A-Z]\[\]\:&#039;`
fi

-- END --

Tested on Debian (sid)&#039;s postfix, and a few others.</description>
		<content:encoded><![CDATA[<p>Found an error in &#8216;postfix&#8217; that would cause invalid addresses when the hostname had numbers (kept the numbers and dots so it usually looked something like 207..123.45.67.89. Here is the new and improved postfix script, which works with numbered hostnames:</p>
<p>&#8211; BEGIN /usr/local/bfd/rules/postfix &#8211;</p>
<p># failed logins from a single address before ban<br />
# uncomment to override conf.bfd trig value<br />
#TRIG=&#8221;50&#8243;</p>
<p># file must exist for rule to be active<br />
REQ=&#8221;/usr/sbin/postfix&#8221;</p>
<p>if [ -f "$REQ" ]; then<br />
LP=&#8221;/var/log/mail.log&#8221;<br />
TLOG_TF=&#8221;postfix&#8221;</p>
<p>## Postfix dictionary attacks<br />
ARG_VAL=`$TLOG_PATH $LP $TLOG_TF | grep -iwE &#8220;SASL LOGIN authentication failed:|SASL PLAIN authentication failed:&#8221; | grep -E &#8216;[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+&#8217; | awk -F &#8216;\[' '{ print $3 }' | tr -d '[a-z][A-Z]\[\]\:&#8217;`<br />
fi</p>
<p>&#8211; END &#8211;</p>
<p>Tested on Debian (sid)&#8217;s postfix, and a few others.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Top 20 OpenSSH Server Best Security Practices &#124; ByPat博客专注于Linux资源分享!</title>
		<link>http://www.rfxn.com/projects/brute-force-detection/#comment-20248</link>
		<dc:creator>Top 20 OpenSSH Server Best Security Practices &#124; ByPat博客专注于Linux资源分享!</dc:creator>
		<pubDate>Tue, 20 Dec 2011 03:42:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfxn.com/?page_id=51#comment-20248</guid>
		<description>[...] Brute Force Detection A modular shell script for parsing application logs and checking for authentication failures. It does this using a rules system where application specific options are stored including regular expressions for each unique auth format. [...]</description>
		<content:encoded><![CDATA[<p>[...] Brute Force Detection A modular shell script for parsing application logs and checking for authentication failures. It does this using a rules system where application specific options are stored including regular expressions for each unique auth format. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Top 20 OpenSSH Server Best Security Practices - Linux tutorials</title>
		<link>http://www.rfxn.com/projects/brute-force-detection/#comment-18972</link>
		<dc:creator>Top 20 OpenSSH Server Best Security Practices - Linux tutorials</dc:creator>
		<pubDate>Sun, 27 Nov 2011 10:42:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfxn.com/?page_id=51#comment-18972</guid>
		<description>[...] Brute Force Detection A modular shell script for parsing application logs and checking for authentication failures. It does this using a rules system where application specific options are stored including regular expressions for each unique auth format. [...]</description>
		<content:encoded><![CDATA[<p>[...] Brute Force Detection A modular shell script for parsing application logs and checking for authentication failures. It does this using a rules system where application specific options are stored including regular expressions for each unique auth format. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brute Force Detection &#124; R-fx Networks &#124; MKfmn &#124; Matthew M. Kaufman</title>
		<link>http://www.rfxn.com/projects/brute-force-detection/#comment-18345</link>
		<dc:creator>Brute Force Detection &#124; R-fx Networks &#124; MKfmn &#124; Matthew M. Kaufman</dc:creator>
		<pubDate>Sat, 19 Nov 2011 11:27:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfxn.com/?page_id=51#comment-18345</guid>
		<description>[...] Brute Force Detection &#124; R-fx Networks. [...]</description>
		<content:encoded><![CDATA[<p>[...] Brute Force Detection | R-fx Networks. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Les best practices OpenSSH</title>
		<link>http://www.rfxn.com/projects/brute-force-detection/#comment-18250</link>
		<dc:creator>Les best practices OpenSSH</dc:creator>
		<pubDate>Fri, 18 Nov 2011 15:05:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfxn.com/?page_id=51#comment-18250</guid>
		<description>[...] Brute Force detection [...]</description>
		<content:encoded><![CDATA[<p>[...] Brute Force detection [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Securing cPanel After Install &#171; Recon Hosting Docs</title>
		<link>http://www.rfxn.com/projects/brute-force-detection/#comment-17797</link>
		<dc:creator>Securing cPanel After Install &#171; Recon Hosting Docs</dc:creator>
		<pubDate>Sun, 13 Nov 2011 04:07:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfxn.com/?page_id=51#comment-17797</guid>
		<description>[...] and bruteforce detection mechanism such as the free firewall [CSF]. Other options include [APF]+[BFD], or custom iptables [...]</description>
		<content:encoded><![CDATA[<p>[...] and bruteforce detection mechanism such as the free firewall [CSF]. Other options include [APF]+[BFD], or custom iptables [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jez</title>
		<link>http://www.rfxn.com/projects/brute-force-detection/#comment-17031</link>
		<dc:creator>Jez</dc:creator>
		<pubDate>Mon, 07 Nov 2011 13:09:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfxn.com/?page_id=51#comment-17031</guid>
		<description>Hi,

I&#039;m very happy with your AFP and BFD tools, but I have a question about configuring BFD: by default, conf.bfd has:

BAN_COMMAND=&quot;/etc/apf/apf -d $ATTACK_HOST {bfd.$MOD}&quot;

This adds the hostname of the the attacker to the ban list, but is there a way to add their IP address instead?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;m very happy with your AFP and BFD tools, but I have a question about configuring BFD: by default, conf.bfd has:</p>
<p>BAN_COMMAND=&#8221;/etc/apf/apf -d $ATTACK_HOST {bfd.$MOD}&#8221;</p>
<p>This adds the hostname of the the attacker to the ban list, but is there a way to add their IP address instead?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zwerfkat</title>
		<link>http://www.rfxn.com/projects/brute-force-detection/#comment-16804</link>
		<dc:creator>zwerfkat</dc:creator>
		<pubDate>Fri, 04 Nov 2011 08:21:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfxn.com/?page_id=51#comment-16804</guid>
		<description>Found a small bug in BFD 1.4. Somewhere at line 153 is listed:

if [ &quot;$ATTACK_COUNT&quot; -gt &quot;$TRIG&quot; ] &#124;&#124; [ &quot;$ATTACK_COUNT&quot; -eq &quot;$TRIG&quot; ] &amp;&amp; [ &quot;$HOST_IGNORE&quot; == &quot;0&quot; ]; then

However, when $HOST_IGNORE is null,  $ATTACK_COUNT is not defined at all. This will result into a script error:

 [: : integer expression expected

Defining ATTACK_COUNT somewhere at the start of the script will fix this:
ATTACK_COUNT=0

Not sure how the working of BFD is affected by this error...</description>
		<content:encoded><![CDATA[<p>Found a small bug in BFD 1.4. Somewhere at line 153 is listed:</p>
<p>if [ "$ATTACK_COUNT" -gt "$TRIG" ] || [ "$ATTACK_COUNT" -eq "$TRIG" ] &amp;&amp; [ "$HOST_IGNORE" == "0" ]; then</p>
<p>However, when $HOST_IGNORE is null,  $ATTACK_COUNT is not defined at all. This will result into a script error:</p>
<p> [: : integer expression expected</p>
<p>Defining ATTACK_COUNT somewhere at the start of the script will fix this:<br />
ATTACK_COUNT=0</p>
<p>Not sure how the working of BFD is affected by this error&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Basic / Advance security tips for SSH &#8211; Mayur&#039;s Blog</title>
		<link>http://www.rfxn.com/projects/brute-force-detection/#comment-14745</link>
		<dc:creator>Basic / Advance security tips for SSH &#8211; Mayur&#039;s Blog</dc:creator>
		<pubDate>Sat, 15 Oct 2011 13:01:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfxn.com/?page_id=51#comment-14745</guid>
		<description>[...] Brute Force Detection A modular shell script for parsing application logs and checking for authentication failures. It does this using a rules system where application specific options are stored including regular expressions for each unique auth format. [...]</description>
		<content:encoded><![CDATA[<p>[...] Brute Force Detection A modular shell script for parsing application logs and checking for authentication failures. It does this using a rules system where application specific options are stored including regular expressions for each unique auth format. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brute Force EVO 2 &#8211; a users review</title>
		<link>http://www.rfxn.com/projects/brute-force-detection/#comment-14562</link>
		<dc:creator>Brute Force EVO 2 &#8211; a users review</dc:creator>
		<pubDate>Wed, 12 Oct 2011 04:06:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfxn.com/?page_id=51#comment-14562</guid>
		<description>[...] Small Business Debt Relief Strategies How To Negotiate And Get Rid Of DebtMyBrute Brute Force!Brute Force Detection   .posts-default li { width: 205px; height: 225px; } .posts-default img, .posts-default [...]</description>
		<content:encoded><![CDATA[<p>[...] Small Business Debt Relief Strategies How To Negotiate And Get Rid Of DebtMyBrute Brute Force!Brute Force Detection   .posts-default li { width: 205px; height: 225px; } .posts-default img, .posts-default [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 5 Security Tips That Could Save Your Server</title>
		<link>http://www.rfxn.com/projects/brute-force-detection/#comment-14013</link>
		<dc:creator>5 Security Tips That Could Save Your Server</dc:creator>
		<pubDate>Thu, 06 Oct 2011 04:01:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfxn.com/?page_id=51#comment-14013</guid>
		<description>[...] detection software, such as Brute Force Detection, can alert you whenever someone attempts to sneak into your fortress. Many of these solutions will [...]</description>
		<content:encoded><![CDATA[<p>[...] detection software, such as Brute Force Detection, can alert you whenever someone attempts to sneak into your fortress. Many of these solutions will [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zwerfkat</title>
		<link>http://www.rfxn.com/projects/brute-force-detection/#comment-13331</link>
		<dc:creator>zwerfkat</dc:creator>
		<pubDate>Wed, 28 Sep 2011 19:31:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfxn.com/?page_id=51#comment-13331</guid>
		<description>&lt;blockquote&gt;
&lt;a href=&quot;#comment-9589&quot; rel=&quot;nofollow&quot;&gt;
&lt;strong&gt;&lt;em&gt;Roland:&lt;/em&gt;&lt;/strong&gt;
&lt;/a&gt;
 great script, however i’m getting 1000′s of these in my exim logs and it doesn’t ban them:
2011-06-28 05:47:38 login authenticator failed for (ylmf-pc) [113.65.143.13]: 535 Incorrect authentication data (set_id=web)
does anyone have a rule for exim that will ban these as well?
thanks in advance
roland
&lt;/blockquote&gt;

I am using the following rule for this:

# failed logins from a single address before ban
# uncomment to override conf.bfd trig value
TRIG=&quot;50&quot;

# file must exist for rule to be active
REQ=&quot;/usr/sbin/exim&quot;

if [ -f &quot;$REQ&quot; ]; then
 LP=&quot;/var/log/exim/mainlog&quot;
 TLOG_TF=&quot;exim1&quot;

 ## EXIM attacks
 ARG_VAL=`$TLOG_PATH $LP $TLOG_TF &#124; grep -E &quot;login authenticator failed for&quot; &#124; grep -E &#039;[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+&#039; &#124; tr -d &#039;[]&#039; &#124; sed -n -e &#039;s/.*login authenticator failed for \([^ ]*\) .* \([\.0-9]*\): 535 Incorrect authentication data.*/\2:\1/p&#039;`
fi</description>
		<content:encoded><![CDATA[<blockquote><p>
<a href="#comment-9589" rel="nofollow"><br />
<strong><em>Roland:</em></strong><br />
</a><br />
 great script, however i’m getting 1000′s of these in my exim logs and it doesn’t ban them:<br />
2011-06-28 05:47:38 login authenticator failed for (ylmf-pc) [113.65.143.13]: 535 Incorrect authentication data (set_id=web)<br />
does anyone have a rule for exim that will ban these as well?<br />
thanks in advance<br />
roland
</p></blockquote>
<p>I am using the following rule for this:</p>
<p># failed logins from a single address before ban<br />
# uncomment to override conf.bfd trig value<br />
TRIG=&#8221;50&#8243;</p>
<p># file must exist for rule to be active<br />
REQ=&#8221;/usr/sbin/exim&#8221;</p>
<p>if [ -f "$REQ" ]; then<br />
 LP=&#8221;/var/log/exim/mainlog&#8221;<br />
 TLOG_TF=&#8221;exim1&#8243;</p>
<p> ## EXIM attacks<br />
 ARG_VAL=`$TLOG_PATH $LP $TLOG_TF | grep -E &#8220;login authenticator failed for&#8221; | grep -E &#8216;[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+&#8217; | tr -d &#8216;[]&#8216; | sed -n -e &#8216;s/.*login authenticator failed for \([^ ]*\) .* \([\.0-9]*\): 535 Incorrect authentication data.*/\2:\1/p&#8217;`<br />
fi</p>
]]></content:encoded>
	</item>
</channel>
</rss>

