Lecture 1 - Introduction
Lecture 1 - Introduction
• Course Details
• Attack Model
o Attacker Goals
o Attacker Capabilities
0 Course Details
Who am I?
• Nitya Lakshmanan
• Lecturer at SoC
• Research Area: 4G/5G security
• Office: COM3-02-44
• Email id: nitya.l@nus.edu.sg
https://pollev.com/nitya
Teaching Team and Support
• Forum discussion
o Piazza for all discussions
o https://piazza.com/nus.edu.sg/spring2025/cs2107
• Consultation
o Every Thursday (2 PM – 4 PM) [Office: COM3-02-44]
o Each TA will also open a weekly consultation.
https://pollev.com/nitya
Course Objective
https://pollev.com/nitya
Learning Outcome
• Awareness of common and well-known attacks (e.g. phishing, SQL, XSS, ...)
• Understand basic concepts of security (e.g. availability, confidentiality, ...)
https://pollev.com/nitya
Lectures and Tutorials
https://pollev.com/nitya
https://canvas.nus.edu.sg/courses/69923/pages/syllabus
https://pollev.com/nitya
Quizzes and Assignments
• Quizzes: Best 4 out of 5 quizzes
o Take home (1.5 day deadline, 1 attempt)
o Opens at 12 PM, Thursday after lecture, closes Friday, 23:59 PM
o Scope: Quiz 1( L1, L2), Quiz 2( L3, L4), Quiz 3( L5, L6), Quiz 4( L7, L8), Quiz 5( L9, L10)
• Assignment
o CTF-style 2 assignments
o 3 weeks deadline
o Assignment 1 (Week 5 - Week 7), Assignment 2 (Week 10 - Week 12)
o Piazza and consultation: for clarifications
https://pollev.com/nitya
CA Components
CA Component Weightage
Take-home CTF 10% + 10% = 20 %
Quiz (Best 4 out of 5) 6%
Midterm 25%
Tutorial attendance (8 out of 11) 4%
End term 45%
Total: 100%
https://pollev.com/nitya
References
• Security in Computing (5th ed). Prentice Hall.
• Computer Security (3rd ed), Dieter Gollman, Wiley.
o Very concise. Abstract concepts clearly explained.
o Good to have if you plan to take higher level security courses.
• Computer Security: Principles and Practice, William Stallings
• Security Engineering (3rd edition), Ross Anderson.
• Introduction to Modern Cryptography (2nd ed), Katz & Y. Lindell
https://pollev.com/nitya
Important Dates
• 28th Jan 2025 (Tuesday – after 2PM): Makeup tutorial (Chinese NY)
• 30th Jan 2025 (Thursday): No lecture (Chinese NY)
• 6th March 2025 (Thursday): Midterm exam (lecture time and venue: MPSH 2B)
• 28th March 2025 (Friday): Makeup tutorial (Well-Being Day)
• 31st March 2025 (Monday): Makeup tutorial (Hari-Raya)
• 18th April 2025 (Friday): Makeup tutorial (Good Friday Day)
• 5th May 2025 (Monday): End term test, 5:00 PM - 7:00 PM (Venue: TBA)
https://pollev.com/nitya
Registration for Tutorials
• Current vacancy:
o All Monday slots => T1 to T6
o Tuesday Slots => T10, T15, T16
o Friday slots=> filled
https://pollev.com/nitya
1 Plagiarism
Zero-Tolerance for Plagiarism
• https://www.comp.nus.edu.sg/cug/plagiarism/
• All students share the responsibility for upholding the academic standards and reputation
of the University. Academic honesty is a prerequisite condition in the pursuit and
acquisition of knowledge. Academic dishonesty is any misrepresentation with the intent
to deceive or failure to acknowledge the source or falsification of information or
inaccuracy of statements or cheating at examinations/tests or inappropriate use of
resources. There are many forms of academic dishonesty and plagiarism is one of them.
• Plagiarism is generally defined as the practice of taking someone else’s work or
ideas and passing them off as one’s own (The New Oxford Dictionary of English).
• The University does not condone plagiarism.
https://pollev.com/nitya
Zero-Tolerance for Plagiarism
• Students will be reported to University for disciplinary action for plagiarism/cheating
offence
• Assignment:
o Not allowed:
− Sharing of “flag” and program (essentially materials submitted) is considered plagiarism.
− Using tools in public domain is allowed, except tools that are specifically developed for CS2107
assignments.
− Receive or provide any part of the solution to the assignments
o Allowed:
− Group discussion of assignments without producing a solution for reference
− Discussing course material to understand it better
• Resources:
o http://www.nus.edu.sg/celc/programmes/plagiarism.html
o https://www.comp.nus.edu.sg/cug/plagiarism/
https://pollev.com/nitya
Plagiarism from Internet/ChatGPT
• If you completed any work with the aid of an AI tool, you should always
acknowledge the use.
o Specify which AI tools were used, in which parts of the process they were used, what were the
prompts used to generate results
https://pollev.com/nitya
Unintentional Plagiarism
• A student may not knowingly intend to plagiarize, but that should not be used
as an excuse for plagiarism.
• Students should seek clarification from their instructors if they are unsure
whether or not they are plagiarizing the work of another person.
• You also need to protect your work. If using GitHub, make it private.
• If your project work is carelessly accessible by others, and they plagiarize, you
are responsible too.
https://pollev.com/nitya
Common theme
ATTRIBUTION
You must acknowledge the “original sources” of all parts of your
submission at all times.
GIVE CREDIT to who did the work.
https://pollev.com/nitya
3 What is Computer/Information Security
System Failures
https://pollev.com/nitya
Security: Intentional Failures
o An attacker uses objects resemble coins to buy drinks from vending machines
https://pollev.com/nitya
Computer/Information Security
https://pollev.com/nitya
Vulnerability Threat Control Paradigm
• Threat: A set of circumstances that has the potential to cause loss or harm.
o e.g., an attacker with control of the workstation in the lecture theatre could maliciously gather
sensitive info such as passwords
https://pollev.com/nitya
Why Important?
https://pollev.com/nitya
Internet Security Threat Report [link]
https://pollev.com/nitya
Open Web Application Security Project (OWASP)
[link]
https://pollev.com/nitya
CrowdStrike [link]
https://pollev.com/nitya
4 CIA Triad
Security Definitions: C-I-A Triad
Principles that guide the design and implementation of secure systems
Integrity
Confidentiality Availability
Data and
services
https://pollev.com/nitya
1. Confidentiality
• Integrity: Assures that the data has not been altered or tampered with by
unauthorized users.
• Examples:
o A student “hacked” into the university system and modified the grade. Integrity of the
exam result is compromised.
o An application is being modified by an attacker. The integrity of the application is being
compromised.
o The compromised application carries out key-logging. It captures the password
entered by the user and sends it to the attackers. As a result, the confidentiality of the
user password is compromised.
https://pollev.com/nitya
3. Availability
• Assures that systems work promptly, and service is not denied to authorized
users.
• Example:
o A botnet floods a web-server with large number of http requests. A legitimate http
request now takes longer time to be processed. Thus, the quality of the service
significantly degraded.
o In the extreme case, the web-server crashed and not able to provide web service
(distributed denial of service attack (DDoS) on the web-server)
https://pollev.com/nitya
Other Requirements
• Some literatures group them under C-I-A, whereas some argue that they
are fundamentally different requirements.
• Confidentiality
o Anonymity, Privacy, Covert Channel
• Integrity
o Non-Repudiation (digital signature): The ability of a system to confirm that a sender
cannot convincingly deny having sent something
o Source Authenticity: The ability of a system to confirm the identity of a sender
https://pollev.com/nitya
5 Why is it Difficult to be Secure?
Trade-off with Ease-of-use, Performance and Cost
• Ease-of-use: Security mechanisms interfere with working patterns users
originally familiar with (aka usability).
• Performance: Security mechanisms consumes more resources and lowers
performance.
• Cost: Security mechanisms are expensive to develop and manage.
• Difficult to Design:
o System most vulnerable at its weakest point, and there are many constraints. (e.g., we
understand email spoofing very well. But there is no practical foolproof design.)
https://pollev.com/nitya
Difficulty in Achieving Security
• Implementation bugs:
o Even if the design is secure, the system may not be properly implemented, especially for
large, complex systems.
o Also, it is difficult to verify whether an implementation is correct.
• Difficult to operate/manage:
o Human in-the-loop.
o Complexity leads to configuration errors, mismanagement of patches, credential, etc. (e.g.,
developers’ accounts remain in production system)
https://pollev.com/nitya
Summary
• Aware of
o Security Trade-off (usability, cost, performance)
o Difficulty to achieve
https://pollev.com/nitya
6 Encryption and Decryption
Symmetric Key Encryption Scheme
https://pollev.com/nitya
An Application Scenario
k sent via a secure channel, i.e.,
no one can eavesdrop the info.
Key Key
Encrypt Decrypt
Ek(PT) Dk(CT)
https://pollev.com/nitya
Cryptography (Cryptology)
• We might still need a more precise way to describe the security requirement.
• Consider the fingerprint system that unlocks mobile phone.
o Who are the attackers? What is he capable of?
o Does the system consider an attacker who attempts to unlock the phone by pressing a
fingerprint on the sensor?
o Does the system consider an attacker who dissembles the phone and feed in data to the
communication port?
o Does the system consider an attacker who only wants to steal information of the registered
fingerprints?
o…
https://pollev.com/nitya
Which System is more Secure?
• This description is also known as attack model, threat model, adversary model &
security model.
https://pollev.com/nitya
How is the Attack Model Used?
• If some attacks are successful on S1, whereas S2 can prevent all possible
attacks (within the class of attacks formulated by the attack model)
https://pollev.com/nitya
8 Attacker Goals and Capabilities
Attack Model: Attacker’s Goals
Possibly an image
https://pollev.com/nitya
Attack Model: Attacker’s Goals
• Distinguishability: Most modest goal
o With some “non-negligible” probability more than half, the attacker can correctly
distinguish the ciphertexts of a given plaintext (say, “Y”) from the ciphertext of another
given plaintext (say, “N”).
o If attacker is unable to distinguish, we call this property indistinguishability (IND) or the
scheme is semantically secure.
Y' N'
For rigorous definition see the textbook: J. Katz & Y.
https://pollev.com/nitya
Lindell, Introduction to Modern Cryptography, 2nd ed.
Attack Model: Attacker’s Goals
• Total break is the “most difficult” goal. Total Break
• If an attacker can achieve total break, the attacker also can Partial Break
achieve partial break and distinguishability.
https://pollev.com/nitya
Attack Models: Attacker’s Capability
https://pollev.com/nitya
Attacker’s Capability: Ciphertext-Only Attack
(CTO)
• The attacker is given a collection of ciphertext, c and may know some
properties of the plaintext (type of plaintext that is concealed)
o E.g., the plaintext is an English sentence or French text, etc.
o Attacker can’t choose the plaintext
m* (some PT
distribution)
Attacker
https://pollev.com/nitya
Attacker’s Capability: Ciphertext-Only Attack
(CTO)
• The attacker will analysis of the ciphertext itself, generally applying various
statistical tests to it.
o Exhaustively attempt all possible keys to decrypt the ciphertext and obtain the plaintext.
o Verify if the decrypted plaintext matches the expected plaintext distribution; if it does, the
corresponding key is likely Alice's key.
https://pollev.com/nitya
Attacker’s Capability: Known-Plaintext Attack
(KPA)
• The attacker is given a collection of plaintext m and their corresponding
ciphertext c (the attacker can’t choose the plaintext.)
• The attacker may be able to capture one or more (plaintext, ciphertext) pairs.
m* (some PT
distribution)
Attacker
https://pollev.com/nitya
Attacker’s Capability: Known-Plaintext Attack
(KPA)
• The attacker may know that certain plaintext patterns will appear in a
message.
o For example, a file that is encoded in the Postscript format always begins with the same
pattern or standardized header such html, etc
• With this knowledge, the attacker may be able to find the key based on the way
the known-plaintext is transformed.
https://pollev.com/nitya
Attacker’s Capability: Chosen-Plaintext Attack
(CPA)
• The attacker can choose arbitrary plaintexts to be encrypted and obtain the
corresponding ciphertexts.
• Model this by considering attacker has access to encryption oracle.
m1, m2,..
Encrypt
Ek(…)
c1 = Ek(m1), c2 = Ek(m2),..
Attacker
Encryption Oracle
https://pollev.com/nitya
Attacker’s Capability: Chosen-Plaintext Attack
(CPA)
• The attacker can choose and feed any plaintext, m to the oracle and obtain
the corresponding ciphertext, c (all encrypted with the same key).
• He can see the multiple ciphertext and analyse how different plaintext inputs
affect the ciphertext outputs.
• The attacker can access the oracle many times, as long as it is within the
attacker’s compute power.
Is CPA a
realistic
concern?
Reference: J. Katz & Y. Lindell, Introduction to Modern
Cryptography, 2nd ed. https://pollev.com/nitya
Attacker’s Capability: Chosen-Plaintext Attack
(CPA)
• It has been shown that CPA is possible (link)
• Example:
o An attacker is typing on a terminal, which in turn encrypts and sends message using a key
shared with a remote server (and unknown to the attacker).
o Here the attacker exactly controls what gets encrypted and he maps the patterns to
ciphertext over multiple submissions.
c1 = Ek(m1), c2 = Ek(m2),..
Decrypt
Dk(…)
m1, m2,..
Attacker Decryption Oracle
https://pollev.com/nitya
Why assuming the Attacker has Decryption Oracle ?
• There are practical scenarios where the attacker has access to a weaker form
of decryption oracle.
o We are going to see an example: Padding Oracle.
o There could be many different weaker forms of decryption oracle.
o If a cipher can defend against decryption oracle, then the cipher can defend against all other
weaker forms.
https://pollev.com/nitya
Why assuming the Attacker has Decryption Oracle ?
• Unfortunately, many systems employ cipher that is only secure against CPA but
not CCA2.
https://pollev.com/nitya
Summary
https://pollev.com/nitya