查看: 292542|回复: 675
收起左侧

打磨Comodo,做有意义的事儿

  [复制链接]
ubuntu
发表于 2007-12-21 14:00:37 | 显示全部楼层 |阅读模式
本帖最后由 mxf147 于 2011-5-31 12:29 编辑

声明:本文属ubuntu原创,首发于卡饭Comodo版,转贴请保留作者和出处,严禁用于商业用途。

第一部分 Comodo Defense+ 简介


天地尚不能久,而况於人乎?
1. Defense+ 简介


Comodo Defense+ 是一个典型的HIPS(Host Intrusion Prevention System),中文名是主机入侵防御系统,还可以叫系统防火墙。传统防火墙控制的是网络通讯,而系统防火墙控制系统行为。HIPS 可以拦截恶意软件的危险行为,然后根据规则直接阻止,或者通过提示窗口询问用户。

HIPS 由于不依赖特征码,相对于传统的杀毒软件,在对付0day 威胁、未知病毒上有巨大的优势。HIPS 可以阻止杀毒软件无法检测的病毒进入你的系统,可以阻止病毒的运行,即使病毒运行,HIPS还有机会可以阻止病毒对系统的破坏行为,这是杀软做不到的。

Comodo Defense+ 是和SSM、ProSecurity、EQSecure类似的HIPS,完全可以作为整个安全体系的第一道防线,通过规则,主动拦截各种可能的入侵。

Defense+ 也有不足,尽管Defense+ 已经使用了尽量浅显易懂的语言,警告提示还是要求用户有一定的系统知识和安全知识,才能做出正确的选择。普通用户需要一段时间的学习才能掌握和使用 Defense+ 。从易用上,Defense+ 还不够简单、不够智能,不够成熟;从功能划分和规则定制上,Defense+ 还不够灵活和细腻,还需要一定的时间去改进。
目前,通过内置的白名单和Clean PC Mode,普通用户通过学习是可以驾驭Defense+ 的。

Defense+ 不能取代所有的安全软件,完整的防御体系应该由三部分组成:
Prevention(防毒)、Detection(杀毒)、Cure(清毒)



2. Defense+ 初步:规则设置界面

Defense+ 的设置界面,Security Policy 是安全策略,这里用规则代替,比较易懂:
Defense+ -> Advanced -> Computer Security Policy (Defense+ 规则)
用户当前的所有Defense+规则都可以在这里找到和设置

Defense+ -> Advanced -> Predefined Security Policy (Defense+ 预设规则)
用户可以设置预设规则,一个预设规则可以分配给多个有类似行为的程序。(规则复用)
图1



Computer Security Policy (计算机安全策略)
打开规则设置界面,可以看到程序名和规则名。
一个程序组的所有成员可以继承使用同一种规则。
一个预设规则可以分配给多个程序(规则复用)。
图2 Computer Security Policy


Application System Activity Control (程序系统行为控制)
双击一个程序,程序系统行为控制(前面讲过HIPS 就是对程序的各种行为进行控制)
这里可以使用预设规则和自定义规则。
规则由两部分组成:Access Rights(访问权限)Protection Settings(自我保护设置)
简单的说访问权限就是行为控制,对程序的子程序和操作对象进行控制。
自我保护就是对其它程序的行为作用于本程序进行控制,对自身进程完整性的保护。

图3 Application System Activity Control



Protection Settings(自我保护设置)
要保护杀毒软件进程不被非法终止,可以设置杀毒软件程序规则
设置Process Terminations (进程终止) Active为 Yes,来监视和保护进程终止。
图4 Protection Settings(自我保护设置)



Access Rights(访问权限,行为控制)
Access Rights 里的Access Name就是具体的行为,通过Default Action 可以进行控制。
英文原版:
图5e


我翻译的中文版:
图5c


可以看到能够控制的行为有15项之多,Comodo将这些放到一个界面里来设置,不需要来回切换,很方便和直观。
Run an executable
Interprocess Memory Access
Windows/WinEvent Hooks
Process Terminations
Device Driver Installations
Window Messages
Protected COM Interfaces
Protected Registry Keys
Protected Files/Folders
Loopback Networking
DNS Client Service
Physical Memory
Computer Monitor
Disks
Keyboard

评分

参与人数 6人气 +6 收起 理由
xiaoluo + 1 感谢提供分享
cucme + 1 第三个人气给comodo
sanji24 + 1 神贴留名...话说好像有大部分的图都看不了.
lorchid + 1 感谢指引~补上人气
PlayWill + 1 非常感谢

查看全部评分

ubuntu
 楼主| 发表于 2007-12-21 14:01:59 | 显示全部楼层
第二部分 Comodo Defense+ 规则架构


1. 工欲善其事,必先利其器

要完全释放Defense+的威力,必须自己动手设置规则。预设规则首当其冲。
预设规则是Defense+规则的精华,我们手中的名剑,杀敌的利器,战略武器库。
Defense+ 默认的预设规则,Trusted 太松,Limited 太紧,不够和谐,我们要做的就是完善它。我们要做的就是使大部分程序可以用预设规则一步搞定,这样就会减少提示,让普通人也可以使用 Defense+ 。
增加和改造预设规则是自定义规则的关键一步。


知己知彼,百战不殆
2. Defnese+ 的规则优先级


在设置规则前,要搞清楚规则的优先级。
Defense+ 的规则优先级是从上至下匹配,如果两条精确匹配规则(包括例外规则)都和行为匹配,上面第一条精确匹配规则(包括例外规则)被执行,规则匹配结束。如果不存在精确匹配规则,Defense+ 将弹出警告窗口。等待用户选择后,结束。


什么是精确匹配规则?
对于访问权限,是当前程序操作其它子进程和对象,需要匹配当前程序和它操作的对象。然后再检查默认行为(Default Action)。
只有Allow和Block 是精确匹配规则,Allow和Block的权限高于Ask。Ask会被直接忽略。


对于自我保护,当前程序是其它进程的操作对象,需要检查目标程序是否为本程序,保护类型(Protection Type)和保护Active(Yes); 没有自我保护规则的程序直接被忽略。目标的自我保护规则优先于其它程序的访问权限规则。


特殊的精确匹配规则(例外规则)
对于访问权限,本程序Modify... 里具体的Allow和Block规则,优先于外面的Ask、Allow、Block全体规则。Modify... 内Allow 的优先级高于Block。Modify里的规则属于例外规则。

对于自我保护,本程序Modify...里具体的Exceptions规则,优先于外面的Active规则,Exception 例外程序,不受自我保护规则的制约。

例外规则也遵守从上至下匹配的原则。
如果两条规则都和行为匹配,那么只有上面的精确匹配规则(包括例外规则)被执行,下面程序的例外规则将被忽略。

All Applications * 很重要,代表所有程序,它也遵守规则流程,所以为了制定严格的所有程序规则,必须将它移动到最下面。All Applications * 会在特定的情况下会使用特殊的规则处理逻辑,非常重要。


例1 同一行为,Block Ask的优先级:
All Applications *,将 Run an executable设置为Ask
同时设置explorer.exe ,禁止explorer.exe 运行cmd.exe 。
#1 All Applications *    Run an executable Ask
#2 explorer.exe Run an executable Block


结果是:Defense+ 阻止cmd运行,而不会提示。 Block > Ask
图6

图7



例2 同一行为,Allow Ask的优先级:
All Applications *,将 Run an executable设置为Ask
同时设置explorer.exe ,允许explorer.exe 运行cmd.exe 。
#1 All Applications *    Run an executable Ask
#2 explorer.exe Run an executable Allow


结果是:Defense+ 允许cmd运行,而不会提示。 Allow > Ask
图8



例3 两条规则都适合,由上至下匹配:
All Applications *,将 Run an executable设置为Block
同时设置explorer.exe ,允许explorer.exe 运行cmd.exe 。
#1 All Applications *    Run an executable Block
#2 explorer.exe Run an executable Allow


结果是:Defense+ 阻止cmd运行。
图9



例4 两条规则都适合,由上至下匹配:
All Applications *,将 Run an executable设置为 cmd.exe Allow
同时设置explorer.exe ,explorer.exe Block。
#1 All Applications *   Run an executable Allow cmd.exe
#2 explorer.exe Run an executable Block


结果是:Defense+ 允许cmd运行。
图10

图11



例5 自我保护规则优先于其它程序的访问控制规则
设置Process Explorer可以结束一切进程,保护notepad.exe 不被结束。
#1 procexp.exe Process Terminations Allow 访问控制规则
#2 explorer.exe 没有自我保护
#3 notepad.exe 自我保护 Process Terminations Yes 自我保护规则


结果是:explorer 被结束,而notepad.exe 进程被保护。
图12

图13



例6 例外规则优先于全体规则
notepad.exe FD 全体规则设置为Allow,Modify...里Block %windir%\system.ini

结果是 netepad.exe 不能修改system.ini
图14



例7 自我保护例外规则优先于自我保护规则
设置Process Explorer可以结束一切进程
设置任务管理器可以结束一切进程。
保护 notepad.exe 被终止,将Process Explorer 设置为Exceptions 。
#1 procexp.exe Process Terminations Allow
#2 taskmgr.exe Process Terminations Allow
#3 禁止notepad.exe 被终止,procexp.exe例外。


结果是 taskmgr.exe 不能终止notedpad.exe; procexp.exe 可以终止notepad.exe
图15



例8 例外规则也遵守从上至下匹配的原则。
允许 All Applications 运行cmd.exe
禁止explorer.exe 运行cmd.exe
#1 All Applications * Run an executable Ask Modify... Allow cmd.exe
#2 explorer.exe   Run an executable Ask Modify... Block cmd.exe

结果是 explorer.exe 可以运行cmd.exe
图16

图17



例9 例外规则内,Allow > Block
explorer.exe Run an executable Ask Modify... Allow cmd.exe Block cmd.exe

结果是 explorer.exe 可以运行cmd.exe
图18

图19


官方没有公布规则优先级的资料,以上均来自个人使用总结,有不对的地方请指出。



善守者,藏于九地之下,善攻者,动于九天之上
3. Defense+ 的环境变量和通配符


要提高规则的效率,要提高规则的适应性,必须了解Defense+ 的环境变量和通配符。

环境变量
使用环境变量可以增强规则的通用性,便于分享规则。同时也可以减少规则输入的时间。
系统的环境变量,可以通过 DOS窗口,set命令查看。Defense+ 只支持部分环境变量。

Defense+ 支持的环境变量:
假设操作系统的安装目录为C:
%windir% = C:\Windows
%SystemRoot% = C:\Windows
%temp% = C:\Documents and Settings\用户名\Local Settings\Temp
%AllUsersProfile% = C:\Documents and Settings\All Users
%UserProfile% = C:\Documents and Settings\用户名
%AppData% = C:\Documents and Settings\用户名\Application Data
%ProgramFiles% = C:\Program Files
%CommonProgramFiles% = C:\Program Files\Common Files
此外Defense+ 还支持\Device\HarddiskVolume? 这种特殊写法。



通配符
我知道的通配符就是*和? 。* 是比较常用的,可以代表任意字符,可以表示所有文件、注册表项目、COM接口。通过和\ 的组合,可以表示目录和注册表的层次。
? 一般代表单独的字符,用的比较少,?:可以用来表示盘符。
Defense+ 的通配符目前不支持单独的目录操作,目录也是文件。* 都是包括所有子目录的。

例子:
C:\* 表示C盘下的所有文件
C:\*.exe 表示C盘下的所有exe文件
C:\*\* 表示C盘第一层目录下的所有文件
%windir%\system32\* 表示C:\Windows\System32 下的所有文件
C:\test\test1\*.* C:\test\test1 下所有带后缀名的文件和带. 的目录,对于test1目录操作不保护。
C:\test\test* C:\test 目录下的以test开头的文件和目录,保护目录操作,如不能重命名test1 目录
?:\autorun.inf 表示所有根目录下的autorun.inf
?:\* 表示所有文件,包括目录
?:\*.* 表示所有带后缀名的文件和带. 的目录
*.exe 表示全盘所有exe文件
*.dll 表示全盘的所有dll文件
?:\Documents and Settings\*\Cookies\*.txt 表示类似C:\Documents and Settings\All Users\Cookies 和C:\Documents and Settings\用户名\Cookies 下的所有txt文件

*\Software\Microsoft\Windows\CurrentVersion\Run*
表示HKLM | HKCU\Software\Microsoft\Windows\CurrentVersion\ 下 所有以Run 开头的键值和项,及项下面所有子项,子键。


官方没有公布通配符和环境变量的资料,以上均来自个人使用,有不对的请指出。


以下只是我自己在对Defense+的理解和经验的基础上,根据我的需要而制定规则的尝试。
我的规则只能作为参考,切勿生搬硬套。 学习别人的规则,动手制定适合自己的规则是最好的。
Defense+ 的界限就是我的界限,我的规则不能突破Defense+ 对我的限制。
完美是不存在的,但通过Comodo不断更新,我可以不断超越,接近"完美" 。
ubuntu
 楼主| 发表于 2007-12-21 14:03:39 | 显示全部楼层
第三部分 物以类聚,人以群分:分组(Groups)


致谢:部分文件分组和规则来自Spbic和Happyday2 的EQSecure规则,RD规则大部分来自Tony 的GSS规则,在此表示谢意。



要高效的设置Defense+规则,必须先分组。对不同的程序进行分组,对不同的文件进行分组,对不同的注册表项目进行分组、对不同的COM接口进行分组。
通过改变组成员的组成,通过给组分配不同的预设规则,通过组合不同的对象组,可以制定非常灵活的规则,在现有架构下尽量达到我的要求。

图20




1. My Protected Files (FD)

