A brute-force attack is when all possible keys are checked against encrypted data until the right key is found. Brute-force attacks are extremely costly from a resource and time perspective because the attacker is exploiting vulnerabilities in the encryption by taking advantage of key length and simplicity of the key.
A password is often based on dictionary words meaning the total space an attacker would have to test would be all words in a matching dictionary making the guessing scope significantly smaller than a password using random characters.
Best practice to mitigate brute-force attacks is using long and complicated keys as well as timeouts after a number of attempts and other methods to add more security factors.
Use the following command to generate a random password of any choice(length):
Command: tr -dc A-Za-z0-9 < /dev/urandom | head -c 8 | xargs
You can even create a bash function by editing the /root/.bashrc file and add the following code at the end of the file.
Code:
# Random password generator
genpasswd() {
tr -dc A-Za-z0-9 < /dev/urandom | head -c ${1:-8} | xargs
}
Then use “genpasswd” command to generate a random password of your choice.
For Example, if you want to generate a random password of 15 digits, then the command will be “genpasswd 15“.
You may also like:- 15 Essential Windows Command Prompt Commands for Everyday Use
- Most Common DNS Record Types and Their Roles
- Top Skills Needed to Become a Cybersecurity Analyst
- Mastering Windows Management with WMIC Commands – Top 20 Examples
- Edit and Compile Code with the Best 5 Code Editors
- 50+ Top DevSecOps Tools You Need To Know
- Learn How to Add Proxy and Multiple Accounts in MoreLogin
- Some Useful PowerShell Cmdlets
- Create Free SSL Certificate – ZEROSSL.COM [2020 Tutorial]
- Generate Self-Signed SSL Certificate with OPENSSL in Kali Linux