Go to the source code of this file.
◆ 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().
◆ 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().
◆ SetPrivilege()
Definition at line 4 of file undoc.c.
25 tp.PrivilegeCount = 1;
26 tp.Privileges[0].Luid = luid;
34 tp.Privileges[0].Attributes = 0;
DWORD WINAPI GetLastError(VOID)
#define LookupPrivilegeValue
#define SE_PRIVILEGE_ENABLED
_In_ uint64_t _In_ uint64_t _In_ uint64_t _In_opt_ traverse_ptr * tp
#define GetCurrentProcess()
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
#define TOKEN_ADJUST_PRIVILEGES
#define SE_LOAD_DRIVER_NAME
Referenced by LoadVia_SystemExtendServiceTableInformation(), LoadVia_SystemLoadGdiDriverInformation(), NtStartDriver(), and NtStopDriver().