Defense+ -> Advanced -> My Protected Files -> Groups... 可以看到Defense+预设的一些文件组。接下来,我们要做的就是在这里添加大量的组和成员,完善已有的组。
图21



在此之前,我先介绍一下My Protected Files
简单的说,Defense+ 只保护My Protected Files里的文件。换句话说,我们要保护什么文件和目录,必须添加到My Protected Files 。
我的建议,对于新人,可以到Defense+ Settings 里禁用文件保护,文件保护会给新人造成很多麻烦。尤其Defense+ 的文件保护是全局性质的,如可执行文件,这对于以HIPS为辅助的新人,过于严厉。我建议或者禁用文件保护,或者删掉Executables ,自己添加需要保护的目录。


作为高级用户,我个人是全局保护所有文件,外加重点保护某些目录和文件。
我的My Protected Files 保护项目列表:

*\*.*
表示所有带后缀名的文件,还有带.的目录。 简称所有文件。主要是因为现在Defense+ FD还不支持目录,变通的方法。如果使用?:\* 会有很多目录操作提示,太麻烦,也不需要。病毒一般都是文件操作,新建目录没关系,借助Pending Files 追踪可执行文件,也可以看到新建的目录,然后资源管理器删除掉。

FD_WinDir Windows目录
%windir%\* 监视在Windows目录下创建文件和目录。系统所在目录属于重点保护目录,所以连目录操作也包括进来,你还可以模仿添加自己需要重点保护的目录。

FD_Executables 可执行文件
在原有基础上,补充了很多后缀名, 属于重点保护文件。具体后面介绍。

FD_Important Files/Folders 重要的文件和目录
在原有基础上,补充了一些文件和目录,属于重点保护文件和目录。具体后面介绍

FD_Startup Folders 开始菜单启动目录

FD_COMODO Files/Folders COMODO安装目录

FD_3rd Party Protocol Drivers 第三方协议驱动

FD_My Protected Files 私人文件

图22



2. File Groups(文件分组)
我的文件分组,主要用于文件保护FD(Files Proetction)、应用程序保护AD(Applications Protection) 和 程序组AG(Applications Groups),所以我会给组名加上前缀,这样便于区分和使用。
FD_...   表示这个组用于文件保护FD
AD_...   表示这个组用于应用程序保护AD
AG_...   表示一个程序组,具有相似的行为,可以使用相同的规则

有些组可能暂时用不上,因为我尝试过不同思路。 这些可以保留,也许以后会用到。
有些是不能照搬的,模仿和拓展思路,自己添加和修改就可以咯。



我的文件分组列表:

All Applications 所有程序
*


FD_Executables FD_可执行文件
*.exe
*.dll
*.sys
*.ocx
*.drv
*.lmz
*.olb
*.vxd
*.inf
*.js
*.vbs
*.vbe
*.bat
*.cmd
*.com
*.pif
*.scr
*.cpl
*.chm
*.hta
*.htr
*.hlp
*.msc
*.msi
*.msp
*.wsf
*.wsh
*.jar
*.jse
*.wmf
*.shs
*.ins
*.hiv

可执行文件保护,增加了很多后缀名。


FD_WinDir FD_Windows目录
%windir%\*


FD_Important Files/Folders FD_重要的文件和目录
%windir%\system32\*
%windir%\system32\drivers\etc\*
%windir%\servicing\*
%windir%\system.ini
%windir%\win.ini
%windir%\wininit.ini
%windir%\winstart.bat
%windir%\Tasks\*
\Device\HarddiskVolume?
\Device\HarddiskVolume?\autoexec.bat
\Device\HarddiskVolume?\config.sys
\Device\HarddiskVolume?\boot.ini
\Device\HarddiskVolume?\bootfont.bin
\Device\HarddiskVolume?\ntdetect.com
\Device\HarddiskVolume?\ntldr
%ProgramFiles%\Common Files\Microsoft Shared\MSINFO\*
*.gho
*\autorun.inf
%ProgramFiles%\DefenseWall\*
%ProgramFiles%\EQSysSecure\*
%ProgramFiles%\Filseclab\*
%ProgramFiles%\Internet Explorer\*
%ProgramFiles%\Returnil\*
%ProgramFiles%\Windows Media Player\*

FD_重要的文件和目录 这里可以加入ghost文件、杀软目录、autorun.inf、病毒通常建新文件的目录


临时文件目录
FD_Temporary Files FD_临时文件
C:\OperaCache\*
%temp%\*
?:\Documents and Settings\*\Local Settings\Temporary Internet Files\*
?:\RECYCLE?\d*
?:\RECYCLE?\*\d*
临时文件目录:Opera缓存目录、系统临时目录、IE临时目录、回收站


FD_UserProfile Allow FD_用户文档和设置目录 允许
?:\Documents and Settings\*\Cookies\index.dat
?:\Documents and Settings\*\Cookies\*.txt
?:\Documents and Settings\*\Favorites\*.url
?:\Documents and Settings\*\Recent\index.dat
?:\Documents and Settings\*\Recent\*.lnk
?:\Documents and Settings\*\UserData\index.dat
?:\Documents and Settings\*\UserData\*.xml
?:\Documents and Settings\*\Local Settings\History\*\index.dat
?:\Documents and Settings\*\Local Settings\History\History.IE5\MSHist*


用户的Documents and Settings 下允许创建Cookies、收藏夹、最近的文档、历史信息


FD_UserProfile Block FD_用户文档和设置目录 阻止
?:\Documents and Settings\*\Cookies\*
?:\Documents and Settings\*\Favorites\*
?:\Documents and Settings\*\Recent\*
?:\Documents and Settings\*\UserData\*
?:\Documents and Settings\*\Local Settings\History\*


用户的Documents and Settings 下Cookies、Favorites、Recent、UserData、History禁止创建其它类型文件


FD_Application Data FD_AppData目录
?:\Documents and Settings\*\Application Data\*
?:\Documents and Settings\*\Local Settings\Application Data\*



FD_WinDir Allow FD_Windows目录 允许
%windir%\msgtn.ini
%windir%\psnetwork.ini
%windir%\powerplayer.ini
%windir%\Sti_Trace.log
%windir%\WindowsUpdate.log
%windir%\Debug\UserMode\ChkAcc.log
%windir%\Debug\UserMode\ChkAcc.bak
%windir%\inf\*.pnf
%windir%\LastGood\TMP*.tmp
%windir%\Prefetch\*.pf
%windir%\system32\cid_store.dat
%windir%\system32\catroot2\dberr.txt
%windir%\system32\catroot2\edb*.log
%windir%\system32\catroot2\tmp.edb
%windir%\system32\drivers\SET*.tmp
%windir%\system32\drivers\disk.sys
%windir%\system32\drivers\usbstor.sys
*\Thumbs.db
*\Thumbs.db:encryptable


允许修改的Windows目录下的文件,例外规则


FD_Browser Allow FD_浏览器 允许
%temp%\opr???.tmp.exe
%userprofile%\Application Data\Mozilla\Firefox\Profiles\*\FlashGot.exe
%userprofile%\Application Data\Mozilla\Firefox\Profiles\*\prefs*.js
%userprofile%\Application Data\Mozilla\Firefox\Profiles\*\sessionstore*.js
%userprofile%\Application Data\Mozilla\Firefox\Profiles\*\extensions\*\install.js
%userprofile%\Application Data\Mozilla\Firefox\Profiles\*\extensions\*\chrome\*.jar
%userprofile%\Application Data\Mozilla\Firefox\Profiles\*\extensions\*\components\*.js
%userprofile%\Application Data\Mozilla\Firefox\Profiles\*\extensions\*\defaults\preferences\*.js
%userprofile%\Application Data\Macromedia\Flash Player\macromedia.com


允许浏览器修改的文件,例外规则


FD_Thunder Allow FD_迅雷 允许
%programfiles%\Thunder\ComDlls\TDAtOnce*.dll
%programfiles%\Thunder\ComDlls\ThunderAgent*.dll
%programfiles%\Thunder\ComDlls\XunLeiBHO*.dll
%programfiles%\Thunder\Program\Update\DsXlCom*.exe
%programfiles%\Thunder\Program\Update\PPlayerSetup*.exe
%programfiles%\Thunder\Program\Update\Update.dat
%programfiles%\Thunder\Program\UpdateShell.dll
%windir%\system32\pub_store.dat

允许迅雷修改的文件,例外规则


FD_Downloads FD_下载目录
F:\downloads\software\*
F:\leaktests\*
F:\virus\*
H:\eMule\*


允许浏览器和下载工具访问的目录


FD_My Documents FD_我的文档目录和桌面
%userprofile%\My Documents\*
%userprofile%\Desktop\*
D:\My Documents\*



FD_Program Files FD_程序目录
%programfiles%\*
D:\Program Files\*



FD_Startup Folders FD_开始菜单启动
?:\Documents and Settings\*\Start Menu\Programs\Startup\*
?:\Documents and Settings\*\「开始」菜单\程序\启动\*
?:\Documents and Settings\*\「開始」功能表\程式集\啟動\*
%windir%\system32\GroupPolicy\Machine\Scripts\Startup\*
%windir%\system32\GroupPolicy\User\Scripts\Logon\*



FD_COMODO Files/Folders FD_COMODO安装目录
C:\Program Files\COMODO\Firewall*
C:\Documents and Settings\All Users\Application Data\Comodo*



FD_3rd Party Protocol Drivers FD_第三方协议驱动
\Device\NPF_*
\Device\Ndisuio
\Device\NdisTapi



FD_Sysbackup FD_系统备份
G:\*
I:\*
*.gho


系统备份目录


FD_NonSystem I FD_非系统盘 I
D:\*
E:\*
F:\*
H:\*
J:\*


非系统盘,包括根目录


FD_NonSystem II FD_非系统盘 II
D:\*\*
E:\*\*
F:\*\*
H:\*\*

J:\*\*


非系统盘,不包括根目录


FD_My Protected Files FD_私人文件
\Device\Harddisk0\DR0
\Device\Harddisk1\DR1
%programfiles%\cFosSpeed\*
%ProgramFiles%\WinRAR\*
C:\BOOT\*
D:\Downloads\*
D:\My Documents\*
D:\Opera\*



FD_Pictures FD_图形文件
*.jpg
*.png
*.bmp



FD_SystemDriver FD_系统盘
C:\*


FD_NamedPipe FD_命名管道
\Device\NamedPipe\lsass
\Device\NamedPipe\ntsvcs
\Device\NamedPipe\Win32Pipes
\Device\NamedPipe\Adobe LM Service
\Device\NamedPipe\pgpserv
\Device\NamedPipe\ROUTER


除了测试,一般用不到,我也没有什么可以说的,占个位置而已。


FD_Devices FD_设备驱动服务
\Device\Harddisk
\Device\CdRom
\Device\LanmanRedirector
\Device\USBFDO-0
\Device\USBFDO-1
\Device\Tcp
\Device\Udp
\Device\Ip
\Device\RawIp
\Device\Afd
\Device\PhysicalMemory
\Device\Harddisk0\DR0
\Device\Harddisk1\DR1
\Device\MountPointManager


除了测试,一般用不到,我也没有什么可以说的,占个位置而已。


AD_Blacklist folders I AD_黑名单目录 I
?:\RECYCLE?\*
?:\System Volume Information\*
*\Local Settings\Temp\*
*\Local Settings\Temporary Internet Files\*
%ProgramFiles%\Common Files\Microsoft Shared\MSINFO\*
C:\OperaCache\*


禁止运行临时文件目录、回收站、系统还原目录下的程序


AD_Blacklist folders II AD_黑名单目录 II
%temp%\*
%windir%\downloaded program files\*
%windir%\temp\*


禁止运行临时文件目录下的程序


AD_Blacklist Programs AD_黑名单程序
*.com
*\cmd.exe
*\ntvdm.exe
*\attrib.exe
*\cscript.exe
*\wscript.exe
*\mshta.exe
*\ntoskrnl.exe
*\regedit.exe
*\regsvr32.exe
*\taskkill.exe
*\at.exe
*\hh.exe
*\sc.exe
*\format.*
*\debug.exe
*\Cacls.exe
*\command.com
*\conime.exe
*\net.exe
*\net1.exe
*\netsh.exe
*\netstat.exe
*\telnet.exe
*\tftp.exe
*\tasklist.exe
*\diskpart.exe
*\mmc.exe
*\msconfig.exe
*\ntsd.exe
*\schtasks.exe
*\replace.exe
*\realsched.exe
*\TIMPlatform.exe
*\QQUpdateCenter.exe


禁止运行一些常被病毒调用的程序


AD_All Hooks AD_所有钩子
%windir%\system32\*.dll
%programfiles%\*\*.dll
%programfiles%\*\*.exe
%programfiles%\*\*.ocx

简化全局钩子规则


AD_Windows Hooks AD_Windows钩子
%windir%\system32\msctf.dll
%windir%\system32\browseui.dll
%windir%\system32\ieframe.dll


官方规则的三个Windows 钩子


AD_Whitelist AD_白名单
%windir%\notepad.exe
%windir%\system32\calc.exe
%windir%\system32\control.exe
%windir%\system32\ctfmon.exe
%windir%\system32\drwtsn32.exe
%windir%\system32\dumprep.exe
%windir%\system32\dwwin.exe
%windir%\system32\freecell.exe
%windir%\system32\mspaint.exe
%windir%\system32\notepad.exe
%windir%\system32\sndvol32.exe
%windir%\system32\sol.exe
%windir%\system32\spider.exe
%windir%\system32\taskmgr.exe
%windir%\system32\userinit.exe
%windir%\system32\verclsid.exe
%windir%\system32\winmine.exe


允许常见的Windows程序


AG_Windows System Applications AG_Windows系统程序组
System
%windir%\system32\smss.exe
%windir%\system32\csrss.exe
%windir%\system32\winlogon.exe
%windir%\system32\services.exe
%windir%\system32\spoolsv.exe
%windir%\system32\lsass.exe


