Week 11 — Ethics, privacy and security
Four words for the digital world, the attacks and the defenses, a breach that started with one missed update, and how to check a password without telling it.
This week has four short videos. Watch them in order. When a video asks a question, pause it and answer first.
Video 1 · Right, legal, private, secure
Ethics, law, privacy and security, and two ways to judge a hard case.
Read the script
Hello, this is Peter Zou. Your phone knows where you slept last night. It logged your location all night. Who else knows? And is that a problem of ethics, of law, of privacy, or of security? This video gives you four words, and two tools to judge hard cases.
Four words that people mix up. Ethics asks: is it right or wrong? Law asks: is it required or forbidden? Many legal things are not ethical. Privacy is your control over data about you. Information privacy means protecting data about individuals. Security is protection of systems and data from attack. Careful: a company can have perfect security and still hurt your privacy. It guards your data well, and then sells it.
People in IT work by four principles. Integrity, accountability, confidentiality, and transparency. Hard cases are called dilemmas. A dilemma is usually not good against evil. It is one good thing against another good thing. Convenience or profit on one side, privacy or fairness on the other.
To judge a dilemma, Chapter 10 offers two thinking machines. The first is natural laws and rights. It judges an action by rules and basic human rights. It does not look at the consequences. If an action breaks a rule, it is wrong, even when the result is good. The second is utilitarianism. It weighs the good results against the harmful ones. The greatest good for the greatest number. A city puts cameras on every street, and crime falls. Results say yes. Rights may say no. The same action can get two different answers.
Intellectual property is property you cannot touch: music, books, software, designs. Digital rights management is the lock that controls access to it. Protecting it is hard once the work is digitized. A digital copy is perfect and free. Plagiarism means passing someone’s words off as your own. If you credit the source, it is not plagiarism. It is a citation.
Anonymity means nobody knows who you are. It protects whistleblowers. But it also protects spammers and criminals. A proxy server is one tool for anonymity. Your traffic goes through its computer, so websites see the proxy, not you. The drawback is trust. The proxy company sees everything you do.
Why do employers watch employee email and browsing? The strongest reason is liability. Courts have held employers responsible for their employees’ offensive posts. In one well-known case, an airline was held responsible for harassment of its first female pilot on an online forum. Other reasons are security, productivity, and keeping personal files off company computers. Usually legal. Is it ethical? Run the two machines.
Your turn. Greatest good for the greatest number. Which machine? Utilitarianism. You use someone’s words and you name the source. Plagiarism? No. That is a citation. Which machine ignores the consequences? Natural laws and rights. Four words, two machines. Next: the attacks, and the defenses.
Video 2 · Attacks and defenses
The common attacks, the risk matrix, and the two kinds of controls.
Read the script
Hello, this is Peter Zou. Every company is a building with many doors. Some attackers pick the lock. Some just ask nicely to be let in. This video names the attacks, and the two kinds of defense.
Malware is malicious software. A botnet is an army of infected computers, called zombies, controlled by one criminal. Together they flood a website with requests until it crashes. That is called distributed denial of service. Phishing is a clever email that lures you to click. The click downloads the malware. Spyware watches what you do, often installed without your knowledge.
Ransomware locks every file on a server, then sells you the key. Why is it hard to catch these groups? They shut down and come back under a new name when the police get close. Information leakage needs no hacker at all. A lost laptop. Papers in a dumpster. And spam keeps getting harder to fight. It moves to phones, block lists catch honest companies by mistake, and clean-up is expensive.
A company cannot fix everything at once. A risk matrix decides what comes first. Two questions for every threat. How likely is it? How bad would it be? Likely and bad: fix it now. Unlikely and small: accept it.
Defenses come in two families. Administrative controls are made of people and paper. A written security policy. Approval before a new account is created. Separation of duties, so no single person can steal alone. And an incident response plan: who does what when something happens. Technical controls are enforced by the system itself. Authentication: passwords, fingerprints, and multi-factor codes. Encryption scrambles data, so stolen data is useless. A firewall inspects incoming and outgoing traffic, and blocks or permits it by the company’s rules. Memory trick. Administrative: people and paper. Technical: the machine enforces it.
The strongest firewall has one weak spot: us. Social engineering means tricking people into breaking security rules. Attackers push three buttons. Our wish to help. Our respect for authority, like an email that seems to come from the CEO. And greed: you have won, just confirm your bank details.
So the last control is education. A security awareness program trains people, and keeps reminding them, because attention fades. It starts with passwords. Never use personal information: not your name, not your birthday, not your dog. Use a different password on every site. Long beats clever.
Your turn. A written rule: every new account needs a manager’s approval. Administrative or technical? Administrative. People and paper. The system blocks traffic that breaks the company’s rules. Technical. A firewall. An email signed by the CEO asks you for your password. Social engineering. The authority button. Technology is only half of security. People are the other half.
Case video · One missed update
The background for this week’s case: the 2017 Equifax breach.
Read the script
Hello, this is Peter Zou. Equifax is one of the three big credit bureaus in the United States. It keeps data about almost every adult in the country. You never chose to give it your data. In 2017, attackers walked out with a huge part of it.
In March 2017, a serious hole was found in a common piece of web software. A fix was published right away. Equifax used that software on a website where people could dispute their credit reports. But that website was not updated.
In mid-May, attackers found the unpatched site and got in. They stayed inside for about two and a half months. They searched the databases and took data out in small pieces. One more failure made it worse. A security tool that should have inspected the outgoing traffic was not working, because a digital certificate had expired. So nobody saw the data leave.
At the end of July, the certificate was renewed, the tool started working, and the strange traffic was found at once. But the public heard about it only on September 7th, about six weeks later. About 147 million people were affected. Names, Social Security numbers, birth dates, addresses, and for some people, driver’s license and credit card numbers.
The reaction was angry. The help website for victims was confusing at first. Some executives had sold company shares before the news came out, and one was later convicted of insider trading. The chief executive retired within weeks. In 2019, Equifax agreed to a settlement of up to about 700 million dollars.
Look at this story with Monday’s four words. A security failure: one update, missed. A privacy failure: data people never chose to share. And questions of law and of ethics: what should a company tell the public, and when? Keep those four words in front of you today.
Lab preview · Fingerprints for passwords
Hashing, and how to check a password without sending it.
Read the script
Hello, this is Peter Zou. Here is a puzzle. You want to know if a password appeared in a data breach. But you do not want to tell anyone the password. Can that work? Yes, with a fingerprint.
A hash is a fingerprint of a text. A math function turns any text into a long code of letters and numbers. The same text always gives the same fingerprint. Change one character, and the fingerprint changes completely. And there is no way back. From the fingerprint alone, nobody can calculate the text. That is why good companies store the fingerprint of your password, never the password itself.
Security researchers collect the fingerprints of passwords from real data breaches. Hundreds of millions of them. If your password’s fingerprint is in that library, attackers already have it on their lists.
Now the clever part. Your computer sends only the first five characters of the fingerprint. The service sends back every fingerprint that starts with those five characters, often about two thousand. Your computer looks for the match itself. The service saw five characters shared by thousands of passwords. It cannot know which one you meant. This is called privacy by design: the system is built so that it cannot see your secret.
Remember three things. A hash is a fingerprint. Only five characters leave your computer. And one rule for the lab: never type a password you really use. We check sample passwords only. In the lab, you will see how often some famous passwords were breached. The numbers are bigger than you think.
Lab help · Has this password been breached?
After the lab: how to finish the three graded parts at home. The method on other examples, never the answers.
Read the script
Hello, this is Peter Zou. I will not give you the answers. I will show you the method with a different example. Then you pause the video and do your own.
First, open Google Colab and start a new notebook. Open the code page for this week. Copy Cell zero, from its title line to the next title line. Paste it into a new cell, and press the play button. Never go back and change an old cell.
Never type a password you really use. Use the sample passwords, or invent a new one that you will never use.
Part one is Challenge 1, with three blanks. The word is PYTHON. Square brackets, colon, two, gives the first two letters: P Y. Square brackets, two, colon, gives everything after them: T H O N. Colon first means “the first”. Colon last means “everything after”. Our computer sends only the first five characters of the fingerprint. It keeps the rest. The hint is always on the same line, after the hash sign. Pause the video now. Fill in blank one and blank two.
The service sends back hundreds of fingerprints. Your computer compares each one with the part it kept. Which name did you give the part you kept? Look at blank two. The name is on the left of the equals sign. Pause the video, and fill in blank three.
Now run the cell. Red bars for passwords found in breaches, with big numbers. A green label for a password that was never found. The last line must say: self-check OK. A name error with four underscores: one blank is still empty. An error with the number four hundred: the service did not get exactly five characters. Every bar green, and self-check failed: blank three compares with the wrong piece. When you see self-check OK, take a screenshot of the whole chart. Save it as your last name, your first name, Week 11 Lab.
Part two is Challenge 4. Copy it, paste it, and run it first, with the mistake. You get a red error. Read only the last red line. Only five characters may leave your computer. What does it send? The whole fingerprint: forty characters. Which slice from Part one gives the first five? Pause the video, and fix that one line.
The same cell has one blank, in years to guess. A phone PIN has four positions. Each position has ten possible digits. So there are ten to the power of four combinations: ten thousand. In Python, two stars mean “to the power of”. In the lab, the pool is the number of possible characters. The power is the length of the password. In Python, l e n gives the length of a text. The word PYTHON has a length of six. Pause the video, and fill in the blank.
In Step one, replace the example password with a new one you invent. Run the cell. The last line must say: self-check OK. Take a screenshot of the chart. Save it as your last name, your first name, Week 11 Lab, Part 2.
Part three is one or two sentences. Look at your Challenge 4 table. Which password would survive longest, and why? Then name one rule you will use for your real passwords. Now open the Week 11 Lab Submission on Moodle. Upload your two pictures. Type your sentences in the text box. Then save your changes. Stuck? Ask me in class, or write in the Question Box.
In Moodle
The quiz, the case and the lab for this week are in Moodle. Due dates are in Moodle.