0% found this document useful (0 votes)
144 views32 pages

Secure Password Creation Guide

Uploaded by

22bfs030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
144 views32 pages

Secure Password Creation Guide

Uploaded by

22bfs030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

What is a password?

A password is a string of characters used to verify the identity of a user during


the authentication process. Passwords are typically used in tandem with a
username; they are designed to be known only to the user and allow that user to
gain access to a device, application or website. Passwords can vary in length and
can contain letters, numbers and special characters.

A password is sometimes called a passwo, when the password uses more than one
word, or a passcode or passkey, when the password uses only numbers, such as
a personal identification number (PIN).

A password is a simple application of challenge-response authentication, using a


verbal, written or typed code to satisfy the challenge request. The order and variety
of characters are often what determines the difficulty, or security strength, of a
given password. That is why security systems often require users to create
passwords that use at least one capital letter, number and symbol. For a password
to be an effective security mechanism, its details must be kept secret. Otherwise,
unauthorized users could gain access to the files and securities one is trying to
protect.

How to create a secure password


Passwords, when carefully created and protected, increase safe and secure
interactions online and in the workplace and can prevent password cracking. To
maximize the strength and efficacy of passwords, organizations often establish
password policies. These policies are designed to help users create strong
passwords and adopt best practices for managing login credentials. Below are a
few examples of the practices that contribute to effective password management
and creation:
 A minimum length of eight characters and a maximum between 16 to 64
characters. While there is no limit to the length of a password, it does
reach a point of diminishing returns.
 Include both uppercase and lowercase letters with case sensitivity. This
increases the number of variables at play and, therefore, its difficulty.
 Use at least one number.
 Use at least one special character.
 Avoid using easily guessed elements such as names of children, pet
names and birthdays.
 Consider using a password management tool.
Why Choosing a Secure Password Is So Important
Strong passwords are of the utmost importance. They protect your
electronic accounts and devices from unauthorized access, keeping your
sensitive personal information safe. The more complex the password, the
more protected your information will be from cyber threats and hackers. So
how can you make sure the passwords you use don’t jeopardize your
security? Here are some tips on creating a secure password that can help
safeguard your information.

1. Use two-factor authentication (2FA).

2FA is an additional security measure that requires you to provide


more information than your password alone. This can be an assigned
personal identification number (PIN), a code sent to your email or
mobile phone, or a fingerprint or voiceprint. Though not available
across all accounts and devices, you should use 2FA whenever
possible to further protect your information.

2. Incorporate numbers, symbols, and uppercase and lowercase


letters.

Hackers use programs that cycle the most common, simplest


passwords used. Because of this, your password should include a
combination of letters, numbers, and symbols to increase its
complexity. The more complex the password, the safer it is.

3. Make sure your password is at least eight characters in length.

Sometimes, hackers use a brute force method to gain access to your


accounts and devices. However, the longer your password is, the
less likely it is for this cyber threat to occur. Complex, lengthy
passwords take too much time to hack—so cyberterrorists are less
likely to target these.

4. Use an abbreviated phrase or saying for your password.

Choosing a password that’s easy to remember makes sense, and