AG_Windows Updater Applications AG_Windows升级程序组
%windir%\system32\svchost.exe
%windir%\system32\wuauclt.exe
%windir%\system32\wupdmgr.exe



AG_COMODO Firewall Pro AG_COMODO防火墙
%programfiles%\COMODO\Firewall\cfp.exe
%programfiles%\COMODO\Firewall\cmdagent.exe
%programfiles%\COMODO\Firewall\cfplogvw.exe
%programfiles%\COMODO\Firewall\cfpupdat.exe
%programfiles%\COMODO\Firewall\cfpsbmit.exe
%programfiles%\COMODO\Firewall\cfpconfg.exe
%programfiles%\COMODO\Firewall\crashrep.exe



AG_Filseclab AG_杀毒软件
%programfiles%\Filseclab\Twister\Twister.exe
%programfiles%\Filseclab\Twister\psview.exe
%programfiles%\Filseclab\Twister\PowerRmv.exe
%programfiles%\Filseclab\Twister\spifix.exe
%commonprogramfiles%\Filseclab\FilUp.exe
%commonprogramfiles%\Filseclab\FilMsg.exe

%commonprogramfiles%\Filseclab\CertReg.exe
%commonprogramfiles%\Filseclab\CabArc.Exe
%commonprogramfiles%\Filseclab\SimpMsg.exe
%commonprogramfiles%\Filseclab\UserReg.exe

杀软分组示例


AG_DefenseWall AG_沙盘
%programfiles%\DefenseWall\defensewall.exe
%windir%\system32\defensewall_serv.exe


沙盘分组示例


AG_EQSecure AG_其它HIPS
%programfiles%\EQSysSecure\EQSysSecure.exe
%programfiles%\EQSysSecure\EQService.exe


其它HIPS分组示例


AG_Network Applications AG_网络程序组
%programfiles%\WinRAR\WinRAR.exe
%programfiles%\Thunder\Thunder.exe
%programfiles%\Thunder\Program\Thunder5.exe
%userprofile%\Application Data\Mozilla\Firefox\Profiles\*\FlashGot.exe
D:\Program Files\Opera 9.5\opfinder.exe
D:\Program Files\Opera 9.5\oget\oget.exe
D:\Program Files\Opera 9.5\oget\flashgot.exe
%windir%\system32\winhlp32.exe
%programfiles%\Internet Explorer\iexplore.exe
D:\Program Files\Opera\Opera.exe
D:\Program Files\Opera 9.5\opera.exe
%programfiles%\Mozilla Firefox\firefox.exe
%programfiles%\Mozilla Firefox\updater.exe
%programfiles%\Mozilla Firefox\xpicleanup.exe
%programfiles%\TVKoo\viviplay.exe
%programfiles%\TVKoo\Update.exe
%programfiles%\SopCast\SopCast.exe
%programfiles%\SopCast\adv\SopAdver.exe
%programfiles%\PPStream\PPStream.exe
%programfiles%\PPLive\PPLive.exe
%programfiles%\TVAnts\Tvants.exe
%programfiles%\TVUPlayer\TVUPlayer.exe
%programfiles%\TVUPlayer\AutoUpgrade.exe
%programfiles%\Lingoes\Translator2\Lingoes.exe
%programfiles%\Lingoes\Translator2\lgsupd.exe
%programfiles%\feidianTV\P2PPlayer.exe
%programfiles%\feidianTV\UpgradeP2PClient_211.exe
%programfiles%\eMule\emule.exe
%programfiles%\BitSpirit\BitSpirit.exe
%programfiles%\BitSpirit\SPParser.exe


网络程序调用的子程序


AG_Safe'n'Sec AG_智能HIPS
%programfiles%\S.N.Safe&Software\Safe'n'Sec Pro\protect.exe
%programfiles%\S.N.Safe&Software\Safe'n'Sec Pro\safensec.exe
%programfiles%\S.N.Safe&Software\Safe'n'Sec Pro\snsassist.exe
%programfiles%\S.N.Safe&Software\Safe'n'Sec Pro\snsmcon.exe
%programfiles%\S.N.Safe&Software\Safe'n'Sec Pro\snsnotify.exe
%programfiles%\S.N.Safe&Software\Safe'n'Sec Pro\snsupd.exe


犀牛分组示例

图23



My Protected Registry Keys(RD)
注册表保护,也是要先在My Protected Registry Keys 添加相应的项和键


我的注册表保护列表:
Automatic Startup 自动运行
Important Keys 其它重要项
System Drivers Services 系统设置驱动服务
Internet Explorer Keys IE浏览器
Special Registry 特殊项
Security Policies 安全策略
Terminal Server
File Associations 文件关联
Networking 网络相关
COMODO Keys COMODO
Debug Keys 映像劫持
Protocols 网络协议
Shell Icons 系统图标

图24



我的注册表分组列表:

Automatic Startup 自动运行
*\Software\Microsoft\Windows\CurrentVersion\Run*
*\Software\Microsoft\Windows NT\CurrentVersion\Windows\Run*
*\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run*
*\Software\Microsoft\Command Processor\AutoRun
*\Software\Microsoft\Windows NT\CurrentVersion\Windows\Load
*\Software\Policies\Microsoft\Windows\System\Scripts\*
*\Software\Microsoft\Windows\CurrentVersion\Policies\System\Shell\*
*\Software\Microsoft\Windows NT\CurrentVersion\IniFileMapping\*
*\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\*
*\Software\Microsoft\Windows NT\CurrentVersion\WOW\boot\*
*\Software\Microsoft\Windows NT\CurrentVersion\WOW\NonWindowsApp\*
*\Software\Microsoft\Windows NT\CurrentVersion\WOW\standard\*
*\Software\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayLoad\*
*\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\*
*\Software\Policies\Microsoft\Windows\System\Scripts\Startup
*\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Startup
*\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Startup
*\Software\Microsoft\Internet Explorer\URLSearchHooks\*
HKLM\System\ControlSet???\Control\Session Manager\BootExecute
HKLM\System\CurrentControlSet\Control\Session Manager\BootExecute
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\Utility Manager\*
HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\*
HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\ShellExecuteHooks\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Windows\AppInit_DLLs
HKLM\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Windows\AppInit_DLLs
HKLM\Software\Microsoft\Active Setup\Installed Components\*\StubPath
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\GinaDLL
HKLM\SYSTEM\ControlSet???\Control\Session Manager\PendingFileRenameOperations
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations
HKEY_CURRENT_USER\Control Panel\Desktop\SCRNSAVE.EXE
HKLM\SYSTEM\ControlSet???\Control\WOW\*
HKLM\SYSTEM\CurrentControlSet\Control\WOW\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Windows\*
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\*\Shell\*


Important Keys 其它重要项
HKLM\SYSTEM\ControlSet???\Services\*
*\Software\Classes\?\shellex\ContextMenuHandlers\*
*\Software\Classes\*file\shell\*\command\*
*\Software\Classes\.exe\*
*\Software\Classes\.bat\*
*\Software\Classes\.com\*
*\Software\Classes\.cmd\*
*\Software\Classes\.reg\*
*\Software\Classes\.scr\*
*\Software\Classes\.vbs\*
*\Software\Classes\.vbe\*
*\Software\Classes\.pif\*
*\Software\Classes\.jar\*
*\Software\Classes\.js\*
*\Software\Classes\.pif\*
*\Software\Classes\.cpl\*
*\Software\Classes\.txt\*
*\Software\Classes\.ini\*
*\Software\Classes\.lnk\*
*\Software\Classes\.html\*
*\Software\Classes\.htm\*
*\Software\Classes\.doc\*
*\Software\Classes\.xls\*
*\Software\Classes\.ppt\*
*\Software\Classes\.rtf\*
*\Software\Classes\.hta\*
*\Software\Classes\.gif\*
*\Software\Classes\.jpg\*
*\Software\Classes\.png\*
*\Software\Classes\.mdb\*
*\Software\Classes\.eml\*
*\Software\Classes\.mp3\*
*\Software\Classes\.shs\*
*\Software\Classes\.wsh\*
*\Software\Classes\.rar\*
*\Software\Classes\.zip\*
*\Software\Classes\.jpeg\*
*\Software\Classes\.Folder\*
*\Software\Classes\Shell*
*\Software\Classes\Unknown\Shell*
*\Software\Classes\Folder\Shell*
*\Software\Classes\?\Shell\*
*\Software\Classes\mailto\shell\open\command\*
*\Software\Classes\*\ShellNew
*\Software\Classes\*\Shell\*\Command*
*\Software\Classes\Directory\Shell*
*\Software\Classes\*\NeverShowExt
*\Software\Classes\*\AlwaysShowExt
*\Software\Microsoft\Driver Signing\Policy
*\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe\*
*\Software\Classes\CLSID\{7EFFAAFF-EA0A-1A3A-CBCD-F13522D53649}\InProcServer32\*
*\Software\Policies\*
HKUS\*\Environment\Path
HKUS\*\Control Panel\Desktop\SCRNSAVE.EXE
HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\SharedTaskScheduler\*
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\*
HKLM\Software\Classes\Folder\shellex\ColumnHandlers\*
HKLM\Software\Classes\Protocols\Filter\*
HKLM\Software\Classes\Protocols\Handler\*


System Drivers Services 系统设置驱动服务
HKLM\SYSTEM\ControlSet???\Services\*
HKLM\SYSTEM\CurrentControlSet\Services\*
HKLM\SYSTEM\ControlSet???\Control\SafeBoot\*
HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\*
HKLM\System\ControlSet???\Control\BackupRestore\*
HKLM\System\CurrentControlSet\Control\BackupRestore\*
HKLM\System\ControlSet???\Control\ComputerName\*
HKLM\System\CurrentControlSet\Control\ComputerName\*
HKLM\SYSTEM\ControlSet???\Control\GroupOrderList\*
HKLM\SYSTEM\CurrentControlSet\Control\GroupOrderList\*
HKLM\SYSTEM\ControlSet???\Control\Lsa\*
HKLM\SYSTEM\CurrentControlSet\Control\Lsa\*
HKLM\System\ControlSet???\Control\MprServices\*
HKLM\System\CurrentControlSet\Control\MprServices\*
HKLM\System\ControlSet???\Control\Print\Monitors\*
HKLM\System\CurrentControlSet\Control\Print\Monitors\*
HKLM\SYSTEM\ControlSet???\Control\ServiceGroupOrder\*
HKLM\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder\*
HKLM\System\ControlSet???\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}\*
HKLM\System\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}\*
HKLM\Software\Microsoft\Ole*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Svchost\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Drivers\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Drivers32\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\WOW\boot\*


Internet Explorer Keys IE浏览器
*\Software\Microsoft\Internet Domains\*
*\Software\Microsoft\Internet Explorer\Main\Default_Page_URL
*\Software\Microsoft\Internet Explorer\Main\Default_Search_URL
*\Software\Microsoft\Internet Explorer\Main\Enable Browser Extensions
*\Software\Microsoft\Internet Explorer\Main\First Home Page
*\Software\Microsoft\Internet Explorer\Main\HOMEOldSP
*\Software\Microsoft\Internet Explorer\Main\Local Page
*\Software\Microsoft\Internet Explorer\Main\Start Page
*\Software\Microsoft\Internet Explorer\Main\Start Page_bak
*\Software\Microsoft\Internet Explorer\Main\Use Custom Search URL
*\Software\Microsoft\Internet Explorer\Main\Window Title
*\Software\Microsoft\Internet Explorer\Main\FeatureControl\*
*\Software\Microsoft\Internet Explorer\Main\Search*
*\Software\Microsoft\Internet Explorer\AboutURLs\*
*\Software\Microsoft\Internet Explorer\Activex Compatibility\*
*\Software\Microsoft\Internet Explorer\AdvancedOptions\*
*\Software\Microsoft\Internet Explorer\Desktop\Components\*
*\Software\Microsoft\Internet Explorer\Explorer Bars\*
*\Software\Microsoft\Internet Explorer\Extensions\*
*\Software\Microsoft\Internet Explorer\MenuExt\*
*\Software\Microsoft\Internet Explorer\Plugins\*
*\Software\Microsoft\Internet Explorer\Search\*
*\Software\Microsoft\Internet Explorer\SearchUrl*
*\Software\Microsoft\Internet Explorer\Styles\*
*\Software\Microsoft\Internet Explorer\Toolbar\*
*\Software\Microsoft\Internet Explorer\UrlSearchHooks\*
*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\AutoConfigProxy
*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\CertificateRevocation
*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Special Paths\Cookies\*
*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\MinLevel
*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable
*\Software\Microsoft\Windows\Currentversion\Internet Settings\Security_RunActiveXControls
*\Software\Microsoft\Windows\Currentversion\Internet Settings\Security_RunScripts
*\Software\Microsoft\Windows\Currentversion\Internet Settings\Safety Warning Level
*\Software\Microsoft\Windows\Currentversion\Internet Settings\Trust Warning Level
*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\SafeSites\*
*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Security*
*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\User Agent\*
*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Warnon*
*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\*
*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\*
*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\ProtocolDefaults\*
*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\User Agent\*
*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\*
*\Software\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\*
*\Software\Microsoft\Windows\CurrentVersion\Wintrust\Trust Providers\Software Publishing\*
*\Software\Clients\StartMenuInternet\*
*\Software\Microsoft\Windows\CurrentVersion\URL\*
*\Software\Classes\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\Shell\OpenHomePage\Command\*
HKLM\Software\Microsoft\Internet Explorer\Registration\ProductID
HKLM\Software\Microsoft\Code Store Database\Distribution Units\*
HKCR\Protocols\Handler\*
HKCR\Protocols\Filter\*


