2013-07-16 59 views
1

只是一個問題,我想知道是否可以掛鉤到Ring0 /內核來顯示在內核中運行的加載驅動程序的列表?我需要寫一個驅動程序來完成嗎?在ring0/kernel中列出驅動程序?

與您如何列出所有正在運行的進程相當容易。

哦,這是在C++/Windows中。

+0

嘗試使用system()過程執行lsmod命令。 – bkausbk

+0

這裏有一個命令,如果我沒有弄錯,'drivers',但是我不確定它是否是命令,因爲很長一段時間我沒有打開Windows盒子。 –

+0

I.e.我們在談論什麼操作系統?你爲什麼不直接問OS? – MSalters

回答

1

如果您真的想爲此編寫自己的代碼,那麼這裏是Microsfts網站上的"Device Driver Information"頁面。

因此,您應該能夠將這些部分組合在一起(這與列出當前正在運行的進程非常相似)。

2

正如我所評論的,使用driverquery命令。

driverquery 
Display a list of all installed device drivers and their properties. 

Syntax 

driverquery [/s Computer] [/u Domain\User /p Password] 
     [/fo {TABLE|LIST|CSV}] [/nh] [/v] [/si] 
example 

Show all installed device drivers in Table output: 
driverquery 

Show all installed device drivers in a CSV format: 
DriverQuery /fo csv 

Without a header: 
DriverQuery /nh 

Drivers that are not signed: 
DriverQuery /si | findstr FALSE 

Find drivers that are currently Running: 
Driverquery.exe /v |findstr Running 

Show installed device drivers on a remote machine 
driverquery /s ipaddress 

Show installed device drivers on server64 and authenticate as a different user: 
driverquery /s server64 /u ss64Ddom\user123 /p [email protected] /fo list 

Export a verbose listing of drivers to a file 
driverquery /v /fo csv > T:\driverlist.csv 

When running DriverQuery within PowerShell, the CSV output format can be used to turn the output into objects. The PowerShell function below turns DriverQuery into a graphical tool that will list drivers from both local and remote systems (assuming you have the appropriate permissions.) 

function Show-DriverDialog { 
    param(
     $ComputerName = $env:computername 
    ) 

    driverquery.exe /S $ComputerName /FO CSV | 
     ConvertFrom-Csv | 
     Out-GridView -Title "Driver on \\$ComputerName" 

來源:http://windows.commands.com/driverquery

特別注意:

Find drivers that are currently Running: 
Driverquery.exe /v | findstr Running 
0

您可以使用命令SC

sc query type driver 

這將爲您提供當前運行的驅動程序的文本列表。 你可以玩像運行/停止標誌。 從那裏得到一個簡短的批處理/ bash/python命令來獲取服務名稱。

相關問題