網絡安全從基礎概念開始
- 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
- 很多問題的出現是因爲人們不思考
- 如果人們錯誤的使用再好的安全保證都會失敗
- 如果愚弄人們是最簡單的事攻擊者就會愚弄人們