在线试用
微信扫码联系专属客服
安企神软件官网
首页
下载中心
客户列表
课程
关于安企神

域环境如何禁用U盘、限制U盘使用以及监控USB端口的使用

2022-07-15

公司上网行为管理,就用安企神软件

立即咨询

随着USB存储设备的不断发展,当前通过U盘、移动硬盘、手机存储文件的方式越来越普遍,同时这些USB存储空间也越来越大,动辄几十G的存储空间司空见惯。这些USB存储设备一方面在方便信息存储、信息传递的同时,另一方面也带来了巨大的信息泄露的风险,尤其是员工可以轻易地将公司重要的文件私自拷贝、存储到个人的U盘、移动硬盘或手机里面携带出去,从而给公司带来重大的商业机密泄密的风险。为此,我们必须采取有效的举措禁止员工私自使用USB存储设备的行为。

当然,较有效的方式是通过部署专业的USB控制软件,如“安企神USB控制系统”(下载地址:http://www.wgj7.com/download/dszusb.rar),只需要点点鼠标就可以完全屏蔽USB 存储设备的使用,完全禁用U盘、移动硬盘、手机等USB存储设备;同时还可以禁止蓝牙、红外、串口和并口,以及禁止无线网卡、限制修改计算机重要配置等,如注册表、组策略等,从而可以满足国内非专业网管员的需要,而对于

我现在的网络环境中是用脚本做的,只对USB存储设备,如U盘、移动硬盘、USB光驱等,对USB的键盘、鼠标等无影响!原理就是对USB存储设备所需要的驱动文件进行删除或恢复,是参考Microsoft KB:823732 而来的!
http://support.microsoft.com/default.aspx?scid=kb;zh-cn;823732

如下:在GPO中按不同的要求分调用下面两脚本,说明如下:
比如说默认情况下,所有电脑都是在Computer OU下面,为了禁用或开启的需要,我另建两个OU: Disable USB/Enable USB,
1、禁止使用(将下面的代码copy到记事本,然后另存为.vbs),将需要禁止的电脑,移到禁用USB的Disable USB OU中,然后在此OU中的GPO调用下面的脚本
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists("C:\windows\inf\usbstor.pnf") Then
    objFSO.DeleteFile("C:\windows\inf\usbstor.pnf")
End If
If objFSO.FileExists("C:\windows\inf\usbstor.inf") Then
    objFSO.DeleteFile("C:\windows\inf\usbstor.inf")
End If
If objFSO.FileExists("C:\windows\system32\drivers\usbstor.sys") Then
    objFSO.DeleteFile("C:\windows\system32\drivers\usbstor.sys")
End If
If objFSO.FileExists("C:\winnt\inf\usbstor.pnf") Then
    objFSO.DeleteFile("C:\winnt\inf\usbstor.pnf")
End If
If objFSO.FileExists("C:\winnt\inf\usbstor.inf") Then
    objFSO.DeleteFile("C:\winnt\inf\usbstor.inf")
End If
If objFSO.FileExists("C:\winnt\system32\drivers\usbstor.sys") Then
    objFSO.DeleteFile("C:\winnt\system32\drivers\usbstor.sys")
End If

Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."

Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")

strKeyPath = "SYSTEM\CurrentControlSet\Services\UsbStor"
strValueName = "Start"
dwValue = 4
objRegistry.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue

2、解除禁止(将下面的代码copy到记事本,然后另存为.vbs),对于已禁用的电脑,需要解除的,将需要解除的电脑移到:Enable USB的OU中,然后在OU中的GPO调用,待可以用后,再移到正常使用的OU中(Computer),红色部分是具体文件及路径,需要依你实际情况而定,可以预先将几个文件COPY在某个隐藏的共享目录下!
Set objFSO = CreateObject("Scripting.FileSystemObject")
IF  objFSO.FolderExists("C:\windows") Then
If objFSO.FileExists("C:\windows\inf\usbstor.pnf") Then
Else
    objFSO.CopyFile "Usbstor.pnf" , "C:\windows\inf\usbstor.pnf"
End If
If objFSO.FileExists("C:\windows\inf\usbstor.Inf") Then
Else
    objFSO.CopyFile "Usbstor.Inf" , "C:\windows\inf\usbstor.Inf"
End If
If objFSO.FileExists("C:\windows\system32\drivers\usbstor.sys") Then
Else
    objFSO.CopyFile "Usbstor.sys" , "C:\windows\system32\drivers\usbstor.sys"
End If
End If
IF  objFSO.FolderExists("C:\winnt") Then
If objFSO.FileExists("C:\winnt\inf\usbstor.pnf") Then
Else
    objFSO.CopyFile "Usbstor.pnf" , "C:\winnt\inf\usbstor.pnf"
End If
If objFSO.FileExists("C:\winnt\inf\usbstor.inf") Then
Else
    objFSO.CopyFile "Usbstor.Inf" , "C:\winnt\inf\usbstor.Inf"
End If
If objFSO.FileExists("C:\winnt\inf\usbstor.sys") Then
Else
    objFSO.CopyFile "Usbstor.sys" , "C:\winnt\system32\drivers\usbstor.sys"
End If
End If

Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."

Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")

strKeyPath = "SYSTEM\CurrentControlSet\Services\UsbStor"
strValueName = "Start"
dwValue = 3
objRegistry.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue

说明:以上在Windows 2000/XP/Vista/Win7 32位的环境中都能正常,解除禁用的部分,因XP 64/Vista 64/Win7 64的驱动不一样,所以不保证能正常运行!

总之,企业局域网禁用U盘、屏蔽USB存储设备的方法很多,但是对于大多数企业来说,由于缺乏专业的网络管理人员,通过USB控制软件来限制员工用U盘、禁用usb端口的方式较为直接和有效,具体可以根据自己的需要进行选择。

  • TAG: