Github lock release of Windows files downloaded salad: Why is there a warning when downloading a file open, and will be "locked"?

Site: https://www.cnblogs.com/greenerycn/archive/2010/08/08/why_file_blocked.html

 

Windows salad: Why is there a warning when you open the downloaded file, and will be "locked"?

 

From the beginning of XP SP2, sometimes downloaded file will always be "locked" with exe, there are some word class file.

Happens, probably there are so few:

1. pop-up warning when you open the program


image

 

2 . When you view the file properties found "safety lock", need to unlock

 

image

 

So this is how it happened?

 

Attachment Manager (Attachment Manager)

 

They all start with XP's SP2. Prior to SP2, it is probably in 2004, because at that time the Internet was a relatively large development, resulting in many viruses Trojans are spread via the Internet. At that time the main mode of transmission is through the Internet to exchange files, then the virus to expand. Which, IE file downloads, email attachments, and instant messaging software such as MSN file transfer and so become one of the communication channels. In order to solve the security file exchange via the Internet, Microsoft introduced a lot of means of settlement, which is one way - Attachment Execution Services (AES), and it is installed as part of XP SP2.

Attachment Execution Service (Attachment Execution Services, AES), or Attachment Manager (Attachment Manager). According to Microsoft's instructions, all () API call procedures will have been checked with AES ShellExecute. AES reads Web content zone information for the file from Zone.Identifier Oh NTFS stream of the file, and then to decide what protection policies according to certain rules.

 

Attachment Manager is mainly in accordance with certain rules, files transmitted over the Internet to determine the safety, and prompt the user before execution. If you are using the NTFS file system format, it will also help you automatically locked files unsafe.


由于这个设计起到了一定的效果,因此后很多的浏览器等客户端软件都会调用附件管理器来处理交换的文件,比如Firefox,Chrome等。这也就是这些浏览器里下载的文件经常被锁定的原因。 

规则

附件管理器判断一个文件安不安全,从而决定是阻止文件执行、还是弹框提示,是结合下面三种情况来判断的:

  • 使用的程序的类型。
  • 下载或尝试打开的文件类型。
  • 从中下载文件的 Web 内容区域的安全设置。

用图来描述:

Attachment Manger_cn

 

软件,就是文件是哪个软件来下载或者传输的的,比如IE,或者MSN。

 

文件类型则是根据PE文件,非PE文件,以及文件扩展名一起来给文件分为三类:

高风险

大部分是pe文件,如.exe,.bat,.com等。这个可以设置的。

低风险

大部分是非pe文件,如.txt,.bmp,.log等文件。

注意: 只有.txt,.log,.text文件关联的打开程序是记事本的时候,这些文件才被标记为低风险。

图片文件如.bmp,.jpg,.png等也是关联的打开程序为Windows 图片和传真查看器才能被标记为低风险。

中级风险

除了高风险和低风险外,其余的文件都是中级风险。

 

Web内容区域的安全设置则是指IE选项中的4个安全区域:

image

 

在使用NTFS的系统中,如果软件使用了附件管理器来保存文件,那么对于的web内容区域信息也会被保存下来。它是保存在NTFS的文件流中。

 

有了上述信息后,附件管理器就会按照下面的规则来决定改采取阻止执行,或者弹框提示:


tip

 

 

配置附件管理器

通过组策略或者注册表可以来配置附件管理器。我推荐组策略(它也是改注册表。好处是不用记住具体哪个键值)。

打开组策略编辑器的方法是在“运行”中输入gpedit.msc

然后选择“用户配置”-“管理模板”-“Windows 组件”-“附件管理器”。如下图:

image

 

image

 

可以看到大部分内容都可以配置。具体内容请大家参考 这些设置的帮助,还是很容易理解的。

 

如何关闭附件管理器检查?

关闭的方法也很简单,就是配置上面的策略。

有两种方法:

第一种是增加一个全局的环境变量SEE_MASK_NOZONECHECKS,设置值为1.

[HKEY_CURRENT_USER \Environment] 
SEE_MASK_NOZONECHECKS = "1"

第二中是修改组策略中的配置:

1.文件类型的默认风险级别,设置为“启用”,“低风险”。

2.低风险文件类型的包含列表,设置为“启用”,扩展名增加.exe;.msi

3.文件附件值中不保留区域信息,设置为“启用”

 

 

参考资料

Windows XP Service Pack 2 中的附件管理器工作方式的说明

http://support.microsoft.com/kb/883260

How to bypass the security warning "Unknown Publisher" with the checkbox "Always Ask Before Opening this File"

http://blogs.msdn.com/b/askie/archive/2009/06/19/how-to-bypass-the-security-warning-unknown-publisher-with-the-checkbox-always-ask-before-opening-this-file.aspx

How to Disable the Open File Security Warning in Windows XP 
http://www.ehow.com/how_5804009_disable-security-warning-windows-xp.html#

Microsoft Attachment Manager blocks files that have crossed the internet

http://www.lansa.com/support/notes/p0348.htm

Configure the Attachment Manager in Windows XP SP2

http://smallvoid.com/article/ie-attachment-manager.html

使用IE下载的文件属性里老有”解除锁定”

http://www.iefans.net/ie-xiazai-wenjian-shuxing-jiechusuoding/

Removing 'Security Warning' on files downloaded with Firefox 3.0

http://blog.case.edu/bes7/2008/04/21/removing_security_warning_on_files_downloaded_with_firefox_30

IAttachmentExecute Interface

http://msdn.microsoft.com/en-us/library/bb776297(VS.85).aspx

The Open File - Security Warning dialog box is displayed when you try to silently install a hotfix or an update by using a Visual Basic script in Windows XP Service Pack 2

