计算机安全-从基础概念讲起(中英结合)
网络安全从基础概念开始
- 1. 一些重要的基础概念 - Some important concepts
- 2. 安全的目标和威胁 - Security goals and Threats
- 2.1 Security goals - CIA
- 2.2 Threats
- a. Interruption - 中断
- b. Interception - 拦截 窃听 (steal)
- c. Modification - 修改
- d. Fabrication - 伪造
- e. Destruction threats - 破坏威胁
- Active threats and Passive threats
- 2.4 Threats category
- 3. 安全原则(principle), 政策(policies)和工具(tools)
- 3.1 安全系统的设计原则 - security system design principle
- 3.11 Economy
- 3.12 Complete mediation 完全调解
- 3.13 Open design 开放式设计
- 3.14 Separation of privileges 权限分离设计
- 3.15 Least privilege 最小权限设计
- 3.16 Least common mechanism 安全系统的最小共用机制
- 3.17 Acceptability 可接受性(针对大众来说的)
- 3.18 Fail-safe designs 自动防故障的设计
- 3.2 安全政策 - Security Policies
- 3.3 安全工具 - Security tools
- 4. 普遍观念 - Common sense
1. 一些重要的基础概念 - Some important concepts
1.1 Security and Protection - 安全与保护
-
安全是一项政策 而 保护是一种措施
Security is a policy and Protection is a mechanism -
安全与保护的关系在于 保护机制实现了安全政策
Protection mechanisms implement security policies
举例:
security: 未授权用户(unauthorized user)不能访问(access)文件
protection: 系统查看用户的身份(identity)
protection implement security
1.2 漏洞与利用 - Vulnerabilities and Exploit
- 漏洞是一个可以被黑客利用已造成问题的弱点(weakness)
漏洞不是万能的只能造成特定问题 并且大多数漏洞未被利用 - 利用是指一次利用漏洞的真实事故(actual incident)
这个词同时也是用来利用漏洞的方法学或者代码
1.3 信任 - Trust
Trust是安全中很重要的一个名词, 看似很简单但是:
- How do you express trust? 怎么表达信任
- Why do you trust something? 为什么信任
- How can you be sure who you’re dealing with? 怎么确信你在和谁打交道
- What if trust is situational? 信任是基于情形的
- What if trust changes? 信任变化了怎么办
- Transitive Trust 传递的信任?
2. 安全的目标和威胁 - Security goals and Threats
2.1 Security goals - CIA
- Confidentiality 机密性
文件是机密的要小心那些窃听的人 be careful who hear it - Integraity 完整
文件要是完整的未被篡改的 don’t let someone change something they shouldn’t - Availability 可用性
要保证服务一直可用 don’t let others stop the services
2.2 Threats
Threats are viewed as types of attacks on normal services
正常的服务:
a. Interruption - 中断
拒绝服务(Denial service)-> 阻止接收端发送请求或者 阻止来源发送信息给接收端
那么中断威胁是怎么发生的呢:
- Destruction of hardware, software or data (硬件 软件 和 数据 的破坏)
- Interference with communication channel (沟通信道的干扰)
- Overloading a shared resource (重载共享资源)
b. Interception - 拦截 窃听 (steal)
An unintended party receives information 非计划中的人收到了信息
Either in conjection with or independent of a legal request 可以与合法请求同时或独立进行
那么窃取又是怎么发生的呢:
- 窃听 - Eavesdropping ['i:vz,drɔpiŋ]
- 伪装- Masquerading (Fabrication) [mɑ:skə’reɪdɪŋ]
- 闯入 - Break in
- 违法的数据拷贝- Illicit data copying [ɪˈlɪsɪt] (illegal [ɪˈliːɡl])
c. Modification - 修改
The receiver receive different message rather than the original sent one
-> 要么在返还用户的路上改要么永久的在服务器中改掉
更改又是怎么发生的呢:
- 中断数据的请求于回复(Interception)
- Masquerading [mɑ:skə’reɪdɪŋ] 伪装
- Break in 闯入
- Flaws in application
- 主机或者服务的其他非法形式访问
d. Fabrication - 伪造
The destination receive the message the source never sent
-> 造成不合适的数据改动
-> 造成不合适的系统资源的使用
-> 造成其他不好的行为behavior
伪造又是怎么形成的:
- Masquerading 伪装
- Bypassing protection mechanisms 绕过保护机制
- Duplication of legal requests/responses 复制合法的请求和响应
e. Destruction threats - 破坏威胁
The information is no longer accessible to a legitimate user
Active threats and Passive threats
-
Passive threats
Passive threats are most like eavesdropping 不涉及修改或者注射的请求
Passive threats 更多的是涉及secrecy(秘密) -
Active threats
Active threats are mor aggressive [əˈɡresɪv]
Active threats are about all properties
2.4 Threats category
3. 安全原则(principle), 政策(policies)和工具(tools)
3.1 安全系统的设计原则 - security system design principle
3.11 Economy
- Should add little or no overhead
- Should do only what needs to be done
- Generally, try to keep it simple and small
以最少的钱完成最必要的事不做多余的事情
3.12 Complete mediation 完全调解
- 给保护目标的每种访问都加上安全控制不只是文件的打开操作
- 也包含了检查所有可能被攻击的事情的访问
3.13 Open design 开放式设计
- 不要让依靠别人不懂你的设计这种想法来保证系统的安全
- 要假设所有的攻击者都完全了解设计
- 这也不代表你要公布你安全系统所有重要的部分尽管有时候是有好处的
Kerckhoffs principle
A cryptographic system should be secure even if everything about the system, except the key, is public knowledge
一个加密系统应该在大众知道除钥匙以外的所有细节的情况下仍然是安全的
3.14 Separation of privileges 权限分离设计
- 把用于不同目的的操作权限分离
- 使安全系统有灵活性
- 把每个文件的访问控制分离 separate access control on each file
3.15 Least privilege 最小权限设计
- 赋予能完成一个任务的最小权限
- 需要另外的权限才能够进行其他任务
- 比如说在只要求读的时候不给予写的权力
3.16 Least common mechanism 安全系统的最小共用机制
- 避免一个安全系统中的共用部分, 不同用户间的共用和不同的系统部分间的共用
- 耦合可能会导致安全漏洞
比如: side-channel attacks based on OS shared memory
3.17 Acceptability 可接受性(针对大众来说的)
- 简单到用户不用想就能用
- 不能组织任何合法的访问
3.18 Fail-safe designs 自动防故障的设计
- 默认为无权限状态, 这样即使出了什么问题或者忘记了什么也不会导致安全性的丢失
- 如果发生了一些很严重的错误, 开发人员可以找到错误并且不损失安全性
比如登陆设置 忘记密码设置 或者验证码设置
3.2 安全政策 - Security Policies
安全政策使用来描述安全系统是怎么行动的. 如果没有一个安全政策那么你就没有一个安全系统因为你不知道你想干什么
一份不正式的安全政策可能是这样的:
- 大多数情况下用户只能访问他们自己的文件夹
- 只有授权用户能登陆
- 系统的可执行程序只能被系统管理员更改
这些不正式的安全政策都有一个特点 普遍上定义的很清楚 但是很难界定是否达成
一份好的安全政策的特点:
- 通常用数学安全策略语言描述
expressed in a mathematical security policy language - 趋向精确->允许对安全策略进项正式的推理
Allowing formal reasoning about the system and policy - 经常和一种安全策略模型所匹配
Bell-La Padula model - 很多明智的策略很难用正式的方式表达出来
3.3 安全工具 - Security tools
3.31 Access control - 访问控制
只让授权的用户访问数据, 听起来很简单但是实际上很复杂尤其是在网络环境中, 比如当数据不在你的系统中的时候你还怎么继续控制它呢(再次强调网络环境的重要性)
3.32 Encryption - 加密术
- 用算法去隐藏数据或者通讯的内容
- 只有那些知道秘密的人可以解密保护
- 计算机安全中最重要的方法但不是万能药
3.33 Authentication 验证
- 用于确认用户身份的方法(比如说人脸识别)
- 对访问控制来说至关重要
- 对其他的方面也很重要
- 经常建立在加密术上(但不是所有的)
3.34 Encapsulation - 封装
- 让外部人员有限的使用资源的方法
- 理念上很简单但是实践中challenging
3.35 Intrusion detection - 入侵检测
- 所有的安全方法有时候都会失效
- 但安全措施失效的时候找到错误并纠正
- 这是响应式的并非是提防 因为相信任何预防措施都是肯定的是不现实的
4. 普遍观念 - Common sense
- 很多问题的出现是因为人们不思考
- 如果人们错误的使用再好的安全保证都会失败
- 如果愚弄人们是最简单的事攻击者就会愚弄人们