Special Registry 特殊项
*\Software\Classes\CLSID\{E6FB5E20-DE35-11CF-9C87-00AA005127ED}\*
HKEY_CURRENT_USER\Control Panel\don't load\*
HKEY_CURRENT_USER\Environment\*
HKEY_CURRENT_USER\Software\VB and VBA Program Settings\*
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Programs
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayload*
HKLM\Software\Clients\Mail\*\Protocols\mailto*
HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\*
HKLM\Software\Microsoft\Windows\CurrentVersion\Control Panel\don't load\*
HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\ShellExecuteHooks\*
HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\SharedTaskScheduler\*
HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\*
HKLM\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved\*
HKLM\Software\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayLoad\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Windows\AppInit_DLLs
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Extensions\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Imagefile Execution Options\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Secedit\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Defaultpassword
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\GPExtensions\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\ReportBootOk
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\SFC*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\UIHost
HKLM\System\ControlSet???\Control\Session Manager\AllowProtectedRenames
HKLM\System\CurrentControlSet\Control\Session Manager\AllowProtectedRenames
HKLM\System\ControlSet???\Control\BootVerificationProgram\ImagePath
HKLM\System\CurrentControlSet\Control\BootVerificationProgram\ImagePath
HKLM\System\ControlSet???\Control\Session Manager\Memory Management\EnforceWriteProtection
HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management\EnforceWriteProtection
HKLM\System\ControlSet???\Control\Session Manager\ExcludeFromKnownDlls
HKLM\System\CurrentControlSet\Control\Session Manager\ExcludeFromKnownDlls
HKLM\System\ControlSet???\Control\Session Manager\Environment\*
HKLM\System\CurrentControlSet\Control\Session Manager\Environment\*
HKLM\System\ControlSet???\Control\Session Manager\Execute
HKLM\System\CurrentControlSet\Control\Session Manager\Execute
HKLM\System\ControlSet???\Control\Session Manager\KnownDlls*
HKLM\System\CurrentControlSet\Control\Session Manager\KnownDlls*
HKLM\System\ControlSet???\Control\Session Manager\SetupExecute
HKLM\System\CurrentControlSet\Control\Session Manager\SetupExecute
HKLM\System\ControlSet???\Control\Session Manager\SubSystems\*
HKLM\System\CurrentControlSet\Control\Session Manager\SubSystems\*
HKLM\System\ControlSet???\Control\VirtualDeviceDrivers\VDD
HKLM\System\CurrentControlSet\Control\VirtualDeviceDrivers\VDD
HKLM\System\ControlSet???\Control\Wmi\Globallogger*
HKLM\System\CurrentControlSet\Control\Wmi\Globallogger*
HKLM\System\LastKnownGoodRecovery*
HKLM\System\MountedDevices\*


Security Policies 安全策略
HKEY_CURRENT_USER\Control Panel\Desktop\*
HKEY_CURRENT_USER\Software\Policies\Microsoft\*
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\General\Wallpaper
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\EnforceShellExtensionSecurity
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hid*
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\No*
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Documents\HideMyDocsFolder
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\IncludeSubFolders
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Search*
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ShellState
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\*
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\SystemRestore\*
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Open
HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\*
HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\HideFileExt\*
HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\SuperHidden\*
HKLM\Software\Microsoft\Windows\CurrentVersion\NetCache\*
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop\*
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\*
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall\*
HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\*
HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\WindowsUpdate\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\SystemRestore\DisableSR
HKLM\Software\Policies\Microsoft\Windows\*
HKLM\System\ControlSet???\Services\Sharedaccess\Parameters\FirewallPolicy\*
HKLM\System\CurrentControlSet\Services\Sharedaccess\Parameters\FirewallPolicy\*
*\Software\Microsoft\Security Center\*
*\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced*
*\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\*
*\Software\Microsoft\Windows\CurrentVersion\Policies\System\*


Terminal Server
HKLM\Software\Microsoft\Terminal Server Client\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Drivers32\Terminal Server\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\MCI32\Terminal Server\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\*
HKLM\SYSTEM\ControlSet???\Control\Terminal Server\*
HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\*


File Associations 文件关联
HKCR\.bat\*
HKCR\.cmd\*
HKCR\.exe\*
HKCR\.txt\*
HKCR\.ini\*
HKCR\.lnk\*
HKCR\.pif\*
HKCR\.html\*
HKCR\.com\*
HKCR\.doc\*
HKCR\.htm\*
HKCR\.gif\*
HKCR\.hta\*
HKCR\.jpg\*
HKCR\.js\*
HKCR\.mdb\*
HKCR\.mp3\*
HKCR\.png\*
HKCR\.ppt\*
HKCR\.rtf\*
HKCR\.shs\*
HKCR\.vbs\*
HKCR\.vbe\*
HKCR\.wsh\*
HKCR\.xls\*
HKCR\.zip\*
HKCR\.eml\*
HKCR\.cpl\*
HKCR\.reg\*
HKCR\.jpeg\*
HKCR\.scr\*
HKCR\Shell*
HKCR\Unknown\Shell*
HKCR\Folder\Shell*
HKCR\?\Shell\*
HKCR\*\ShellNew
HKCR\*\Shell\*\Command*
HKCR\Directory\Shell*
HKCR\*\NeverShowExt
HKCR\*\AlwaysShowExt
HKCR\CLSID\{7EFFAAFF-EA0A-1A3A-CBCD-F13522D53649}\InProcServer32\*


Networking 网络相关
HKLM\System\ControlSet???\Services\Winsock2\*
HKLM\System\CurrentControlSet\Services\Winsock2\*
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Network\*
HKLM\System\ControlSet???\Services\Tcpip\Parameters\DataBasePath
HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath
HKLM\System\ControlSet???\Services\Tcpip\Parameters\Interfaces\*
HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\*
HKLM\System\ControlSet???\Control\Session Manager\UserAgent
HKLM\System\CurrentControlSet\Control\Session Manager\UserAgent
HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\User Agent\Post Platform\*
HKLM\Software\Microsoft\Ras*



COMODO Keys COMODO自我保护
HKLM\System\Software\Comodo*
*\Software\Comodo*



Debug Keys 映像劫持
HKLM\Software\Microsoft\Windows NT\CurrentVersion\AeDebug\*
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution\*



Protocols 网络协议
HKLM\Software\Classes\Protocols\Filter\*
HKLM\Software\Classes\Protocols\Handler\*



Shell Icons 系统图标
HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons*
*\Software\Classes\*file\DefaultIcon
*\Software\Classes\CLSID\*\DefaultIcon
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\*\DefaultIcon


图25




My Protected COM Interface(COM接口保护)
这里没做修改,直接用默认的。


Internet Explorer/Windows Shell
InternetExplorer.Application.*
Outlook.Application.*
Microsoft.XMLHTTP
{8856F961-340A-11D0-A96B-00C04FD705A2}
{FBF23B40-E3F0-101B-8488-00AA003E56F8}
{9BA05972-F6A8-11CF-A442-00A0C90A8F39}
{75048700-EF1F-11D0-9888-006097DEACF9}



Windows Management
{4590F811-1D3A-11D0-891F-00AA004B2E24}
{4991D34B-80A1-4291-83B6-3328366B9097}



Pseudo COM Interfaces - Privileges
LocalSecurityAuthority.Backup
LocalSecurityAuthority.Restore
LocalSecurityAuthority.Debug
LocalSecurityAuthority.Shutdown
LocalSecurityAuthority.SystemEnvironment
LocalSecurityAuthority.SystemTime



Pseudo COM Interfaces - Important Ports
\RPC Control\ntsvcs
\RPC Control\wzcsvc
\RPC Control\spoolss



Miscellaneous Classes
{B69003B3-C55E-4B48-836C-BC5946FC3B28}
{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}
{0002E012-0000-0000-C000-000000000046}
{EE140200-0000-0000-C000-000000000046}
{9BA05972- F6A8- 11CF- A442-00A0C90A8F39}


图26


[ 本帖最后由 ubuntu 于 2007-12-26 14:33 编辑 ]
ubuntu
 楼主| 发表于 2007-12-21 14:09:52 | 显示全部楼层
第四部分 预设规则



知行合一
1.预设规则的原则

前面已经讲过默认的Trusted 对大多数程序太松,默认的Limited 又太紧。
我们接下来要做到就是削减Trusted的权限,提高Limited的权限。
另外,再增加两个预设规则,本地程序和网络程序。
如果Comodo安装在干净的系统,那么不需要上网的本地程序,基本不会对我们构成威胁。
网络程序一旦联网随时可以威胁系统安全,需要制定和本地程序不同的严格规则。网络程序也被称作 Threat Gates(威胁入口),限制网络程序及其生成物就是我的策略。
此外,我们还需要稍微修改一下默认所有程序规则。
目前的想法是:explorer、默认浏览器、系统启动常用的一些程序(windows 和system32 下) 使用Custom Policy,剩下其它程序都可以使用后面的预设规则。预设规则也会根据以后的软件加入而不断扩充,不断添加新规则。


2. 需要留意的弹出警告

这些行为比较特殊,是增权和削权的主要对象。

启发分析报可疑行为,基本上可以判断是病毒,只有极少的是HIPS/Firewall 测试程序。最好阻止一切行为,结束进程,然后上传VirScan、VirusTotal扫描。

注意:在Comodo V3, 点击Cancel表示阻止一次!

图27



对于不认识的程序,修改Windows系统程序、explorer、安全软件、IE、其它浏览器内存空间,也要留意。



对于安装驱动要十分小心,因为一般程序是不会安装驱动的,除非安全软件和安装特定的设备驱动。
不认识的程序安装驱动一律阻止,一旦安装加载驱动,程序将获得和HIPS一样的底层权限,拥有这种权限的程序可以使HIPS的保护部分或全部失效。




访问物理内存,一般程序也不会有的行为。直接访问物理内存也可以获得很高的系统特权。一般直接阻止。



底层磁盘,一般程序也用不到,直接阻止。QQ、PPStream、PPLive、搜狗之类的也阻止,不影响使用。





底层键盘,不认识的程序,直接阻止。防止键盘记录。



对于不认识的程序,修改注册表自启动、服务驱动、映像劫持 直接阻止。




对于COM接口 Pseudo COM Interfaces - Privileges 提升权限,一般程序很少用到,最好阻止。尤其是:
LocalSecurityAuthority.Debug 提升权限到Debug直接阻止,非常重要,除非是完全信任的程序




LocalSecurityAuthority.SystemTime 修改系统时间直接阻止。 通常只允许rundll32 修改系统时间。


LocalSecurityAuthority.Restore 系统还原,可以绕过已设置的文件、注册表权限,非系统程序直接阻止。


Pseudo COM Interfaces - Privileges 下的所有项,对于不认识的程序,直接阻止。


Service Control Manager (\RPC Control\ntsvcs) 涉及到对服务的管理,不认识的程序直接阻止。





我的预设规则

1. 所有程序默认规则,主要用于安装新软件,学习新软件的规则。询问方式,需要用户参与。

All Application Default
图 All Application Default


禁止运行 AD_Blacklist folders I 临时文件、回收站、系统还原目录下的程序。
允许访问 %windir%\system32\ctfmon.exe 内存空间
允许 AD_Windows Hooks
阻止COM LocalSecurityAuthority.Debug、LocalSecurityAuthority.SystemTime
FD 允许 FD_Temporary Files、FD_UserProfile Allow、FD_WinDir Allow
FD 阻止 FD_UserProfile Block、FD_COMODO Files/Folders、FD_Sysbackup、FD_3rd Party Protocol Drivers



All Application Default
Default Action
Modify | Allow
Modify | Block
Run an executable
Ask
AD_Blacklist folders I
Interprocess Memory Access
Ask
%windir%\system32\ctfmon.exe
Windows/WinEvent Hooks
Ask
AD_Windows Hooks
Process Terminations
Ask
Device Driver Installations
Ask
Window Messages
Ask
Protected COM Interfaces
Ask
LocalSecurityAuthority.Debug
LocalSecurityAuthority.SystemTime
Protected Registry Keys
Ask
Protected Files/Folders
Ask
FD_Temporary Files
FD_UserProfile Allow
FD_WinDir Allow
FD_UserProfile Block、
FD_COMODO Files/Folders
FD_Sysbackup
FD_3rd Party Protocol Drivers
Loopback Networking
Ask
DNS Client Service
Ask
Physical Memory
Ask
Computer Monitor
Ask
Disks
Ask
Keyboard
Ask


2, 削减了权限的信任程序规则,主要用于非系统级的,完全信任的程序。

All Applications Trusted
图 All Applications Trusted


允许运行 :%windir%\explorer.exe、%windir%\system32\mshta.exe、AD_Whitelist
阻止运行: AD_Blacklist folders I、AD_Blacklist folders II

阻止插入: AG_Windows System Applications、AG_Windows Updater Applications、AG_COMODO Firewall Pro

阻止终止:AG_Windows System Applications、AG_COMODO Firewall Pro

阻止安装驱动

阻止COM:LocalSecurityAuthority.Debug、LocalSecurityAuthority.SystemTime

RD阻止:COMODO Keys、Debug Keys

FD允许:
FD_Temporary Files
FD_UserProfile Allow
FD_Application Data
FD_Downloads
FD_My Documents
FD_WinDir Allow
FD_Program Files
FD_NonSystem II
FD_My Protected Files
FD_Browser Allow
FD_Thunder Allow

FD阻止:
FD_Executables
FD_Important Files/Folders
FD_Startup Folders
FD_COMODO Files/Folders
FD_3rd Party Protocol Drivers
FD_Sysbackup
FD_NonSystem I

阻止物理内存

阻止底层磁盘

