025.1 Lesson 1
Certificate: |
Security Essentials |
---|---|
Version: |
1.0 |
Topic: |
025 Identity and Privacy |
Objective: |
025.1 Identity and Authentication |
Lesson: |
1 of 1 |
Introduction
The question of identity boils down to, “Who are you?” If you drop in on a friend’s party, the friend can recognize you by your face. But if you come to a conference, the staff might want to check an ID (which probably has a photo of your face) before letting you in. So even in everyday life, identity is not always a simple matter.
Authentication is a way of determining identity. At the conference, the staff authenticate you through the ID with your picture. When you pick up your laundry from a cleaner, you don’t need to prove your identity — but you had better bring the receipt that lists the laundry. That’s another form of authentication.
This lesson covers digital identity, which is the way computer programs and online services identify you in order to grant you access. We’ll look at related topics such as password management, multi-factor authentication, and single sign-on. We tell you how to maximize your secure use of these technologies, so that attackers find it hard to steal your identity.
Concepts in Identity and Authentication
Over the centuries, many forms of authentication have been developed. In speakeasies (the illegal outlets for alcohol that existed in the U.S. during the Prohibition era), people would authenticate themselves by saying a password known to the staff (famously, “Joe sent me”) and thus gain entrance. Passwords — or more generally, secret keys — are now central to computer authentication.
Security experts divide types of authentication into a few categories: “something you know” (a password), “something you have” (an ID, an ATM card), and “something you are” (a fingerprint, a retinal scan).
Identity and authentication are critical to computerized interactions. We need to identify ourselves and be authenticated by schools, businesses, banks, retailers, government offices, social media accounts, and more.
Making a mistake in authentication can have grievous consequences. People have lost their life savings through identity fraud, or through scams caused by attackers who falsely identified themselves as trusted institutions.
Steps in Identification: Authentication, Authorization, and Accounting
When you use a service, your identity is used in the following basic ways.
Authentication, as we have seen, just validates that Julie is Julie, and not George or Ahmed.
Authorization uses the authenticated identity to determine whether you have the right to gain access to some resource. For instance, you might be authorized to read and write files on your computer, but not to change its security settings.
Accounting (also known as logging) keeps a record of what you’ve done, so that an administrator can check for suspicious things that happened in the past. For instance, if data seems to have been stolen, the administrator might be interested to know that one of the staff was recorded to have logged into the system at 3:00 AM. That login could well have been a malicious intruder who stole the staff person’s credentials.
Password Security
Passwords are central to identity and security in computing. Although there’s a lot of talk about alternatives to passwords, these alternatives are still based on the same concept of “something you know” and require the choice of a text string that’s hard to guess.
When physical IDs and biometrics are in use, they are generally used together with a password or other secure key of some kind.
Choosing a Good Password
Few internet users maintain good password security. We’ll look at the guidelines for password security in this section, and then turn later to tools that can help.
When you sign up for an online account, you are generally given some guidelines for choosing a good password, such as a minimum (and sometimes maximum) length, and a rule to vary the text by including capital letters, digits, and punctuation (sometimes a limited list of characters to choose from).
Complexity is important, but length is even more important. This is because attackers often guess passwords just by trying random combinations of characters, a method called a brute force attack. Thus, if you have a complex but short password such as H*z-6d
, a brute force attack might happen to try that combination of six characters as part of its random attempts to log in.
If you want to choose a long password that you can type easily, start by forming a string of random words that you can remember. For instance, you could start with “scarf lunch wingnut rhino pretty” and then mix in special characters to make the password scarf\lunch5wingnut(rhino,pretty
.
If you succeed in choosing a difficult password, can it still by guessed by an intruder? There is always a small chance. Someone might see you entering the password and guess some of the characters. Malware might get on your computer and monitor your keystrokes. A site that you log into might store the password in an insecure manner and be hacked.
Therefore, choose a different password for every site where you log in. Attackers tend to try a combination of user name and password on lots of popular internet services in a process called credential stuffing. This often works because so many people use the same password for multiple sites. If you use unique passwords, an attacker who gets the password for your social media site might disrupt your social media, but at least they won’t get into your bank account.
It’s a good idea to change your passwords every year or so. Some sites require you to change the password frequently. Don’t try to play tricks such as alternating between two passwords: Use a new one every time. Certainly change the password if you’ve heard that your service was the victim of a breach.
Never share a password. There is no reason for an employer, a system administrator, or some random person calling you and claiming to represent your bank to know your password.
Passwords should never be sent over unencrypted channels such as email or mobile texting. As we’ve seen, passwords never need to be shared at all.
Security Questions and Account Recovery Tools
In addition to a password, services often ask you personal questions such as “Where were you born?” and store the answers. They sometimes use these security questions to add extra checks when you enter your user name and password. If you get locked out and forgot your password, look for a link such as “Forgot your password?” on the services' login screen. That link takes you to a page with the security questions you previously answered.
After you answer the questions accurately, the service usually requires another step for additional security: It mails a special link for one-time use to your email address. You have to log in using that link within a specified amount of time. There you can reset your password. This extra step ensures that, even if a malicious intruder manages to get your security questions right, the intruder can’t break into the service unless they also have access to your email.
The problem with security questions is that someone might guess the answers. It probably isn’t hard for an attacker to figure out where you were born. Even a more obscure fact, such as “What was the model of your first car?” might be known by someone.
So it’s best to invent answers to the security questions and keep track of your fake answers.
Password Managers
We have outlined some detailed rules for password management. Fortunately, there are tools available to assist with this process.
Many people keep a paper list of passwords, and in some circumstances that’s a reasonable way to maintain them. If you are working from home and nobody goes in your office, a paper list might be safe. (However, a thief might find it.)
And if you have a paper list, you still have to type in each password, which is cumbersome and error-prone. Many sites shut you out after a few login attempts, in order to thwart brute force attacks. So a paper list is never ideal.
A plain-text list on your computer is even less secure, because malware might install a tool that finds the list.
For best security, therefore, use a password manager. This program can run either on your personal computer (desktop, laptop, or mobile device) or in the cloud. Start by entering into the password manager any relevant login information for each service or program you use: your email address or user name, your password, and answers to security questions.
A password manager encrypts your login information so that an intruder can’t use it if the data file is stolen. If a password manager runs in the cloud, it also uses encryption when transmitting your data between your computer and the server in the cloud.
You need remember only one password, called the master password, to let you into the password manager. You can then instruct the password manager to log you into all the programs and services you have stored there. Changing passwords is also simple.
There are trade-offs between using a offline password manager on your computer and using a cloud-based password manager. You can’t use the local password manager when you want to log into a family member’s or friend’s computer in case your system goes down or you’re visiting someone. The cloud password manager is available everywhere, and is clearly helpful when you’re on the move.
Offline password managers store password data locally on a user’s device, providing a higher level of security because the data is not stored in the cloud and is not vulnerable to online attacks. This type of manager is ideal for users who prioritize security over convenience and do not need access to their passwords across multiple devices. Offline managers, such as KeePass2, offer robust security features, including local encryption and the ability to manage passwords without an internet connection. The main drawback is that users are responsible for backing up their data and may find it less convenient to synchronize passwords across devices manually.
Online password managers store encrypted password data in the cloud, allowing users to access their passwords from any device connected to the internet. This synchronization feature is particularly useful for users who need access to their passwords across multiple devices, such as smartphones, tablets, and computers. Popular examples include LastPass, 1Password, and Dashlane. However, storing passwords in the cloud introduces some security risks, as the data could potentially be accessed if the service is compromised or the cloud password manager might go down itself, or you might lose internet access. The business might also raise its prices, go out of business, or abandon you in other ways.
Some web browsers also have password managers. These are convenient so long as you are doing all your work on the same browser, but the password manager on one browser isn’t accessible from another browser.
KeePass 2 is a popular, free password manager that runs on all popular operating systems. The web site offers downloads for a wide range of systems — Windows, macOS, GNU/Linux, popular mobile devices — and distributes its open source code under the GNU General Public License.
Single sign-on
Single sign-on (SSO) allows you to log in to one service and then use other services without having to log into them individually. For instance, suppose you keep Facebook open on your computer all the time. When you visit some other service, you might see a dialog box pop up that allows you to log in using your Facebook account. Google is another popular service that is often used for single sign-on.
Complicated data exchanges are going on behind the scenes to enable single sign-on. The basic idea is that, after you click on the icon presented by the second service, it sends a message to Facebook and gets back a token (a random, encrypted message) authenticating you.
When you want to use single sign-on, the service you want to use might not be running in the same browser. You might be logged out of Facebook, for instance, or have left it running in a different browser. In such case, the second service causes Facebook to open a dialog box and ask you to log in to Facebook. In this case, it takes just as much trouble to use single sign-on the first time as to log in using a different account, but further uses of single sign-on will be easy because Facebook keeps running.
As with an online password manager, depending on a service for single sign-on has a risk: If you lose access to your account or the service closes down, you lose access to all the other services that queried it for your login information.
Furthermore, when a new service asks another one for access, the new service might ask for a lot of data on you that isn’t required for logging in: location and date of birth, for instance. If you’re asked to approve the transfer of data from one service to another, think carefully about whether you want the new service to have that data.
Multi-Factor Authentication
More and more, internet users are being prompted to enter a string of digits sent to their phone, or perform some other task, before logging in to a service. The services require two or more ways of identifying you, known as multi-factor authentication (MFA), to address the risks of passwords. The scenario described earlier, where you reset your password by having a link sent to your email address, is another form of MFA. These procedures prevent you from being impersonated by someone from across the world, or even in the next office.
All forms of MFA require extra effort on the part of the user (because you’re dealing with two or more ways of identifying yourself), but they’re worth the trouble because they cut out many common attacks. Almost every computer user has a cell phone now, so it’s reasonable to use it for MFA. Many services can send the code to your email instead, so you can use the code from your desktop or laptop too.
Most MFA calls for a password and one other factor, and therefore can be called two-factor authentication (2FA).
Many other forms of MFA have been in use for some time. An ATM card, combined with a four-digit pin, is a simple and effective way for your bank to identify you wherever you go in the world. Many ATMs also contain cameras so that, in case of a fraudulent withdrawal, an adminstrator can see who did it.
There are special devices that attach to work computers and let you authenticate yourself by holding up a badge with a strip like the one on an ATM.
One-time passwords were developed long before digital computing. People who wanted to verify themselves over a telephone or radio would carry a “one-time pad,” each sheet bearing a random code. One person would say the code, the other would validate it, and then each would tear off the sheet.
In computing, you can run a program or device that generates a one-time password, and use it to authenticate yourself.
A related kind of authentication is a time-based one-time password (TOTP). This service generates a random code every 30 seconds or so. When you want to log into your workplace or other service, you can press a button in the service to generate a code, and enter that code when the service you’re logging into prompts for it. The server simultaneously generates the same code from the service. When the codes match, you can log in.
Many mobile devices now let you log in with a fingerprint. The fingerprint readers on these devices are only partly accurate, and fingerprints are not completely unique either. So it’s best to use the fingerprint with a password or other form of authentication.
Although MFA can be tiresome, it is recommend that you use it for every program and service you access. After all, you probably log in to services only a few times each day. By installing an authenticator app, you can set up the use of MFA for your services and halt many kinds of attacks.
Protecting Passwords at Online Services
We’ve discussed how you should manage your passwords securely. But what about the server? It has to recognize your password. But if it contains a database of users and passwords, it’s highly vulnerable to malicious intrusion.
The two main ways to protect your password are hashing and salting. These techniques have been known for many decades, and all servers should use them.
Hashing means running the characters of your password through some simple mathematical function, often consisting of additions, multiplications, and divisions. A good hash produces a fixed-length string of random characters. Because information is lost during the hashing, no one can reconstruct the original password from the hash.
When you log in and submit the password, the server hashes it and makes sure the result matches what’s in its database.
Determined and well-funded attackers have found a way to attack hashes: They create a huge database of strings and their associated hashes (which assumes they can determine what hash function is in use). This database is called a rainbow table. If the attacker breaks into a server and obtains the hashes, they look up each hash in the rainbow table and try the various strings that match.
Therefore, hashing should be supplemented by salting. This means adding a short unique string — called a salt or nonce — to the user’s password. Then the combination of password and salt is hashed.
Email Accounts and IT Security
Email accounts are often the gateway to our digital identities, serving as a central hub for managing access to various online services, including social media, e-commerce, banking, and even work-related platforms. Because of this, securing email accounts is one of the most critical aspects of IT security. A compromised email account can lead to a cascade of security breaches, as attackers can use it to reset passwords and gain unauthorized access to other connected services.
To safeguard email accounts, it is essential to implement strong security measures. One of the most effective strategies is to use multi-factor authentication.
Regular monitoring of your email account activity is also an important practice. Look out for any unusual login attempts or changes in settings, such as forwarding rules that you did not set up. These could be indicators that someone is trying to gain unauthorized access to your account.
Monitoring Personal Accounts
Monitoring personal accounts for password leaks is an essential practice in maintaining digital security and protecting your online identity. Password leaks occur when hackers gain unauthorized access to databases containing user credentials, which can then be exposed or sold on the dark web.
To mitigate the risks associated with password leaks, it is crucial to be proactive in monitoring your accounts for signs of compromise. One effective method is to set up search engine alerts for your usernames or email addresses.
Additionally, password leak checkers are an invaluable tool for identifying compromised credentials. Websites and services such as Have I Been Pwned and Google’s Password Checkup can scan your email address or password against databases of known breaches to determine whether your information has been leaked.
If you receive an alert that your password has been compromised, it is important to act quickly. Change your password immediately on the affected site and any other site where you may have used the same password.
Modern web browsers such as Google Chrome, Firefox and Safari have integrated security features that alert users if their passwords have been compromised in a data breach. These browsers can detect when saved passwords are no longer secure and notify users about which accounts are affected, prompting them to take action to protect their information.
When you use a browser’s built-in password manager, it securely stores your login credentials for various websites. If any of these stored passwords match a known data breach, the browser will issue a security alert.
Security Aspects of Online Banking and Credit Cards
Online banking and the use of credit cards offer convenience and accessibility for users to manage their finances from anywhere. However, this convenience comes with significant security risks, as these services are prime targets for cybercriminals looking to steal personal information and financial assets.
One of the foundations for online banking security is the use of secure connections, typically indicated by a URL that begins with https://
and a padlock icon in the browser’s address bar. Always ensure that you are on the bank’s legitimate website before entering any personal information. Phishing attacks, where fraudulent websites mimic legitimate ones, are a common threat. Another critical security aspect is multi-factor authentication (MFA), which most banks now require or offer as an option.
Avoid using public or shared computers, as they may be infected with malware that can capture your keystrokes or steal your login credentials. Similarly, public Wi-Fi networks are often insecure and can be used by attackers to intercept your data. If you must use public Wi-Fi, consider using a Virtual Private Network (VPN) to encrypt your connection and protect your information.
Guided Exercises
-
Why is it important for a password to be long?
-
What should you do if someone calls from Microsoft and asks for your password so they can fix a security problem on your Windows system?
-
What are some advantages of using a password manager?
Explorational Exercises
-
In hospitals, clinicians typically roam from one floor to another and have to log in frequently to check on patients and enter their notes. What form of authentication might be good for a hospital to use?
-
Some professionals delegate social media postings to a service that publishes the postings at planned times. Do you have to give your password to that service and allow the service to have complete access to your account?
Summary
This lesson covers ways to prove your identity so you can get secure access to resources over the internet. The lesson discusses how to protect passwords that should be used both by you, the user, and by the server you’re logging into. Different types of multi-factor authentication are introduced, along with password managers and single sign-on.
Answers to Guided Exercises
-
Why is it important for a password to be long?
Long passwords (20 characters, or ideally even longer) are the most resistent to brute force attacks.
-
What should you do if someone calls from Microsoft and asks for your password so they can fix a security problem on your Windows system?
Hang up. Scammers claiming to be Microsoft are common. But anyone who asks for your password is a scammer, and it might be helpful to call the company that they claim to represent and warn the company that someone is targetting their clients in a scam.
-
What are some advantages of using a password manager?
Your passwords are stored in a secure, encrypted manner so that you don’t have to write them down in plain text. You need to remember just your master password. You can create long, complex passwords without having to try to type them in.
Answers to Explorational Exercises
-
In hospitals, clinicians typically roam from one floor to another and have to log in frequently to check on patients and enter their notes. What form of authentication might be good for a hospital to use?
Badge readers are a good solution in such a setting. Each clinician carries a badge with a strip containing their identifying information. Each nurse’s station has a computer with a badge reader. To gain access to electronic records, each doctor or nurse holds their badge up before the badge reader, and possibly also enters a password for two-factor authentication. If they leave without logging out, the account is logged out automatically after some idle time.
-
Some professionals delegate social media postings to a service that publishes the postings at planned times. Do you have to give your password to that service and allow the service to have complete access to your account?
No. These services have very limited access to your account. The service uses the social media’s application programming interface (API) to publish your postings. The service has its own API password, so you can revoke access whenever you want. The operations allowed to the service can also be limited.