You are on page 1of 30

Password Protection:

How Safe Are Your Passwords?


Anderson School of Management
Anderson Graduate Student
Bachelors of Science in Computer Science
Masters of Science in Computer Engineering
Master of Science in Information Systems and Assurance
Overview
• About the Program
• Forms of Protection
• Why Passwords?
• Good Password Tips
• Hacking Passwords
• Programming with Python
• Python Password Generator
Information Assurance Program
• The Information Assurance program is an
interdisciplinary field combining aspects of
management, information technology,
specialized aspects of computer science,
computer engineering, information systems
and accounting.

• Program Website:
https://ia.mgt.unm.edu/default.asp
Summer Camps
• Introductory Cybersecurity Camp: 
The introductory camp is intended for high
school students just learning about
cybersecurity and computer systems. 

• https://ia.mgt.unm.edu/summer-camps/default.asp
Forms of Protection
• Passwords
• Two-factor Authentication
– i.e. a password and image
• Biometrics
– Fingerprints, eye scans, etc.
• Tokens
– A piece of technology that only you can use to
login somewhere.
Why Passwords?
• Passwords are here to stay
• Why!?
– Passwords are easy to remember.
– Are used for almost everything.
– Are still wonderful if created and protected
well.
Good Password Tips
• You should never:
– Reuse a password for multiple logins.
– Make a password using your personal
information like your name, birthday, pets
name, etc.
– Make a password that is commonly used such
as, abc123! Or P@55w0rd, etc.
Good Password Tips
• If allowed, passwords should:
– Be 10-14 characters long
– Have lower and upper case letters, numbers
and symbols.
– Be something unique to you that you will
remember.
Hacking Passwords
• Password protection is very important.
• Hackers have tools now to find a
password almost immediately.
– Tools today can figure out simple passwords
in under 0.23 milliseconds!
• Tool:
Even Celebrities Are Affected
Programming With Python
• Random
– This library allows us to generate a random
set of characters.
– Example Code: import random

• print
– This function lets us print out what our
program created.
– Example Code: print p
Programming With Python
• Join()
– This function allows us to join multiple parts
together.
– Example Code: “”.join(random.sample(x,y))
• Variables
– We can set values to variables in order to do
things with them.
– Example Code: variable = “123”
Python Password Generator
• Step One:
– Open the following link:
• https://repl.it/languages/python3
• Step Two:
– Let’s make sure we include our library.
– In order to use the random library, let’s type
the following in our compiler:

import random
Python Password Generator
• Step Three:
• Let’s make our first variable:
– Let’s make a variable that stores lowercase
letters in it:
Letter = “abcdefghijklmnopqrstuvwxyz”

? - If I wanted to make a
variable that had both lower
and upper case, how would I
do that?
Python Password Generator
• What your code should look like so far:

import random
letter =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL
MNOPQRSTUVWXYZ"

You’re doing GREAT!!


Python Password Generator
• Step Four:
• We need to make 2 more variables.
– number = “(your values)”
– symbol = “(your values)”
• The number variable should have
numbers 0-9 and the symbol variable
should have !@#$
Python Password Generator
• What your code should look like so far:

import random
letter =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL
MNOPQRSTUVWXYZ”
number = "0123456789”
symbol = "!@#$"
Python Password Generator

? - Why do we need letters, numbers, and


symbols?

Password Rules:
- Be 10-14 characters long.
- Have lower and upper case letters,
numbers and symbols.
Python Password Generator
• Step Five:
• We need to make a variable for how long
we want our password to be.

• Remember:
– The rules say between 10-14 characters long.
Python Password Generator
• Step Five (cont.):
• Let’s name our variable ‘passlen’, and set
it equal to a number value.
passlen = ??

? – How long should I make my password


variable?
Python Password Generator
• Code So Far:

import random
letter =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLM
NOPQRSTUVWXYZ“
number = "0123456789“
symbol = "!@#$“
passlen = 12
Python Password Generator
• Step Six:
• Creating a print variable and using the join
function.

• Remember:
– Join()
• This function allows us to join multiple parts
together, like our variables we created, letter,
number, and symbol.
Python Password Generator
• Step Six (cont.):
– Example Code: “”.join(random.sample(x,y))

• “”.join(x) – means I want to use the join() function


to create a new entry “”.

• random.sample(x,y) – means I want to use the


random function and take my variable x, and make
it as long as y.
Python Password Generator
• Step Six (cont.):
– The variables we have so far are letter,
number, and symbol
– Step 1:
• Make a variable p
– p = ??
– Step 2:
• Type the following:
– p = “”.join(random.sample(x+y+z, a)
Python Password Generator
• Step Six (cont.):
– Step 3:
• Replace x with ?
• Replace y with ?
• Replace z with ?
• Replace a with ‘passlen’

• Your code so far:


p = “”.join(random.sample(letter+number+symbol,
passlen))
Python Password Generator
• Code So Far:
import random
letter =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQ
RSTUVWXYZ“
number = "0123456789“
symbol = "!@#$“
passlen = 12
p = “”.join(random.sample(letter+number+symbol,
passlen))
Python Password Generator
• Step Seven
• We need to print our variable p
– Easiest step
– Type the following:
• print p

• Step 8
• Run your program!!
Testing Our Passwords
• Let’s see how hard it is to crack your new
passwords you have made!
Password Rules
• Remember the password Dos and Don’ts:
• Do
– Do have at least 10-14 characters.
– Do have letters, numbers, AND symbols.
– Do change your passwords regularly.
• Don’t
– Don’t reuse passwords.
– Don’t use personal information that is easy to guess.
– Don’t use commonly used passwords.

You might also like