often can be done safely. Pick a phrase that’s memorable to you, and
then create a secure password around it. For instance, the phrase
“cup of joe” could be abbreviated to (uP!0F*J03#.

5. Change your password regularly.

The longer you use the same password, the greater the risk that it will
become compromised. Update all your account and device
passwords periodically and be sure that the new password is totally
different from the original. Recycling old passwords increases the
likelihood of successful cyberattacks.

What are Login Credentials?


A login credential is a user ID and password combination that allows
users to access a website or application. Users need to enter their login
credentials every time they want to use the site or app.

Login credentials are also known as username and password, user ID


and password, or simply account details.

Users can register on a website using their existing email address,


create a new email address specifically for that site, or do so through
another social media account connected to the same website.

When creating an account on most websites or apps, you’ll be asked to


enter your username and password. Users may have different login
credentials for different services such as social media sites, financial
institutions, and online stores.

They are typically used to verify the identity of a person logging into the
system when there may be some risk involved in doing so — such as
with an online bank account, e-commerce service, or social media
platform with some personal information like date of birth or home
address listed publicly.
What Are the Types of Login Credentials?
There are two main types of login credentials, based on how they’re
generated and how they’re protected:

 Static. This is a credential that is generated and saved on a server


and remains the same throughout a user’s entire login session.
This means that your password will remain the same unless you
update it.
 Transient. This is a credential that is generated each time a user
logs in — it changes each time. This is also known as a “one-time
password,” or OTP, because the server will generate a brand new
code each time a user logs in. Many financial institutions use OTPs
for login credentials, such as when logging into your checking or
savings account. OTPs are recommended for login credentials
when there is a risk of malicious actors logging into a server and
accessing private information.
How to Remember Login Credentials?
There are a few tried and true ways to remember login credentials, but
only if the site or app you are logging into is one you will use regularly.

This means you should probably forget about the digital notebook or
paper journal where you wrote down your login credentials. There are
other better, more secure ways to keep track of all your different
credentials, for example, to use a password manager.

The best way to keep track of login credentials is to use a password


manager like PassCamp. This tool enables you to store login credentials
in one place and generate new, secure login credentials when you need
to log in to a new site or app.
Tips for Creating Stronger Credentials
 Use long passwords. If a website or app allows you to create long
passwords with letters, numbers, and symbols, do so. Longer
passwords are harder to crack and take longer to hack through
brute force, but only if you use a strong, hard-to-crack password.
 Avoid common words in passwords. Hacking tools such as
dictionaries and brute force tools can try thousands of simple
passwords such as “password” or “12345678” before they move
on to more complicated passwords.
 Don’t use the same password for multiple websites or apps. If
you need to set up login credentials for a new website, make sure
you aren’t reusing the same password from another website. If
you are reusing the same password, replace it with a stronger,
more unique password for the new site.

Apply these rules and stay safe online.


Common Security Issues Found In Password-Based
Login

Passwords are one of the most vulnerable forms of user authentication. We can see
this in practice when we look at how they're put to use.

Oftentimes users may reuse the same password across multiple websites, which
means that if an attacker manages to break into one of their accounts, they can
compromise all of them. It's not uncommon for users to even have the same
password for their email as they do for their online banking.

Beyond the lack of uniqueness in passwords, there are other security issues with
them as well. If a user doesn't update their password regularly, it can be easier for
an attacker to crack it over time. Not only that, but it's also common for users to
choose weak passwords that contain no numbers or special characters and include
simple words (such as "password" itself).
Brute Force Attack
A brute force attack is a method of hacking that uses trial and error to crack
passwords (e.g., login credentials and encryption keys) by attempting a large
amount of combinations for them. It is a simple yet reliable tactic that is often used
when the attacker has only a limited amount of information about its target, such as
a username or when they know the general structure of the password, but not its
specific content.
Consequences of brute force attacks

 Your personal and valuable data is at risk.


 Hackers spread malware to cause disruptions in a network.
 Hackers hijack targeted systems for malicious activities.
 Such attacks can ruin your company’s reputation.
How to prevent brute force attacks?

 Use longer passwords with varied character types.


 Change your passwords frequently.
 Use different usernames for every site.
 Use a password manager to track your online login info automatically.
Phishing Attacks
A phishing attack is a common type of cyber attack, where the hackers send
fraudulent communications through email that appears to come from a reputable
source. Using this method, hackers try to steal sensitive data like credit cards and
login information. Sometimes hackers do this to install malware on the victim’s
device and obtain employee login information or other details for an attack against
a specific company.
Types of phishing attacks

 Deceptive phishing: This type of attack uses “spoofed” email addresses so


that the victim believes the message is from a legitimate email address.
Attackers will typically use the name of a real person within the company to
try and convince the victim that they need to take action on a matter
immediately.
 Spear-phishing: This type of attack is personalized, targeting specific
individuals or departments in an organization. Spear-phishers will do
research to find out who they’re trying to target, and craft their emails
specifically for them—using personal details like names, job titles, locations,
and more in order to gain their trust.
 Whaling: Whaling targets high-level employees within an organization
through spear-phishing techniques. Often times these attacks will happen
over phone calls or video conferences rather than email because they’re
usually targeting CEOs and CTOs of an organization.
How to avoid phishing attacks?

 Protect all devices in the organization using security software.


 Use a mandatory update policy on devices that access your network.
 Use multi-factor-authentication.
 Open and read your emails mindfully to avoid the security risk.
Credential Stuffing
Credential stuffing is a type of cyber attack in which attackers use credentials
obtained through a data breach on one service to log in to another unrelated
service.
If an attacker has a list of usernames and passwords obtained from a breach of a
popular department store, he uses the same login credentials to try and log in to the
site of a national bank. The attacker knows that some customers of that department
store are the customers of that particular bank too. They can withdraw money if
any customers use the same usernames and passwords for both services. But these
attacks are known to have a low success rate.

The Digital Shadows Photon Research states that the number of stolen username
and password combinations currently available on the dark web is more than twice
the number of humans on the planet.
How to prevent credential stuffing?

 Use unique passwords for different web services.


 Use risk-based authentication.
 Use bot management to stop malicious bots from making login attempts without
impacting legitimate logins.
Dictionary Attack
A dictionary attack is a type of brute-force attack in which the hacker attempts to
break the encryption or gain access by spraying a library of terms or other values.
This library of terms includes words in a dictionary or number sequences. Poor
password habits such as updating the passwords with sequential numbers, symbols,
or letters make dictionary attacks easier.
Common dictionary attack vulnerabilities

 Sensitive URLs such as admin pages are sometimes accessible publicly.


 Some applications will not force users to use a strong password during
registration. It ends up with users creating passwords like user name,
company name, and 12345. Some applications do not enforce password
requirements too. These all are some added advantages for hackers.
How to prevent dictionary attacks?

 Use different combinations of passwords that include upper and lower case
alphabets, special characters, and numbers.
 Use a long string password with more characters to prevent cracking.
 Reset passwords frequently.
What Does Password Generator Mean?
A password generator is a software tool that creates random or customized
passwords for users. It helps users create strong passwords that provide greater
security for a given type of access. Some password generators are simply random
password generators. These programs produce complex/strong passwords with
combinations of numbers, uppercase and lowercase letters, and special characters
such as braces, asterisks, slashes, etc.

Other types of password generators are made to generate more recognizable


passwords rather than a completely random set of characters. There are tools for
generating pronounceable passwords, as well as custom tools that allow users to set
detailed criteria. For instance, a user could set a request for a certain number of
characters, a certain mix of letters and numbers, a certain number of special
characters, or any other criteria for generating a new password.

Password generators help those who have to constantly come up with new
passwords to ensure authorized access to programs and to manage a large number
of passwords for identity and access management. Other kinds of tools
include password managers, or “password vaults”, where users manage large
numbers of passwords in a secure location.
Pros and Cons of Password Manager:

1. Password Generators Create Complex Passwords


The more complex the password, the harder it is to crack. Cracking a password
spun by a password generator would be almost impossible. They produce
passwords that are quite complex and more resilient against brute-force attacks.

It Is Easy to Customize Password Generators

Many websites have specifications for the type of passwords you should create.
Some want you to include special characters or lengthy passwords, while others
prefer alphanumeric seven-digit codes.

A password generator can help you conform to different password specifications.


You only need to input those requirements and parameters and wait for the
generator to fulfill your wishes.
You Can Use Password Generators Across Several Devices

One good thing about password generators is that you can use them across all your
devices. You just need to have the password generator apps downloaded and
signed in on all your devices, and you can use them on the go.
Password Generators Save Time

Password generators help save the time you will use to construct a
strong password. In a few seconds, you can have a complex password
generated. All you have to do is pen it somewhere safe, commit it to
memory, or save it on the password manager.
Why You Shouldn't Use a Password Generator
Passwords Are Harder to Memorize

Strong and complicated passwords improve your security, but they can be difficult
to commit to memory.

If you forget details easily or have several things to keep in your head, memorizing
a generated password might be an additional burden. You may want to write your
generated passwords down in an exclusive notepad or store them offline on your
computer (in a location that is not easily accessible).

2. Generated Passwords Can Be Difficult to Enter

In contrast to generating passwords that meet different specifications, you might be


unable to use the generated passwords on some websites if they include certain
characters or character combinations they don’t accept.

3. You Can Overly Depend on Password Generators

The ease of using password generators might make you depend on them too much.
It is a lot easier to guess passwords you generated yourself than one randomly
generated. But your experience can turn sour if your password database becomes
corrupted or you urgently need to log into your account on an external device
while your password generator remains on your device at home.

4. There Are Security Concerns

Threat actors can create malicious generator software with all the tools
of a normal functioning password generator, including a password
manager and some malware added to the mix of password generators
you can online.

The password is generated, stored, and sent remotely to the threat actor, who can
now use it to access your accounts.
STANDING PASSWORD SECURITY

In today's interconnected world, password security is a critical aspect


of online safety. Weak passwords are a significant vulnerability that can
lead to unauthorized access, identity theft, and data breaches. Robust
passwords are the first line of defense against these threats.

A strong password typically consists of a combination of uppercase


and lowercase letters, numbers, and special characters. Its length should be
sufficient to withstand brute force attacks. Additionally, it's crucial to have
unique passwords for each online account to prevent a breach on one
platform from affecting others. Password managers play a crucial role in
generating and securely storing complex passwords for multiple accounts.

Password security best practices include avoiding common words or


phrases, refraining from password sharing, and regularly updating
passwords. Educating users about these practices is essential to reinforce
the importance of strong passwords.
GETTING STARTED

The first step in creating a password generator with Python is setting up


your development environment. Ensure that you have Python installed on
your computer. Depending on the libraries you plan to use, you may need
to install additional packages. Selecting the right libraries is crucial for
efficient and secure password generation.

For this project, you'll want to use libraries like hashlib for hashing and
getpass for securely capturing user input. hashlib provides various hash
functions, such as SHA-256, which are essential for securely hashing
passwords. getpass is useful for taking user input without displaying it on
the screen, enhancing security.

[Link] INPUT AND SALTING

Receiving user input is the core functionality of your password generator.


Users provide a keyword that serves as the base for password generation.
To enhance security, it's crucial to add a salt to this keyword.

Salt is a random data element that adds complexity to password hashing.


Even if users provide the same keyword, the presence of a unique salt
ensures that the generated passwords are distinct. Each password should
have its own salt, generated randomly.

The salt is combined with the user's keyword before hashing. This extra step
significantly improves the security of the generated passwords, making
them resistant to common attacks.
[Link] FOR SECURITY

Hashing is a fundamental process in password security. It involves


converting the combined keyword and salt into a fixed-length string of
characters. Hash functions are designed to be one-way, meaning it's
exceptionally challenging to reverse the process and obtain the original
keyword from the hash.

Choosing a suitable hash function is essential. Commonly used hash


functions include SHA-256 and bcrypt. These functions are designed to be
computationally intensive, making it extremely difficult for attackers to
crack the hashed password using brute force or dictionary attacks.

[Link] PASSWORD

Creating a function to generate passwords is a crucial step in your project.


This function takes the combined keyword and salt, hashes them, and
formats the resulting hash into a secure password.

To make your password generator versatile, you can tailor the generated
passwords for different applications. Each application may have specific
password requirements, such as a minimum length or the inclusion of
special characters. Your generator should accommodate these
requirements to ensure compatibility with various platforms.

Storing passwords securely is also essential. Passwords should never be


stored in plaintext. Instead, you should store only the hashed passwords
and salts, making it nearly impossible for anyone to reverse-engineer the
original passwords from the stored data.

[Link] INTERFACE
Building a user-friendly command-line interface (CLI) or graphical user
interface (GUI) is important for the usability of your password generator. In
this project, we provide an example of a simple HTML form that users can
interact with.

The HTML form collects user input, including the app name and the desired
password. When the "Generate Password" button is clicked, the form data
is sent to the server for processing. This allows users to provide input
conveniently and receive generated passwords.

The Python code for the backend handles the form submission. It takes the
app name and password, generates a salt based on the app name, and
combines it with the password before hashing. The generated password is
then displayed to the user.

[Link] AND DEBUGGING

Thoroughly testing your password generator is essential to ensure it


functions as expected and is secure. You should test it with various
keywords and applications to verify that it generates passwords correctly
and according to the requirements of each app.

Testing should cover various scenarios, including valid and invalid inputs.
You should also test the performance of your generator to ensure it can
handle a large number of requests without issues.

Handling potential errors gracefully is crucial for a user-friendly experience.


For example, if the user enters an invalid keyword or chooses an
unsupported application, your generator should provide clear and
informative error messages to guide the [Link] techniques, such
as printing intermediate values and using debugging tools, can help
identify and fix any issues that may arise during testing.
[Link] AND SECURITY

While your password generator is already a valuable tool for enhancing


online security, there are several ways to further improve it. Consider
adding additional security measures to make it even more robust.

One enhancement is to implement password complexity requirements. You


can set rules for the minimum length of passwords and specify the
inclusion of special characters, numbers, and uppercase letters. These rules
help ensure that the generated passwords meet industry standards for
complexity.

Another security enhancement is encryption for stored passwords. Instead


of storing the generated passwords in plaintext, you can encrypt them
before storage. This adds an extra layer of protection in case an attacker
gains access to the stored data. Encryption ensures that even if an attacker
obtains the hashed passwords and salts, they cannot use them directly.

[Link] WORLD APPLICATIONS

Your password generator has practical applications in the real world. It


allows users to create strong, unique passwords for various applications,
enhancing their online security. Users can have different passwords for each
app without the burden of remembering them all.
Consider potential improvements and extensions to your project. For
instance, you can explore integrating your generator with password
managers, which are widely used to securely store and manage passwords.
Alternatively, you could develop a user-friendly graphical interface (GUI) to
make it even more accessible to users who prefer a visual interface over a
command-line one.

Security considerations should always be a top priority. Emphasize the


importance of keeping the keyword and generated passwords confidential.
Educate users about the significance of regularly updating their passwords
and using two-factor authentication when available.

[Link]

In conclusion, your password generator project equips users with a


powerful tool for enhancing their online security. Strong and unique
passwords are crucial in today's digital landscape, and your generator
simplifies the process of creating and managing them.

Throughout this documentation, we've covered essential topics such as


password security best practices, setting up your development
environment, user input and salting, secure hashing, and user-friendly
interfaces. We've also discussed testing, debugging, and potential
enhancements to make your generator even more robust.

By following the principles and practices outlined in this documentation,


users can significantly improve their online security posture. Your project
not only enhances password security but also contributes to a safer online
environment for everyone. Stay committed to password security, and
encourage others to do the same, as it is a fundamental aspect of digital
safety.

[Link] CODE

HTML Code for the Frontend

<!DOCTYPE html> <html> <head> <title>Password Generator</title> </head>


<body> <h1>Password Generator</h1> <form action="/generate"
method="POST"> <label for="app_name">App Name:</label> <input
type="text" name="app_name" id="app_name" required><br><br> <label
for="password">Password:</label> <input type="password" name="password"
id="password" required><br><br> <input type="submit" value="Generate
Password"> </form> </body> </html>
Explanation: This HTML code creates a simple web page with a form. The
form allows users to enter the name of the application (e.g., "Gmail" or
"Facebook") for which they want to generate a password and input their
chosen password. The form action attribute specifies the URL to which the
form data will be sent upon submission.

Python Code for the Backend

pythonCopy codefrom flask import Flask, render_template, request import


hashlib app = Flask(__name__) # Dictionary to store app passwords
app_passwords = {} @[Link]('/') def index(): return
render_template('[Link]', app_name='', password='')
@[Link]('/generate', methods=['POST']) def generate(): app_name =
[Link]['app_name'] # Check if password for this app already exists in
dictionary if app_name in app_passwords: return render_template('[Link]',
app_name=app_name, password=app_passwords[app_name]) password =
[Link]['password'] # Generate a consistent salt based on app name salt =
hashlib.md5(app_name.encode()).hexdigest() # Add the salt to the password
salted_password = password + salt # Hash the salted password using SHA-256
hashed_password = hashlib.sha256(salted_password.encode()).hexdigest() #
Store generated password in dictionary with app name as key
app_passwords[app_name] = hashed_password return
render_template('[Link]', app_name=app_name,
password=hashed_password) if __name__ == '__main__': [Link]()

Explanation: This Python code utilizes the Flask framework to handle web
requests and responses. It defines two routes: one for the root URL ('/') and
another for '/generate', which processes the form data submitted by users.

When a user accesses the root URL, they are presented with the HTML
form. When they submit the form, the '/generate' route is triggered. The
code checks if a password for the specified app name already exists in the
app_passwords dictionary. If it does, the existing password is retrieved and
displayed to the user. If not, the code generates a salt based on the app
name, combines it with the user-provided password, hashes the result using
SHA-256, and stores the hashed password in the dictionary.

This combination of HTML and Python provides a practical and user-


friendly interface for generating and storing passwords securely. Users can
easily input their desired app name and password, and the generator takes
care of the rest, enhancing password security

You might also like