Lec1 - Introduction
CIA
- Confidentiality: Preserving authorized restrictions on information access and disclosure, including means for protecting personal privacy and proprietary information. 保护用户隐私
- Integrity: Guarding against improper information modification or destruction, including ensuring information nonrepudiation and authenticity. 确保信息的可依赖性和真实性
- Availability: Ensuring timely and reliable access to and use of information. 及时可靠地获取信息。
Terminology
System Resource (Asset):
What assets do we need to protect?
Hardware, Software, Data, Communication facilities and networks
Security Policy 安全策略: 一组规则和实践,指定或规范系统或组织如何提供安全服务来保护敏感和关键的系统资源。比如:“Only authorized user may access this file.”
Vulnerability 弱点: 系统设计、实现或操作和管理中的缺陷或弱点,可被利用来违反系统的安全策略。比如:A weakness in a firewall that can lead to malicious hackers getting into a computer network
Exploit: Term also refers to the code or methodology used to take advantage of a vulnerability.
Threat: A potential for violation of security, which exists when there is a circumstance, capability, action, or event, that could breach security and cause harm.
vulnerability和threat比较:
- Vulnerabilities are not introduced to a system; rather they are there from the beginning
- Threats are introduced to a system like a virus download or a social engineering attack
- a threat is a possible danger that might exploit a vulnerability.
Attack: ·实施的威胁,如果成功,将导致不想见到的安全违规 violation of security 或威胁后果 thread consequence。
Attacker: The agent carrying out the attack
攻击的类别:
- Active attack 主动攻击: 试图改变系统资源或影响其运行。An attempt to alter system resources or affect their operation.
- Passive attack 被动攻击: 试图从系统中学习或利用不影响系统资源的信息。An attempt to learn or make use of information from the system that does not affect system resources
攻击还可以被分类为:
- Inside attack: Initiated by an entity inside the security perimeter (an “insider”). The insider is authorized to access system resources but uses them in a way not approved by those who granted the authorization
- Outside attack: Initiated from outside the perimeter, by an unauthorized or illegitimate user of the system (an “outsider”).
对策 countermeasure:一种动作、装置、程序或技术,通过消除或预防威胁、漏洞或攻击,将其可能造成的伤害降至最低,或通过发现并报告威胁、漏洞或攻击,从而采取纠正措施。
比如:Report to website’s administrator there is DoS attack, Adding randomness to cryptographical algorithms to prevent timing side-channel attack
How are assets threatened?
Threat Consequences
-
Unauthorized disclosure 未经授权的暴露: 一个实体获得未经授权的数据访问的情况或事件。(违反了C)
Result: Exposure 暴露(将敏感数据暴露给未经授权的实体), Interception 拦截(未经授权的实体直接访问在授权源和目的地之间传输的敏感数据。), Inference 推理(未经授权的实体从特征和副产物推理得到的敏感数据), Intrusion 入侵(未经授权的实体通过绕过系统的安全保护来访问敏感数据。) -
Deception 欺骗:可能导致授权实体收到虚假数据并认为其为真实的情况或事件。(违反了I)
Result: Masquerade 伪装(未经授权的实体获得对系统的访问权,假扮成被授权的实体进行恶意行为), Falsification 伪造(虚假数据欺骗授权实体) , Repudiation 否认(一个实体通过错误地否认某一行为的责任来欺骗另一个实体) -
Disruption 中断:中断或阻止系统服务和功能正常运行的情况或事件。(违反了A)
Result: Incapacitation 使无资格(通过禁用系统组件来阻止或中断系统运行。),Corruption 破坏(通过不利地修改系统功能或数据,不希望地改变系统操作),Obstruction 干扰(通过阻碍系统运行而中断系统业务交付的威胁行为) -
Usurpation 篡位:由未经授权的实体控制系统服务或功能的情况或事件。
Result: Misappropriation 盗用(一个实体对系统资源进行未经授权的逻辑或物理控制),Misuse 滥用(导致系统组件执行不利于系统安全的功能或服务)
硬件受到的主要威胁:availability,Confidentiality
软甲受到的主要威胁:availability,Confidentiality, integrity
What can we do to counter those threats?
- Economy of mechanism:安全措施的设计应在开发、使用和验证方面经济。要尽可能的简单并且小
- Fail-safe designs:访问决策应该基于许可而不是排除,默认为缺乏访问因此,如果出了什么问题,或者忘记了什么,或者没有做什么,也不会失去安全。
- Complete mediation:在对受保护对象的每次访问中应用安全,每次访问都必须根据访问控制机制进行检查
- Open design:安全机制的设计应该是开放的,而不是的秘密。假设所有潜在的攻击者都知道设计的一切并且完全理解它,这并不一定意味着要发布有关安全系统的所有重要信息
- Separation of privileges:提供将用于一个目的的特权与用于另一个目的的特权分开的机制。允许安全系统的灵活性减轻计算机安全攻击的潜在损害。例子:一个程序被分成若干部分,这些部分被限制为执行特定任务所需的特定权限。zoom需要使用您的摄像机和麦克风进行视频会议。
- Least privilege:系统的每个进程和每个用户都应该使用执行任务所需的最小权限集进行操作
- Least common mechanism:设计应尽量减少不同用户共享的功能,提供相互的安全性。耦合可能会导致安全漏洞
- Psychological acceptability:机制必须易于使用简单到人们不假思索就会使用它。必须很少或从不阻止允许的访问
全面的安全战略包括三个方面:
- Specification/policy: What is the security scheme supposed to do?
- Implementation/mechanisms: How does it do it?
- Correctness/assurance: Does it really work?
安全策略 Security policies
安全策略描述了安全系统应该如何运行。
Policy says what should happen, not how you achieve that。
在制定安全策略时,安全经理需要考虑以下因素:
被保护资产的价值 The value of the assets being protected
系统的漏洞 The vulnerabilities of the system
潜在的威胁和攻击的可能性 Potential threats and the likelihood of attacks
权衡易用性vs .安全性安,全成本与故障和恢复成本的比较
安全实施包括四个相辅相成的行动方案:
- Prevention: 加密数据,通过密码验证等。
- Detection:入侵intrusion检测,检测DoS攻击
- Response:停止攻击,防止进一步破坏
- Recovery: backup system
保证和评估 Assurance and evaluation
保证处理以下问题:安防系统设计是否满足其要求?安全系统实现是否满足其规格?
保证被表达为一种信心的程度,而不是一个设计或实现是正确的正式证明。
评估是根据一定的标准对计算机产品或系统进行检查的过程。评估包括测试,也可能涉及形式分析或数学技术。
Tools:
• Cryptographic tools
• Encryption, message authentication code, digital signature, etc.
加密 Encryption:隐藏数据或通信内容的算法,只有那些知道秘密的人才能解密,保护计算机安全中最重要的工具之一
消息认证码 Message authentication code
数字签名 Digital signature
• Access control: Only let authorized parties access the system
• User authentication: 确保某人是他们所说的人的方法对访问控制至关重要,但对许多其他目的也至关重要,包括密码方法和非密码方法
• Intrusion detection/prevention
一种安全服务,用于监视和分析系统事件,以发现并提供实时或接近实时的警告当有人试图以未经授权的方式访问系统资源。
IDS: Intrusion detection system
Intrusion prevention system (IPS):也称为入侵检测和防御系统(IDPS)入侵检测和防御系统的扩展,包括试图阻止或阻止检测到的恶意活动的能力
• firewall
保护网络免受恶意外部攻击的机器。
通常位于LAN/WAN和Internet之间。
运行特殊软件来调节网络流量。
Lec2 - Fundamentals of cryptography (1)
古典和现代密码学
从历史上看,密码学只专注于确保事先共享秘密信息的双方之间的秘密通信(又名codes or private-key encryption)
专门负责确保通信秘密的:加密 encryption
完全依赖于通信双方共享的秘密信息(key)
Private-key cryptography
• AKA secret-key / shared-key / symmetric-key cryptography
Secure communication:
• Two parties share a key that they use to communicate securely
Secure storage:
• A single user stores data securely over time
私钥解密:
A private-key encryption scheme is defined by a message space M and algorithms (Gen, Enc, Dec):
- Gen (key-generation algorithm): generates k (生成密钥k)
- Enc (encryption algorithm): takes key k and message m ∈ M as input; outputs ciphertext c (给信息加密得到密文c)
c ← Enc(m) - Dec (decryption algorithm): takes key k and ciphertext c as input; outputs m or “error” (解密)
Dec © = m
移位解密 The shift cipher:
Caesar 凯撒密码 (我会,这里不再赘述)
不够安全,因为只有26个密钥
充足键空间原理 Sufficient key space principle:
密钥空间应该足够大,以防止“暴力”穷尽搜索攻击
如果一个加密方案的密钥空间太小,那么它将容易受到耗尽搜索攻击 exhaustive-search attacks
The Vigenère cipher:
键现在是一个字符串 string,而不仅仅是一个字符
若要加密,请将明文中的每个字符移动由密钥的下一个字符指定的数量
根据需要把钥匙绕进去解密只是反转了这个过程
例子k =’cafe’
密钥空间的大小:
暴力破解几乎是不可能的,多年来相信是安全的
Symmetric encryption 对称加密:
Definition:
Stream ciphers 流密码: