/    Sign up×
Community /Pin to ProfileBookmark

Prevent Multiple Login Attempts

I am building a login where the client is obsessed with high security….I want to be able to present the client with the features that I’ve implemented to make this area as secure as possible.

One of the things I want to present the client with is an implementation that prevents multiple login attempts. I set this up using sessions and counting login attempts, but I was wondering, if there was a bot attack (like a dictionary attack) against a login where hundreds of attempts were tried repeatedly….would they use they same session? I am thinking probably not (but I don’t know, I’m not a security expert). Furthermore…would they even use the same ip?

If the answers to both of the questions above are ‘not necessarily’ then I am thinking the best approach to do this is to prevent multiple login attempts using the same username in a short period of time.

I’m really looking for answers to the above two questions, mainly, however. Thanks in advance to anyone who helps.

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@NogDogNov 15.2009 — Certainly a hacker-bot could simply not send the session cookie and thus avoid your session check.

If the idea is to disallow mutliple invalid login attempts within a given time, I'd probably use the database for that. You could insert a record in a table with the login name and timestamp each time an invalid attempt is made. Then part of the login validation would be to check if there are more than X number of rows in that table for that login name within the last Y minutes/hours/days. You could also or instead record invalid login attempts by IP.
×

Success!

Help @aj_nsc spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...