Brute force protection
This is negging for auth.
I remember in college editing OpenSSH source code to instead of return wrong password to a root shell prompt just to stop brute force attacks
But… arent they logged in as root then? Wdym with “prompt” i am lost
A honeypot!
@Pacmanlives
Couldn’t you just disable root login in the sshd config?Oh all of my configs are deny root ssh login or without-password. I noticed a significant decrease in scans when returning a root prompt when I did that. This was also in the mid 2000s so who knows how things would be in this day in age for a reduction in scans
It’s not quite complete without code on the password reset page to tell you that you can’t reuse your password.
I’ve had that before and I’m very confident the password was correct - my theory is that they’d changed how non-ASCII characters like £ were handled and their code only half recognised my password.
I never got that rule. Surely it is less secure to keep records of historical passwords than to let someone rotate between !!! And #### etc
Hopefully they’re not sitting the old passwords in plain text and just have the hashes.
And label the text box “username” when it only accepts email address.
Don’t forget to have hidden password requirements and secretly truncate any password longer than 12 characters.
Well yeah, if you don’t truncate the password to 12 chars how will you fit the plaintext in a memory efficient fixed latin1 CHAR column that only accepts letters, numbers, and underscores
/s
Battle.net used to not be case-sensitive for passwords, back in like the pre-wow era.
Intresting. At least they got their act together, even making a physical totp authenticator in the 2000s.
And then validate the email with a custom regex that definitely doesn’t account for all the valid syntax permutations defined by the several email-oriented RFCs
Only on mobile though, on desktop have different criteria. Perhaps give the text box an arbitrary max length of like 30 characters on sign-in but not on account creation.
You guys are evil - who shat on your pillow??
Hearsay
**Allegedly
took me a solid 30 seconds of re-reading to get the joke
As a non programmer, is the joke that humans will retype their password assuming that they made a typo?
If so, sick indeed.
@gibmiser
Yes exactly 😂The guy coding made it so, on your first attempt, even if you answer correctly, it will tell you your login failed due to incorrect username or password, to joke about how it feels like you always get it wrong on the first try
The logic is bugging me, though. It should be
if isFirstAttempt || !isPasswordCorrect
I understand the meme is trying to convey in spite of being correct to still return an error, but then it doesn’t account for when the password is actually incorrect.
Like the other person said, it’s not meant to always fail the first time you enter any password.
It is meant to fail the first time you enter the correct password.
So it should be: if password == correct and first_success == true then { login failure; first_success = false }
Something like that.
That defeats the brute-force attack protection…
The idea is that brute-force attackers will only check each password once, while real users will likely assume they mistyped and retype the same password.
The code isn’t complete, and has nothing to do with actually incorrect passwords.
Yeah, hackers have automated tools and they will, of course, only try each password once.
I would assume that I was being phished and the attacker wanted me to re-type the password to verify that it’s correct.
Not to be pedantic but wouldn’t it be IsFirstLoginWithAttemptedPassword or am I missing something?
@cobra89
Yeah I agree.no, since it first checks if the password is correct. if it is, display error message. if it is corrent and the second time, accept the password (code not in screenshot) but if the password is wrong, it doesnt check if it is the first attempt.
How does that stop a brute force attack? As written, it only stops the single luckiest brute force attack that happens to get the password right on their first try.
It wouldn’t stop most brute force attacks, which are not performed on the live web service, but rather on a password hasb list that was stolen via some other means.
You can’t really prevent a brute force attack. Even if you prevent it from one IP or so, you can still do “distributed” brute force attacks.
Also only allowing one password per 5 seconds or so per IP will not work if you have lots of users and they are at work and have the same IP.
You’re right, and nothing wrong with being pedantic when working with code :)
No, it’s correct - say your password gets leaked across thousands of passwords. A hacker will try to crack all of them with a program that guesses them once, which as the image suggests defeats these types of programs
Add a randomizer with 50/50 succeeding for this error
That’s actually pretty smart
Password managers say hi
I’ve never used one
Bitwarden works well.
I feel like it’ll screw me when I need to log into accounts on devices like my TV or Google Home
I don’t really have “devices” that need logging into so i can’t help you, there.
@kandoh
Yes haha. This way we can get back to the times where 4 characters passwords were sufficient 😃
This is a really interesting idea, but a password manager would throw a wrench in it.
I’d assume my password was invalidated or stored incorrectly, so I’d reset, then I’d try to log in, wtf… this website blows.
Won’t protect against an offline attack (just will confuse the hell out of the hacker) but might confound an online attack? Until someone gets wise and runs the tool a second time. Loving the chaotic neutral vibes here.
It doesn’t really even protect against online attacks though. Like, if you’re going through a list of known accounts, by definition it won’t be any of those accounts’ first time logging in, right?
And if you’re not going through a list of known accounts, good luck getting anywhere with your attack any time this millennia
This would be per session, not lifetime.
This makes it even more cursed
Function naming could use some work then, it’s not obvious that
isFirstLoginAttempt
would be session-aware.Sorry, I’ll stop being pedantic now
Well, I sometimes input the same password 15-times in a row, and it works only on the last try. ¯\_(ツ)_/¯
if isFirst14Attempts
The one guy got grey hairs in-between slides lol
If they had the password right the first try, that isn’t a brute force attack, thats a credential leak.
Don’t trust anyone - not even yourself
could also work in a brute force scenario, but first attempt would be not first attempt in a set amount of time but first attempt for each password by the user in a fixed amount of time
I think the author attempted first time login to be with the right password.
It should be that it rejects the password the first time it’s entered correctly but accepts it on every subsequent try. That actually would provide some protection against like dictionary attacks and raw brute force attacks.
deleted by creator
I swear this is what some websites do
Cell phone lock screens too.
Also USB cords
And women
It’s true. I get my password wrong all the time.
Fine I’ll just change my password to what I thought it should be.
*New password cannot match old password