资源简介
监控整个U盘的读写,防删除,防重命名,实现整个盘透明加密。只对注册好的U盘才会读写加解密,与普通的U盘可以同时在一个机里使用。
代码片段和文件信息
/*++
Copyright (c) 1989-1993 Microsoft Corporation
Module Name:
sfilter.c
Abstract:
This module contains the code that implements the general purpose sample
file system filter driver.
As of the Windows XP SP1 IFS Kit version of this sample and later this
sample can be built for each build environment released with the IFS Kit
with no additional modifications. To provide this capability additional
compile-time logic was added -- see the ‘#if WINVER‘ locations. Comments
tagged with the ‘VERSION NOTE‘ header have also been added as appropriate to
describe how the logic must change between versions.
If this sample is built in the Windows XP environment or later it will run
on Windows 2000 or later. This is done by dynamically loading the routines
that are only available on Windows XP or later and making run-time decisions
to determine what code to execute. Comments tagged with ‘MULTIVERISON NOTE‘
mark the locations where such logic has been added.
Environment:
Kernel mode
--*/
#include “ntifs.h“
#include “ntdddisk.h“
#include
/*extern “C“
{
#include “ntifs.h“
#include “ntdddisk.h“
}*/
//
// Enable these warnings in the code.
//
#pragma warning(error:4100) // Unreferenced formal parameter
#pragma warning(error:4101) // Unreferenced local variable
#define SECTOR_SIZE 512
#define BUFFER_SIZE 512
#define DOS_SECTOR_SEQUENCE 0
#define MAX_DEVNAME_LENGTH 64
#define MAX_SIGNATURE_LENGTH 20
#define MAX_USERID_LENGTH 15
#define DEVICESERIAL_LEN 20
#define MAX_PATHNAME 256
#define USERID_LEN 15 ///用户ID
#define USERPASSWORD_LEN 15 ///用户密码
#define DEVICENO_LEN 4 ///设备编号
#define STORAGE_DEVICETYPE_UNKNOWN -1
#if DBG
#define IS_START_SFILTER 1
#else
#define IS_START_SFILTER 0
#endif
#if IS_START_SFILTER
ULONG g_dEnableSfiler = 0;//用于标识u盘驱动加密是否可以使用非法设置 1:不可以,0可以 sht [9/10/2011]
#else
ULONG g_dEnableSfiler = 1;//用于标识u盘驱动加密是否可以使用非法设置 1:不可以,0可以 sht [9/10/2011]
#endif
/////////test
/*权限访问*/
#define ACCESS_CREATE 0x00000001
#define ACCESS_READ 0x00000002
#define ACCESS_WRITE 0x00000004
#define ACCESS_DELETE 0x00000008
#define ACCESS_RENAME 0x00000010
#define IOCTL_USER_START_DISK \
CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM 0x801 \
METHOD_BUFFERED FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_USER_WRITE_DISK \
CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM 0x802 \
METHOD_BUFFERED FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_USER_REFERENCE_EVENT \
CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM 0x803 \
METHOD_NEITHER FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_USER_SET_EVENT \
CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM 0x804 \
METHOD_NEITHER FILE_READ_ACCESS | FILE_WRI
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 374 2017-05-25 18:59 usfilter\makefile
文件 244263 2017-05-25 18:59 usfilter\sfilter.c
文件 3411 2017-05-25 18:59 usfilter\sfilter.dsp
文件 537 2017-05-25 18:59 usfilter\sfilter.dsw
文件 2408 2017-05-25 18:59 usfilter\sfilter.inf
文件 50176 2018-09-07 10:01 usfilter\sfilter.ncb
文件 48640 2018-09-07 10:01 usfilter\sfilter.opt
文件 1257 2017-05-25 18:59 usfilter\sfilter.plg
文件 268 2017-05-25 18:59 usfilter\sfilter.rc
文件 22528 2017-05-25 18:59 usfilter\sfilter.suo
文件 157 2017-05-25 18:59 usfilter\sfilterInstall.cmd
文件 161 2017-05-25 18:59 usfilter\sfilterUninstall.cmd
文件 2389 2017-05-25 18:59 usfilter\sfilterw2k.inf
文件 119 2017-05-25 18:59 usfilter\sources
目录 0 2018-09-07 10:01 usfilter\Debug
目录 0 2018-09-07 10:01 usfilter
----------- --------- ---------- ----- ----
376688 16
相关资源
- 国内首家采用MS全新 MiniFilter架构的
- NDIS中间层 NDIS6过滤驱动开发笔记
- 基于minifilter的分布式驱动级文件透明
- Nt式过滤驱动 keyfilter 键盘过滤驱动源
- 天锐绿盾2.9破解版安装+注册机
- 基于API_HOOK的数据文件透明加解密系统
- 原创透明加解密-AES等长加密算法含
- \\基于WDF过滤驱动的USB存储设备监控系
- USB内核过滤驱动
- 修复单击变双击的鼠标过滤驱动源码
- USB设备过滤驱动[Src+Bin]
- Window文件监控微过滤驱动
- windows内科安全与驱动开发,minifilte
- 基于API-HOOK的数据文件透明加解密系统
- minifilter 文件透明加密源码
- 文件透明加解密源代码
- 透明加密minifilter
- wdm驱动-过滤驱动
- 楚狂人的透明加密源码
评论
共有 条评论