All Application Trusted
Default Action
Modify | Allow
Modify | Block
Run an executable
Ask
%windir%\explorer.exe
%windir%\system32\mshta.exe
AD_Whitelist
AD_Blacklist folders I
AD_Blacklist folders II
Interprocess Memory Access
Allow
AG_Windows System Applications
AG_Windows Updater Applications
AG_COMODO Firewall Pro
Windows/WinEvent Hooks
Allow
Process Terminations
Allow
AG_Windows System Applications
AG_COMODO Firewall Pro
Device Driver Installations
Block
Window Messages
Allow
Protected COM Interfaces
Allow
LocalSecurityAuthority.Debug
LocalSecurityAuthority.SystemTime
Protected Registry Keys
Allow
COMODO Keys
Debug Keys
Protected Files/Folders
Allow
FD_Temporary Files
FD_UserProfile Allow
FD_Application Data
FD_Downloads
FD_My Documents
FD_WinDir Allow
FD_Program Files
FD_NonSystem II
FD_My Protected Files
FD_Browser Allow
FD_Thunder Allow
FD_Executables
FD_Important Files/Folders
FD_Startup Folders
FD_COMODO Files/Folders
FD_3rd Party Protocol Drivers
FD_Sysbackup
FD_NonSystem I
Loopback Networking
Allow
DNS Client Service
Allow
Physical Memory
Block
Computer Monitor
Allow
Disks
Block
Keyboard
Allow



3. 本地程序,不需要上网

All Applications Local
图 All Applications Local


允许运行:AG_Whitelist
阻止运行:AD_Blacklist folders I、AD_Blacklist folders II、AD_Blacklist Programs

允许修改内存:
%windir%\system32\ctfmon.exe、%windir%\explorer.exe
阻止修改内存:
AG_Windows System Applications
AG_Windows Updater Applications
AG_COMODO Firewall Pro
AG_Filseclab
AG_DefenseWall

阻止Hooks
允许:AD_Windows Hooks 、AD_All Hooks

允许结束进程
阻止结束:
AG_Windows System Applications
AG_COMODO Firewall Pro
AG_Filseclab
AG_DefenseWall

阻止安装驱动

允许Windows消息

允许COM
阻止:Internet Explorer/Windows Shell、Pseudo COM Interfaces - Privileges、Windows Management

RD阻止

FD允许
Allowed Files/Folders
FD_Temporary Files
FD_UserProfile Allow
FD_Downloads
FD_WinDir Allow
FD_My Documents

Blocked Files/Folders
FD_WinDir
FD_Executables
FD_Important Files/Folders
FD_NonSystem I
FD_Sysbackup
FD_Startup Folders
FD_COMODO Files/Folders
FD_3rd Party Protocol Drivers
FD_My Protected Files

Loopaback Networking 阻止

DNS 阻止

物理内存 阻止

Disk 阻止

All Application Local
Default Action
Modify | Allow
Modify | Block
Run an executable
Ask
AD_WhitelistAD_Blacklist folders I
AD_Blacklist folders II
AD_Blacklist Programs
Interprocess Memory Access
Block
%windir%\system32\ctfmon.exe
%windir%\explorer.exe
AG_Windows System Applications
AG_Windows Updater Applications
AG_COMODO Firewall Pro

AG_Filseclab
AG_DefenseWall

Windows/WinEvent Hooks
Block
AD_Windows Hooks
AD_All Hooks
Process Terminations
Allow
AG_Windows System Applications
AG_COMODO Firewall Pro

AG_Filseclab
AG_DefenseWall

Device Driver Installations
Block
Window Messages
Allow
Protected COM Interfaces
Allow
Internet Explorer/Windows Shell
Pseudo COM Interfaces - Privileges
Windows Management
Protected Registry Keys
Block
Protected Files/Folders
Allow
FD_Temporary Files
FD_UserProfile Allow
FD_Downloads
FD_WinDir Allow
FD_My Documents
FD_WinDir
FD_Executables
FD_Important Files/Folders
FD_NonSystem I
FD_Sysbackup
FD_Startup Folders
FD_COMODO Files/Folders
FD_3rd Party Protocol Drivers
FD_My Protected Files
Loopback Networking
Block
DNS Client Service
Block
Physical Memory
Block
Computer Monitor
Allow
Disks
Block
Keyboard
Allow



4. 网络程序(Threat Gates)

图 All Applications Network


All Applications Network

允许运行:
AG_Network Applications
AG_Whitelist
阻止运行:
AD_Blacklist folders I
AD_Blacklist folders II
AD_Blacklist Programs

阻止修改内存
允许:
%windir%\system32\ctfmon.exe
%windir%\explorer.exe
C:\Program Files\PPLive\PPLive.exe
阻止:
AG_Windows System Applications
AG_Windows Updater Applications
AG_COMODO Firewall Pro
AG_Filseclab
AG_DefenseWall

阻止Hooks
允许:AD_Windows Hooks 、AD_All Hooks、C:\Program Files\PPLive\SynacastList.ocx


允许结束进程
阻止结束:
AG_Windows System Applications
AG_COMODO Firewall Pro
AG_Filseclab
AG_DefenseWall

阻止安装驱动

允许Windows消息

阻止COM
允许:\RPC Control\ntsvcs
{9BA05972-F6A8-11CF-A442-00A0C90A8F39}
阻止:Pseudo COM Interfaces - Privileges

RD阻止
允许:*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable
*\Software\Microsoft\Internet Explorer\Toolbar\Locked
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{889D2FEB-5411-4565-8998-1DD2C5261283}*

FD允许
Allowed Files/Folders
FD_UserProfile Allow
FD_Downloads
FD_WinDir Allow
FD_Browser Allow
FD_Thunder Allow

Blocked Files/Folders
FD_WinDir
FD_Executables
FD_Important Files/Folders
FD_UserProfile Block
FD_NonSystem I
FD_Sysbackup
FD_Startup Folders
FD_COMODO Files/Folders
FD_3rd Party Protocol Drivers
FD_My Protected Files

Loopaback Networking 允许

DNS 允许

物理内存 阻止

Disk 阻止

All Application Network
Default Action
Modify | Allow
Modify | Block
Run an executable
Ask
AG_Network Applications
AD_Whitelist
AD_Blacklist folders I
AD_Blacklist folders II
AD_Blacklist Programs
Interprocess Memory Access
Block
%windir%\system32\ctfmon.exe
%windir%\explorer.exe
C:\Program Files\PPLive\PPLive.exe
AG_Windows System Applications
AG_Windows Updater Applications
AG_COMODO Firewall Pro

AG_Filseclab
AG_DefenseWall

Windows/WinEvent Hooks
Block
AD_Windows Hooks
AD_All Hooks

C:\Program Files\PPLive\SynacastList.ocx
Process Terminations
Allow
AG_Windows System Applications
AG_COMODO Firewall Pro

AG_Filseclab
AG_DefenseWall

Device Driver Installations
Block
Window Messages
Allow
Protected COM Interfaces
Block
\RPC Control\ntsvcs

{9BA05972-F6A8-11CF-A442-00A0C90A8F39}
Pseudo COM Interfaces - Privileges
Protected Registry Keys
Block
*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable

*\Software\Microsoft\Internet Explorer\Toolbar\Locked
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\{889D2FEB-5411-4565-8998-1DD2C5261283}*
Protected Files/Folders
Allow
FD_UserProfile Allow
FD_Downloads
FD_WinDir Allow
FD_Browser Allow
FD_Thunder Allow
FD_WinDir
FD_Executables
FD_Important Files/Folders
FD_UserProfile Block
FD_NonSystem I
FD_Sysbackup
FD_Startup Folders
FD_COMODO Files/Folders
FD_3rd Party Protocol Drivers
FD_My Protected Files
Loopback Networking
Allow
DNS Client Service
Allow
Physical Memory
Block
Computer Monitor
Allow
Disks
Block
Keyboard
Allow




5. 受限程序,可以作为All Application 规则使用,尽可能做到无提示、通用,并且能阻止几乎所有的病毒威胁。有点策略限制Sandbox 内置规则的意思。

All Applications Limited

图 All Applications Limited


Ask 阻止运行:
AD_Blacklist folders I
AD_Blacklist folders II
AD_Blacklist Programs

阻止修改内存
允许:
%windir%\system32\ctfmon.exe
C:\Program Files\PPLive\PPLive.exe
阻止:
AG_Windows System Applications
AG_Windows Updater Applications
AG_COMODO Firewall Pro
AG_Filseclab
AG_DefenseWall
%windir%\explorer.exe
%programfiles%\Internet Explorer\iexplore.exe
D:\Program Files\Opera 9.5\Opera.exe
D:\Program Files\Opera\Opera.exe
C:\Program Files\Mozilla Firefox\firefox.exe


阻止Hooks
允许:

AD_Windows Hooks
AD_All Hooks


允许结束进程
阻止结束:
AG_Windows System Applications
AG_COMODO Firewall Pro
AG_Filseclab
AG_DefenseWall

阻止安装驱动

允许Windows消息

阻止COM
阻止:Pseudo COM Interfaces - Privileges

RD阻止
允许:HKUS\*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable
*\Software\Microsoft\Internet Explorer\Toolbar\Locked

FD允许
Allowed Files/Folders
FD_UserProfile Allow
FD_WinDir Allow
FD_Browser Allow

Blocked Files/Folders
FD_WinDir
FD_Executables
FD_Important Files/Folders
FD_UserProfile Block
FD_My Documents
FD_NonSystem I
FD_Sysbackup
FD_Startup Folders
FD_COMODO Files/Folders
FD_3rd Party Protocol Drivers
FD_My Protected Files

Loopaback Networking 允许

DNS 允许

物理内存 阻止

Disk 阻止

Keyboard 阻止



All Application Limited
Default Action
Modify | Allow
Modify | Block
Run an executable
Ask


AD_Blacklist folders I
AD_Blacklist folders II
AD_Blacklist Programs
Interprocess Memory Access
Block
%windir%\system32\ctfmon.exe
C:\Program Files\PPLive\PPLive.exe
AG_Windows System Applications
AG_Windows Updater Applications
AG_COMODO Firewall Pro

AG_Filseclab
AG_DefenseWall

%windir%\explorer.exe
%programfiles%\Internet Explorer\iexplore.exe
D:\Program Files\Opera 9.5\Opera.exe
D:\Program Files\Opera\Opera.exe
C:\Program Files\Mozilla Firefox\firefox.exe

Windows/WinEvent Hooks
Block
AD_Windows Hooks
AD_All Hooks

Process Terminations
Allow
AG_Windows System Applications
AG_COMODO Firewall Pro

AG_Filseclab
AG_DefenseWall

Device Driver Installations
Block
Window Messages
Allow
Protected COM Interfaces
Block

Pseudo COM Interfaces - Privileges
Protected Registry Keys
Block
HKUS\*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable

*\Software\Microsoft\Internet Explorer\Toolbar\Locked


Protected Files/Folders
Allow
FD_UserProfile Allow
FD_WinDir Allow
FD_Browser Allow
FD_WinDir
FD_Executables
FD_Important Files/Folders
FD_UserProfile Block
FD_My Documents
FD_NonSystem I
FD_Sysbackup
FD_Startup Folders
FD_COMODO Files/Folders
FD_3rd Party Protocol Drivers
FD_My Protected Files
Loopback Networking
Allow
DNS Client Service
Allow
Physical Memory
Block
Computer Monitor
Allow
Disks
Block
Keyboard
Block




为了减少本文读者手工输入规则的时间,我把分组文件和D+预设规则放上来。
能不能用看RP了,因为Comodo的规则都和具体分区挂勾的
我按照一般用户(95%+)的分区方式整理,只有下面这种分区形式才能用:
C:\     -->  \Device\HarddiskVolume1
D:\     -->  \Device\HarddiskVolume2

导入前,先要备份原来的规则。
Disable Defense+ ,退出Comodo,双击导入。
启动Comodo,还原Defense+的模式,然后,打开Computer Security Policy,点击Apply。
因为修改了已有组的名字,如果组规则不正常的话,需要删除原来的组,重新设置。
象(Windows System Applications、Windows Updater Applications、COMODO Firewall Pro)。

