<!-- @(#) $Id$
  -  Example of Microsoft FTP rules for OSSEC.
  -
  -  Copyright (C) 2009 Trend Micro Inc.
  -  All rights reserved.
  -
  -  This program is a free software; you can redistribute it
  -  and/or modify it under the terms of the GNU General Public
  -  License (version 2) as published by the FSF - Free Software
  -  Foundation.
  -
  -  License details: http://www.ossec.net/en/licensing.html
  -->


<group name="syslog,msftp,">
  <rule id="11500" level="0">
    <decoded_as>msftp</decoded_as>
    <description>Grouping for the Microsoft ftp rules.</description>
  </rule>
  
  <rule id="11501" level="3">
    <if_sid>11500</if_sid>
    <action>USER</action>
    <description>New FTP connection.</description>
    <group>connection_attempt,</group>
  </rule>

  <rule id="11502" level="5">
    <if_sid>11500</if_sid>
    <action>PASS</action>
    <id>530</id>
    <description>FTP Authentication failed.</description>
    <group>authentication_failed,</group>
  </rule>

  <rule id="11503" level="3">
    <if_sid>11500</if_sid>
    <action>PASS</action>
    <id>230</id>
    <description>FTP Authentication success.</description>
    <group>authentication_success,</group>
  </rule>  

  <rule id="11504" level="4">
    <if_sid>11500</if_sid>
    <id>^5</id>
    <description>FTP client request failed.</description>
  </rule>
  
  <rule id="11510" level="10" frequency="6" timeframe="120">
    <if_matched_sid>11502</if_matched_sid>
    <description>FTP brute force (multiple failed logins).</description>
    <group>authentication_failures,</group>
  </rule>

  <rule id="11511" level="10" frequency="8" timeframe="30">
    <if_matched_sid>11501</if_matched_sid>
    <same_source_ip />
    <description>Multiple connection attempts from same source.</description>
    <group>recon,</group>
  </rule>

  <rule id="11512" level="10" frequency="6" timeframe="120">
    <if_matched_sid>11504</if_matched_sid>
    <same_source_ip />
    <description>Multiple FTP errors from same source.</description>
  </rule>
</group> <!-- SYSLOG,PURE-FTPD -->


<!-- EOF -->
