CS 419 Exam info

The final exam will be held in our regular classroom on May 8, 2017 from 8:00-10:00pm.

Please be sure to arrive on time and bring your ID! Expect a format similar to the other exams: a few short-answer questions and a larger number of multiple-choice questions in the style of those on mid-semester exams.

Remember that the final is optional and will only serve to displace a lower normalized grade on one of the three exams. It will not make up for poor performance on quizzes or assignments.

Exam rules

Be sure to arrive on time. If you arrive after the exam starts, you will not be allowed to take it.

This will be a closed book, closed notes exam. Calculators, phones, augmented reality glasses, laptops, and tablets are neither needed nor permitted. If you have these devices, you must turn them off, put them out of sight, and not access them for the duration of the exam.

No other electronic devices are permitted except for hearing aids, pacemakers, electronic nerve stimulators, other implanted medical devices, or electronic watches that function only as timekeeping devices or chronographs.

Bring a couple of pens or pencils with you. An extra pencil is affordable fault tolerance. If you want to splurge, the Palomino Blackwing 602 is considered by many to be one of the finest pencils available. The company advertises its key virtue as "half the pressure, twice the speed." If that claim is really true, using this product might help you complete the exam quicker. If you do not choose bring several extra pencils, you may want to bring a pencil sharpener. Palamino makes a companion Blackwing Long Point Sharpener. This, too, is pricey at $11.00. For a bit less money, you can get what looks like a clone: the Alvin Kum Long Point Pencil Sharpener. Both of these feature two-step sharpening: one for the wood case and another for the graphite core of the pencil. A truly beautiful sharpener is the El Casco Pencil Sharpener, but bringing this to class is really overkill, as is spending over $300 on a pencil sharpener. If you would like to learn the craft of pencil sharpening, there are several books available. The best of these may be How to Sharpen Pencils: A Practical & Theoretical Treatise on the Artisanal Craft of Pencil Sharpening for Writers, Artists, Contractors, Flange Turners, Anglesmiths, & Civil Servants by David Rees. Do not be intimidated by the omission of "students" in the title. You can read more about it at artisinalpencilsharpening.com. A video by David Rees is here. You are welcome to bring a full pencil sharpening travel kit to the exam but be aware that a proper sharpening routine may consume too much time during the exam and may be messy.

Study guide

You are responsible for all the material since the start of the semester.

The a study guide is a concatenation of the previous three study guides and attempts to cover most of the material you should know. It is not a substitute for the lectures, lecture material, and other reading matter. My goal is to put most of the information you need to know in as concise a form as possible, with more elaboration in areas where textbook coverage may be lacking.

Topics

Topics that you should know and may be on the exam include:

