论坛首页 逆向工程技术区 阅读主题

[讨论][求助]PCIE过滤驱动如何开发

495 浏览 0 回复
#1 楼主 2026-06-01 21:09:03
PS E:\> .\devcon.exe stack "PCI\VEN_****&DEV_0010"PCI\VEN_****&DEV_0010&SUBSYS_00000000&REV_10\4&39FF1125&0&0009    Name: PCI Configuration Filter Driver for VEN_****&DEV_0010    Setup Class: {4d36e97d-e325-11ce-bfc1-08002be10318} System    Controlling service:        PciConfig    Lower filters:        PciConfigROOT\SYSTEM\0002    Name: PCI Configuration Filter Driver for VEN_****&DEV_0010    Setup Class: {4d36e97d-e325-11ce-bfc1-08002be10318} System    Controlling service:        PciConfig    Lower filters:        PciConfig2 matching device(s) found.我电脑插入了一块pcie switch板卡,默认驱动是pci.sys我想在pci.sys驱动上安装一个过滤驱动,即上面的PciConfig,这个过滤驱动的功能主要是去读写pci配置和bar空间的操作。但是感觉安装后显示如上图所示。原来的pci.sys不见了。devcon.exe driverfiles又可以看到pci.sys,如下
PS E:\> .\devcon.exe driverfiles "PCI\VEN_****&DEV_0010*"PCI\VEN_****&DEV_0010&SUBSYS_00000000&REV_10\4&39FF1125&0&0009    Name: PCI Configuration Filter Driver for VEN_****&DEV_0010    Driver installed from C:\WINDOWS\INF\oem31.inf [PciConfig_Device]. 2 file(s) used by driver:        C:\WINDOWS\system32\DRIVERS\PciConfig.sys        C:\WINDOWS\system32\DRIVERS\pci.sysROOT\SYSTEM\0002    Name: PCI Configuration Filter Driver for VEN_****&DEV_0010    Driver installed from C:\WINDOWS\INF\oem31.inf [PciConfig_Device]. 2 file(s) used by driver:        C:\WINDOWS\system32\DRIVERS\PciConfig.sys        C:\WINDOWS\system32\DRIVERS\pci.sys2 matching device(s) found.

;; PciConfig.inf;
[Version]Signature   = "$WINDOWS NT$"Class       = SystemClassGuid   = {4d36e97d-e325-11ce-bfc1-08002be10318}Provider    = %ManufacturerName%CatalogFile = PciConfig.catDriverVer   = 11/13/2025,1.0.0.0PnpLockdown = 1
[DestinationDirs]DefaultDestDir = 12
[SourceDisksNames]1 = %DiskName%,,,""
[SourceDisksFiles]PciConfig.sys  = 1,,
;*****************************************; Install Section;*****************************************
[Manufacturer]%ManufacturerName% = Standard,NT$ARCH$.10.0...16299
[Standard.NT$ARCH$.10.0...16299]%PciConfig.DeviceDesc% = PciConfig_Device, PCI\VEN_****&DEV_0010&SUBSYS_00000000&REV_10%PciConfig.DeviceDesc% = PciConfig_Device, PCI\VEN_****&DEV_0010&SUBSYS_00000000%PciConfig.DeviceDesc% = PciConfig_Device, PCI\VEN_****&DEV_0010
[PciConfig_Device.NT]; MODIFIED: 使用正确的节名 PCI_BRIDGEInclude=pci.infNeeds=PCI_BRIDGECopyFiles = File_Copy
[PciConfig_Device.NT.HW]AddReg = PciFilter_AddReg
[PciFilter_AddReg]HKR,,"LowerFilters",0x00010008,"PciConfig"
[File_Copy]PciConfig.sys
;-------------- Service installation[PciConfig_Device.NT.Services]; MODIFIED: 使用正确的服务节名 PCI_BRIDGE.ServicesInclude=pci.infNeeds=PCI_BRIDGE.ServicesAddService = PciConfig,%SPSVCINST_ASSOCSERVICE%, PciConfig_Service_Inst
; -------------- PciConfig driver install sections[PciConfig_Service_Inst]DisplayName    = %PciConfig.SVCDESC%ServiceType    = 1               ; SERVICE_KERNEL_DRIVERStartType      = 3               ; SERVICE_DEMAND_STARTErrorControl   = 1               ; SERVICE_ERROR_NORMALServiceBinary  = %12%\PciConfig.sysLoadOrderGroup = "Filter"
[PciConfig_Device.NT.Wdf]KmdfServi

...(已截断)

---
来源: 看雪论坛
原文链接: https://bbs.kanxue.com/thread-289270.htm

暂无回复,快来抢沙发吧!

请登录后参与讨论

立即登录 注册账号