Recognizing Threats in Computer Security, Explained

UPI Study › Courses › Introduction to Artificial Intelligence › Free lessons › Lesson 3.4 Free with a free account

Recognizing Threats in Computer Security

Introduction to Artificial Intelligence · Chapter 3: Programming Foundations and SecuritySection 3.4 · lesson 21 of 6914 min · free with a free account

← How Interpreters and Compilers Process CodeNext lesson: Real-World Uses of Machine Learning →

Earn 3 college credits for Introduction to Artificial IntelligenceRecommended for credit by NCCRS · Computer Science 373 · self-paced · one payment, lifetime access

In this lesson

Common computer security threats and the layered defenses that counter them.

  • Explain confidentiality, integrity, and availability and the threats that attack each
  • Identify types of malware, phishing, social engineering, network, web, and insider attacks
  • Match updates, multi-factor authentication, encryption, and least privilege to the threats they counter
  • Apply secure coding habits such as input validation, parameterized queries, and salted password hashes

Free study notes

Get this lesson's notes by email

The key points and 4 practice questions with answers, in your inbox. One email, free.

One email. Unsubscribe in one click.

Transcript

Everything said in the video, section by section (1,908 words). Read along, or search it.

Opening Analogy

Layers of Protection Around a House

A house is protected by more than one thing: a lock on the door, a latch on the window, a neighbor who notices strangers, and a rule about who gets a spare key. No single measure is perfect. But together, they make a break-in much harder. Computer security works the same way. Almost every program you write will handle something worth protecting: passwords, messages, payments, or personal records. So what can go wrong, and what answers it?

Core Goals

Confidentiality, Integrity, and Availability

Security protects three things, often remembered as confidentiality, integrity, and availability. Every threat in this lesson attacks at least one of them. Confidentiality: only authorized people can see the information. It's attacked by stealing or exposing data, like a stranger reading customer records. Integrity: information stays accurate and unaltered. It's attacked by changing data without permission, like altering a grade, or a bank balance. Availability: systems and data are usable when needed. It's attacked by blocking or destroying access, like knocking a website offline.

Key Terms

Threat, Vulnerability, Attack, and Risk

Four words have specific meanings. A threat is anyone or anything that could cause harm: a criminal, a careless employee, or malicious software. A vulnerability is a weakness that a threat could use, like unpatched software, or a guessable password. An attack is an attempt to take advantage of a vulnerability. And risk is how likely harm is, combined with how damaging it would be. So a defense can block the attacker, repair the weak point, or protect the asset itself.

Malware Types

Viruses, Worms, Trojans, Ransomware, Spyware

Malware, malicious software, is any program designed to harm a system or its users. Knowing the type helps you choose the response. A virus attaches itself to a file, and spreads when that file is shared and opened. A worm spreads by itself across networks, with no user action needed. A trojan pretends to be a useful program, like a free tool, and opens a door for the attacker once it's installed. Ransomware locks files and demands payment to unlock them, like a hospital that finds its records unreadable. And spyware hides inside other software, and quietly records activity, such as every key you type.

Phishing

Messages That Imitate Trusted Senders

Phishing is a message that imitates a trusted sender, to trick you into revealing information, opening a harmful file, or clicking a harmful link. It arrives by email, by text message, sometimes called smishing, and by phone call, called vishing. Spear phishing targets one person or organization with personal details, which makes it far more convincing. Typical warning signs: pressure to act right now, a sender address that's slightly off, a link that leads somewhere else, and a request for a password or a payment.

Social Engineering

Pretexting, Impersonation, Baiting, Tailgating

Social engineering manipulates people, not machines. It's often the easiest way in, because a person can be persuaded to open a door that technology keeps locked. Attackers pull a few emotional levers: authority, urgency, fear, helpfulness, and curiosity, or reward. Pretexting invents a believable story: a caller claims to be from IT, and needs your password. Verify through an official channel you already know. Impersonation poses as someone with authority, like a message from the CEO asking for an urgent payment. Confirm it, using a separate contact you know. Baiting leaves something tempting, like a USB drive labeled Salaries, in a parking lot. Never plug in unknown devices. And tailgating follows an authorized person through a secure door. Ask them to badge in themselves.

Network Attacks

Eavesdropping, Man-in-the-Middle, Denial of Service

Now attacks on networks. Eavesdropping reads traffic sent without encryption, like data sent over an open public Wi-Fi network. It hits confidentiality. A man-in-the-middle secretly sits between two parties, and can read or change what passes, like a fake hotspot. That hits confidentiality and integrity. Denial of service floods a system so real users can't get in, like a shop's site on a sale day. A distributed attack uses many machines at once. That hits availability. And password attacks use automated tools to try many passwords, or reuse passwords leaked from other sites.

Web Attacks

SQL Injection and Cross-Site Scripting

Web applications accept input from strangers, which makes them a favorite target. Two well-known problems come from one mistake: trusting input. Injection, such as SQL injection: a program builds a database command by joining in text a user typed. A cleverly written entry is then read as part of the command, not as data. Cross-site scripting: an attacker gets harmful script code into a page, through a comment box, say, and it runs in other visitors' browsers. Picture a bank check that says, pay to the order of, blank. Someone writes: Sam, and also all the money in the account. A bank that obeys has confused data with a command. Injection works the same way.

