Skip to content

iamjonbradley/cakephp_brute_force

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Brute Force Detection Plugin

Simple brute force login detector

Background

While developing an application we were getting 1000s of brute force attacks so
we decided to create a plugin to handle detection of this to block the users.

Requirements

  • PHP 5.3+
  • CakePHP 1.3
  • Minor intelligence

Get The Source

[Manual]

  1. Download this: http://github.com/jonbradley/Brute-Force-Detection/zipball/master
  2. Unzip that download.
  3. Copy the resulting folder to app/plugins
  4. Rename the folder you just copied to @intrusion

[GIT Clone]

  • In your plugin directory type
    git clone [email protected]:jonbradley/Brute-Force-Detection.git brute_force

Installation

  • Import the database schema
    ./cake/console/cake schema -plugin brute_force_ create
  • Rename and update the config in detect/config/settings.php:
  • Include the detect component in your app_controller.php:
    public $components = array('BruteForce.Detect');
  • Add the following to your beforeFilter
    $this->set('blocked', $this->Detect->checkForPenalty());

Now you can call $blocked anywhere you wish in your views

Options

  1. max_penalty : time in seconds of the penalty
  2. max_attempts : max number of attempts until the user is blocked
  3. look_back : amount of time to look back to block a user
  4. notify : email to nofiy of the block

Todo

  • Add new features, and no I have no clue what they should be right now

License

Copyright © 2011 Jonathan Bradley

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages