Go to the source code of this file.
◆ ConvertPath()
Definition at line 56 of file undoc.c.
58{
61
62 if (lpPath)
63 {
65 0,
66 0);
69
71
73 0,
75 if (!lpFullPath)
77
79 lpFullPath,
81 {
86
89 0,
94
96
98 {
101 }
102
107
114 {
118
120
122 }
123
125 }
126 }
127
129}
NTSTATUS NtQueryObject(IN HANDLE Handle, IN OBJECT_INFO_CLASS ObjectInformationClass, OUT PVOID ObjectInformation, IN ULONG ObjectInformationLength, OUT PULONG ReturnLength)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define FILE_ATTRIBUTE_NORMAL
DWORD WINAPI GetLongPathNameW(IN LPCWSTR lpszShortPath, OUT LPWSTR lpszLongPath, IN DWORD cchBuffer)
static POBJECTS_AND_NAME_A pObjName
DWORD WINAPI GetLastError(void)
Referenced by SneakyUndocumentedMethods().
◆ LoadVia_SystemExtendServiceTableInformation()
BOOL LoadVia_SystemExtendServiceTableInformation |
( |
LPWSTR |
lpDriverPath | ) |
|
Definition at line 240 of file undoc.c.
241{
245
248
250 {
255 {
256 wprintf(
L"SystemExtendServiceTableInformation can only be used in kmode.\n");
257 }
259 {
260 wprintf(
L"SystemExtendServiceTableInformation incorrectly loaded the driver\n");
262
264 }
265 else
266 {
268 wprintf(
L"LoadVia_SystemExtendServiceTableInformation failed [%lu] - 0x%x\n",
err,
Status);
269 }
270
272 }
273
275}
NTSYSAPI NTSTATUS NTAPI NtSetSystemInformation(IN INT SystemInformationClass, IN PVOID SystemInformation, IN ULONG SystemInformationLength)
NTSTATUS NtUnloadDriver(IN PUNICODE_STRING DriverServiceName)
#define STATUS_PRIVILEGE_NOT_HELD
#define SystemExtendServiceTableInformation
struct _UNICODE_STRING UNICODE_STRING
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
static BOOL SetPrivilege(BOOL bSet)
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.
200{
204
206
209
211 {
216 {
217 wprintf(
L"SystemLoadGdiDriverInformation can only be used in kmode.\n");
218 }
220 {
221 wprintf(
L"SystemLoadGdiDriverInformation incorrectly loaded the driver\n");
223
225 }
226 else
227 {
229 wprintf(
L"LoadVia_SystemLoadGdiDriverInformation failed [%lu]\n",
err);
230 }
231
233 }
234
236}
struct _SYSTEM_GDI_DRIVER_INFORMATION SYSTEM_GDI_DRIVER_INFORMATION
#define SystemLoadGdiDriverInformation
Referenced by SneakyUndocumentedMethods().
◆ NtStartDriver()
Definition at line 133 of file undoc.c.
134{
138
140 L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\");
142 lpService);
143
145 szDriverPath);
146
148 {
151 {
154 }
155
157 }
158
160}
NTSTATUS NTAPI NtLoadDriver(IN PUNICODE_STRING DriverServiceName)
Referenced by UndocumentedMethod().
◆ NtStopDriver()
◆ SetPrivilege()
Definition at line 4 of file undoc.c.
5{
9
12 &hToken))
13 {
15 }
16
19 &luid))
20 {
23 }
24
25 tp.PrivilegeCount = 1;
26 tp.Privileges[0].Luid = luid;
27
28 if (bSet)
29 {
31 }
32 else
33 {
34 tp.Privileges[0].Attributes = 0;
35 }
36
44 {
47 }
48
50
52}
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 GetCurrentProcess()
_In_ uint64_t _In_ uint64_t _In_ uint64_t _In_opt_ traverse_ptr * tp
#define LookupPrivilegeValue
#define SE_LOAD_DRIVER_NAME
#define TOKEN_ADJUST_PRIVILEGES
#define SE_PRIVILEGE_ENABLED
Referenced by LoadVia_SystemExtendServiceTableInformation(), LoadVia_SystemLoadGdiDriverInformation(), NtStartDriver(), and NtStopDriver().