<!-- @(#) $Id$
  -  Official pure-ftpd rules for OSSEC.
  -  Author: Peter Ahlert <peter@ifup.de>
  -  Author: Daniel B. Cid
  -  License: http://www.ossec.net/en/licensing.html
  -->
      

<group name="syslog,pure-ftpd,">
  <rule id="11300" level="0">
    <decoded_as>pure-ftpd</decoded_as>
    <description>Grouping for the pure-ftpd rules.</description>
  </rule>
  
  <rule id="11301" level="3">
    <if_sid>11300</if_sid>
    <match>[INFO] New connection from</match>
    <description>New FTP connection.</description>
    <group>connection_attempt,</group>
  </rule>

  <rule id="11302" level="5">
    <if_sid>11300</if_sid>
    <match>[WARNING] Authentication failed for user</match>
    <description>FTP Authentication failed.</description>
    <group>authentication_failed,</group>
  </rule>

  <rule id="11303" level="0">
    <if_sid>11300</if_sid>
    <match> [INFO] Logout| [INFO] Timeout</match>
    <description>FTP user logout/timeout</description>
  </rule>
  
  <rule id="11304" level="0">
    <if_sid>11300</if_sid>
    <match> [NOTICE] </match>
    <description>FTP notice messages</description>
  </rule>
  
  <rule id="11305" level="5">
    <if_sid>11300</if_sid>
    <match>[INFO] Can't change directory to</match>
    <description>Attempt to access invalid directory</description>
  </rule>  

  <rule id="11306" level="10" frequency="6" timeframe="120">
    <if_matched_sid>11302</if_matched_sid>
    <description>FTP brute force (multiple failed logins).</description>
    <group>authentication_failures,</group>
  </rule>

  <rule id="11307" level="10" frequency="6" timeframe="60">
    <if_matched_sid>11301</if_matched_sid>
    <same_source_ip />
    <description>Multiple connection attempts from same source.</description>
    <group>recon,</group>
  </rule>

  <rule id="11309" level="3">
    <match>[INFO] \S+ is now logged in</match>
    <description>FTP Authentication success.</description>
    <group>authentication_success,</group>
  </rule>  
</group> <!-- SYSLOG,PURE-FTPD -->


<!-- EOF -->
