#include <windows.h>
#include <stdio.h>
#include <winternl.h>
Go to the source code of this file.
|
enum | _OBJECT_INFORMATION_CLASS {
ObjectBasicInformation,
ObjectNameInformation,
ObjectTypeInformation,
ObjectAllTypesInformation,
ObjectHandleInformation,
ObjectBasicInformation = 0,
ObjectTypeInformation = 2,
ObjectBasicInformation,
ObjectNameInformation,
ObjectTypeInformation,
ObjectTypesInformation,
ObjectDataInformation
} |
|
◆ _WIN32_WINNT
◆ DRIVER_NAME
◆ STATUS_PRIVILEGE_NOT_HELD
◆ STATUS_SUCCESS
◆ SystemExtendServiceTableInformation
#define SystemExtendServiceTableInformation 38 |
◆ SystemLoadGdiDriverInformation
#define SystemLoadGdiDriverInformation 26 |
◆ NTSTATUS
◆ OBJECT_INFO_CLASS
◆ OBJECT_NAME_INFORMATION
◆ POBJECT_NAME_INFORMATION
◆ PSYSTEM_GDI_DRIVER_INFORMATION
◆ SYSTEM_GDI_DRIVER_INFORMATION
◆ _OBJECT_INFORMATION_CLASS
Enumerator |
---|
ObjectBasicInformation | |
ObjectNameInformation | |
ObjectTypeInformation | |
ObjectAllTypesInformation | |
ObjectHandleInformation | |
ObjectBasicInformation | |
ObjectTypeInformation | |
ObjectBasicInformation | |
ObjectNameInformation | |
ObjectTypeInformation | |
ObjectTypesInformation | |
ObjectDataInformation | |
Definition at line 53 of file DriverTester.h.
enum _OBJECT_INFORMATION_CLASS OBJECT_INFO_CLASS
◆ ConvertPath()
Definition at line 56 of file undoc.c.
#define INVALID_HANDLE_VALUE
DWORD WINAPI GetLastError(VOID)
static POBJECTS_AND_NAME_A pObjName
DWORD WINAPI GetLongPathNameW(IN LPCWSTR lpszShortPath, OUT LPWSTR lpszLongPath, IN DWORD cchBuffer)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
NTSTATUS NtQueryObject(IN HANDLE Handle, IN OBJECT_INFO_CLASS ObjectInformationClass, OUT PVOID ObjectInformation, IN ULONG ObjectInformationLength, OUT PULONG ReturnLength)
#define FILE_ATTRIBUTE_NORMAL
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
#define HeapFree(x, y, z)
Referenced by SneakyUndocumentedMethods().
◆ LoadVia_SystemExtendServiceTableInformation()
BOOL LoadVia_SystemExtendServiceTableInformation |
( |
LPWSTR |
lpDriverPath | ) |
|
Definition at line 240 of file undoc.c.
256 wprintf(
L"SystemExtendServiceTableInformation can only be used in kmode.\n");
260 wprintf(
L"SystemExtendServiceTableInformation incorrectly loaded the driver\n");
268 wprintf(
L"LoadVia_SystemExtendServiceTableInformation failed [%lu] - 0x%x\n",
err,
Status);
#define STATUS_PRIVILEGE_NOT_HELD
IN BOOLEAN OUT PSTR Buffer
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
NTSYSAPI NTSTATUS NTAPI NtSetSystemInformation(IN INT SystemInformationClass, IN PVOID SystemInformation, IN ULONG SystemInformationLength)
#define SystemExtendServiceTableInformation
static BOOL SetPrivilege(BOOL bSet)
NTSTATUS NtUnloadDriver(IN PUNICODE_STRING DriverServiceName)
struct _UNICODE_STRING UNICODE_STRING
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
Referenced by SneakyUndocumentedMethods().
◆ LoadVia_SystemLoadGdiDriverInformation()
BOOL LoadVia_SystemLoadGdiDriverInformation |
( |
LPWSTR |
lpDriverPath | ) |
|
Definition at line 199 of file undoc.c.
217 wprintf(
L"SystemLoadGdiDriverInformation can only be used in kmode.\n");
221 wprintf(
L"SystemLoadGdiDriverInformation incorrectly loaded the driver\n");
229 wprintf(
L"LoadVia_SystemLoadGdiDriverInformation failed [%lu]\n",
err);
#define STATUS_PRIVILEGE_NOT_HELD
IN BOOLEAN OUT PSTR Buffer
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
NTSYSAPI NTSTATUS NTAPI NtSetSystemInformation(IN INT SystemInformationClass, IN PVOID SystemInformation, IN ULONG SystemInformationLength)
static BOOL SetPrivilege(BOOL bSet)
#define SystemLoadGdiDriverInformation
NTSTATUS NtUnloadDriver(IN PUNICODE_STRING DriverServiceName)
struct _SYSTEM_GDI_DRIVER_INFORMATION SYSTEM_GDI_DRIVER_INFORMATION
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
Referenced by SneakyUndocumentedMethods().
◆ NtQueryObject()
◆ NtSetSystemInformation()
◆ NtStartDriver()
Definition at line 133 of file undoc.c.
140 L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\");
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static BOOL SetPrivilege(BOOL bSet)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI NtLoadDriver(IN PUNICODE_STRING DriverServiceName)
Referenced by UndocumentedMethod().
◆ NtStopDriver()
Definition at line 164 of file undoc.c.
171 L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\");
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static BOOL SetPrivilege(BOOL bSet)
NTSTATUS NtUnloadDriver(IN PUNICODE_STRING DriverServiceName)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
Referenced by SneakyUndocumentedMethods(), and UndocumentedMethod().
◆ NtUnloadDriver()
◆ RegisterDriver()
Definition at line 5 of file umode.c.
BOOL StopDriver(LPCWSTR lpDriverName)
#define SERVICE_ERROR_NORMAL
SC_HANDLE WINAPI CreateServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, LPCWSTR lpDisplayName, DWORD dwDesiredAccess, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCWSTR lpBinaryPathName, LPCWSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCWSTR lpDependencies, LPCWSTR lpServiceStartName, LPCWSTR lpPassword)
DWORD WINAPI GetLastError(VOID)
#define SERVICE_ALL_ACCESS
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
#define ERROR_SERVICE_MARKED_FOR_DELETE
#define ERROR_SERVICE_EXISTS
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
#define SC_MANAGER_ALL_ACCESS
#define SERVICE_DEMAND_START
#define SERVICE_KERNEL_DRIVER
Referenced by Initialize().
◆ StartDriver()
Definition at line 56 of file umode.c.
DWORD WINAPI GetLastError(VOID)
#define SERVICE_ALL_ACCESS
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
BOOL WINAPI StartServiceW(SC_HANDLE hService, DWORD dwNumServiceArgs, LPCWSTR *lpServiceArgVectors)
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
#define SC_MANAGER_ALL_ACCESS
#define ERROR_SERVICE_ALREADY_RUNNING
◆ StopDriver()
Definition at line 94 of file umode.c.
DWORD WINAPI GetLastError(VOID)
#define SERVICE_ALL_ACCESS
#define ERROR_SERVICE_NOT_ACTIVE
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
SERVICE_STATUS serviceStatus
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
BOOL WINAPI ControlService(SC_HANDLE hService, DWORD dwControl, LPSERVICE_STATUS lpServiceStatus)
#define SC_MANAGER_ALL_ACCESS
#define SERVICE_CONTROL_STOP
Referenced by RegisterDriver().
◆ UnregisterDriver()
Definition at line 135 of file umode.c.
#define SERVICE_ALL_ACCESS
BOOL WINAPI DeleteService(SC_HANDLE hService)
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
#define SC_MANAGER_ALL_ACCESS
Referenced by UndocumentedMethod(), Uninitialize(), and UsermodeMethod().