
Information Security and Antifraud, Part 7: Protecting Accounts and Registrations from Bots, Brute Force, and Hijacking
🌐 Machine-translated from Russian. Show original
In this part:
Threats to accounts#
- Credential stuffing: bots try login-password pairs from other people's leaks. It works because people repeat passwords.
- Password matching for a specific account.
- Mass registrations by bots — for bonuses, spam, and boosts.
- Capture via access restoration: changing email or phone, intercepting a code.
Frequency limitation#
The first line of defense includes limits on login, registration, password recovery, and code sending:
- per account: no more than N failed logins within 15 minutes;
- by IP and device: no more than M attempts to different accounts;
- by phone number: no more than K SMS codes per hour — otherwise, scammers use your form for expensive mailings at your expense.
Example of an nginx-level constraint for a login form:
limit_req_zone $binary_remote_addr zone=login:10m rate=5r/m;
location = /api/login {
limit_req zone=login burst=5 nodelay;
proxy_pass http://app;
}
Limits at the web server level supplement but do not replace in-app checks: an attacker can change the IP.
Responses that do not help the attacker#
- At the input — the same message "invalid login or password" without "such user does not exist."
- On password recovery — "if such an email is registered, we have sent a message."
- Same response time for existing and non-existing accounts.
Confirmation and the second factor#
- Confirmation of an email or phone during registration cuts off some bots and provides a channel for notifications.
- 2FA — optional for everyone, mandatory for money transactions and admins.
- Step-by-step authentication: for risky actions (changing details, withdrawing funds, changing email) — re-entering the password or code, even if the user is already logged in.
Devices and sessions#
- Remember the user's known devices . Logging in from a new device is a scoring signal (part 6.
- Show the user the list of active sessions with the "end all others" button.
- When changing your password, complete all other sessions.
User notifications#
The user is the best detector for hijacking their account. Notify:
- about logging in from a new device;
- about changing password, email, phone, or details;
- on withdrawals and major transactions.
And in every notification, there is a "it wasn't me" link that blocks sessions and initiates recovery.
Bots during registration#
- Limits by IP, device, and subnets.
- A hidden honeypot that people don't see or fill in, and simple bots fill in.
- Form completion time check: the person does not fill out the form within 0.3 seconds.
- Bonuses for new users — after phone verification and the first real transaction, not immediately upon registration.
Checklist#
- Limits on login, registration, recovery, and SMS codes
- The answers do not reveal whether the account exists
- 2FA is available, mandatory for money and admins
- Re-authentication for risky activities
- Sign-in notifications from a new device and data changes
- Bonuses are issued after confirmation, not upon registration
Comments · 0
No comments yet.Sign in to comment, rate and see all comments.