[ 本帖最后由 ubuntu 于 2008-1-17 10:48 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?快速注册

x
ubuntu
 楼主| 发表于 2007-12-21 14:11:32 | 显示全部楼层
第五部分 规则释疑


为了让大家更好的设置自己的规则,我想有必要解释一下以上的预设规则。然后,华丽的结束Defense+ 的讨论。
再强调一下,别人的规则只是个参考,自己的规则是最好的。
要定制自己的规则,先要养成看日志的好习惯:
1. Defense+ -> Common Tasks -> View Defense+ Events
2. 在Comodo的安装目录下 "C:\Program Files\COMODO\Firewall\cfplogvw.exe" 建立一个桌面快捷方式,在设置规则的时候,经常打开看看。
Comodo的日志不咋地,目前,Defense+ 只记录被阻止的操作,对于建立例外规则够用而已。

我的规则建立在以下假设的基础上,为了简化规则,我假设系统是干净的,所有程序安装在系统盘 Program Files下面,一般的程序,我朴素的都禁止修改非系统盘的文件,所以,如果,你的程序安装在非系统盘,那么需要去掉 FD_NonSystem相应的盘符,否则你的程序将不能正常运行。All Applications 永远放在最下面。

Defense+ 规则应该主要以阻止一切未知,放行个别已知为主,以这个为基础。 由于我们会受到个人安全知识、Defense+ 目前架构局限性限制,在某些特定规则上将采取阻止个别已知有害操作,放行所有其它操作。

同一保护项目的规则执行顺序:
1.例外规则 Modify Allow 里允许的操作
2.例外规则 Modify Block 里阻止的操作
3.全局操作


            
All Applications Default
作为默认所有程序规则的替换规则,做了一点点修改,不做太严格的限制,主要用于安装新软件,学习新软件的操作,主要以询问用户为主,需要用户对弹出警告做出选择。


Run an executable
Ask
AD_Blacklist folders I
?:\RECYCLE?\*
?:\System Volume Information\*
*\Local Settings\Temp\*
*\Local Settings\Temporary Internet Files\*
%ProgramFiles%\Common Files\Microsoft Shared\MSINFO\*
C:\OperaCache\*

阻止所有程序运行 回收站、系统恢复、临时文件目录下的程序。
如果在安装新程序时,需要运行 C:\Documents and Settings\当前用户名\Local Settings\temp 下的程序,要在规则移除*\Local Settings\Temp\* 。



Interprocess Memory Access
Ask
%windir%\system32\ctfmon.exe

允许内存访问  %windir%\system32\ctfmon.exe
ctfmon 几乎每个程序都要提示一下,干脆直接允许,避免麻烦。



Windows/WinEvent Hooks
Ask
AD_Windows Hooks

允许 AD_Windows Hooks
%windir%\system32\msctf.dll
%windir%\system32\browseui.dll
%windir%\system32\ieframe.dll



Protected COM Interfaces
Ask
LocalSecurityAuthority.Debug
LocalSecurityAuthority.SystemTime

COM 接口阻止,如果需要的话,可以根据日志添加个别程序允许规则:
LocalSecurityAuthority.Debug
LocalSecurityAuthority.SystemTime




Protected Files/Folders
Ask
FD_Temporary Files
FD_UserProfile Allow
FD_WinDir Allow
FD_UserProfile Block、
FD_COMODO Files/Folders
FD_Sysbackup
FD_3rd Party Protocol Drivers

FD 允许
FD_Temporary Files      允许临时文件目录下的文件操作
FD_UserProfile Allow     允许在Documents and Settings 用户目录下的Cookies、收藏夹、最近访问的文件...
FD_WinDir Allow  允许Windows系统目录下的一些文件操作

FD 阻止
FD_UserProfile Block  禁止
Documents and Settings 用户目录下的其它文件操作
FD_COMODO Files/Folders  禁止修改Comodo防火墙文件
FD_Sysbackup  禁止修改系统备份目录和文件
FD_3rd Party Protocol Drivers  禁止增加、修改第三方驱动



All Applications Limited
当经过一段时间的学习和设置(也许十天半月,也许一个月),所有常用的程序都有了合适的规则,Comodo基本不再提示以后,可以使用一条严厉的All Applications规则 All ApplicationsLimited。如果安装新程序时,需要切换回 All Applications Default。

目的是在限制所有未知程序权限同时,允许一些正常的操作,并且不需要打扰用户


Run an executable
Ask


AD_Blacklist folders I
AD_Blacklist folders II
AD_Blacklist Programs

主要是阻止临时文件目录和一些普通用户不常用,而病毒、木马经常利用的程序运行


Interprocess Memory Access
Block
%windir%\system32\ctfmon.exe
C:\Program Files\PPLive\PPLive.exe
AG_Windows System Applications
AG_Windows Updater Applications
AG_COMODO Firewall Pro

AG_Filseclab
AG_DefenseWall

%windir%\explorer.exe
%programfiles%\Internet Explorer\iexplore.exe
D:\Program Files\Opera 9.5\Opera.exe
D:\Program Files\Opera\Opera.exe
C:\Program Files\Mozilla Firefox\firefox.exe

防止所有程序,尤其是以下程序被修改内存、插入线程:
AG_Windows System Applications  系统程序
AG_Windows Updater Applications  系统升级程序
AG_COMODO Firewall Pro  防火墙

AG_Filseclab  杀毒软件
AG_DefenseWall  沙盘

%windir%\explorer.exe  资源管理器
%programfiles%\Internet Explorer\iexplore.exe  IE
D:\Program Files\Opera 9.5\Opera.exe  常用浏览器
D:\Program Files\Opera\Opera.exe  其它
常用浏览器
C:\Program Files\Mozilla Firefox\firefox.exe  其它浏览器
一个正常的程序被插入进程,插入远线程以后,会改变正常的行为,有异常行为:
杀毒软件的升级程序本来只连接升级服务器,现在可能会连接一些非法站点;
资源管理器现在也许会自动删除Ghost文件 *.gho


Windows/WinEvent Hooks
Block
AD_Windows Hooks
AD_All Hooks

全局钩子只允许AD_Windows Hooks、AD_All Hooks
AD_All Hooks AD_所有钩子
%windir%\system32\*.dll
%programfiles%\*\*.dll
%programfiles%\*\*.exe
%programfiles%\*\*.ocx

为了避免一个一个的添加,我使用了通配符,很大的范围。由于有FD的保护,这些文件作为钩子是相对安全的。除此之外,我想不到更加简单的办法。


Process Terminations
Allow
AG_Windows System Applications
AG_COMODO Firewall Pro

AG_Filseclab
AG_DefenseWall

禁止终止系统程序和安全软件,可以终止其它软件。


Device Driver Installations
Block
Window Messages
Allow

阻止安装驱动
允许发送Windows消息 (主要是因为常见的通过消息是为了关闭安全软件,前面已经有了保护,这里放行)


Protected COM Interfaces
Block

Pseudo COM Interfaces - Privileges

阻止所有COM 接口,尤其是 Pseudo COM Interfaces - Privileges


Protected Registry Keys
Block
HKUS\*\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable

*\Software\Microsoft\Internet Explorer\Toolbar\Locked



注册表全部阻止,可以根据日志进行排除



Protected Files/Folders
Allow
FD_UserProfile Allow
FD_WinDir Allow
FD_Browser Allow
FD_WinDir
FD_Executables
FD_Important Files/Folders
FD_UserProfile Block
FD_My Documents
FD_NonSystem I
FD_Sysbackup
FD_Startup Folders
FD_COMODO Files/Folders
FD_3rd Party Protocol Drivers
FD_My Protected Files

文件保护有些绕口:
1. 允许修改 UserProfile、Windows、浏览器需要的例外文件
2. 阻止以下目录和文件:
FD_WinDir  Windows目录下的所有文件
FD_Executables  任何目录下的可执行文件
FD_Important Files/Folders  重要的系统文件和目录
FD_UserProfile Block  UserProfile下的其它文件
FD_My Protected Files  我的文档和桌面
FD_NonSystem I  禁止修改非系统盘文件
FD_Sysbackup  禁止修改系统备份文件,包括*.gho
FD_Startup Folders  禁止修改程序 开始文件夹
FD_COMODO Files/Folders  禁止修改Comodo文件
FD_3rd Party Protocol Drivers  禁止安装第三方驱动
FD_My Protected Files  禁止修改用户私有文件

3. 除以上之外,全局允许。


Loopback Networking
Allow
DNS Client Service
Allow
Physical Memory
Block
Computer Monitor
Allow
Disks
Block
Keyboard
Block
Loopaback Networking 允许
DNS Client 允许
进一步的网络活动,可以用防火墙拦截。

物理内存 阻止
Computer Monitor 允许
Disk 阻止
Keyboard 阻止


其它规则,我就不仔细讲了,道理都是一样的。
最后 Defense+ 规则,会类似这样,你可以将这些使用同样预设规则的程序编成一个组,目前这样做意义似乎不大,但是以后就难说了,这代表一种有效的组织规则的理念。



简单介绍一下My Quarantined Files

My Quarantined Files 会彻底隔离一个文件,包括读取、运行操作,而且不受规则(Policy)影响。
我不喜欢这样一个不受规则制约的东西,不过,它也有好处,可以保护我们平时不会修改,又需要保护的文件。
它可以隔离已经运行的病毒,尤其是那种会不断重生的病毒文件。
可以在Defense+ -> Common Tasks -> View Active Process Lists
点击病毒进程,右键选择 Terminate (结束) 或者
点击病毒进程,右键选择 Terminate & Quarantine(结束并且隔离)



对Defense+ 的讲解到此结束,
Defense+ 也在发展,到时候再补充。
接下来将是防火墙部分。



附:鉴于猪三式的穿透系统还原,破坏硬盘主引导区(KillMBR)恶意软件的抬头:
有必要在 FD_My Protected Files 添加:
\Device\Harddisk0\DR0
\Device\Harddisk1\DR1
用Device保护和low Disk 构成双保险。


[ 本帖最后由 ubuntu 于 2007-12-26 14:51 编辑 ]
ubuntu
 楼主| 发表于 2007-12-21 14:12:32 | 显示全部楼层
防火墙
第六部分 网络基础知识



我只讲和Comodo 防火墙应用相关的一些基础知识,由来自网络的资料和本人的理解整理而成。


什么是TCP/IP 协议
TCP/IP协议
(Transmission Control Protocol/Internet Protocol)叫做传输控制/网际协议,是Internet国际互联网络的基础。

TCP/IP是网络中使用的基本的通信协议。虽然从名字上看TCP/IP包括两个协议,传输控制协议(TCP)和网际协议(IP),但TCP/IP实际上是一组协议,它包括IP、TCP、UDP、ICMP、ARP等,而TCP协议和IP协议是保证数据完整传输的两个基本的重要协议。通常说TCP/IP是Internet协议族,而不单单是TCP和IP。


什么是IP、TCP、ICMP、UDP
IP (Internet Protocol),网际协议;IP是TCP/IP 的最底层,高层协议都要转化为IP包,IP包含了源地址和目的地址,路由决策也发生在IP层;

TCP (Transmission Control Protocol),传输控制协议,一种运行于 IP 之上的、可靠的、面向连接的传输层协议。TCP运行在IP之上,是基于数据流连接和面向的协议,应用程序把数据要经过TCP/IP的分割成若干包,这样数据就以字节流发送和接收,到达目的地后,TCP/IP 再按顺序进行组装。TCP/IP 要保证机器与机器之间的连接的可靠性,还要有纠错。TCP是否被选择,取决于应用程序或服务;

UDP (User Datagram Protocol) ,用户数据报协议 ,一种运行于 IP 之上的、不可靠的、无连接的传输层协议。象TCP一样运行在IP之上,是基于数据报或分组的协议,UDP/IP 可以直接发送和接收数据报文,而不必做验证,这一点与TCP/IP 不同。

ICMP (Internet Control Message Protocol),网际控制消息协议;它包括了数据包的错误、控制等相关信息。比如ping 命令就是利用ICMP来测试一个网络的连接情况的工具;

在互联网上,区分每台计算机是使用IP地址, IP协议和路由就是为了将数据包(Packet)发送到正确的主机。
只是确定数据包的传送路径还不够,还需要保证传输过程中,数据的完整性,所以就有了TCP协议。
TCP协议提供了可靠的面向对象的数据流传输服务的规则和约定。简单的说在TCP模式中,对方发一个数据包给你,你要发一个确认数据包给对方。通过这种确认来提供可靠性。网络上常见的服务:WWW、FTP、SMTP等都是TCP协议。

在对数据传送的稳定性不做太多要求的情况下,可以使用UDP协议,由于UDP不需要确认数据是否正确传输,更加快速。
DNS查询、网络即时通讯(QQ)、一些P2P影像软件等主要使用UDP协议。


什么是端口(Ports)
互联网上的每台电脑都有自己的唯一IP,信息的传递就在不同IP之间。
由于一台电脑要运行很多不同的程序,只有IP是不够的,系统不知道将这个数据包分配给哪个具体程序。
于是,为了区别不同的程序,系统就为程序分配不同的端口,数据的传输就是在两台电脑两个端口间进行。
简单的说不同的端口可以代表不同的程序,同一个程序可以使用不止一个端口。


端口的分类
通常的客户端/服务器连接有两种方式,主动连接和被动连接。对应于本机的客户端端口和服务端端口。
服务端监听端口:当本机运行某些网络服务程序或者P2P软件时,会开启相应的端口(Listening),等待客户端的接入。
客户端端口:当我们的浏览器需要连接远程WWW服务器时,需要启用一个大于1024的随机端口,连接WWW服务器的HTTP端口。

通常0-1023 端口会保留给系统服务使用,所以又叫做Well Known Ports 公认端口。例如,80端口分配给WWW服务,21端口分配给FTP服务等。
本机客户端程序所启用的随机端口是在1025-65535之间,这些端口又叫作Dynamic Ports 动态端口。是因为它 一般不固定分配某种服务,而是动态分配。动态分配是指当一个系统进程或应用 程序进程需要网络通信时,它向主机申请一个端口,主机从可用的端口号中分配 一个供它使用。当这个进程关闭时,同时也就释放了所占用的端口号。
通常XP系统的动态端口是 1025-5000,如果到了5000,系统会返回1025,再按顺序使用。


端口的数量
共有65536 (2^16)个端口,0-65535


端口的安全性
经常有人说,我的机子开了xxx个端口,xx端口不安全。
其实,端口是没有安全性的,真正影响安全的是端口背后的服务。
因为端口是由服务开启的,要关闭端口,就要关闭相应的服务。
所以,本机要运行什么服务,一定要使用最新、最安全的版本。至于,开启哪个端口,并不是最重要的。
没有不安全的端口,只有不安全的服务(程序)。


连接的双向性和4个重要参数
单向的发送数据包是不可能建立一条连接
通常使用浏览器访问一个网站,是本机启用一个大于1024的随机端口,发送数据包到服务器的服务端口,通常是固定80端口。
服务器再将我们需要的资料,由80端口,返回本机建立连接的随机端口。
于是有下面4个重要参数:
来源IP ( Source Address )
目的 IP ( Destination Address )
来源端口 ( Source Port )
目的端口 ( Destination Port )


注意来源和目的是相对的,要看数据包传输的方向。


端口(开放、关闭、隐藏)
前面讲过开放(Open)的端口与本机运行的服务有关。
Windows系统默认运行的服务会开放一些端口,要关闭这些端口,需要关闭相应的服务。
最简单的方法是关闭不用的服务,并且使用工具,比如Windows Worms Doors Cleaner



端口关闭(Closed),说明没有服务启用这个端口,端口没有被系统分配,一个关闭的端口当收到连接请求以后,会返回一个错误提示(通常是ICMP "Destination Unreachable")。
例如,当你关闭BT、eMule等P2P软件以后,你的系统会大量向外发送ICMP "Destination Unreachable" 目标不可达,表示端口已经关闭。

端口隐藏(Stealthed),端口隐藏和端口关闭是一样的,不允许连入,只是不返回出错信息而已。

从安全上讲,端口隐藏和端口关闭,没有大的区别,都是不允许非法连入。端口隐藏的好处是不返回任何信息,使入侵者无法得知具体的端口、系统信息;另外,由于丢弃数据包这样的静默处理,可以使端口扫描一直等待结果而超时。


端口在线检测
Comodo默认是隐藏所有端口的,这点通过网络扫描,可以验证。
网络扫描是有前提的,必须是外网IP,不能通过路由器、代理服务器上网,否则结果不准确。
如果,你是ADSL路由器上网,想要获得正确的结果。必须:
1.断开路由器,使用拨号上网的方式,然后扫描。
2.或者,将本机IP加入到路由器的DMZ,或者在路由器映射所有端口。

主要的防火墙在线检测站点:
Shields UP!
PCFlank
Nmap Online
Symentic Security Check
HackerWhacker


什么是DNS
要找到指定的主机,我们用到IP; 要传输数据,需要TCP、UDP、ICMP。
问题是IP地址是很难记忆的,于是我们使用了主机域名来解决这个问题。
普通用户可以通过 bbs.kafan.cn 来访问网站,而不需要输入IP地址。

实际上,这中间有一项服务:Domain Name System (DNS),将域名转换成IP地址。
个人电脑必须向域名服务器(DNS:Domain Name Server)查询IP地址,然后浏览器才会根据返回的IP地址,连接相应的主机服务器。

DNS 是我们经常用到的协议,一旦在防火墙阻止,就不能正常上网了。


特殊的程序C:\WINDOWS\System32\Svchost.exe
在XP系统,必须允许C:\WINDOWS\System32\Svchost.exe 的一些网络活动
允许DNS协议(必须)
允许连接远程UDP 53 端口

允许DCHP 协议(必须)
允许 UDP 本地端口 68 远程端口 67

允许 Windows Update(可选)
允许 TCP 连接微软服务器 : 本地端口 1024-5000  远程端口 80和443

允许 时间同步(可选)
允许 UDP 远程端口 123 (time.windows.com, time.nist.gov)

阻止 RpcLocator
阻止端口 TCP/UDP 139/445

阻止 UPnP (除非使用)
阻止端口 UDP 1900

阻止其它一切入站请求。

设置规则时,注意其它目录的Svchost之类的一律阻止,它们不是系统程序,很大的可能性是木马。

[ 本帖最后由 ubuntu 于 2007-12-27 17:06 编辑 ]
ubuntu
 楼主| 发表于 2007-12-21 14:19:15 | 显示全部楼层
第七部分

防火墙一般设置 Common Tasks



Comodo 防火墙的设置界面由Common Tasks 和 Advanced 两部分组成。
这部分先介绍Common Tasks 普通任务。

如图,Comodo 将一些常见的防火墙操作进行了分类,需要什么功能,就可以到相应的模块里进行设置。
图1



View FireWall Events 查看防火墙日志
防火墙除了规则部分,最重要的是日志,只有通过日志,才能发现规则是否有问题,给予改正。
当安装了新的程序,也需要根据日志来设置规则。
查看日志,还有一种办法,在Comodo的安装目录里有一个cfplogvw,可以建立一个快捷方式,用它来查看日志。
要看懂日志,需要注意:

地址、端口和方向
当收到一个封包(In)
Source Address是指远程电脑的IP,Source Port是指远程电脑建立此连线所使用的Port
Destination Address是指本机电脑的IP,Destination Port是指本机电脑建立此连线所使用的Port

当发出一个封包(Out)
Source Address是指本机电脑的IP,Source Port是指本机电脑建立此连线所使用的Port
Destination Address是指远程电脑的IP,Destination Port是指远程电脑建立此连线所使用的Port

根据来源和目标的IP地址,可以判断防火墙是阻止发送还是接收IP封包。
本机IP 可以在 View Active Connections 里 TCP/UDP Out Source 看到。


Windows Operating System
在Comodo的日志里Windows Operating System 表示防火墙拦截的未经许可,不请自来的数据包(unsolicited packet),通俗点讲就是垃圾数据包。这些数据包无非是违反了规则被拦截,或者是不符合协议、或者超时被SPI引擎拦截。
一般情况下,Windows Operating System 的日志没有多大参考价值,只有特定情况下才有用。

要别人帮忙解决防火墙的问题,必须贴有效的日志,和一个具体程序相关的日志。
cfplogvw 提供了日志过滤功能:
右键 Filter By,有很多选项,最简单的就是程序名
比如,我想看一下PPlive的日志
图2

图3


可以通过Export to HTML 导出日志,附上完整的截图,上传,就可以分析日志。
还可以通过Remove Current Filter 移除过滤,查看所有日志。
顺便提一句,Defense+ 日志也有过滤功能。
图4


要让人帮忙解决防火墙问题,至少要有规则、日志、截图。




My Port Sets 端口组
将一些相关的端口进行分类,方便以后设置防火墙规则。
图5


HTTP Ports 浏览器常用端口
80
443
8080[代理服务器端口,可以去掉]

POP3/SMTP Ports 邮件客户端端口
110
25
143
993
995
465
587

Privileged Ports 系统服务保留端口
0-1024

Dynamic Ports 1025-5000 XP动态端口
1025-5000

Dynamic Ports  Vista动态端口
49152-65535
注:Vista客户端动态端口范围和XP是不一样的。

Dynamic Ports 1025-65535 动态端口 用于P2P软件
1025-65535

Netbios Ports Netbios端口 用于局域网文件和打印机共享
135
137-139
445

Dangerous Ports “危险”端口 对于一个全补丁系统并不“危险”,不过,还是阻止比较好
135
137-139
445
500
1900 [如果用UPnP,需要去掉这个端口]

Thunder Ports 迅雷端口 一个网络程序端口的例子
21
80
3076-3078
5200
6200
15000
16000

P2P TCP In
P2P 允许连入的TCP端口,每个人都不同,不贴具体端口

P2P UDP In
P2P 允许连入的UDP端口,每个人都不同,不贴具体端口

图6





My Network Zone 网络区域
将一些IP地址或子网,用一个网络区域Zone 来代替,方便以后设置防火墙规则。
图7


OpenDNS OpenDNS服务器
IP 208.67.222.222
IP 208.67.220.220

Loopback Zone 本地环回地址,加了掩码是为了防止伪造地址
IP In [127.0.0.1/255.0.0.0 ]

Local Area Network 局域网,请根据自己情况修改IP范围
IP In [192.168.1.0/255.255.255.0]
IP 0.0.0.0
IP 255.255.255.255

Internet-wide Multicast 预留组播地址
IP in 224.0.1.0-238.255.255.255

Special & Local Multicast 管理权限地址 & 本地链接地址
IP in 224.0.0.0-224.0.0.255
IP in 239.0.0.0-239.255.255.255

My Computer 本机IP
192.168.1.100/255.255.255.0



附:一些特殊的IP地址

有类网络
IP地址的第一个字节       归属网络
1-127         A类
128-191     B类
192-223     C类


保留的私有网络地址
下面的一些网络地址是私有的,只能通过NAT转换为公网地址才能访问Internet

地址范围                                        网络类

10.0.0.0-10.255.255.255              A类
172.16.0.0-172.31.255.255          B类
192.168.0.0-192.168.255.255      C类
127.0.0.1-127.255.255.255          回环地址


网络地址和广播地址
举个例子,在局域网中,我们的IP址一般使用私有C类IP地址
其中,以 .0结尾的地址代表网络地址,用于区分不同的网络
以 .255结尾的地址代表广播地址。例如:

192.168.1.0/255.255.255.0
192.168.1.0 就是网络地址,第一个主机地址是网络地址+1 192.168.1.1
192.168.1.255 就是这个网络的广播地址,最后一个主机地址是广播地址-1 192.168.1.254
网络主机的IP地址是:192.168.1.1-192.168.1.254
为了设置方便,我们最好是将网络地址和广播地址都加入局域网
IP Mask : 192.168.1.0/255.255.255.0
IP Ranger:192.168.1.0----192.168.1.255

0.0.0.0
严格说来,0.0.0.0已经不是一个真正意义上的IP地址了。它表示的是这样一个集合:所有不清楚的主机和目的网络。这里的“不清楚”是指在本机的路由表里没有特定条目指明如何到达。对本机来说,它就是一个“收容所”,所有不认识的“三无”人员,一律送进去。如果你在网络设置中设置了缺省网关,那么Windows系统会自动产生一个目的地址为0.0.0.0的缺省路由

255.255.255.255
限制广播地址。对本机来说,这个地址指本网段内(同一广播域)的所有主机。如果翻译成人类的语言,应该是这样:“这个房间里的所有人都注意了!”这个地址不能被路由器转发。

127.0.0.1
本机地址,主要用于测试。用汉语表示,就是“我自己”。在Windows系统中,这个地址有一个别名“Localhost”。寻址这样一个地址,是不能把它发到网络接口的。除非出错,否则在传输介质上永远不应该出现目的地址为“127.0.0.1”的数据包。

224.0.0.1
组播地址,注意它和广播的区别。从224.0.0.0到239.255.255.255都是这样的地址。224.0.0.1特指所有主机,224.0.0.2特指所有路由器。这样的地址多用于一些特定的程序以及多媒体程序。如果你的主机开启了IRDP(Internet路由发现协议,使用组播功能)功能,那么你的主机路由表中应该有这样一条路由。
本地链接地址:224.0.0.0~224.0.0.255,用于局域网,路由器不转发属于此范围的IP包
预留组播地址:224.0.1.0~238.255.255.255,用于全球范围或网络协议
管理权限地址:239.0.0.0~239.255.255.255,组织内部使用,用于限制组播范围

169.254.x.x
如果你的主机使用了DHCP功能自动获得一个IP地址,那么当你的DHCP服务器发生故障,或响应时间太长而超出了一个系统规定的时间,Wingdows系统会为你分配这样一个地址。如果你发现你的主机IP地址是一个诸如此类的地址,很不幸,十有八九是你的网络不能正常运行了

10.x.x.x、172.16.x.x~172.31.x.x、192.168.x.x
私有地址,这些地址被大量用于企业内部网络中。一些宽带路由器,也往往使用192.168.1.1作为缺省地址。私有网络由于不与外部互连,因而可能使用随意的IP地址。保留这样的地址供其使用是为了避免以后接入公网时引起地址混乱。使用私有地址的私有网络在接入Internet时,要使用地址翻译 (NAT),将私有地址翻译成公用合法地址。在Internet上,这类地址是不能出现的。

对一台网络上的主机来说,它可以正常接收的合法目的网络地址有三种:本机的IP地址、广播地址以及组播地址。




My Blocked Network Zones
屏蔽一个IP或网段
图8




Stealth Ports Wizard 端口隐藏向导
我在给新人的指南里已经讲过了,我再将局域网设置解释一下:

点击向导,设置一个信任网络:
图9



在Zone Name :加入我们前面设置的Local Area Network和Special & Local Multicast,点Finish
这样,本机和局域网之间的访问就没有问题了。
图10


[ 本帖最后由 ubuntu 于 2008-1-11 03:34 编辑 ]
ubuntu
 楼主| 发表于 2007-12-21 14:20:33 | 显示全部楼层
平常心,平常心!
ubuntu
 楼主| 发表于 2007-12-21 14:21:16 | 显示全部楼层
第八部分 防火墙规则


Comodo Firewall 的特点

状态检测
Comodo Firewall V3除了传统包过滤以外,还实现了TCP/UDP/ARP SPI全状态检测(Stateful Packet Inspection)
判断一个防火墙是不是状态检测防火墙,有一个简单的办法,就是看IP规则的数量,数量少的极有可能是。
Comodo V3自带的Global Rules 很少,更容易使用,更安全。
对于普通用户,可以由防火墙引擎自动处理的,就不需要添加外部规则了。
P2P模式 只有1条
隐身模式 4条


什么是状态检测?
每个网络连接包括以下信息:源地址、目的地址、源端口和目的端口,协议类型、连接状态(TCP协议)和超时时间等。防火墙把这些信息叫作状态(Stateful),能够检测每个连接状态的防火墙叫作状态包过滤防火墙。它除了能够完成简单包过滤防火墙的包过滤工作外,还在自己的内存中维护一个跟踪连接状态的表,比简单包过滤防火墙具有更大的安全性,更高的执行效率。
Comodo的状态检测不仅支持TCP协议,而且支持无连接的UDP协议,通过建立一个虚拟UDP连接,来实现,叫Pseudo UDP SPI 。
最新的V3 还加入了对ARP 数据包的状态检测。

传统包过滤,监视的是每个数据包,割裂了数据包之间的有机联系。
状态检测最显著的特点,就是通过以前的数据包建立一个内在存中跟踪连接状态的表,然后,比较当前数据包和连接的关系,判断是已有连接的延续[通过动态建立临时规则来放行],还是新的连接。
状态检测追踪的不是一个数据包,而是数据流。
还可以有一个名字叫动态包过滤,以区别于传统的静态包过滤。




Comodo Firewall 规则综述




Comodo Firewall 是双层过滤:应用程序过滤和互联网过滤
Comodo Firewall 规则分为 Application Rules 应用程序过滤和 Global Rules 互联网过滤。
Application Rules 设置的是一个或一组程序的网络访问规则。
Global Rules 控制的是所有的网络访问,独立于应用程序。

你可以把Global Rules看作一个独立的许出不许进的软路由器或硬件防火墙,要在本机开放端口,需要在路由中进行端口映射。

从某种意义上说,当你安装 Comodo V3 并重启后,你处于隐身模式中,端口对外是不可见的 (当然不是拔了网线那种)。外来的连接请求将被拒绝,数据包被丢弃。

只有两种可能会允许外部的数据包通过:
1. 由本机发起的连接,你主动连接别人,会产生应答数据包,Comodo会允许外部传入的正常回应的数据包通过,在这里 Comodo的 TCP SPI / UDP Pseudo SPI 会起作用,它可以判断哪些数据包是属于目前存在的已经建立好的本地连接。简单的说是“许出不许进,或者有条件的进 No Money,No Pass”
2. 通过添加规则,强行允许外部连接,允许数据包通过某些特定的端口。简单的说“我的眼里只有你  you are the only one in my heart”


Global Rules 和 Applications Rules 是没有优先级的,只是作用的范围和时间不同,一个程序要正常的访问网络,需要在Global Rules 和 Applications Rules 都进行设置。Global Rules 是全局规则,对所有程序有效,Applications Rules 对应的是特定的程序。
一个连出请求,需要先检测Applications Rules,通过以后才是Global Rules
本机 -> Applications Rules -> Global Rules -> 外部网络
一个连入请求,需要先检测Global Rules,通过以后才是Applications Rules
外部网络-> Global Rules -> Applications Rules -> 本机



借助于 Comodo 的强大数据包过滤,是的强大。第一种情况,我们通常只需要添加Application Rules,而不需要改动Global Rules。但是,当碰到一些作为服务运行的程序和P2P程序、某些网络游戏时,必须允许外部主动连接我们,只设置 Applications Rules 是不行滴,我们要修改 Global Rules,和端口映射很像。

Comodo 的状态检测和其它防火墙的区别,还有一点,就是状态包检测和程序规则的绑定
一般的包过滤防火墙当添加一条P2P规则,开放本机的某一个端口以后
当程序运行时,端口是开放的;当程序关闭以后,端口只能做到关闭,而不是隐藏。

而Comodo 的动态包过滤是自适应的,可以自动调整。
当在Global Rules 建立一条允许开放P2P端口的规则以后
当程序运行时,端口是开放的;当程序关闭以后,端口自动隐藏。
即使用只有一条规则的P2P模式,也是如此。




Global Rules  全局规则

我主要讲隐藏端口模式,又叫隐身模式的设置。 适用于较少使用P2P或者使用固定P2P端口的用户。
P2P 模式 只要参考我写的新人指南,进行修改就可以。
P2P 模式规则



以下是经过我强化以后的 Global Rules,Network Zone 和 Port Sets参考前文。
隐身模式规则



Allow All Outgoing Requests If The Target Is In [Local Area Network]
Allow All Incoming Requests If The Sender Is In [Local Area Network]
Allow All Outgoing Requests If The Target Is In [Special & Local Multicast]
Allow All Incoming Requests If The Sender Is In [Special & Local Multicast]
这四条是局域网规则,不用局域网的可以删掉

Allow TCP In From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-65535] And Destination Port Is In [P2P TCP In]
Allow UDP In From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-65535] And Destination Port Is In [P2P UDP In]
P2P 开放端口规则

