dejanstojanovic / MVC-Honeypot

Honeypot implementation in ASP.NET MVC
Other
12 stars 7 forks source link

MVC-Honeypot

Honeypot anti bot mechanism implementation in ASP.NET MVC https://dejanstojanovic.net/aspnet/2014/september/honeypot-implementation-in-mvc/

What does it do

This mechanism allows you to detect bot posts from forms on website without using CAPTCHA and bother visitors to enter weird letter and numbers.

In short, it more elegant and user friendly approach in detecting bot form posts. It is based on masking the real field with field that has some illogical name.

When form is posted illogical named field holds actual data, and meaningful named field is a trap field. If meaningful named field value is set, that is proof that bot has filled out the form (this field should be not visible on the page, so that only bots can find it inspecting document structure)

How does it work

The solution contains of three elements:

How to use it

You can download the project and include in your solution as project or compiled dll. Another option is to install it with NuGet package manager.

ScreenShot

PM> Install-Package Mvc.Honeypot

There are few staps you need to to do in order to enable honeypot trap on your form page.

The only difference is that you will treat posed data differently than normal, ignore the data, log it somewhere, or mark as a bot post when storing.