├── .gitattributes ├── .gitignore ├── Include ├── Common.h └── MntGuid.h ├── MonitorApp ├── Format.h ├── InstallService.cpp ├── InstallService.h ├── MonitorApp.vcxproj ├── MonitorApp.vcxproj.filters ├── MonitorCmd.cpp └── MonitorCmd.txt ├── MonitorService ├── MonitorService.cpp ├── MonitorService.vcxproj └── MonitorService.vcxproj.filters ├── NetworkMnt Package ├── NetworkMnt Package.vcxproj └── NetworkMnt Package.vcxproj.filters ├── NetworkMnt ├── MntInit.c ├── MntProcess.c ├── MntProcess.h ├── NetworkMnt.inf ├── NetworkMnt.vcxproj └── NetworkMnt.vcxproj.filters ├── NetworkMonitor.sln ├── PVKIMPRT.EXE ├── README.md ├── cert2spc.exe ├── devcon.exe ├── makecert.exe ├── pvkimprt_install.exe ├── pvkimprt_unzip.exe └── traceview.exe /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc 262 | /MonitorApp/Win8.1Debug/MonitorApp.tlog 263 | /MonitorApp/Win7Debug/MonitorApp.tlog 264 | /MonitorService/Win7Debug/MonitorService.tlog 265 | /MonitorService/Win8.1Debug/MonitorService.tlog 266 | /NetworkMnt/Win7Debug 267 | /NetworkMnt/Win8.1Debug/NetworkMnt.tlog 268 | /NetworkMnt/Win8.1Debug 269 | /NetworkMnt Package/Win7Debug 270 | /NetworkMnt Package/Win8.1Debug 271 | /Win7Debug 272 | /Win8.1Debug 273 | -------------------------------------------------------------------------------- /Include/Common.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | typedef enum _MONITOR_OPERATION_MODE 4 | { 5 | invalidOperation = 0, 6 | monitorTraffic = 1, 7 | monitorOperationMax 8 | 9 | } MONITOR_OPERATION_MODE; 10 | 11 | #define DEFAULT_EVENT_NUM 3 12 | 13 | typedef struct _MONITOR_SETTINGS 14 | { 15 | MONITOR_OPERATION_MODE monitorOperation; 16 | UINT32 flags; 17 | //hInforEvents[DEFAULT_EVENT_NUM-1] is reserved. 18 | HANDLE hInforEvents[DEFAULT_EVENT_NUM]; 19 | 20 | } MONITOR_SETTINGS; 21 | 22 | #define MAX_PROCESS_PATH_SIZE 32 23 | 24 | typedef struct _MONITOR_INFORMATION 25 | { 26 | UINT64 receivedBytes; 27 | UINT64 sentBytes; 28 | UINT64 totalSetnBytes; 29 | UINT64 totalRecvBytes; 30 | UINT64 processId; 31 | USHORT ipProto; 32 | WCHAR processPath[MAX_PROCESS_PATH_SIZE]; 33 | 34 | 35 | }MONITOR_INFORMATION, *PMONITOR_INFORMATION; 36 | 37 | #define SIZEOF_MONITOR_INFORMATION sizeof(MONITOR_INFORMATION) 38 | 39 | #define MAX_NUM_OF_INFORMATION 100 40 | 41 | typedef struct _MONITOR_INFORMATIONS 42 | { 43 | UINT32 numMonitorInformations; 44 | MONITOR_INFORMATION monitorInformation[MAX_NUM_OF_INFORMATION]; 45 | 46 | }MONITOR_INFORMATIONS, *PMONITOR_INFORMATIONS; 47 | 48 | #define SIZEOF_MONITOR_INFORMATIONS sizeof(MONITOR_INFORMATIONS) //5608bytes 49 | 50 | typedef struct _REGISTER_EVENT 51 | { 52 | HANDLE hEvent; 53 | LARGE_INTEGER DueTime; // requested DueTime in 100-nanosecond units 54 | 55 | } REGISTER_EVENT, *PREGISTER_EVENT; 56 | 57 | #define SIZEOF_REGISTER_EVENT sizeof(REGISTER_EVENT) 58 | 59 | #define MONITOR_IOCTL_ENABLE_MONITOR CTL_CODE(FILE_DEVICE_NETWORK, 0x1, METHOD_BUFFERED, FILE_ANY_ACCESS) 60 | #define MONITOR_IOCTL_DISABLE_MONITOR CTL_CODE(FILE_DEVICE_NETWORK, 0x2, METHOD_BUFFERED, FILE_ANY_ACCESS) 61 | #define MONITOR_IOCTL_GETINFO_MONITOR CTL_CODE(FILE_DEVICE_NETWORK, 0x3, METHOD_BUFFERED, FILE_ANY_ACCESS) 62 | #define MONITOR_IOCTL_GETINFOS_MONITOR CTL_CODE(FILE_DEVICE_NETWORK, 0x4, METHOD_BUFFERED, FILE_ANY_ACCESS) 63 | #define MONITOR_IOCTL_REGISTER_EVENT CTL_CODE(FILE_DEVICE_NETWORK, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS) 64 | 65 | 66 | #define MONITOR_DEVICE_NAME L"\\Device\\NetworkMonitor" 67 | #define MONITOR_SYMBOLIC_NAME L"\\DosDevices\\Global\\NetworkMonitor" 68 | #define MONITOR_DOS_NAME L"\\\\.\\NetworkMonitor" 69 | 70 | #define DRIVER_NAME L"NetworkMnt" 71 | 72 | #define DRIVER_FUNC_INSTALL 0x01 73 | #define DRIVER_FUNC_REMOVE 0x02 -------------------------------------------------------------------------------- /Include/MntGuid.h: -------------------------------------------------------------------------------- 1 | #pragma once; 2 | 3 | // 1328a7c0-b256-479a-a243-7cc43af6d711 4 | DEFINE_GUID( 5 | NETWORK_MONITOR_SUBLAYER, 6 | 0x1328a7c0, 7 | 0xb256, 8 | 0x479a, 9 | 0xa2, 0x43, 0x7c, 0xc4, 0x3a, 0xf6, 0xd7, 0x11 10 | ); 11 | 12 | // c44194d7-f2b3-4879-ab89-2c841b51c57d 13 | DEFINE_GUID( 14 | NETWORK_MONITOR_FLOW_ESTABLISHED_CALLOUT_V4, 15 | 0xc44194d7, 16 | 0xf2b3, 17 | 0x4879, 18 | 0xab, 0x89, 0x2c, 0x84, 0x1b, 0x51, 0xc5, 0x7d 19 | ); 20 | 21 | // 6a6ddeaa-91e1-4aad-b836-968b334339d5 22 | DEFINE_GUID( 23 | NETWORK_MONITOR_STREAM_CALLOUT_V4, 24 | 0x6a6ddeaa, 25 | 0x91e1, 26 | 0x4aad, 27 | 0xb8, 0x36, 0x96, 0x8b, 0x33, 0x43, 0x39, 0xd5 28 | ); -------------------------------------------------------------------------------- /MonitorApp/Format.h: -------------------------------------------------------------------------------- 1 | #ifndef _FORMAT_H_ 2 | #define _FORMAT_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | const char report_interval[] = " %4.1lf-%4.1lf sec %ss %ss/sec\n"; 9 | const char result_t_upload[] = "[T-Upload] %4.1lf-%4.1lf sec %ss %ss/sec\n"; 10 | const char result_t_download[] = "[T-Dwload] %4.1lf-%4.1lf sec %ss %ss/sec\n"; 11 | const char result_n_upload[] = "[N-Upload] %4.1lf-%4.1lf sec %ss %ss/sec\n"; 12 | const char result_n_download[] = "[N-Dwload] %4.1lf-%4.1lf sec %ss %ss/sec\n"; 13 | 14 | const long kKilo_to_Unit = 1024; 15 | const long kMega_to_Unit = 1024 * 1024; 16 | const long kGiga_to_Unit = 1024 * 1024 * 1024; 17 | 18 | const long kkilo_to_Unit = 1000; 19 | const long kmega_to_Unit = 1000 * 1000; 20 | const long kgiga_to_Unit = 1000 * 1000 * 1000; 21 | 22 | enum { 23 | kConv_Unit, 24 | kConv_Kilo, 25 | kConv_Mega, 26 | kConv_Giga 27 | }; 28 | 29 | const double kConversion[] = 30 | { 31 | 1.0, /* unit */ 32 | 1.0 / 1024, /* Kilo */ 33 | 1.0 / 1024 / 1024, /* Mega */ 34 | 1.0 / 1024 / 1024 / 1024 /* Giga */ 35 | }; 36 | 37 | /* labels for Byte formats Total*/ 38 | const char* kLabel_Total[] = 39 | { 40 | "B", 41 | "KB", 42 | "MB", 43 | "GB" 44 | }; 45 | 46 | /* labels for bit formats Speed */ 47 | const char* kLabel_Speed[] = 48 | { 49 | "B/S", 50 | "KB/S", 51 | "MB/S", 52 | "GB/S" 53 | }; 54 | 55 | void ByteSprintf(char * outString, int inLen, double inNum, BOOL isSpeed) 56 | { 57 | int conv; 58 | const char* suffix; 59 | const char* format; 60 | 61 | double tmpNum = inNum; 62 | conv = kConv_Unit; 63 | 64 | while (tmpNum >= 1024.0 && conv <= kConv_Giga){ 65 | tmpNum /= 1024.0; 66 | conv++; 67 | } 68 | 69 | inNum *= kConversion[conv]; 70 | if (isSpeed) 71 | { 72 | suffix = kLabel_Speed[conv]; 73 | } 74 | else 75 | { 76 | suffix = kLabel_Total[conv]; 77 | } 78 | 79 | if (conv == 0) 80 | { 81 | format = "%5.0f%s"; 82 | } 83 | else if (inNum < 9.995) { 84 | format = "%4.2f%s"; 85 | } 86 | else if (inNum < 99.95) { 87 | format = "%4.1f%s"; 88 | } 89 | else if (inNum < 999.5) { 90 | format = "%4.0f%s"; 91 | } 92 | else { 93 | format = "%4.0f%s"; 94 | } 95 | 96 | _snprintf_s(outString, inLen, inLen, format, inNum, suffix); 97 | } 98 | 99 | #endif //_FORMAT_H_ -------------------------------------------------------------------------------- /MonitorApp/InstallService.cpp: -------------------------------------------------------------------------------- 1 | #include "InstallService.h" 2 | 3 | LPWSTR ConvertErrorCodeToString(DWORD errCode) 4 | { 5 | HLOCAL LocalAddress = NULL; 6 | FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM, 7 | NULL, errCode, 0, (LPWSTR)&LocalAddress, 0, NULL); 8 | return (LPWSTR)LocalAddress; 9 | } 10 | 11 | 12 | DWORD FileExistedOrNot(_In_ LPCWSTR DriverDosName) 13 | { 14 | HANDLE hDevice; 15 | DWORD errCode; 16 | hDevice = CreateFileW(DriverDosName, GENERIC_READ | GENERIC_WRITE, 17 | FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); 18 | if (hDevice == INVALID_HANDLE_VALUE) 19 | { 20 | errCode = GetLastError(); 21 | if (errCode == ERROR_FILE_NOT_FOUND) 22 | { 23 | return ERROR_FILE_NOT_FOUND; 24 | } 25 | printf("CreateFile For Device failed with status %d\n", errCode); 26 | return errCode; 27 | } 28 | 29 | 30 | CloseHandle(hDevice); 31 | return NO_ERROR; 32 | } 33 | 34 | DWORD InstallDriver(_In_ LPCWSTR DriverName) 35 | { 36 | SC_HANDLE SchSCManager; 37 | SC_HANDLE schService; 38 | DWORD errCode = NO_ERROR; 39 | WCHAR driverLocation[MAX_PATH] = { 0 }; 40 | 41 | SchSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); 42 | 43 | if (!SchSCManager) 44 | { 45 | errCode = GetLastError(); 46 | printf("Open SC Manager failed with status %d\n", errCode); 47 | return errCode; 48 | } 49 | 50 | errCode = SetupDriverName(driverLocation, sizeof(driverLocation)); 51 | if (errCode != NO_ERROR) 52 | { 53 | goto Cleanup; 54 | } 55 | 56 | //Create a new service object. 57 | schService = CreateServiceW(SchSCManager, // handle of service control manager database 58 | DriverName, // address of name of service to start 59 | DriverName, // address of display name 60 | SERVICE_ALL_ACCESS, // type of access to service 61 | SERVICE_KERNEL_DRIVER, // type of service 62 | SERVICE_DEMAND_START, // when to start service 63 | SERVICE_ERROR_NORMAL, // severity if service fails to start 64 | driverLocation, // address of name of binary file 65 | NULL, // service does not belong to a group 66 | NULL, // no tag requested 67 | NULL, // no dependency names 68 | NULL, // use LocalSystem account 69 | NULL // no password for service account 70 | ); 71 | 72 | if (!schService) 73 | { 74 | errCode = GetLastError(); 75 | if (errCode == ERROR_SERVICE_EXISTS) 76 | { 77 | printf("Previous instance of the service is existed\n"); 78 | } 79 | else if (errCode == ERROR_SERVICE_MARKED_FOR_DELETE) 80 | { 81 | printf("Previous instance of the service is not fully deleted. Try again...\n"); 82 | } 83 | else 84 | { 85 | printf("Create Service failed with status %d\n", errCode); 86 | } 87 | } 88 | else 89 | { 90 | printf("Create Service Successfully\n"); 91 | } 92 | 93 | Cleanup: 94 | 95 | 96 | if (schService) 97 | { 98 | CloseServiceHandle(schService); 99 | } 100 | 101 | if (SchSCManager) 102 | { 103 | CloseServiceHandle(SchSCManager); 104 | } 105 | return errCode; 106 | } 107 | 108 | DWORD SetupDriverName(_Inout_updates_bytes_all_(BufferLength) PWCHAR DriverLocation, _In_ ULONG BufferLength) 109 | { 110 | HANDLE fileHandle; 111 | DWORD driverLocLen = 0; 112 | DWORD errCode = NO_ERROR; 113 | driverLocLen = GetCurrentDirectoryW(BufferLength, DriverLocation); 114 | if (driverLocLen == 0) 115 | { 116 | errCode = GetLastError(); 117 | printf("GetCurrentDirectory failed with status %d\n", errCode); 118 | return errCode; 119 | } 120 | if (FAILED(StringCbCatW(DriverLocation, BufferLength, L"\\" DRIVER_NAME L".sys"))) 121 | { 122 | return ERROR_OPERATION_ABORTED; 123 | } 124 | 125 | if ((fileHandle = CreateFileW(DriverLocation, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)) == INVALID_HANDLE_VALUE) 126 | { 127 | printf("%s.sys is not loaded.\n", (LPCTSTR)DRIVER_NAME); 128 | return ERROR_FILE_NOT_FOUND; 129 | } 130 | 131 | if (fileHandle) 132 | { 133 | CloseHandle(fileHandle); 134 | } 135 | return errCode; 136 | } 137 | 138 | //DRIVER_NAME 139 | DWORD CustomOpenService(_In_ LPCWSTR ServiceName) 140 | { 141 | DWORD errCode = NO_ERROR; 142 | SC_HANDLE schSCManager = NULL; 143 | SC_HANDLE schService = NULL; 144 | 145 | schSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); 146 | 147 | if (!schSCManager) 148 | { 149 | errCode = GetLastError(); 150 | printf("Open SC Manager failed with status %d\n", errCode); 151 | goto Cleanup; 152 | } 153 | 154 | schService = OpenServiceW(schSCManager, ServiceName, SERVICE_ALL_ACCESS); 155 | 156 | if (!schService) 157 | { 158 | errCode = GetLastError(); 159 | if (errCode == ERROR_SERVICE_DOES_NOT_EXIST) 160 | { 161 | printf("The specified Service does not exist, Please install first\n"); 162 | } 163 | else 164 | { 165 | printf("Open Service failed with status %d\n", errCode); 166 | } 167 | 168 | goto Cleanup; 169 | } 170 | 171 | if (!StartService(schService, 0, NULL)) 172 | { 173 | errCode = GetLastError(); 174 | if (errCode == ERROR_SERVICE_ALREADY_RUNNING) 175 | { 176 | printf("The specified Service is already running.\n"); 177 | } 178 | else 179 | { 180 | printf("Start Service failed with status %d\n", errCode); 181 | } 182 | } 183 | else 184 | { 185 | printf("Start Service successfully\n"); 186 | } 187 | 188 | Cleanup: 189 | 190 | if (schService) 191 | { 192 | CloseServiceHandle(schService); 193 | } 194 | 195 | if (schSCManager) 196 | { 197 | CloseServiceHandle(schSCManager); 198 | } 199 | 200 | return errCode; 201 | } 202 | 203 | DWORD CustomCloseService(_In_ LPCWSTR ServiceName) 204 | { 205 | DWORD errCode = NO_ERROR; 206 | SC_HANDLE SchSCManager; 207 | SC_HANDLE schService; 208 | SERVICE_STATUS serviceStatus; 209 | UNREFERENCED_PARAMETER(serviceStatus); 210 | 211 | SchSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); 212 | if (!SchSCManager) 213 | { 214 | errCode = GetLastError(); 215 | printf("Open SC Manager failed with status %d\n", errCode); 216 | return errCode; 217 | } 218 | 219 | schService = OpenServiceW(SchSCManager, ServiceName, SERVICE_ALL_ACCESS); 220 | if (!schService) 221 | { 222 | errCode = GetLastError(); 223 | if (errCode == ERROR_SERVICE_DOES_NOT_EXIST) 224 | { 225 | printf("The specified Service does not exist\n"); 226 | } 227 | else 228 | { 229 | printf("Open Service failed with status %d\n", errCode); 230 | } 231 | 232 | goto Cleanup; 233 | } 234 | 235 | if (ControlService(schService, SERVICE_CONTROL_STOP, &serviceStatus)) 236 | { 237 | printf("Stop Service successfully\n"); 238 | } 239 | else 240 | { 241 | errCode = GetLastError(); 242 | if (errCode == ERROR_SERVICE_NOT_ACTIVE) 243 | { 244 | printf("The specified Service has not been started\n"); 245 | } 246 | else 247 | { 248 | printf("Stop Service failed with status %d\n", errCode); 249 | } 250 | } 251 | 252 | Cleanup: 253 | 254 | if (schService) 255 | { 256 | CloseServiceHandle(schService); 257 | } 258 | 259 | if (SchSCManager) 260 | { 261 | CloseServiceHandle(SchSCManager); 262 | } 263 | 264 | return errCode; 265 | } 266 | 267 | DWORD UnloadDriver(_In_ LPCWSTR DriverName) 268 | { 269 | DWORD errCode = NO_ERROR; 270 | SC_HANDLE schService = NULL; 271 | SC_HANDLE SchSCManager = NULL; 272 | SERVICE_STATUS serviceStatus; 273 | UNREFERENCED_PARAMETER(serviceStatus); 274 | 275 | SchSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); 276 | 277 | if (!SchSCManager) 278 | { 279 | errCode = GetLastError(); 280 | printf("Open SC Manager failed with status %d\n", errCode); 281 | goto Cleanup; 282 | } 283 | 284 | schService = OpenServiceW(SchSCManager, DriverName, SERVICE_ALL_ACCESS); 285 | if (!schService) 286 | { 287 | errCode = GetLastError(); 288 | printf("Open Service failed with status %d\n", errCode); 289 | goto Cleanup; 290 | } 291 | //The service control manager deletes the service by deleting the service key and its subkeys from the registry. 292 | if (!DeleteService(schService)) 293 | { 294 | errCode = GetLastError(); 295 | if (errCode == ERROR_SERVICE_MARKED_FOR_DELETE) 296 | { 297 | printf("The specified service has already been marked for deletion.\n"); 298 | } 299 | else 300 | { 301 | printf("Delete Service failed with status %d\n", errCode); 302 | } 303 | } 304 | else 305 | { 306 | printf("Delete the specified Service successfully\n"); 307 | } 308 | 309 | Cleanup: 310 | 311 | 312 | if (schService) 313 | { 314 | CloseServiceHandle(schService); 315 | } 316 | 317 | if (SchSCManager) 318 | { 319 | CloseServiceHandle(SchSCManager); 320 | } 321 | 322 | return errCode; 323 | } 324 | -------------------------------------------------------------------------------- /MonitorApp/InstallService.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #ifndef _CTYPE_DISABLE_MACROS 8 | #define _CTYPE_DISABLE_MACROS 9 | #endif 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #include 16 | 17 | #include "Common.h" 18 | 19 | #pragma comment(lib, "Fwpuclnt.lib") 20 | 21 | DWORD SetupDriverName(_Inout_updates_bytes_all_(BufferLength) PWCHAR DriverLocation, _In_ ULONG BufferLength); 22 | 23 | DWORD FileExistedOrNot(_In_ LPCWSTR DriverDosName); 24 | 25 | DWORD InstallDriver(_In_ LPCWSTR DriverName); 26 | 27 | DWORD CustomOpenService(_In_ LPCWSTR ServiceName); 28 | 29 | DWORD CustomCloseService(_In_ LPCWSTR ServiceName); 30 | 31 | DWORD UnloadDriver(_In_ LPCWSTR DriverName); 32 | 33 | -------------------------------------------------------------------------------- /MonitorApp/MonitorApp.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Win8.1 Debug 6 | Win32 7 | 8 | 9 | Win8.1 Release 10 | Win32 11 | 12 | 13 | Win8 Debug 14 | Win32 15 | 16 | 17 | Win8 Release 18 | Win32 19 | 20 | 21 | Win7 Debug 22 | Win32 23 | 24 | 25 | Win7 Release 26 | Win32 27 | 28 | 29 | Win8.1 Debug 30 | x64 31 | 32 | 33 | Win8.1 Release 34 | x64 35 | 36 | 37 | Win8 Debug 38 | x64 39 | 40 | 41 | Win8 Release 42 | x64 43 | 44 | 45 | Win7 Debug 46 | x64 47 | 48 | 49 | Win7 Release 50 | x64 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | {48963643-085D-4B95-823A-B33A920895BA} 63 | {504102d4-2172-473c-8adf-cd96e308f257} 64 | v4.5 65 | 11.0 66 | Win8.1 Debug 67 | Win32 68 | MonitorApp 69 | 70 | 71 | 72 | WindowsV6.3 73 | true 74 | WindowsApplicationForDrivers10.0 75 | Application 76 | 77 | 78 | WindowsV6.3 79 | false 80 | WindowsApplicationForDrivers10.0 81 | Application 82 | 83 | 84 | Windows8 85 | true 86 | WindowsApplicationForDrivers10.0 87 | Application 88 | 89 | 90 | Windows8 91 | false 92 | WindowsApplicationForDrivers10.0 93 | Application 94 | 95 | 96 | Windows7 97 | true 98 | WindowsApplicationForDrivers10.0 99 | Application 100 | 101 | 102 | Windows7 103 | false 104 | WindowsApplicationForDrivers10.0 105 | Application 106 | 107 | 108 | WindowsV6.3 109 | true 110 | WindowsApplicationForDrivers10.0 111 | Application 112 | 113 | 114 | WindowsV6.3 115 | false 116 | WindowsApplicationForDrivers10.0 117 | Application 118 | 119 | 120 | Windows8 121 | true 122 | WindowsApplicationForDrivers10.0 123 | Application 124 | 125 | 126 | Windows8 127 | false 128 | WindowsApplicationForDrivers10.0 129 | Application 130 | 131 | 132 | Windows7 133 | true 134 | WindowsApplicationForDrivers10.0 135 | Application 136 | 137 | 138 | Windows7 139 | false 140 | WindowsApplicationForDrivers10.0 141 | Application 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | %(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH);..\Include 154 | %(PreprocessorDefinitions);WIN32 155 | MultiThreadedDebug 156 | true 157 | 158 | 159 | %(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;fwpuclnt.lib 160 | 161 | 162 | 163 | 164 | %(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;fwpuclnt.lib 165 | 166 | 167 | %(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH);..\Include 168 | 169 | 170 | 171 | 172 | %(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH);..\Include 173 | %(PreprocessorDefinitions);WIN32 174 | MultiThreadedDebug 175 | true 176 | 177 | 178 | %(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;fwpuclnt.lib 179 | 180 | 181 | 182 | 183 | 184 | -------------------------------------------------------------------------------- /MonitorApp/MonitorApp.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | 26 | 27 | Header Files 28 | 29 | 30 | Header Files 31 | 32 | 33 | -------------------------------------------------------------------------------- /MonitorApp/MonitorCmd.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gifur/NetworkMnt/5c2d41cc798d5738fde397f69b32d2963756b2ec/MonitorApp/MonitorCmd.cpp -------------------------------------------------------------------------------- /MonitorApp/MonitorCmd.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gifur/NetworkMnt/5c2d41cc798d5738fde397f69b32d2963756b2ec/MonitorApp/MonitorCmd.txt -------------------------------------------------------------------------------- /MonitorService/MonitorService.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gifur/NetworkMnt/5c2d41cc798d5738fde397f69b32d2963756b2ec/MonitorService/MonitorService.cpp -------------------------------------------------------------------------------- /MonitorService/MonitorService.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Win8.1 Debug 6 | Win32 7 | 8 | 9 | Win8.1 Release 10 | Win32 11 | 12 | 13 | Win8 Debug 14 | Win32 15 | 16 | 17 | Win8 Release 18 | Win32 19 | 20 | 21 | Win7 Debug 22 | Win32 23 | 24 | 25 | Win7 Release 26 | Win32 27 | 28 | 29 | Win8.1 Debug 30 | x64 31 | 32 | 33 | Win8.1 Release 34 | x64 35 | 36 | 37 | Win8 Debug 38 | x64 39 | 40 | 41 | Win8 Release 42 | x64 43 | 44 | 45 | Win7 Debug 46 | x64 47 | 48 | 49 | Win7 Release 50 | x64 51 | 52 | 53 | 54 | 55 | 56 | 57 | {E2582516-A30B-47D8-B004-36B04FC9F291} 58 | {504102d4-2172-473c-8adf-cd96e308f257} 59 | v4.5 60 | 11.0 61 | Win8.1 Debug 62 | Win32 63 | MonitorService 64 | 65 | 66 | 67 | WindowsV6.3 68 | true 69 | WindowsApplicationForDrivers10.0 70 | Application 71 | 72 | 73 | WindowsV6.3 74 | false 75 | WindowsApplicationForDrivers10.0 76 | Application 77 | 78 | 79 | Windows8 80 | true 81 | WindowsApplicationForDrivers10.0 82 | Application 83 | 84 | 85 | Windows8 86 | false 87 | WindowsApplicationForDrivers10.0 88 | Application 89 | 90 | 91 | Windows7 92 | true 93 | WindowsApplicationForDrivers10.0 94 | Application 95 | 96 | 97 | Windows7 98 | false 99 | WindowsApplicationForDrivers10.0 100 | Application 101 | 102 | 103 | WindowsV6.3 104 | true 105 | WindowsApplicationForDrivers10.0 106 | Application 107 | 108 | 109 | WindowsV6.3 110 | false 111 | WindowsApplicationForDrivers10.0 112 | Application 113 | 114 | 115 | Windows8 116 | true 117 | WindowsApplicationForDrivers10.0 118 | Application 119 | 120 | 121 | Windows8 122 | false 123 | WindowsApplicationForDrivers10.0 124 | Application 125 | 126 | 127 | Windows7 128 | true 129 | WindowsApplicationForDrivers10.0 130 | Application 131 | 132 | 133 | Windows7 134 | false 135 | WindowsApplicationForDrivers10.0 136 | Application 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | ../Include;%(AdditionalIncludeDirectories) 149 | MultiThreadedDebug 150 | true 151 | 152 | 153 | 154 | 155 | 156 | -------------------------------------------------------------------------------- /MonitorService/MonitorService.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /NetworkMnt Package/NetworkMnt Package.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Win8.1 Debug 6 | Win32 7 | 8 | 9 | Win8.1 Release 10 | Win32 11 | 12 | 13 | Win8 Debug 14 | Win32 15 | 16 | 17 | Win8 Release 18 | Win32 19 | 20 | 21 | Win7 Debug 22 | Win32 23 | 24 | 25 | Win7 Release 26 | Win32 27 | 28 | 29 | Win8.1 Debug 30 | x64 31 | 32 | 33 | Win8.1 Release 34 | x64 35 | 36 | 37 | Win8 Debug 38 | x64 39 | 40 | 41 | Win8 Release 42 | x64 43 | 44 | 45 | Win7 Debug 46 | x64 47 | 48 | 49 | Win7 Release 50 | x64 51 | 52 | 53 | 54 | {A2BEC565-3427-460F-B107-95A4E38B8839} 55 | {4605da2c-74a5-4865-98e1-152ef136825f} 56 | v4.5 57 | 11.0 58 | Win8.1 Debug 59 | Win32 60 | NetworkMnt_Package 61 | 62 | 63 | 64 | WindowsV6.3 65 | true 66 | WindowsKernelModeDriver10.0 67 | Utility 68 | Package 69 | true 70 | 71 | 72 | WindowsV6.3 73 | false 74 | WindowsKernelModeDriver10.0 75 | Utility 76 | Package 77 | true 78 | 79 | 80 | Windows8 81 | true 82 | WindowsKernelModeDriver10.0 83 | Utility 84 | Package 85 | true 86 | 87 | 88 | Windows8 89 | false 90 | WindowsKernelModeDriver10.0 91 | Utility 92 | Package 93 | true 94 | 95 | 96 | Windows7 97 | true 98 | WindowsKernelModeDriver10.0 99 | Utility 100 | Package 101 | true 102 | 103 | 104 | Windows7 105 | false 106 | WindowsKernelModeDriver10.0 107 | Utility 108 | Package 109 | true 110 | 111 | 112 | WindowsV6.3 113 | true 114 | WindowsKernelModeDriver10.0 115 | Utility 116 | Package 117 | true 118 | 119 | 120 | WindowsV6.3 121 | false 122 | WindowsKernelModeDriver10.0 123 | Utility 124 | Package 125 | true 126 | 127 | 128 | Windows8 129 | true 130 | WindowsKernelModeDriver10.0 131 | Utility 132 | Package 133 | true 134 | 135 | 136 | Windows8 137 | false 138 | WindowsKernelModeDriver10.0 139 | Utility 140 | Package 141 | true 142 | 143 | 144 | Windows7 145 | true 146 | WindowsKernelModeDriver10.0 147 | Utility 148 | Package 149 | true 150 | 151 | 152 | Windows7 153 | false 154 | WindowsKernelModeDriver10.0 155 | Utility 156 | Package 157 | true 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | DbgengKernelDebugger 169 | False 170 | True 171 | 172 | 173 | 174 | False 175 | False 176 | True 177 | 178 | 133563 179 | 180 | 181 | DbgengKernelDebugger 182 | False 183 | True 184 | 185 | 186 | 187 | False 188 | False 189 | True 190 | 191 | 133563 192 | 193 | 194 | DbgengKernelDebugger 195 | False 196 | True 197 | 198 | 199 | 200 | False 201 | False 202 | True 203 | 204 | 133563 205 | 206 | 207 | DbgengKernelDebugger 208 | False 209 | True 210 | 211 | 212 | 213 | False 214 | False 215 | True 216 | 217 | 133563 218 | 219 | 220 | DbgengKernelDebugger 221 | False 222 | True 223 | 224 | 225 | 226 | False 227 | False 228 | True 229 | 230 | 133563 231 | 232 | 233 | DbgengKernelDebugger 234 | False 235 | True 236 | 237 | 238 | 239 | False 240 | False 241 | True 242 | 243 | 133563 244 | 245 | 246 | DbgengKernelDebugger 247 | False 248 | True 249 | 250 | 251 | 252 | False 253 | False 254 | True 255 | 256 | 133563 257 | http://timestamp.verisign.com/scripts/timstamp.dll 258 | 259 | 260 | DbgengKernelDebugger 261 | False 262 | True 263 | 264 | 265 | 266 | False 267 | False 268 | True 269 | 270 | 133563 271 | 272 | 273 | DbgengKernelDebugger 274 | False 275 | True 276 | 277 | 278 | 279 | False 280 | False 281 | True 282 | 283 | 133563 284 | 285 | 286 | DbgengKernelDebugger 287 | False 288 | True 289 | 290 | 291 | 292 | False 293 | False 294 | True 295 | 296 | 133563 297 | 298 | 299 | DbgengKernelDebugger 300 | False 301 | True 302 | 303 | 304 | 305 | False 306 | False 307 | True 308 | 309 | 133563 310 | 311 | 312 | DbgengKernelDebugger 313 | False 314 | True 315 | 316 | 317 | 318 | False 319 | False 320 | True 321 | 322 | 133563 323 | 324 | 325 | 326 | 327 | 328 | 329 | {435fc15f-dec7-40ca-a443-3d312ad25b4c} 330 | 331 | 332 | 333 | 334 | 335 | -------------------------------------------------------------------------------- /NetworkMnt Package/NetworkMnt Package.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {8E41214B-6785-4CFE-B992-037D68949A14} 6 | inf;inv;inx;mof;mc; 7 | 8 | 9 | -------------------------------------------------------------------------------- /NetworkMnt/MntInit.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gifur/NetworkMnt/5c2d41cc798d5738fde397f69b32d2963756b2ec/NetworkMnt/MntInit.c -------------------------------------------------------------------------------- /NetworkMnt/MntProcess.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gifur/NetworkMnt/5c2d41cc798d5738fde397f69b32d2963756b2ec/NetworkMnt/MntProcess.c -------------------------------------------------------------------------------- /NetworkMnt/MntProcess.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gifur/NetworkMnt/5c2d41cc798d5738fde397f69b32d2963756b2ec/NetworkMnt/MntProcess.h -------------------------------------------------------------------------------- /NetworkMnt/NetworkMnt.inf: -------------------------------------------------------------------------------- 1 | ;;; 2 | ;;; Copyright (c) China Merchants Bank. All rights reserved 3 | ;;; 4 | ;;; Abstract: 5 | ;;; network monitor driver install configuration. 6 | ;;; 7 | 8 | [Version] 9 | signature = "$Windows NT$" 10 | Provider = %Channel% 11 | DriverVer = 01/26/2016,0.0.0.1 12 | Class =Network Monitor 13 | ClassGuid = {0daa4e3f-2c25-4695-9489-0fe63a6cbc39} 14 | CatalogFile = NetworkMnt.cat ;Windows assumes that the catalog file is in the same location as the INF file 15 | 16 | [DestinationDirs] 17 | DefaultDestDir = 12 18 | NetworkMnt.DriverFiles = 12 ;%windir%\system32\drivers 19 | 20 | ;; 21 | ;; Default install sections 22 | ;; 23 | 24 | [DefaultInstall] 25 | CopyFiles = NetworkMnt.DriverFiles 26 | OptionDesc = %NetworkMntServiceDesc% 27 | 28 | 29 | [DefaultInstall.Services] 30 | AddService = %NetworkMntServiceName%,,NetworkMnt.Service 31 | 32 | ;; 33 | ;; Default uninstall sections 34 | ;; 35 | 36 | [DefaultUninstall] 37 | DelFiles = NetworkMnt.DriverFiles 38 | 39 | [DefaultUninstall.Services] 40 | DelService = NetworkMnt,0x200 ; Flags note to stop service first 41 | 42 | ; 43 | ; Services Section 44 | ; 45 | 46 | [NetworkMnt.Service] 47 | DisplayName = %NetworkMntServiceName% 48 | Description = %NetworkMntServiceDesc% 49 | ServiceBinary = %12%\NetworkMnt.sys ;%windir%\system32\drivers\NetworkMnt.sys 50 | ServiceType = 1 ;SERVICE_KERNEL_DRIVER 51 | StartType = 3 ;SERVICE_DEMAND_START 52 | ErrorControl = 1 ;SERVICE_ERROR_NORMAL 53 | 54 | ; 55 | ; Copy Files 56 | ; 57 | 58 | [NetworkMnt.DriverFiles] 59 | NetworkMnt.sys,,,0x00000040 ; COPYFLG_OVERWRITE_OLDER_ONLY 60 | 61 | [SourceDisksNames] 62 | 1 = %DiskId1%,,,"" 63 | [SourceDisksFiles] 64 | NetworkMnt.sys = 1,, 65 | 66 | ;; 67 | ;; String Section 68 | ;; 69 | 70 | [Strings] 71 | Channel = "Proxy channel" 72 | NetworkMntServiceDesc = "Network Monitor Driver" 73 | NetworkMntServiceName = "NetworkMnt" 74 | NetworkMntRegistry = "system\currentcontrolset\services\NetworkMnt" 75 | DiskId1 = "Disk #1" 76 | -------------------------------------------------------------------------------- /NetworkMnt/NetworkMnt.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Win8.1 Debug 6 | Win32 7 | 8 | 9 | Win8.1 Release 10 | Win32 11 | 12 | 13 | Win8 Debug 14 | Win32 15 | 16 | 17 | Win8 Release 18 | Win32 19 | 20 | 21 | Win7 Debug 22 | Win32 23 | 24 | 25 | Win7 Release 26 | Win32 27 | 28 | 29 | Win8.1 Debug 30 | x64 31 | 32 | 33 | Win8.1 Release 34 | x64 35 | 36 | 37 | Win8 Debug 38 | x64 39 | 40 | 41 | Win8 Release 42 | x64 43 | 44 | 45 | Win7 Debug 46 | x64 47 | 48 | 49 | Win7 Release 50 | x64 51 | 52 | 53 | 54 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C} 55 | {1bc93793-694f-48fe-9372-81e2b05556fd} 56 | v4.5 57 | 11.0 58 | Win8.1 Debug 59 | Win32 60 | NetworkMnt 61 | 62 | 63 | 64 | WindowsV6.3 65 | true 66 | WindowsKernelModeDriver10.0 67 | Driver 68 | KMDF 69 | 1 70 | 13 71 | 72 | 73 | WindowsV6.3 74 | false 75 | WindowsKernelModeDriver10.0 76 | Driver 77 | KMDF 78 | 79 | 80 | Windows8 81 | true 82 | WindowsKernelModeDriver10.0 83 | Driver 84 | KMDF 85 | 86 | 87 | Windows8 88 | false 89 | WindowsKernelModeDriver10.0 90 | Driver 91 | KMDF 92 | 93 | 94 | Windows7 95 | true 96 | WindowsKernelModeDriver10.0 97 | Driver 98 | KMDF 99 | 1 100 | 9 101 | 102 | 103 | Windows7 104 | false 105 | WindowsKernelModeDriver10.0 106 | Driver 107 | KMDF 108 | 109 | 110 | WindowsV6.3 111 | true 112 | WindowsKernelModeDriver10.0 113 | Driver 114 | KMDF 115 | 1 116 | 13 117 | 118 | 119 | WindowsV6.3 120 | false 121 | WindowsKernelModeDriver10.0 122 | Driver 123 | KMDF 124 | 125 | 126 | Windows8 127 | true 128 | WindowsKernelModeDriver10.0 129 | Driver 130 | KMDF 131 | 132 | 133 | Windows8 134 | false 135 | WindowsKernelModeDriver10.0 136 | Driver 137 | KMDF 138 | 139 | 140 | Windows7 141 | true 142 | WindowsKernelModeDriver10.0 143 | Driver 144 | KMDF 145 | 146 | 147 | Windows7 148 | false 149 | WindowsKernelModeDriver10.0 150 | Driver 151 | KMDF 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | DbgengKernelDebugger 163 | 164 | 165 | DbgengKernelDebugger 166 | 167 | 168 | DbgengKernelDebugger 169 | 170 | 171 | DbgengKernelDebugger 172 | 173 | 174 | DbgengKernelDebugger 175 | 176 | 177 | DbgengKernelDebugger 178 | 179 | 180 | DbgengKernelDebugger 181 | http://timestamp.verisign.com/scripts/timstamp.dll 182 | 183 | 184 | DbgengKernelDebugger 185 | 186 | 187 | DbgengKernelDebugger 188 | 189 | 190 | DbgengKernelDebugger 191 | 192 | 193 | DbgengKernelDebugger 194 | 195 | 196 | DbgengKernelDebugger 197 | 198 | 199 | 200 | true 201 | 202 | 203 | true 204 | %(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\Include 205 | %(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO 206 | {km-WdfDefault.tpl}*.tmh 207 | 208 | 209 | %(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib 210 | 211 | 212 | 213 | 214 | true 215 | trace.h 216 | true 217 | 218 | 219 | 220 | 221 | true 222 | trace.h 223 | true 224 | 225 | 226 | 227 | 228 | true 229 | trace.h 230 | true 231 | 232 | 233 | 234 | 235 | true 236 | 237 | 238 | true 239 | %(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\Include 240 | %(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO 241 | {km-WdfDefault.tpl}*.tmh 242 | 243 | 244 | %(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib 245 | 246 | 247 | 248 | 249 | true 250 | trace.h 251 | true 252 | 253 | 254 | 255 | 256 | true 257 | 258 | 259 | 260 | 261 | %(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\Include 262 | %(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO 263 | 264 | {km-WdfDefault.tpl}*.tmh 265 | 266 | 267 | %(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib 268 | 269 | 270 | 271 | 272 | true 273 | trace.h 274 | true 275 | 276 | 277 | 278 | 279 | true 280 | trace.h 281 | true 282 | 283 | 284 | 285 | 286 | true 287 | trace.h 288 | true 289 | 290 | 291 | 292 | 293 | true 294 | trace.h 295 | true 296 | 297 | 298 | 299 | 300 | true 301 | trace.h 302 | true 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | -------------------------------------------------------------------------------- /NetworkMnt/NetworkMnt.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {8E41214B-6785-4CFE-B992-037D68949A14} 18 | inf;inv;inx;mof;mc; 19 | 20 | 21 | 22 | 23 | Driver Files 24 | 25 | 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | 35 | 36 | Header Files 37 | 38 | 39 | -------------------------------------------------------------------------------- /NetworkMonitor.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.30501.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetworkMnt", "NetworkMnt\NetworkMnt.vcxproj", "{435FC15F-DEC7-40CA-A443-3D312AD25B4C}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetworkMnt Package", "NetworkMnt Package\NetworkMnt Package.vcxproj", "{A2BEC565-3427-460F-B107-95A4E38B8839}" 9 | ProjectSection(ProjectDependencies) = postProject 10 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C} = {435FC15F-DEC7-40CA-A443-3D312AD25B4C} 11 | EndProjectSection 12 | EndProject 13 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MonitorApp", "MonitorApp\MonitorApp.vcxproj", "{48963643-085D-4B95-823A-B33A920895BA}" 14 | EndProject 15 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MonitorService", "MonitorService\MonitorService.vcxproj", "{E2582516-A30B-47D8-B004-36B04FC9F291}" 16 | EndProject 17 | Global 18 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 19 | Win7 Debug|Win32 = Win7 Debug|Win32 20 | Win7 Debug|x64 = Win7 Debug|x64 21 | Win7 Release|Win32 = Win7 Release|Win32 22 | Win7 Release|x64 = Win7 Release|x64 23 | Win8 Debug|Win32 = Win8 Debug|Win32 24 | Win8 Debug|x64 = Win8 Debug|x64 25 | Win8 Release|Win32 = Win8 Release|Win32 26 | Win8 Release|x64 = Win8 Release|x64 27 | Win8.1 Debug|Win32 = Win8.1 Debug|Win32 28 | Win8.1 Debug|x64 = Win8.1 Debug|x64 29 | Win8.1 Release|Win32 = Win8.1 Release|Win32 30 | Win8.1 Release|x64 = Win8.1 Release|x64 31 | EndGlobalSection 32 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 33 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win7 Debug|Win32.ActiveCfg = Win7 Debug|Win32 34 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win7 Debug|Win32.Build.0 = Win7 Debug|Win32 35 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win7 Debug|x64.ActiveCfg = Win7 Debug|x64 36 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win7 Debug|x64.Build.0 = Win7 Debug|x64 37 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win7 Debug|x64.Deploy.0 = Win7 Debug|x64 38 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win7 Release|Win32.ActiveCfg = Win7 Release|Win32 39 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win7 Release|Win32.Build.0 = Win7 Release|Win32 40 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win7 Release|Win32.Deploy.0 = Win7 Release|Win32 41 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win7 Release|x64.ActiveCfg = Win7 Release|x64 42 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win7 Release|x64.Build.0 = Win7 Release|x64 43 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win7 Release|x64.Deploy.0 = Win7 Release|x64 44 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8 Debug|Win32.ActiveCfg = Win8 Debug|Win32 45 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8 Debug|Win32.Build.0 = Win8 Debug|Win32 46 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8 Debug|Win32.Deploy.0 = Win8 Debug|Win32 47 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8 Debug|x64.ActiveCfg = Win8 Debug|x64 48 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8 Debug|x64.Build.0 = Win8 Debug|x64 49 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8 Debug|x64.Deploy.0 = Win8 Debug|x64 50 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8 Release|Win32.ActiveCfg = Win8 Release|Win32 51 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8 Release|Win32.Build.0 = Win8 Release|Win32 52 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8 Release|Win32.Deploy.0 = Win8 Release|Win32 53 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8 Release|x64.ActiveCfg = Win8 Release|x64 54 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8 Release|x64.Build.0 = Win8 Release|x64 55 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8 Release|x64.Deploy.0 = Win8 Release|x64 56 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8.1 Debug|Win32.ActiveCfg = Win8.1 Debug|Win32 57 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8.1 Debug|Win32.Build.0 = Win8.1 Debug|Win32 58 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8.1 Debug|x64.ActiveCfg = Win8.1 Debug|x64 59 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8.1 Debug|x64.Build.0 = Win8.1 Debug|x64 60 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8.1 Release|Win32.ActiveCfg = Win8.1 Release|Win32 61 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8.1 Release|Win32.Build.0 = Win8.1 Release|Win32 62 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8.1 Release|Win32.Deploy.0 = Win8.1 Release|Win32 63 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8.1 Release|x64.ActiveCfg = Win8.1 Release|x64 64 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8.1 Release|x64.Build.0 = Win8.1 Release|x64 65 | {435FC15F-DEC7-40CA-A443-3D312AD25B4C}.Win8.1 Release|x64.Deploy.0 = Win8.1 Release|x64 66 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win7 Debug|Win32.ActiveCfg = Win7 Debug|Win32 67 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win7 Debug|Win32.Build.0 = Win7 Debug|Win32 68 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win7 Debug|x64.ActiveCfg = Win7 Debug|x64 69 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win7 Debug|x64.Build.0 = Win7 Debug|x64 70 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win7 Debug|x64.Deploy.0 = Win7 Debug|x64 71 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win7 Release|Win32.ActiveCfg = Win7 Release|Win32 72 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win7 Release|Win32.Build.0 = Win7 Release|Win32 73 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win7 Release|Win32.Deploy.0 = Win7 Release|Win32 74 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win7 Release|x64.ActiveCfg = Win7 Release|x64 75 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win7 Release|x64.Build.0 = Win7 Release|x64 76 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win7 Release|x64.Deploy.0 = Win7 Release|x64 77 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8 Debug|Win32.ActiveCfg = Win8 Debug|Win32 78 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8 Debug|Win32.Build.0 = Win8 Debug|Win32 79 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8 Debug|Win32.Deploy.0 = Win8 Debug|Win32 80 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8 Debug|x64.ActiveCfg = Win8 Debug|x64 81 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8 Debug|x64.Build.0 = Win8 Debug|x64 82 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8 Debug|x64.Deploy.0 = Win8 Debug|x64 83 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8 Release|Win32.ActiveCfg = Win8 Release|Win32 84 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8 Release|Win32.Build.0 = Win8 Release|Win32 85 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8 Release|Win32.Deploy.0 = Win8 Release|Win32 86 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8 Release|x64.ActiveCfg = Win8 Release|x64 87 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8 Release|x64.Build.0 = Win8 Release|x64 88 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8 Release|x64.Deploy.0 = Win8 Release|x64 89 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8.1 Debug|Win32.ActiveCfg = Win8.1 Debug|Win32 90 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8.1 Debug|Win32.Build.0 = Win8.1 Debug|Win32 91 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8.1 Debug|x64.ActiveCfg = Win8.1 Debug|x64 92 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8.1 Debug|x64.Build.0 = Win8.1 Debug|x64 93 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8.1 Release|Win32.ActiveCfg = Win8.1 Release|Win32 94 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8.1 Release|Win32.Build.0 = Win8.1 Release|Win32 95 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8.1 Release|Win32.Deploy.0 = Win8.1 Release|Win32 96 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8.1 Release|x64.ActiveCfg = Win8.1 Release|x64 97 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8.1 Release|x64.Build.0 = Win8.1 Release|x64 98 | {A2BEC565-3427-460F-B107-95A4E38B8839}.Win8.1 Release|x64.Deploy.0 = Win8.1 Release|x64 99 | {48963643-085D-4B95-823A-B33A920895BA}.Win7 Debug|Win32.ActiveCfg = Win7 Debug|Win32 100 | {48963643-085D-4B95-823A-B33A920895BA}.Win7 Debug|Win32.Build.0 = Win7 Debug|Win32 101 | {48963643-085D-4B95-823A-B33A920895BA}.Win7 Debug|x64.ActiveCfg = Win7 Debug|x64 102 | {48963643-085D-4B95-823A-B33A920895BA}.Win7 Debug|x64.Build.0 = Win7 Debug|x64 103 | {48963643-085D-4B95-823A-B33A920895BA}.Win7 Debug|x64.Deploy.0 = Win7 Debug|x64 104 | {48963643-085D-4B95-823A-B33A920895BA}.Win7 Release|Win32.ActiveCfg = Win7 Release|Win32 105 | {48963643-085D-4B95-823A-B33A920895BA}.Win7 Release|Win32.Build.0 = Win7 Release|Win32 106 | {48963643-085D-4B95-823A-B33A920895BA}.Win7 Release|Win32.Deploy.0 = Win7 Release|Win32 107 | {48963643-085D-4B95-823A-B33A920895BA}.Win7 Release|x64.ActiveCfg = Win7 Release|x64 108 | {48963643-085D-4B95-823A-B33A920895BA}.Win7 Release|x64.Build.0 = Win7 Release|x64 109 | {48963643-085D-4B95-823A-B33A920895BA}.Win7 Release|x64.Deploy.0 = Win7 Release|x64 110 | {48963643-085D-4B95-823A-B33A920895BA}.Win8 Debug|Win32.ActiveCfg = Win8 Debug|Win32 111 | {48963643-085D-4B95-823A-B33A920895BA}.Win8 Debug|Win32.Build.0 = Win8 Debug|Win32 112 | {48963643-085D-4B95-823A-B33A920895BA}.Win8 Debug|Win32.Deploy.0 = Win8 Debug|Win32 113 | {48963643-085D-4B95-823A-B33A920895BA}.Win8 Debug|x64.ActiveCfg = Win8 Debug|x64 114 | {48963643-085D-4B95-823A-B33A920895BA}.Win8 Debug|x64.Build.0 = Win8 Debug|x64 115 | {48963643-085D-4B95-823A-B33A920895BA}.Win8 Debug|x64.Deploy.0 = Win8 Debug|x64 116 | {48963643-085D-4B95-823A-B33A920895BA}.Win8 Release|Win32.ActiveCfg = Win8 Release|Win32 117 | {48963643-085D-4B95-823A-B33A920895BA}.Win8 Release|Win32.Build.0 = Win8 Release|Win32 118 | {48963643-085D-4B95-823A-B33A920895BA}.Win8 Release|Win32.Deploy.0 = Win8 Release|Win32 119 | {48963643-085D-4B95-823A-B33A920895BA}.Win8 Release|x64.ActiveCfg = Win8 Release|x64 120 | {48963643-085D-4B95-823A-B33A920895BA}.Win8 Release|x64.Build.0 = Win8 Release|x64 121 | {48963643-085D-4B95-823A-B33A920895BA}.Win8 Release|x64.Deploy.0 = Win8 Release|x64 122 | {48963643-085D-4B95-823A-B33A920895BA}.Win8.1 Debug|Win32.ActiveCfg = Win8.1 Debug|Win32 123 | {48963643-085D-4B95-823A-B33A920895BA}.Win8.1 Debug|Win32.Build.0 = Win8.1 Debug|Win32 124 | {48963643-085D-4B95-823A-B33A920895BA}.Win8.1 Debug|x64.ActiveCfg = Win8.1 Debug|x64 125 | {48963643-085D-4B95-823A-B33A920895BA}.Win8.1 Debug|x64.Build.0 = Win8.1 Debug|x64 126 | {48963643-085D-4B95-823A-B33A920895BA}.Win8.1 Release|Win32.ActiveCfg = Win8.1 Release|Win32 127 | {48963643-085D-4B95-823A-B33A920895BA}.Win8.1 Release|Win32.Build.0 = Win8.1 Release|Win32 128 | {48963643-085D-4B95-823A-B33A920895BA}.Win8.1 Release|Win32.Deploy.0 = Win8.1 Release|Win32 129 | {48963643-085D-4B95-823A-B33A920895BA}.Win8.1 Release|x64.ActiveCfg = Win8.1 Release|x64 130 | {48963643-085D-4B95-823A-B33A920895BA}.Win8.1 Release|x64.Build.0 = Win8.1 Release|x64 131 | {48963643-085D-4B95-823A-B33A920895BA}.Win8.1 Release|x64.Deploy.0 = Win8.1 Release|x64 132 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win7 Debug|Win32.ActiveCfg = Win7 Debug|Win32 133 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win7 Debug|Win32.Build.0 = Win7 Debug|Win32 134 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win7 Debug|Win32.Deploy.0 = Win7 Debug|Win32 135 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win7 Debug|x64.ActiveCfg = Win7 Debug|x64 136 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win7 Debug|x64.Build.0 = Win7 Debug|x64 137 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win7 Debug|x64.Deploy.0 = Win7 Debug|x64 138 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win7 Release|Win32.ActiveCfg = Win7 Release|Win32 139 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win7 Release|Win32.Build.0 = Win7 Release|Win32 140 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win7 Release|Win32.Deploy.0 = Win7 Release|Win32 141 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win7 Release|x64.ActiveCfg = Win7 Release|x64 142 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win7 Release|x64.Build.0 = Win7 Release|x64 143 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win7 Release|x64.Deploy.0 = Win7 Release|x64 144 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8 Debug|Win32.ActiveCfg = Win8 Debug|Win32 145 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8 Debug|Win32.Build.0 = Win8 Debug|Win32 146 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8 Debug|Win32.Deploy.0 = Win8 Debug|Win32 147 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8 Debug|x64.ActiveCfg = Win8 Debug|x64 148 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8 Debug|x64.Build.0 = Win8 Debug|x64 149 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8 Debug|x64.Deploy.0 = Win8 Debug|x64 150 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8 Release|Win32.ActiveCfg = Win8 Release|Win32 151 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8 Release|Win32.Build.0 = Win8 Release|Win32 152 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8 Release|Win32.Deploy.0 = Win8 Release|Win32 153 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8 Release|x64.ActiveCfg = Win8 Release|x64 154 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8 Release|x64.Build.0 = Win8 Release|x64 155 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8 Release|x64.Deploy.0 = Win8 Release|x64 156 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8.1 Debug|Win32.ActiveCfg = Win8.1 Debug|Win32 157 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8.1 Debug|Win32.Build.0 = Win8.1 Debug|Win32 158 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8.1 Debug|x64.ActiveCfg = Win8.1 Debug|x64 159 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8.1 Debug|x64.Build.0 = Win8.1 Debug|x64 160 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8.1 Release|Win32.ActiveCfg = Win8.1 Release|Win32 161 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8.1 Release|Win32.Build.0 = Win8.1 Release|Win32 162 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8.1 Release|Win32.Deploy.0 = Win8.1 Release|Win32 163 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8.1 Release|x64.ActiveCfg = Win8.1 Release|x64 164 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8.1 Release|x64.Build.0 = Win8.1 Release|x64 165 | {E2582516-A30B-47D8-B004-36B04FC9F291}.Win8.1 Release|x64.Deploy.0 = Win8.1 Release|x64 166 | EndGlobalSection 167 | GlobalSection(SolutionProperties) = preSolution 168 | HideSolutionNode = FALSE 169 | EndGlobalSection 170 | EndGlobal 171 | -------------------------------------------------------------------------------- /PVKIMPRT.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gifur/NetworkMnt/5c2d41cc798d5738fde397f69b32d2963756b2ec/PVKIMPRT.EXE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | MonitorService 2 | ============================ 3 | __Run the driver as a service.__ this program will install the driver as a service. 4 | 5 | __Usage:__ 6 | 7 | `MonitorService.exe 0` ; install and run the service 8 | 9 | `MonitorService.exe 1` ; stop and unstall the service 10 | 11 | MonitorApp 12 | ============================ 13 | console program which display the netowrk statistic of the progress which is having internet communication. 14 | it would show the progress id and progress name and the upload & download flow per second, and the total flow it used since 15 | the __MonitorApp__ has been started. 16 | 17 | `Ctrl + C`:stop and quit the app. 18 | 19 | `Ctrl + Break`:snapshot about how many flow data has been used. 20 | 21 | NetworkMnt 22 | ============================ 23 | the driver implement code base on WDF and WFP 24 | 25 | Refer to: __Windows Filtering Platform MSN Messenger Monitor Sample__ 26 | 27 | Snapshot 28 | ======== 29 | ![Snapshot](http://oxutubpgi.bkt.clouddn.com/18-6-15/86837617.jpg) 30 | -------------------------------------------------------------------------------- /cert2spc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gifur/NetworkMnt/5c2d41cc798d5738fde397f69b32d2963756b2ec/cert2spc.exe -------------------------------------------------------------------------------- /devcon.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gifur/NetworkMnt/5c2d41cc798d5738fde397f69b32d2963756b2ec/devcon.exe -------------------------------------------------------------------------------- /makecert.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gifur/NetworkMnt/5c2d41cc798d5738fde397f69b32d2963756b2ec/makecert.exe -------------------------------------------------------------------------------- /pvkimprt_install.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gifur/NetworkMnt/5c2d41cc798d5738fde397f69b32d2963756b2ec/pvkimprt_install.exe -------------------------------------------------------------------------------- /pvkimprt_unzip.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gifur/NetworkMnt/5c2d41cc798d5738fde397f69b32d2963756b2ec/pvkimprt_unzip.exe -------------------------------------------------------------------------------- /traceview.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gifur/NetworkMnt/5c2d41cc798d5738fde397f69b32d2963756b2ec/traceview.exe --------------------------------------------------------------------------------