forked from QSCTech/zju-icicles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
300 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,300 @@ | ||
# Information Security Principle | ||
|
||
###### created by wth | ||
|
||
|
||
|
||
### Basic of Security | ||
|
||
信息安全保护的是信息的: | ||
|
||
* 秘密性 | ||
* 可用性 | ||
* 完整性 | ||
|
||
|
||
|
||
|
||
passive attacks:监听 | ||
|
||
active attacks:修改、延迟、重放、拒绝 | ||
|
||
|
||
|
||
DOS攻击: | ||
|
||
发送pin数据包,发送地址填A,接收地址是局域网上的广播地址,然后局域网中所有机子会向A回复引起宕机 | ||
|
||
|
||
|
||
信息安全策略和机制: | ||
|
||
策略只规定做什么,没说怎么做,具体实施由机制决定 | ||
|
||
Assurance:测量多大程度上可以信任系统会做其应做的事情 | ||
|
||
|
||
|
||
信息安全30%技术,70%管理 | ||
|
||
|
||
|
||
信息安全的目标: | ||
|
||
* 预防 | ||
* 发现 | ||
* 修复 | ||
* Advanced Version: 受攻击后仍能运行 | ||
|
||
|
||
|
||
### Cryptography | ||
|
||
希腊密码:用数字方阵代替字母 | ||
|
||
凯撒密码:移位 | ||
|
||
Vigenere Square:用key移位,然后替换 | ||
|
||
|
||
|
||
restricted algorithm:要求加密算法保密 | ||
|
||
key-based algorithm: 要求密钥保密 | ||
|
||
|
||
|
||
block cipher:用key一块一块加密 | ||
|
||
|
||
|
||
Data Encryption Standard (DES):加密算法,用64位的key加密64位的信息块 | ||
|
||
Advanced Encryption Standard (AED): 可变长DES | ||
|
||
|
||
|
||
RSA:加密原理是逆元非常难求,但生成一对逆元对应的模比较容易 | ||
|
||
私钥:便宜,快捷,低成本芯片可用,但分发困难 | ||
|
||
公钥:分发简单,但是较贵,较慢,VLSI芯片不可用或高成本 | ||
|
||
现实中:用公钥分发私钥,私钥加密信息 | ||
|
||
|
||
|
||
好的单向hash算法: | ||
|
||
* 容易计算 | ||
* 难以逆向 | ||
* 难以碰撞 | ||
|
||
单向hash原始长度不确定 | ||
|
||
MD5, SHS, HAVAL | ||
|
||
|
||
|
||
数字签名:难以伪造,难以抵赖,通用验证,随文档变化,容易实现 | ||
|
||
|
||
|
||
### Authentication | ||
|
||
UNIX系统储存密码使用hash后的值,不使用明文,hash函数必须是单向的 | ||
|
||
salting:在密码前面加上一个随机前缀,防止密码过于常见,但字典攻击仍然是可行的,只是变慢了 | ||
|
||
shadow:只有管理员才能看见hash后的密码 | ||
|
||
|
||
|
||
证明你是谁的方法: | ||
|
||
* what u know (password) | ||
* where r u (ip address) | ||
* what u can (physiological / behavioral) | ||
* what u have (secure tokens) | ||
|
||
|
||
|
||
|
||
|
||
### Authorization | ||
|
||
access control matrix: 用户文件矩阵 | ||
|
||
* 抽象:主体,客体,权力 | ||
|
||
每个user可以有多个用户(principal),但每个用户只能对应一个user。是为了保证能够找到对用户行为负责的人。所以说共享账户是不好的。 | ||
|
||
|
||
|
||
一个subject是一个程序,代表着一个principal。 | ||
|
||
一般(不是一直)一个subject对应一个principal,同一个principal的所有程序有相同的权限 | ||
|
||
object是subject作用的对象,一般是文件或储存,但subjects也可能是objects,如suspend,kill | ||
|
||
|
||
|
||
ACL(Access Control List):一个文件有哪些人可以访问及其权限 | ||
|
||
* 要求对subjects的验证,对文件有更好的灵活性 | ||
|
||
Capability:一个用户能访问哪些文件及对该文件的权限。能力列表,实现最小特权 | ||
|
||
* 不要求对subjects的验证,但要求对权力传递的不可伪造和控制 | ||
|
||
一般使用ACL较多 | ||
|
||
|
||
|
||
*property,高等级 | ||
|
||
simple property,低等级 | ||
|
||
|
||
|
||
DAC(Discretionary Access Controls):允许访问权限的传递,拥有访问权限即可访问 | ||
|
||
* 内在缺陷:一个能被所有objects读的object的信息可能会被一个subject修改 | ||
|
||
MAC(Mandatory Access Controls):访问权限受限于安全级别 | ||
|
||
* 经常用于军事系统,多层安全级别模型是最有名的 | ||
* BLP模型:线性安全级别,最高到最低,低层可以向高层写入但不能读取,高层可以读取低层但<u>不能写入</u>,BLP模型,安全等级从上到下,管理关系从上到下,信息汇报关系从下到上 | ||
|
||
|
||
|
||
隐藏通道: | ||
|
||
* 资源耗尽型 | ||
* 加载敏感型 | ||
|
||
|
||
|
||
|
||
### Malicious Code | ||
|
||
木马:有一个表面的目的和一个隐藏的目的的程序 | ||
|
||
病毒:会把自己插入到多个文件里并可能执行某些动作的程序 | ||
|
||
|
||
|
||
病毒伪代码 | ||
|
||
```pascal | ||
begin virus: | ||
if spread-condition then | ||
begin | ||
for some set of target files do | ||
begin | ||
if target is not infected then | ||
begin | ||
determine where to place virus instructions | ||
copy instructions from beginvirus to endvirus into target | ||
alter target to execute added instructions | ||
end; | ||
end; | ||
end; | ||
perform some action(s) | ||
goto beginning of infected programendvirus: | ||
end virus; | ||
``` | ||
|
||
virus:一般插在别的程序中,被动传播 | ||
|
||
worm:一般是单独的程序,主动传播 | ||
|
||
|
||
|
||
morris worm:选择宿主、空投hook,hook编译,执行hook把自身复制过去 | ||
|
||
|
||
|
||
|
||
|
||
### Trusted Operating System | ||
|
||
trust是相对的、特定的、是特性,而security是目标 | ||
|
||
设计原则: | ||
|
||
* Economy of Mechanism: KISS 尽量简单、愚蠢 | ||
* Fail-Safe Default: 不要检查什么是错的,只用对的部分 | ||
* complete mediation: 每次访问都要检查权限 | ||
* open design: 开源,底层可见 | ||
* separation of privilege: 权力分割 | ||
* least privilege:最小特权 | ||
* least common mechanism:尽量不让程序之间共享状态 | ||
* psychological acceptability:使用界面要友好简单 | ||
|
||
|
||
|
||
|
||
### Trusted Computing | ||
|
||
核心硬件:Trusted Platform Module (TPM) | ||
|
||
核心特征: | ||
|
||
* 隔离受保护的执行环境 | ||
* 加密服务 | ||
* 信息传递路径安全 | ||
* 总体的想法:将trust深入到主系统中 | ||
|
||
核心概念 | ||
|
||
* 安全IO:信息传递安全 | ||
* 内存屏蔽:系统也无法访问,被攻击后依然安全 | ||
* 封装储存:某些特定软件才能访问特定位置 | ||
* 远程证明:远程知道电脑是否安全 | ||
|
||
|
||
|
||
|
||
### Botnet | ||
|
||
可用于以下攻击: | ||
|
||
* 分布式拒绝攻击(DDoS) | ||
* 垃圾邮件和链接诈骗 | ||
* 蠕虫或其他攻击的起点 | ||
|
||
|
||
|
||
感染方法: | ||
|
||
* 寻找攻击点植入shellcode | ||
* shellcode下载安装bot | ||
* bot关闭防火墙 | ||
* 寻找服务器,加入网络 | ||
* 增加本机的验证,防止再被他人使用 | ||
|
||
|
||
|
||
僵尸网络的传播: | ||
|
||
* 每台僵尸扫描ip寻找新的受害者 | ||
* 主动式僵尸网络管理 | ||
|
||
|
||
|
||
僵尸网络是怎么控制的: | ||
|
||
|
||
|
||
僵尸网络是怎么发动攻击的: | ||
|
||
主动式的僵尸网络管理: | ||
|
||
master machines | ||
|
||
zombie machines | ||
|
||
多对多,防止master关机或者爆掉,boss死了小兵还能动,小兵挂了boss不会被供出来 | ||
|
||
主动式管理:能者上,弱者下,自动调整 |