Data Breaches

A Chain of Smaller Failures

A data breach is an incident, in which information is accessed or exposed by someone who shouldn't have it. Breaches usually come from a chain of smaller failures: a stolen password, an unpatched flaw, a misconfigured storage setting, a lost device, or an insider. Because it's a chain, removing any one link can stop it. The damage can include identity theft, financial loss, legal penalties, and lost trust.

Quick Check

Malware That Spreads on Its Own

Quick check. One weekend, the same unknown program turns up on every computer in an office, and they all slow down. The logs show it crossed the network on its own, while nobody was in the building. Which kind of malware is it? Pause, and decide. A worm. It spreads by itself across a network, with no user action needed, and it eats up resources, which is why everything slows. A virus is tempting, but a virus rides on a file that someone shares and opens. And a trojan needs someone to install a program that looks useful.

Insider Threats

Malicious, Negligent, and Compromised Insiders

Not every threat comes from outside. An insider already has legitimate access, so many outside defenses don't apply. A malicious insider deliberately misuses access, like a departing employee copying a client list. Safeguards: limit access, watch for unusual activity, and remove access promptly. A negligent insider causes harm by mistake, like emailing a spreadsheet to the wrong person. Training and confirmation prompts help. And a compromised insider is a real person's account, controlled by an attacker, like a phished staff login. Multi-factor authentication, and alerts for odd logins, help there.

Defense One

Patching Software With Updates

Four basic defenses cover a surprising share of everyday risk. None is complete alone, but each closes a different door. First, updates. Software flaws are found all the time, and makers release patches to fix them. Once a flaw is public, attackers look for systems that haven't been patched. So keep operating systems, apps, and the libraries your own code depends on up to date. It's one of the cheapest, most effective defenses, and automatic updates mean you don't have to remember.

Defense Two

Authentication Factors and MFA

Second, authentication: proving someone is who they claim to be. Proof comes in three kinds. Something you know, like a password or PIN, which can be guessed, stolen, or reused. Something you have, like a phone app code or a security key, which can be lost or stolen. And something you are, like a fingerprint or a face, which can't be changed if it's copied. Multi-factor authentication requires two or more different kinds, so a stolen password alone isn't enough. Codes from an authenticator app, or a physical key, are generally stronger than codes sent by text. For passwords, length and uniqueness matter most. Use a long passphrase, never reuse it, and let a password manager remember it.

Defense Three

Encryption in Transit and at Rest

Third, encryption. It scrambles readable data, plaintext, into an unreadable form, ciphertext, using a key. Only someone with the right key can turn it back. It's used in two places. In transit: data crossing a network, like web traffic protected by HTTPS, the padlock in a browser. That defeats eavesdropping. At rest: data stored on a disk, a phone, or a database. If a laptop is stolen, encrypted files stay unreadable. But encryption is only as strong as the protection of its keys. And it doesn't help against someone with legitimate access to the decrypted data.

Defense Four

Least Privilege Limits the Damage

Fourth, least privilege: every person and program gets only the access needed for its job, and no more. If an account is compromised, the damage is limited to what it could reach. A cashier needs the sales screen, not payroll records or administrator settings. A report-generating program needs read-only access to the tables it summarizes, not the ability to change or delete data. And a new employee needs their own team's files, not every department's.

Layered Defense

Matching Defenses to Threats

Which defense helps against which threat? Updates are strong against malware. Multi-factor logins are strong against phishing. Encryption is strong against eavesdropping. Least privilege is strong against insiders, and secure code is strong against web injection. A stolen database is covered by several at once. But no threat is covered by a single defense alone. That's why security uses several layers together, just like the house.

Quick Check

Protecting a Copied Database File

Quick check. Attackers copy a company's customer database file, from a cloud folder that was set up wrong. Which one defense would protect the data inside that copied file? Pause, and decide. Encryption at rest. The file was stored encrypted, so without the key, the stolen copy is just scrambled data. Multi-factor logins protect accounts, but nobody logged in here: the folder was simply open. And updates fix software flaws, not a storage setting someone got wrong.

Security Mindset

Asking How Code Could Misbehave

Many attacks succeed not through a clever trick, but because a programmer didn't imagine anyone would do something unexpected. So besides asking, does my code work for normal use, also ask: what could someone do to make it misbehave? Four questions help. What are we protecting? Who might attack it, and how? What could go wrong: trace where outside data enters, and where it ends up. And what will we do about it?

Secure Coding

Parameterized Queries and Salted Hashes

Good habits for secure code. Never trust input: check its type, length, and format, and prefer a list of what's allowed, over a list of what's banned. Keep data separate from commands. Instead of joining a typed name into a database query, use a parameterized query: the name travels separately, so it can never become part of the command. Never store passwords as typed. Store a salted hash: a one-way scramble that can't be reversed, combined with a random extra value, the salt, so identical passwords give different results. Keep secrets, like keys, out of the code, and load them from protected settings. Fail safely: show users a plain message, and keep the details in a private log. And use proven tools for encryption and login. Don't invent your own.

