Bug 741107 - kernel timestamps prevent fail2ban detecting sshd brute force attacks
Summary: kernel timestamps prevent fail2ban detecting sshd brute force attacks
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: fail2ban
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Axel Thimm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-25 12:20 UTC by Adam Spiers
Modified: 2012-08-07 14:55 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-07 14:55:34 UTC


Attachments (Terms of Use)

Description Adam Spiers 2011-09-25 12:20:25 UTC
Something changed at some point since Fedora 11, and now some messages from userspace daemons include kernel timestamps in their syslog text, e.g.

Sep 25 12:51:04 myhost kernel: [773580.832329] sshd[25557]: Invalid user pgsql from 91.203.223.206

Unfortunately fail2ban does not recognise this extra 'kernel: \[\d+\.\d+\]' text, which means that it fails to detect sshd brute force attacks, and probably many other kinds of attacks.

Seen on Fedora 15 with fail2ban-0.8.4-27.fc15.noarch

Steps to Reproduce:
1. Install fail2ban on F15
2. Configure sshd jail and start fail2ban service
3. Simulate sshd attack by ssh'ing to machine with non-existent user names multiple times
  
Actual results:
fail2ban takes no action

Expected results:
fail2ban should ban IP from which ssh attempts originate.

I have submitted a bug and patch upstream (sourceforge) to fix this:

https://sourceforge.net/tracker/?func=detail&aid=3413745&group_id=121032&atid=689044
https://sourceforge.net/tracker/?func=detail&aid=3413746&group_id=121032&atid=689046

but it doesn't look like fail2ban's sourceforge project is being maintained very actively.  On github I found a more active git-svn clone of the sourceforge svn repo, forked that, and patched it:

https://github.com/aspiers/Fail2Ban/commit/bdbb36434647a7c34b084ff7bf4f8ab31f846d3e

Comment 1 Fedora End Of Life 2012-08-07 14:55:38 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


Note You need to log in before you can comment on or make changes to this bug.