Allow TCP In From IP Any To IP Any Where Source Port Is 20 And Destination Port Is In [Dynamic Ports 1025-65535]
主动FTP规则

Block And Log TCP OR UDP Out From IP Any To IP Any Where Source Port Is In [Dangerous Ports] And Destination Port Is Any
阻止“危险”端口的连出

Allow And Log TCP OR UDP Out From IP Any To IP Any Where Source Port Is In [Privileged Ports] And Destination Port Is Any
允许和记录Privileged Ports 0-1024 端口的连出

Allow TCP OR UDP Out From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-65535] And Destination Port Is Any
允许一般的网络应用

Allow IP Out From IP Any To IP Any Where Protocol Is GRE
允许VPN连出,不用VPN可以删掉

Allow ICMP Out From IP Any to IP Any Where ICMP Message Is ECHO REQUEST
允许 ICMP Ping 他人
Allow ICMP In From IP Any to IP Any Where ICMP Message Is ECHO REPLY
允许 ICMP Ping 他人
Allow ICMP In From IP Any to IP Any Where ICMP Message Is TIME EXCEEDED
允许 ICMP 追踪路由
Allow ICMP In From IP Any to IP Any Where ICMP Message Is PORT UNREACHABLE
允许 ICMP 端口不可达
Allow ICMP In From IP Any to IP Any Where ICMP Message Is FRAGMENTATION NEEDED
允许 ICMP需要分片

