What are Brute-force Attacks?
A brute-force attack means to figure out a password by trying possible combination of letters, numbers, and symbols unless you find a combination that works. Depending on the password’s length and complexity, the process can take a long time, and you get unnecessary traffic. To speed up the process, an attacker ussually uses an attack known as dictionary attack, where they use the dictionary words or some midified version of those words. The attackers can also automate this process by using a tool like “Hydra”, “Hashcat”, or their custom scripts. Attacks like these are fairly easy to detect but if defended against them they could result in a catastrophe (For example if an admin account is compromised, or even if a standard user account is also compromised it can allow the hacker to laterally move in the network).
How to defend against Brute-force Attacks?
Strong passwords:
This means to make sure that users are using strong passwords: long unpredictable passwords, avoid reusing passwords, and change passwords regularly.
Account lock-out:
Account lock out means, after a defined number of incorrect login attempts the account will automatically get locked (For example the account can get lock for 30 seconds after the second attempt, 1 min and the 3rd and 4th attempt, and after the 5th attempt it, locks out and needs manual unlocking by an administrator).
The problems with account lockouts are:
- An attacker can cause a denial of service (DoS) by locking out large numbers of accounts.
- Because you cannot lock out an account that does not exist, only valid account names will lock. An attacker could use this fact to harvest usernames from the site, depending on the error responses.
- An attacker can cause a diversion by locking out many accounts and flooding the help desk with support calls.
- An attacker can continuously lock out the same account, even seconds after an administrator unlocks it, effectively disabling the account.
- Account lockout is ineffective against slow attacks that try only a few passwords every hour.
- Account lockout is ineffective against attacks that try one password against a large list of usernames.
- Account lockout is ineffective if the attacker is using a username/password combo list and guesses correctly on the first couple of attempts.
- Powerful accounts such as administrator accounts often bypass lockout policy, but these are the most desirable accounts to attack. Some systems lock out administrator accounts only on network-based logins.
- Even once you lock out an account, the attack may continue, consuming valuable human and computer resources.
Device based lock-out:
This means locking out authentication attempts from known and unknown browsers or devices separately based on the information collected (via the cookies, locations or IP addresses).
Using CAPTCHAS:
CAPTCHAS are helpful to stop those automated attacks which means that the attacker will need to login manually which can take a long time, and the team has time to work on the recovery measures once alarmed.
How to find out if there has been a brute-force attempt?
- Many failed logins from the same IP address
- Logins with multiple usernames from the same IP address
- Logins for a single account coming from many different IP addresses
- Excessive usage and bandwidth consumption from a single use
- Failed login attempts from alphabetically sequential usernames or passwords