Computer Science Cybersecurity Fundamentals
Foundations and Goals of Cybersecurity
- Interconnectivity and Risk: As computers have become interconnected, allowing near-instant global communication, the risk from users who do not follow rules or lack positive intentions has increased.
- Physical vs. Virtual Security: Just as the physical world employs locks, fences, and police officers to minimize crime, the virtual world requires cybersecurity to minimize harm and crime.
- Lack of Ethics in Computing: Computers are amoral and execute formally specified problems regardless of the ethical outcome.
* Example: A computer treats code that shuts down a hospital's systems for ransom the same way it treats code that maintains a patient's heartbeat.
- Cybersecurity Definition: A set of techniques used to protect the secrecy, integrity, and availability of computer systems and data against various threats. It evolves as rapidly as the capabilities of computing itself.
- The CIA Triad:
* Secrecy (Confidentiality): Ensuring only authorized individuals can access or read specific computer systems and data.
* Attack Example: Data breaches where hackers reveal credit card information.
* Integrity: Ensuring only authorized individuals have the ability to use or modify systems and data.
* Attack Example: Hackers learning a password and masquerading as the user to send emails.
* Availability: Ensuring authorized individuals always have access to their systems and data.
* Attack Example: Denial of Service (DoS) attacks where hackers overload a website with fake requests to make it unreachable or slow for others.
Threat Modeling and Attack Vectors
- Threat Model: An abstract specification of the "enemy." It profiles attackers based on their capabilities, goals, and probable methods of attack.
- Attack Vector: The specific means or path by which an attacker gains access to a system.
- Dynamic Security Levels: How a system is secured depends heavily on the specific threat being addressed.
* Example 1 (Nosy Roommate): If the threat is a roommate looking at your laptop, hiding it in a dirty laundry hamper might suffice.
* Example 2 (Mischievous Younger Sibling): If the threat is a sibling who knows your hiding spots, you might require a locked safe.
- Formal Threat Models: In professional settings, these are often defined by technical capabilities, such as "an attacker with physical access to the hardware and unlimited time."
- Architecture and Assumptions: Security architects design solutions based on the threat model, assuming certain conditions are met, such as users not revealing their passwords to attackers.
Authentication: "Who Are You?"
- Authentication Definition: The process by which a computer understands and identifies the entity it is interacting with. There are three primary types.
- Type 1: What You Know: Based on a secret known only by the user and the computer (e.g., username and password).
* Pros: Easiest to implement; most widely used.
* Cons: Can be compromised via guessing or social engineering.
* Brute Force Attack: An algorithm that tries every possible combination without cleverness.
* Example: A computer can cycle through all ten thousand possible combinations of a 4-digit PIN (from 0000 to 9999) in a fraction of a second.
* Botnets: Large networks of compromised computers used to perform simultaneous attacks. A botnet can try a common PIN like 2580 across tens of thousands of bank accounts at once, likely succeeding on a few.
* Password Complexity:
* An 8-digit numerical PIN has only 108 (100,000,000) combinations.
* An 8-character password using upper/lowercase letters and symbols has more than 600imes1012 (600 trillion) combinations.
* Memorable Passwords: Using three random words joined together (e.g., "green brothers rock"). With approximately 100,000 words in the English language, a three-word combination yields roughly 1imes1015 (1 quadrillion) possibilities.
- Type 2: What You Have: Based on the possession of a secret physical token (e.g., a physical key and lock).
* Pros: Not "guessable"; typically requires physical presence, making remote attacks from far-off locations (like Florida) difficult.
* Cons: Vulnerable to physical theft, duplication of keys, or lock picking.
- Type 3: What You Are: Biometric authentication based on physical characteristics (e.g., fingerprint readers, iris scanners).
* Pros: High inherent security.
* Cons: Expensive technology; sensor data varies over time (due to lighting or clothing).
* Deterministic vs. Probabilistic: "What you know" and "What you have" are deterministic (either 100% or 0% access). Biometrics are probabilistic; there is a non-zero chance the system fails to recognize the user or recognizes the wrong person (the "evil twin" scenario).
* Persistence Issues: Biometrics cannot be reset. Users have a limited number of fingers or eyes; if fingerprint data is compromised, it is compromised for life.
* Forging: Researchers have demonstrated the ability to forge an iris using only a high-quality photograph.
- Multi-Factor Authentication (MFA): Using two or more forms of authentication (e.g., a password and a physical phone) for important accounts, making it significantly harder for attackers to compromise both.
Access Control and Permissions
- Access Control: The specification of what an authenticated user is permitted to see, modify, and use.
- Access Control Lists (ACL): Lists that describe the specific access every user has for every file, folder, and program.
- Types of Permissions:
* Read: Allows a user to see the contents of a file.
* Write: Allows a user to modify the contents of a file.
* Execute: Allows a user to run a file as a program.
- Bell-LaPadula Model: A multi-level security policy formulated for the U.S.DepartmentofDefense.
* Rule of Thumb 1 (No Read Up): A user with a specific clearance (e.g., "Secret") cannot read files at a higher level (e.g., "Top Secret"). They can, however, read "Secret" and "Public" files.
* Rule of Thumb 2 (No Write Down): A user with a high clearance (e.g., "Top Secret") cannot modify files at a lower level (e.g., "Public"). This prevents accidental leakage of classified information into public domains.
- Other Models: The Chinese Wall model and the Biba model are alternative access control frameworks tailored to different use cases.
System Security and Software Integrity
- Trust Dependence: Security depends on the hardware and software running the authentication programs being uncompromised.
- Malware: Malicious software that can compromise an operating system or create backdoors for attackers.
- Vulnerability Reality: There is currently no way to guarantee 100% security for any program. Implementation bugs often result in vulnerabilities even if the security theory is sound.
- Security Kernel / Trusted Computing Base (TCB): A minimal set of operating system software designed to be as small as possible to make it close to provably secure. Less code is generally safer as it reduces "code bloat" and implementation errors.
- Independent Verification and Validation (IV&V): A process where code is audited by external developers with "fresh eyes" and different expertise.
- Open-Sourced Security: Security code is almost always open-source so the community can find bugs that original authors might miss.
- DEF CON: The largest annual conference held in Las Vegas where security experts and hackers share ideas.
Isolation and Sandboxing
- Isolation Principle: Designing programs so that when (not if) they are compromised, the damage is limited and cannot affect other programs on the computer.
- Sandboxing: An isolation technique where applications are confined to their own environment.
* Metaphor: Like an angry child in a sandbox; if they go ballistic, they only destroy their own sandcastle while other children play unaffected.
- Memory Isolation: Operating systems attempt to sandbox applications by assigning each a specific block of memory that other programs cannot access.
- Virtual Machines (VMs): Simulated computers that live in their own sandbox. If a program crashes or compromises a VM, the other VMs running on the same physical computer remain isolated and unaffected.
Best Practices and Future Topics
- Strong Passwords: Use complex or long word-based combinations.
- Active Security: Enable 2-factor authentication whenever possible.
- Prudence: Never click links in unsolicited emails.
- Upcoming Topics: Future discussions will cover specific hacking methods and the role of encryption in security.