Block And Log IP In/Out From IP Any To IP Any Where Protocol Is Any
阻止一切IP连接

[ 本帖最后由 ubuntu 于 2008-1-17 10:22 编辑 ]
ubuntu
 楼主| 发表于 2007-12-21 14:22:17 | 显示全部楼层
第九部分 防火墙预设规则



Comodo Firewall 可以预先设置一些常用规则模板,然后具体程序可以直接套用,以减少操作。
比如:IE、Firefox、Opera、Maxthon等用Web Browser 。
电驴用 eMule。。。

我的防火墙预设规则如下:

Web Browser  浏览器


Allow Outgoing HTTP Requests  
[Allow TCP Out From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is HTTP Ports]
Allow Outgoing FTP Requests
[Allow TCP Out From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is 21]
Allow Outgoing DNS Requests
[Allow UDP Out From IP Any To In [OpenDNS] Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is 53]
Allow Access to Loopback Zone
[Allow IP Out From IP Any To In [Loopback Zone] Where Protocol Is Any]
Block and Log All Unmatching Requests


Email Client 邮件客户端


Allow Outgoing POP3/SMTP Requests
[Allow TCP Out From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is In [POP3/SMTP Ports]
Allow Outgoing DNS Requests
[Allow UDP Out From IP Any To In [OpenDNS] Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is 53]
Allow Access to Loopback Zone
[Allow IP Out From IP Any To In [Loopback Zone] Where Protocol Is Any]
Ask All the Remaining Requests


FTP Client  FTP客户端


Allow Outgoing Passive FTP  Requests
[Allow TCP Out From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-65535] And Destination Port Is In [Dynamic Ports 1025-65535]
Allow Outgoing FTP Connetion Requests
[Allow TCP Out From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is 21]
Allow Incoming FTP-DATA Requests
Allow TCP In From IP Any To IP Any Where Source Port Is 20 And Destination Port Is In [Dynamic Ports 1025-65535]
Allow Outgoing DNS Requests
[Allow UDP Out From IP Any To In [OpenDNS] Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is 53]
Allow Access to Loopback Zone
[Allow IP Out From IP Any To In [Loopback Zone] Where Protocol Is Any]
Block and Log All Unmatching Requests


Trusted Application  信任程序


Allow All Incoming and Outgoing Requests


Blocked Application  阻止程序


Block All Incoming and Outgoing Requests


Outgoing Only  只允许连出


Allow Outgoing TCP or UDP Requests
Block and Log All Unmatching Requests



Opera  


Allow Outgoing TCP Requests
[Allow TCP Out From IP Any To In Any Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is Any]
Allow Outgoing DNS Requests
[Allow UDP Out From IP Any To In [OpenDNS] Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is 53]
Allow Access to Loopback Zone
[Allow IP Out From IP Any To In [Loopback Zone] Where Protocol Is Any]
Block and Log All Unmatching Requests


eMule


Allow Incoming TCP Requests
[Allow TCP In From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-65535] And Destination Port Is In [eMule 监听端口]]
Allow Incoming UDP Requests
[Allow UDP In From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-65535] And Destination Port Is In [eMule 监听端口]]
Allow Outgoing TCP and UDP Requests
[Allow TCP OR UDP Out From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-65535] And Destination Port Is In [Dynamic Ports 1025-65535]]
Allow Ping the ED2K Servers Requests
[Allow ICMP Out From IP Any to IP Any Where ICMP Message Is ECHO REQUEST]
Allow and Log Outgoing HTTP Requests
[Allow And Log TCP Out From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is 80]
Allow Outgoing DNS Requests
[Allow UDP Out From IP Any To In [OpenDNS] Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is 53]
Allow Access to Loopback Zone
[Allow IP Out From IP Any To In [Loopback Zone] Where Protocol Is Any]
Block and Log All Unmatching Requests


BT


Allow Incoming TCP and UDP Requests
[Allow TCP OR UDP In From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-65535] And Destination Port Is In [BT 监听端口]]
Allow Outgoing TCP Requests
[Allow TCP Out From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-65535] And Destination Port Is In [Dynamic Ports 1025-65535]]
Allow Outgoing UDP Requests
[Allow UDP Out From IP Any To IP Any Where Source Port Is In [BT 监听端口] And Destination Port Is In [Dynamic Ports 1025-65535]]
Allow Outgoing HTTP Requests
[Allow TCP Out From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is 80-83]
Allow Outgoing Ping Requests
[Allow ICMP Out From IP Any to IP Any Where ICMP Message Is ECHO REQUEST]
Allow Outgoing DNS Requests
[Allow UDP Out From IP Any To In [OpenDNS] Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is 53]
Allow Access to Loopback Zone
[Allow IP Out From IP Any To In [Loopback Zone] Where Protocol Is Any]
Block and Log All Unmatching Requests


P2P  使用随机端口的P2P软件


Allow Incoming TCP or UDP Requests
[Allow TCP OR UDP In From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-65535] And Destination Port Is In [Dynamic Ports 1025-65535]]
Allow Outgoing TCP and UDP Requests
[Allow TCP OR UDP Out From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-65535] And Destination Port Is In [Dynamic Ports 1025-65535]]
Allow Outgoing HTTP Requests
[Allow TCP Out From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is 80-83]
Allow Outgoing DNS Requests
[Allow UDP Out From IP Any To In [OpenDNS] Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is 53]
Allow Access to Loopback Zone
[Allow IP Out From IP Any To In [Loopback Zone] Where Protocol Is Any]
Block and Log All Unmatching Requests


Thunder  迅雷


Allow Incoming TCP and UDP Requests
[Allow TCP OR UDP In From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-65535] And Destination Port Is In [迅雷 监听端口]]
Allow Outgoing TCP Requests
[Allow TCP Out From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-65535] And Destination Port Is In [Dynamic Ports 1025-65535]]
Allow Outgoing UDP Requests
[Allow UDP Out From IP Any To IP Any Where Source Port Is In [迅雷 监听端口] And Destination Port Is In [Dynamic Ports 1025-65535]]
Allow Outgoing Thunder Ports Requests
[Allow TCP OR UDP Out From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-65535 And Destination Port Is In [Thunder Ports]]
Allow Outgoing HTTP Requests
[Allow TCP Out From IP Any To IP Any Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is 80-83]
Allow Outgoing Ping Requests
[Allow ICMP Out From IP Any to IP Any Where ICMP Message Is ECHO REQUEST]
Allow Outgoing DNS Requests
[Allow UDP Out From IP Any To In [OpenDNS] Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is 53]
Allow Access to Loopback Zone
[Allow IP Out From IP Any To In [Loopback Zone] Where Protocol Is Any]
Block and Log All Unmatching Requests


LAN  局域网


Allow IP In From In [Local Area Network] To IP Any Where Protocol Is Any
Allow IP Out From IP Any To In [Local Area Network] Where Protocol Is Any
Allow IP Out From IP Any To In [Special & Local Multicast] Where Protocol Is Any
Block and Log All Unmatching Requests


LAN & Outgoing  局域网和允许连出


Allow IP In From In [Local Area Network] To IP Any Where Protocol Is Any
Allow IP Out From IP Any To In [Local Area Network] Where Protocol Is Any
Allow IP Out From IP Any To In [Special & Local Multicast] Where Protocol Is Any
Allow TCP OR UDP Outgoing Requests
[Allow TCP OR UDP Out From IP Any To IP Any Where Source Port Is Any And Destination Port Is Any]
Block and Log All Unmatching Requests



规则都很注释清楚了,在弹出对话框Treat As ... , 选择同类适合的规则即可。

有几个特殊程序,再讲一下:
System
LAN(局域网) 或 完全阻止(无局域网)

Windows Updater/Svchost
LAN(局域网) 或 Outgoing Only(无局域网)


%windir%\explorer.exe


Allow IP In From In [Local Area Network] To IP Any Where Protocol Is Any
Allow IP Out From IP Any To In [Local Area Network] Where Protocol Is Any
Allow IP Out From IP Any To In [Special & Local Multicast] Where Protocol Is Any
Allow HTTP Outgoing crl.microsoft.com Requests

[Allow TCP Out From IP Any To crl.microsoft.com Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is 80]
Allow Outgoing DNS Requests
[Allow UDP Out From IP Any To In [OpenDNS] Where Source Port Is In [Dynamic Ports 1025-5000] And Destination Port Is 53]
Block and Log All Unmatching Requests




上传了 Global Rules 和 Predefined Rules , 导入以后,必须自己调整才能使用,仅供参考!
导入方法:
备份原有规则
Disable Defense+ , 退出Comodo
双击导入
重新启动Comodo,恢复Defense+ 原来模式。


[ 本帖最后由 ubuntu 于 2008-1-17 10:43 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?快速注册

x

评分

参与人数 1人气 +1 收起 理由
99779698 + 1 斑斑辛苦了!

查看全部评分

您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2024-4-25 12:53 , Processed in 0.153458 second(s), 18 queries .

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

快速回复 客服 返回顶部 返回列表