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
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Introduction to Artificial Intelligence.
Lesson complete
Earn the 3 college credits for Introduction to Artificial Intelligence
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: Real-World Uses of Machine Learning →← How Interpreters and Compilers Process CodeNext lesson: Real-World Uses of Machine Learning →
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.
Enroll now → Course details Download the syllabus All Computer Science courses Every course with PRO →
Compare: AI vs Current Trends in CS and IT
Why take it here
Why students take Introduction to Artificial Intelligence with UPI Study
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.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →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?
What is the difference between a virus and a worm?
How does SQL injection work and how do you prevent it?
What is multi-factor authentication?
About the Introduction to Artificial Intelligence course
How many college credits is Introduction to Artificial Intelligence?
How much does Introduction to Artificial Intelligence cost and what is included?
Which universities accept UPI Study credits?
How long does Introduction to Artificial Intelligence take?
How are the exams done?
How do my credits reach my college?
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.
3 credits · NCCRSEnroll →