Skip to content

Commit

Permalink
Allow for the log format in proftpd 1.3.5, and add a test.
Browse files Browse the repository at this point in the history
This should cover issue ossec#584
  • Loading branch information
ddpbsd committed Apr 28, 2015
1 parent 50fc92d commit a7b69e8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions contrib/ossec-testing/tests/proftpd.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ log 1 pass = Jan 04 22:51:57 valhalla proftpd[15181]: valhalla (crawl-66-249-66-
rule = 11206
alert = 5
decoder = proftpd

[Login failed accessing the FTP server]
log 1 pass = 2015-04-16 21:51:02,805 zuse proftpd[26189] zuse.domain.com (182.100.67.115[182.100.67.115]): USER root (Login failed): Incorrect password
rule = 11204
alert = 5
decoder = proftpd

12 changes: 12 additions & 0 deletions src/analysisd/cleanevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ int OS_CleanMSG(char *msg, Eventinfo *lf)
* ( ex: Dec 29 10:00:01
* or 2007-06-14T15:48:55-04:00 for syslog-ng isodate
* or 2009-05-22T09:36:46.214994-07:00 for rsyslog )
* or 2015-04-16 21:51:02,805 (proftpd 1.3.5)
*/
if (
(
Expand All @@ -89,6 +90,17 @@ int OS_CleanMSG(char *msg, Eventinfo *lf)
(pieces[15] == ' ') && (lf->log += 16)
)
||
(
(loglen > 24) &&
(pieces[4] == '-') &&
(pieces[7] == '-') &&
(pieces[10] == ' ') &&
(pieces[13] == ':') &&
(pieces[16] == ':') &&
(pieces[19] == ',') &&
(lf->log += 23)
)
||
(
(loglen > 33) &&
(pieces[4] == '-') &&
Expand Down

0 comments on commit a7b69e8

Please sign in to comment.