Introduction

  • What is computer security? Know the terms
    • Confidentiality
    • Kknow how privacy relates to confidentiality
    • Integrity
      • Data integrity
      • origin/destination (endpoint) integrity
      • system integrity
    • Availability
  • Security goals
    • Prevention
    • Detection
    • Recovery
  • Policy vs. Mechanism
  • Definitions
    • Vulnerability
    • Attack
    • Threat categories (know but don't memorize)
      • Disclosure
      • Deception
      • Disruption
      • Usurpation
  • Examples of threats
    • Snooping
    • Modification
    • Alteration
    • Repudiation of origin
    • Denial of receipt
    • Delay
    • Denial of service
  • You don't need to know the threat matrix or types of attackers/adversaries
  • What is a trusted computing base

Access control

  • What is protection?
  • What is access control?
  • Basic OS and hardware mechanisms for protection
    • Hardware timer
    • Process scheduler
    • Memory management unit (MMU)
    • user vs. kernel mode execution
    • You do not need to know about rings of privilege levels or call gates
    • Purpose of authentication
    • Subjects vs. objects
  • Unix access control model
    • root user
    • User, group, other
    • Read, write, execute permissions
    • Order of checking
    • You don't need to know windows domains
    • What do permissions mean for directories (e.g., execute?)?
    • You don't need to remember /etc/passwd and /etc/group but know that there's a file that stores a user' login, user ID, and a user's default group, and another that stores a list of groups and user names that belong to each group
    • You don't need to remember syntax but know:
      • chmod - change permissions of a file
      • chown - change ownership of a file
      • chgrp - change group of a file
      • umask - initial (default) permissions of a file
      • possible race condition with using umask
    • setuid - what does it do? What are the risks?
  • Access control lists (ACLs)
    • Know the purpose of ACLs
    • You don't need to know any syntax for setting them
  • Principle of least privilege
  • Privilege separation
  • Access control matrix
    • What's a row annd what's a column?
    • I will not ask about access transitions
    • I will not ask about domain transfers
    • Implementation problems of ACLs
    • Implementation problems of capability lists
  • Mandatory Access Control (MAC)
    • DAC vs. MAC
    • Bell-LaPadula Model
      • Simple Security Property
      • *-Property
      • Discretionary Security Property
      • I will not ask about Bell-LaPadula tranquility principles
    • Biba Integrity Model
      • Difference from Bell-LaPadula
      • Simple Integrity Property
      • *-Property
    • Type Enforcement (TE) Model
      • Just the concept
    • Role-Based Access Control (RBAC) Model
      • Just the concept
  • Multilateral security
    • What is the concept?
    • What is a compartment?
    • What does a lattice model represent?
  • Chinese Wall model
    • What is the goal?
    • What is a conflict class?
    • I will not ask you about the Simple security property and *-property but understand when a subject will or will not be granted access to an object.
    • I will not ask you about unsanitized data

Control hijacking

  • What is a buffer overflow?
  • Why are setuid programs attractive targets?
  • Stack overflow
    • Role of stack pointer
    • Return address overwrite
    • NOP slide = landing zone
  • Off-by-one stack overflow
    • What is a frame pointer?
    • Taking control (see hw assignment)
  • Heap overflow
    • What is the risk?
  • Format string attacks
    • What creates the vulnerability?
    • Understand how you can read the stack
    • Understand how you can write to memory via printf
  • Defenses
    • Safe vs. dangerous functions (e.g., strncpy vs. strcpy)
    • What does fuzzing do?
    • What's the problem with languages like C or C++?
    • Data Execute Protection
      • What does it do?
      • What is a return-to-libc attack?
      • What is Return Oriented Programming (ROP)?
    • Address Space Layout Randomization (ASLR)
      • What is it?
    • Stack canaries
      • What are they?
      • When are they checked?
      • Why would a compiler re-order how variables are allocated on the stack?

Other injection attacks (and a few other attacks)

  • Injection attacks
    • What are they?
  • SQL injection attack
    • I do not expect you to know SQL but recognize how the attack works and how interpreted languages and command interpreters in general are vulnerable
    • Prevention
      • Escaping (but error-prone)
      • Parameterized queries
  • Shell and execution environment attacks
    • IFS
      • Understand the concept of an internal field separator
      • How can a redefinition of IFS affect command parsing?
    • system() and popen() risks
      • Understand that the attacks are essentially the same as for SQL injection
    • PATH: what is the risk?
    • LD_PRELOAD/LD_LIBRARY_PATH: what is the risk?
    • How can you attack a program via a file descriptor?
  • Non-injection attacks
    • Understand what is meant by comprehension errors
    • Understand why parsing a filename can be tricky
    • Understand why unicode can make parsing even trickier
    • What is a homograph attack?
      • Understand it's for deception, not injection
    • What is a TOCTTOU (Time Of Check To Time Of Use) attack?
  • Relative Attack Surface Quotient (RASQ)
    • All you need to know is in the exam review slide deck - just understand bias as a multiplier to each possible attack type
    • Know what is meant by an attack vector
    • I will not ask you about root attack vectors, attack surfaces, or effective attack surface value
  • App Confinement
    • Why is access control not sufficient?
    • chroot
      • What does it do?
      • I will not ask you about jailkits
      • Why must it only be run as root?
      • How can you escape a chroot jail if you get root privileges?
    • FreeBSD Jails
      • Understand the goal and how they wanted to improve chroot
      • Ability to restric what root can do inside a jail
    • Linux app isolation
      • Namespaces
        • Recognize the different namespaces: IPC, network, mount (file system), process IDs, user/group IDs, network name
        • Understand the concept of the clone() system call: create a new process but specify which namespaces get shared
      • Capabilities
        • Note that these have no relation to capability lists for files
        • Know that they restrict what a proess can do with root privileges if it becomes root
        • You don't have to know the capabilities but it might be good to recognize a few in the notes
      • Control groups
        • Just know that they allow you to limit the amount of resources used by a proces (CPU, memory, file I/O, network I/O)

App Confinement

  • Containers
    • Security components: namespaces, cgroups, capabilities
    • Benefits
      • Separate policy from enforcement
      • Helps avoid comprehension errors
  • Sandboxing
    • System call interposition
      • Hooks
      • Per-process policies
      • User-level (e.g., Janus) problem: TOCTTOU
    • NaCl (Chromium Native Client)
      • Goal
    • Java
      • roles of bytecode verifier, class loader, security manager
    • OS-level sandboxing
  • Virtual Machines
    • Process virtual machine: what is it? How does it differ from a VM?
    • What's a hypervisor (virtual machine manager)
    • Handling of privileged instructions with VMM in place
    • Native vs. hosted VM
    • Covert channel: what is it?

Malware

  • Worm vs. virus
  • Virus components: infection mechanism, payload, trigger
  • File infector virus
  • Boot sector virus
  • Infected flash drives: AutoRun, hacked firmware, and data leakage
  • Macro viruses
  • Trojan horses
  • Backdoors
  • Phishing, spear phishing
  • Keyloggers
  • I will not ask about JavaScript, source repositories
  • Rootkits: user & kernel mode rootkits
  • I will not ask about the Sony BMG rootkit
  • Hypervisor rootkit: what makes it more dangerous than other rootkits?
  • I will not ask you about the Red Pill (SIDT instruction)
  • I will not ask about Stuxnet
  • What's a 0-day attack?
  • Defenses
    • file protection (including MAC)
    • warning users
    • why they don't always work
    • Anti-virus software
      • Signature scanning
      • Polymorphic viruses: virus payload encryption
      • Sandboxing
      • Anomaly detection
    • removing admin rights from users
    • containers (but know there are problems)

Cryptography

  • definitions: authentication, integrity, nonrepudiation, confidentiality
  • definitions: plaintext, encryption, ciphertext, decription, cipher
  • understand: restricted cipher, public key cipher, symmetric cipher, symmetric key, public key, private key
  • Kerchoff's principle
  • Properties of a good cryptosystem
  • Classic cryptography
    • monoalphabetic substitution cipher; shift cipher
    • attacks: frequency analysis
    • polyalphabetic substitution cipher: Vigenère cipher
    • why is it better than a monoalphabetic substitution cipher
    • one-time pad why is it so secure?
  • What is perfect secrecy?
  • What is a stream cipher seeded pseudorandom number generator
  • What is a rotor machine? just know it's a symmetric polyalphabetic cipher
  • Transposition cipher recognize a skytale
  • What is a block cipher?
    • What is meant by "multiple rounds"?
    • What is a subkey?
    • What is meant by substitution-permutation?
    • I will not ask you how DES works but know it's a Feistel cipher
    • DES vs. 3DES
    • I will not ask you how AES works
    • Electronic Codebook mode (ECB) - problems with using it
    • Cipher Block Chaining mode (CBC)
    • Counter mode (CTR)
  • What is meant bu a trapdoor function?
  • Understand how you use public & private keys
  • I will not ask you about how RSA works but know it's based on the complexity of factoring products of large primes.
  • RSA problems with using it for general purpose communication
  • Diffie-Hellman key exchange
    • You don't have to know the algorithm
    • Know that it's for key exchange and not encryption
    • Understand how public & private keys are exchanged (you don't need to know the formula)
    • Know that it is based on (a^b)mod c and its strength is based on our inability to find the inverse - do discrete logarithms
    • Advantage over using RSA for key exchange
  • Brute-force search for a key power of 2 complexity
  • What is a hybrid cryptosystem? What's the advantage?
  • What is meant by forward secrecy?
  • What are ephemeral keys vs. long-term keys?
  • What are session keys?
  • Understand the goals of differential and linear cryptanalysis
  • I will not ask you about Elliptic Curve Cryptography but understand it's a higher-performance, higher-security (fewer bits) alternative to RSA

Message Integrity

  • What is a one-way function?
  • What is a cryptographic hash function?
  • What are the properties of a cryptographic hash function?
  • I will not ask you about the difference between strong and weak collision resistance
  • I will not ask you how SHA-1 works
  • How does the birthday paradox affect the security of a hash function?
  • What is a Message Authentication Code (MAC)?
  • I will not ash you the formulat for HMAC but understand it's based on hashing the message and a secret key
  • Understand what a CBC-MAC is
  • What's a digital signature? How do you create one?

Key exchange

  • Use of a trusted third party with symmetric cryptography
  • Needham-Schroeder: understand the value of adding a nonce
  • Understand the value of adding a timestamp (you don't have to remember the names Denning-Sacco)
  • Understand the value of using session IDs (you don't have to remember the anames Otway-Rees)
  • Kerberos
    • Understand it uses a trusted third party
    • You don't have to know the protocol
    • Understand that you get an encryted session key and a ticket.
    • Understand what a ticket is (basically, the same session key encrypted for the service)
    • I will not ask about the Ticket Granting Server
  • Diffie-Hellman key exchange (see earlier notes)
  • Key exchange using public key cryptography

Authentication

  • Distinction between identification, authentication, & authorization
  • What are the three factors of authentication?
  • What is multi-factor authentication?
  • Password Authentication Protocol
    • How does it work?
    • What are the security problems?
    • Hashed passwords
    • Dictionary vs. brute force attacks
    • Precomputed hashes
    • Salt
    • Password recovery options
  • One-time Passwords
    • Sequence-based
      • Understand how one-way functions can be used to create a list of one-time passwords
    • Challenge-based
      • Know the basic steps of CHAP
      • What makes it secure over a network?
      • I will not ask you about MS-CHAP
    • Time-based
      • Have a basic understanding of how a SecurID token works: f(time, seed, PIN)
  • How are authentication protocols vulnerable to man-in-the-middle attacks?
  • How do you guard against man-in-the-middle attacks?
  • Public key authentication
  • Identity binding: digital certificates
    • Know the purpose of a digital certificate
    • Understand distinguished name, certification authority, & signature
    • What is certificate chaining?
    • What is a root CA?
    • What is a certificate revocation list (CRL)?

Biometric Authentication

  • Text: Chapter 15: pages 457-482
  • What is statistical pattern recognition?
  • False accept rate (FAR) vs. false reject rate (FRR)
  • Receiver Operator Characteristic (ROC) plot
  • Behavioral factors
  • Fingerprint minutia
  • Robustness vs. distinctiveness
  • Authentication process: enrollment, sensing, feature extraction, pattern matching, decision
  • Challenges:
    • trusted devices and data path
    • human liveness
    • tamper-proof devices and secure communications
    • thresholds
    • compartmentalization
    • theft of biometric
  • Cooperative vs. non-cooperative systems
  • Detecting humans
    • What does Gestalt psychology address?
    • Goal of CAPTCHA
    • Improvement with NoCAPTCHA reCAPTCHA
  • Signed software: understand the principle
    • Why per-page signatures?

Network security

  • Link layer
    • What does a CAM overflow attack do?
    • What does a switch spoofing attack do?
    • What is ARP cache poisoning?
    • How can you defend against ARP cache poisoning?
  • Network layer
    • What is DHCP server spoofing?
    • How does DHCP snooping work?
    • Understand lack of authentication in IP datagrams
  • Transport layer
    • Simplicity of forging UDP packets
    • Understand need for random TCP sequence numbers
    • What is a SYN flooding attack?
    • How can you guard against it?
    • What does a TCP RESET accomplish?
  • Routing
    • What is the security problem with BGP?
    • You don't need to know RPKI and BGPsec
    • Security problem with DNS
    • How does DNS cache poisoning work?
    • Is there a defense against it?
    • What is a DNS rebinding attack?

Firewalls & VPNs

  • Virtual Private Networks
    • What is a tunnel?
    • Tunnel mode vs. transport mode
    • IPsec Authentication Heander (AH) protocol
      • Just understnad what it authenticats and encrypts
    • IPsec Encapsulating Security Payload (ESP) protocol
      • Just understnad what it authenticats and encrypts
    • You don't need to know the ciphers used by IPsec but know that it uses symmetric cryptography and MACs. Know that Diffie-Hellman can be used for key generation.
  • Transport Layer Security (TLS)
    • Goal of SSL/TLS
    • Mutual vs. uni-directional authentication
    • Know that SSL (Secure Socket Layer) evolved into TLS
    • Basic concepts: authentication, key exchange, message integrity, communication.
    • You don't need to know the ciphers used by TLS but know that key echange can be done with public keys, Diffie-Hellman keys, or pre-shared keys; know that data is encrypted with a symmetric algorithm (usually AES), and data integrity is provided with an HMAC.
    • Don't memorize TLS protocol attacks but recognize them if you see them described.
    • Know that client authentication is almost never used. Why?
  • Firewalls
    • High-level goal of a firewall
    • Approaches: Packet filters (screening routers), application proxies, IDS/IPS
    • Packet filters
      • What does a screening router do?
      • What is a filter chain?
      • You don't have to know the syntax of rules but should recognize allow/reject rules
      • You don't have to know the details of differences between Windows, OpenBSD, and Linux implementations
      • What is the basic firewalling principle?
      • Why is a default deny model good?
      • How do you guard against spoofed traffic?
      • What does stateful inspecion add to a packet filter?
      • What is a DMZ (demilitarized zone)?
      • What is deep packet inspection (DPI)?
    • Intrusion Detection/Prevention Systems (IDS/IPS)
      • Understand the three types of systems: protocol-, signature-, and anomaly-based
      • Anomoly vs. misuse detection
      • Problem of false positives
      • Signatures in the context of IDS/IPS
      • Why is anomaly detection difficult?
    • Application proxies
      • What are they?
      • What is a dual-homed host?
      • What is a bastion host?
    • What is deperimiterization?
    • Host-based vs. network firewalls
    • Example IDS/IPS: Snort
      • Function of packet decoder
      • Function of detection engine
      • Function of logging/alert module
      • You don't need to know the rules but understand that you can to traditional packet filtering (addresses, protocol, ports) and add in pattern matching
      • What's a dyamic rule? (triggered by an activate rule)

Web browser security

  • Understand the increase in browser complexity (don't memorize the list but understand the issues)
    • JavaScript, DOM allows modification of pages, more communication models, multimedia support
    • Components come from multiple sources
  • Role of Frames (and iFrames)
  • Risks of mixed http/https content
  • What is an extended validation (EV) certificate?
  • Same-origin policy
    • When are frames considered to have the same origin?
    • What unique resources can an origin access? Cookies, JavaScript namespace, DOM storage, DOM tree
    • I won't ask you about the MIME sniffing attack
    • What can go cross origin? Images, CSS, JavaScript
  • Cross-Origin Resource Sharing (CORS)
    • KNow that a page can load content cross origin
    • But JavaScript-based downloads must be same-origin
    • CORS allows servers to define other acceptable origins
  • Cookies
    • When are they sent to the server?
    • Purpose of HttpOnly
    • Purpose of Secure flag
  • Cross-Site Request Forgery (XSRF)
    • How does it work and when is it a problem?
    • How can you defend against it?
  • What is Clickjacking? How can you defend against it?
  • I will not ask you about screen sharing attacks
  • Input sanitization issues
  • SQL injection attacks
  • Pathname attacks to escape the HTML directory
  • I will not ask you about the Shellshock attack
  • Cross-Site Scriptnig (XSS)
    • What is XSS?
    • Whet causes it?
    • Reflected vs. Persistent XSS
    • How do you defend against it?
  • What is the GIFAR attack?
  • Data transfer with HTML image tags

Mobile device security

  • Why are mobile devices attractive targets?
  • Android security
    • Dalvik VM model
    • Use of Linux user IDs
    • Intents
    • Permission model
    • Use of stack canaries, heap overflow protection, ASLR
    • Malicious intents, permission re-delegation, permission avoidance
  • iOS security
    • Sandbox with per-app directory
    • Permission-based access to resources
    • Non-executable memory pages
    • Mandatory code signing
    • Per-file encryption
    • Disk content encryption by encrypting metadata.
    • Masque attack
  • Hardware support for security
    • ARM TrustZone: secure and non-secure worlds

Content protection, watermarking, and steganography

  • Digital Rights Management (DRM)
    • How can we associate software with a specific computer?
    • The fundemental problem of software checks licensing
    • Advantage of cloud software from a copy protection point?
    • Goal of digital rights management
    • DVB (Digital Video Broadcasting)
      • You don't need to memorize what an Entitlement Cotnrol Message or an Entitlement Management Message is
      • Know that content is encyrpted with constantly-changing keys
      • Those keys are transmitted periodically, encryted with another key.
      • That other key is encrypted with the subscriber's smart card key and updated less frequently.
    • CableCARD
      • Just know that each content stream is encrypted, the card stores rights management data and dectrypts content
      • Keys and rights are transmitted periodically but can be decrypted only inside the CableCARD
    • You don't need to know about AllVid
    • DVD CSS and Blu-ray AACS
      • Just know the very high-level concept: media is encrypted with a key and that key is encrypted once for each device family.
      • Know that once any device key is disclosed, content is freely readable
      • Know that once any media key is disclosed, device keys don't matter
    • What is the analog hole?
    • What is the purpose of the Digital Millennium Copyright Act (DMCA)?
  • Steganography and watermarking
    • What is steganography?
    • How does it differ from watermarking?
    • What is a null cipher?
    • What is chaffing and Winnowing?
    • How can you add data to images that users will not detect?
    • Text shifting