Core Habit

Untrusted Input and Least Access

If you keep one habit, keep this one: treat all input as untrusted, and give every part of a program the least access it needs. These two prevent a large share of real-world flaws. Security isn't a feature added at the end. It's cheaper, and more effective, to think about it while you design and write the code. Threats to AI systems themselves come later in the course.

Key Takeaways

Threats and the Defenses That Answer Them

To sum up. Security protects confidentiality, integrity, and availability. Malware, phishing, and social engineering often succeed by exploiting people, not technology. Network attacks, injection, breaches, and insiders each hit a different weak point. Updates, multi-factor authentication, encryption, and least privilege each close a different door, and work best together. And secure code treats all input as untrusted, and keeps data apart from commands.

Reflection

A Clinic With One Shared Password

Something to think about. A small clinic stores patient records on a shared computer, and every employee logs in with the same password. List the threats this setup invites. Then decide: which single change would reduce the risk the most?

About Introduction to Artificial Intelligence at UPI Study

Introduction to Artificial Intelligence (Computer Science 373) is a self-paced online course of 69 video lessons in 9 chapters, from intelligent agents and search to game strategy, neural networks, logic and reasoning, machine learning, language, robotics and AI ethics. It carries a NCCRS credit recommendation for 3 semester credits.

Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Compare: AI vs Current Trends in CS and IT

Why take it here

Why students take Introduction to Artificial Intelligence with UPI Study

How machines search, reason and learnIntroduction to Artificial Intelligence covers how AI systems are built: intelligent agents, search and heuristics, game strategy, logic, neural networks, machine learning, language and perception, and the ethics of AI. It is a common upper-level course in computer science degrees.
Credit at a fraction of the priceThe same 3 credits can cost $750 or more at a US college. Here it is one payment, self-paced, with lifetime access.
Finish your degree soonerTransfer credits reduce the courses you still owe, so you can graduate earlier or lighten a heavy semester.
Strengthen an applicationA completed college-level course on an official transcript shows admissions and scholarship committees you can do the work.
Study on your own scheduleNo start dates, no deadlines. Watch the lessons, practice, and take the final when you are ready.
130,000+students helped with college creditsACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Where the credit goes

Universities that work with NCCRS

Introduction to Artificial Intelligence carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.

FAQ

Questions students ask us

About Recognizing Threats in Computer Security

What is the CIA triad in computer security?
The CIA triad is confidentiality, integrity, and availability, the three things security protects. Confidentiality means only authorized people can see information, and data theft attacks it. Integrity means information stays accurate and unaltered, and changing a grade or bank balance attacks it. Availability means systems are usable when needed, and denial-of-service attacks that knock a site offline target it.
What is the difference between a virus and a worm?
A virus attaches itself to a file and spreads when someone shares and opens that file, while a worm spreads by itself across networks with no user action. If the same unknown program turns up on every office computer over a weekend, and the logs show it crossed the network on its own while nobody was there, it is most likely a worm. A trojan differs from both: it poses as a useful program that someone installs.
How does SQL injection work and how do you prevent it?
SQL injection happens when a program builds a database command by joining in text a user typed, so a crafted entry is read as part of the command instead of as data. The main prevention is a parameterized query, which sends the user's input separately so it cannot become part of the command. Validating input type, length, and format adds another layer.
What is multi-factor authentication?
Multi-factor authentication requires proof from two or more different kinds of factors: something you know, like a password; something you have, like a phone app code or security key; and something you are, like a fingerprint. A stolen password alone is then not enough to log in. Codes from an authenticator app or a physical key are generally stronger than codes sent by text.

About the Introduction to Artificial Intelligence course

How many college credits is Introduction to Artificial Intelligence?
Introduction to Artificial Intelligence (Computer Science 373) carries a NCCRS credit recommendation for 3 semester credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
How much does Introduction to Artificial Intelligence cost and what is included?
$250, paid once, with lifetime access: all 69 video lessons, a practice quiz after each, the graded work and final exam, and an official transcript when you finish. Students who want several courses choose UPI Study PRO instead.
Which universities accept UPI Study credits?
UPI Study has signed partner agreements with universities such as Thomas Edison State University, University of the People and Charter Oak State College, and works with universities such as Penn State, SNHU and SUNY. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities. Use "Find my college" on this page to check yours.
How long does Introduction to Artificial Intelligence take?
It is self-paced with no deadlines. The 69 lessons total about 16 hours of video; most students add reading and practice time and finish in a few weeks to a few months, on their own schedule.
How are the exams done?
Quizzes and assignments are online in the course. The final exam is taken online with proctoring; a person on the UPI Study team checks assignments, usually within two days.
How do my credits reach my college?
When the course shows 100% complete, request the official transcript from your dashboard. It is sent to the college you name, and you can send it to more than one. Check your college first with "Find my college" on this page, or ask Athena.

Ready for the full course? Earn 3 credits in Introduction to Artificial Intelligence.

69 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.

Introduction to Artificial Intelligence
3 credits · NCCRS
Enroll →