AP Computer Science Principles · Unit 5 lecture · Part 10 of 11 · 9 min

5.6 Safe computing: attacks and defensesHow systems get broken into

Mr. Thompkins
Last piece of safe computing: the attacks themselves. There are only a handful of names you need, and each one has a matching defense. Learn the pairs and most attack questions take ten seconds.

All real-world systems have errors or design flaws that can be exploited to compromise them. Regular software updates help fix errors that could compromise a computing system. That's why your phone keeps asking to update: many updates close security holes that attackers already know about.

A computer virus is a malicious program that can copy itself and gain access to a computer in an unauthorized way. Computer viruses often attach themselves to legitimate programs and start running independently on a computer. Malware is software intended to damage a computing system or to take partial control over its operation. Every virus is malware, but malware also includes programs that spy, steal or lock your files. Computer virus and malware scanning software can help protect a computing system against infection.

?Wait, what's the difference between a virus and malware?
Malware is the big category: any software meant to damage a system or take partial control of it. A virus is one kind of malware, the kind that copies itself, often by attaching to a real program. All viruses are malware; not all malware is a virus.

Phishing is a technique that attempts to trick a user into providing personal information. That personal information can then be used to access sensitive online resources, such as bank accounts and emails. It usually arrives as an email or text that looks like it came from somewhere you trust. Unsolicited emails, attachments, links and forms in emails can be used to compromise the security of a computing system, so they should be opened only from trusted sources.

From: [email protected]Dear Valued Member,Unusual sign-in detected.Verify within 12 HOURS oryour account will be frozen.Verify my passwordlink goes to: nfcu-verify.infoNorthfield Credit Union12345
A fake email, with five warning signs: (1) a look-alike address with a 1 for an l, (2) a greeting without your name, (3) urgency and a threat, (4) a button asking for your password, (5) a link to a different site.

Keylogging is the use of a program to record every keystroke made by a computer user in order to gain fraudulent access to passwords and other confidential information. It can come from malware on your device or a small hidden device plugged into a public computer. Unlike phishing, it doesn't trick you into typing somewhere fake; it records what you type everywhere.

?Wait, what's a wireless access point?
It's the device that creates a Wi-Fi network and connects it to the internet, usually part of a router. Every packet you send over that Wi-Fi goes through it first. Whoever controls the access point can see, and sometimes change, any traffic that isn't encrypted.

Data sent over public networks can be intercepted, analyzed and modified. One way that can happen is through a rogue access point: a wireless access point that gives unauthorized access to secure networks. An attacker sets up a Wi-Fi network named like the café's and waits for people to connect. Encryption, like HTTPS, keeps intercepted data unreadable, which is why it matters most on public Wi-Fi.

ThreatWhat it isBest defenses
PhishingA fake message or site that tricks you into giving up informationDon't click; go to the real site yourself; multifactor
KeyloggingA program or device that records every key you pressMalware scanning; updates; avoid typing passwords on public computers
Computer virusMalicious code that copies itself, often attached to a real programInstall only trusted software; scanning; updates
Malware (any kind)Software meant to damage a system or take partial control of itUpdates, scanning, don't open unknown attachments
Rogue access pointA wireless access point that gives an attacker access to your trafficAvoid unknown Wi-Fi; use encrypted (HTTPS) connections
The threats the CED names, and the defense that matches each one.
Pause and think
Your friend's account sends you a message: "lol is this you?" with a link. Is it safe because it's from a friend? What should you do?
I thought about it. Show me
Not necessarily. Accounts get taken over, and attackers use them to send phishing links to friends, because people trust friends. Don't click. Ask your friend another way, like a text or in person, whether they sent it.
Analyze this scenario
At an airport, Leo connects to free Wi-Fi called "Airport_Free_WiFi". Then he gets an email saying his streaming account will be canceled in 24 hours unless he updates his payment details; he clicks the link and types his password. Later, he logs into his email on a shared computer in the airport lounge. Identify each threat Leo faced, and the defense that would have protected him from each.
  1. Threat 1: the Wi-Fi might be a rogue access point set up by an attacker, who could read or change any unencrypted traffic.
    Why?
    The name looks official, but anyone can name a network anything.
  2. Defense: use the airport's official network (or his phone's data), and make sure sites use HTTPS so intercepted data is unreadable.
  3. Threat 2: the email is phishing: urgency, a threat and a request for private information through a link.
  4. Defense: don't click; open the streaming app or type its real address himself. Multifactor authentication would stop an attacker who only has his password. And now he should change that password right away.
  5. Threat 3: a shared public computer could be running a keylogger that records his email password.
    Why?
    Phishing tricks you into typing in a fake place; keylogging records what you type in a real place.
  6. Defense: avoid typing passwords on public computers. If he must, multifactor authentication again means the stolen password alone isn't enough.

Answer: Rogue access point (use trusted networks and HTTPS), phishing (don't click, go to the real site, use multifactor, change the password), and possible keylogging on the shared computer (avoid public computers for logins, use multifactor).

Stuck? Get a hint
  1. There are three moments in the story: the Wi-Fi, the email, the shared computer.
  2. Fake Wi-Fi, fake message, recorded keystrokes: match each to its name.
  3. Multifactor authentication helps against more than one of these.
Check yourself
A program secretly installed on a library computer records everything typed on the keyboard so its creator can collect passwords. This is an example of
  1. Aphishing
  2. Ba rogue access point
  3. Ckeylogging
  4. Da certificate authority
Show the answer

C. Recording every keystroke to steal passwords is keylogging. Phishing would trick the user into typing their information into a fake site or message. A rogue access point is a fake or unauthorized Wi-Fi network.

Check yourself
Why do security experts recommend installing software updates regularly?
  1. AUpdates often fix errors and design flaws that attackers could exploit
  2. BUpdates make a password count as multifactor authentication
  3. CUpdates delete all personal information from the device
  4. DUpdates are required before a device can use the internet's protocols
Show the answer

A. All real systems have flaws, and updates fix many that attackers already know about. The other choices describe things updates don't do.

Exam tip from Mr. T

Learn the four pairs: fake Wi-Fi is a rogue access point, a fake message or site is phishing, recorded keys are keylogging, self-copying code is a virus. Name the threat first, then pick the defense that stops that specific threat.

  • All real systems have flaws; regular updates fix many of them.
  • Virus: self-copying malicious program. Malware: any software meant to damage or control a system. Scanners help.
  • Phishing tricks you into giving up information. Keylogging records your keystrokes. A rogue access point gives an attacker access to your network traffic.
  • Open emails, attachments and links only from trusted sources.