http://support.microsoft.com/?scid=kb;en-us;889815&x=8&y=14

从XP的SP2开始,有时候下载的文件总是会被“锁定”,有exe,也有一些word类的文件。

出现的情况,大概有这么几种:

1.打开程序时弹出警告


image

 

2.查看文件属性时发现“安全锁定”,需要解除锁定

 

image

 

那么这个是怎么回事呢?

 

附件管理器(Attachment Manager)

 

这一切都要从XP的SP2说起。在SP2之前,大概是2004年吧,由于当时互联网得到了一个比较大的发展,导致很多病毒木马都借助于互联网传播。当时的传播方式主要就是通过互联网交换文件,然后病毒得以扩展。其中,IE的文件下载、电子邮件附件,以及即时通讯软件如MSN的文件传输等都成为了传播渠道之一。为了解决通过互联网文件交换的安全性,微软推出了很多解决手段,其中的办法之一就是——附件执行服务(AES),并把它作为XP SP2的一部分进行安装。

附件执行服务(Attachment Execution Services, AES),或者说附件管理器(Attachment Manager)。按照微软的说明,凡是用ShellExecute() API调用的程序都会经过AES检查。 AES会从该文件的哦NTFS的流中读取该文件的Web内容区域信息Zone.Identifier,然后根据一定的规则来决定采取什么的保护策略。

 

附件管理器主要是按照一定的规则,对通过互联网传输的文件进行安全判断,并在执行前给用户提示。如果你使用的是NTFS格式的文件系统,它还会帮你自动锁定不安全的文件。


由于这个设计起到了一定的效果,因此后很多的浏览器等客户端软件都会调用附件管理器来处理交换的文件,比如Firefox,Chrome等。这也就是这些浏览器里下载的文件经常被锁定的原因。 

规则

附件管理器判断一个文件安不安全,从而决定是阻止文件执行、还是弹框提示,是结合下面三种情况来判断的:

  • 使用的程序的类型。
  • 下载或尝试打开的文件类型。
  • 从中下载文件的 Web 内容区域的安全设置。

用图来描述:

Attachment Manger_cn

 

软件,就是文件是哪个软件来下载或者传输的的,比如IE,或者MSN。

 

文件类型则是根据PE文件,非PE文件,以及文件扩展名一起来给文件分为三类:

高风险

大部分是pe文件,如.exe,.bat,.com等。这个可以设置的。

低风险

大部分是非pe文件,如.txt,.bmp,.log等文件。

注意: 只有.txt,.log,.text文件关联的打开程序是记事本的时候,这些文件才被标记为低风险。

图片文件如.bmp,.jpg,.png等也是关联的打开程序为Windows 图片和传真查看器才能被标记为低风险。

中级风险

除了高风险和低风险外,其余的文件都是中级风险。

 

Web内容区域的安全设置则是指IE选项中的4个安全区域:

image

 

在使用NTFS的系统中,如果软件使用了附件管理器来保存文件,那么对于的web内容区域信息也会被保存下来。它是保存在NTFS的文件流中。

 

有了上述信息后,附件管理器就会按照下面的规则来决定改采取阻止执行,或者弹框提示:


tip

 

 

配置附件管理器

通过组策略或者注册表可以来配置附件管理器。我推荐组策略(它也是改注册表。好处是不用记住具体哪个键值)。

打开组策略编辑器的方法是在“运行”中输入gpedit.msc

然后选择“用户配置”-“管理模板”-“Windows 组件”-“附件管理器”。如下图:

image

 

image

 

可以看到大部分内容都可以配置。具体内容请大家参考 这些设置的帮助,还是很容易理解的。

 

如何关闭附件管理器检查?

关闭的方法也很简单,就是配置上面的策略。

有两种方法:

第一种是增加一个全局的环境变量SEE_MASK_NOZONECHECKS,设置值为1.

[HKEY_CURRENT_USER \Environment] 
SEE_MASK_NOZONECHECKS = "1"

第二中是修改组策略中的配置:

1.文件类型的默认风险级别,设置为“启用”,“低风险”。

2.低风险文件类型的包含列表,设置为“启用”,扩展名增加.exe;.msi

3.文件附件值中不保留区域信息,设置为“启用”

 

 

参考资料

Windows XP Service Pack 2 中的附件管理器工作方式的说明

http://support.microsoft.com/kb/883260

How to bypass the security warning "Unknown Publisher" with the checkbox "Always Ask Before Opening this File"

http://blogs.msdn.com/b/askie/archive/2009/06/19/how-to-bypass-the-security-warning-unknown-publisher-with-the-checkbox-always-ask-before-opening-this-file.aspx

How to Disable the Open File Security Warning in Windows XP 
http://www.ehow.com/how_5804009_disable-security-warning-windows-xp.html#

Microsoft Attachment Manager blocks files that have crossed the internet

http://www.lansa.com/support/notes/p0348.htm

Configure the Attachment Manager in Windows XP SP2

http://smallvoid.com/article/ie-attachment-manager.html

使用IE下载的文件属性里老有”解除锁定”

http://www.iefans.net/ie-xiazai-wenjian-shuxing-jiechusuoding/

Removing 'Security Warning' on files downloaded with Firefox 3.0

http://blog.case.edu/bes7/2008/04/21/removing_security_warning_on_files_downloaded_with_firefox_30

IAttachmentExecute Interface

http://msdn.microsoft.com/en-us/library/bb776297(VS.85).aspx

The Open File - Security Warning dialog box is displayed when you try to silently install a hotfix or an update by using a Visual Basic script in Windows XP Service Pack 2

http://support.microsoft.com/?scid=kb;en-us;889815&x=8&y=14

Guess you like

Origin www.cnblogs.com/chinayixia/p/12026967.html