Hi,
I'm loading boot time driver at "System Reserved" or "Boot bus extender(tag = 1)" group.
How can I access file system (even raw)?
I wanna use 'zwopenfile' or 'zwcreatefile' but it didn't work and return 0xc000003a = 'can not find the file specified'
anyone know what is the correct path (filename) for these APIs?
The pathes I tried : "\\Device\\HarddiskVolumeX" , "\\DosDevices\\C:" , "\\arcname\\multi(0)disk(0)rdisk(0)partition(x)\\windows" , ...
I'm loading boot time driver at "System Reserved" or "Boot bus extender(tag = 1)" group.
How can I access file system (even raw)?
I wanna use 'zwopenfile' or 'zwcreatefile' but it didn't work and return 0xc000003a = 'can not find the file specified'
anyone know what is the correct path (filename) for these APIs?
The pathes I tried : "\\Device\\HarddiskVolumeX" , "\\DosDevices\\C:" , "\\arcname\\multi(0)disk(0)rdisk(0)partition(x)\\windows" , ...
Code: Select all
BOOLEAN FileAccessCheck()
{
UNICODE_STRING uniName;
OBJECT_ATTRIBUTES objAttr;
NTSTATUS Status = STATUS_SUCCESS;
HANDLE FileHandle = NULL;
IO_STATUS_BLOCK ioStatusBlock;
__asm int 3
RtlInitUnicodeString(&uniName,L"\\DosDevices\\C:\\Windows\\Test.txt");
InitializeObjectAttributes(&objAttr, &uniName,OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,NULL, NULL);
Status = ZwCreateFile(&FileHandle,
GENERIC_READ,
&objAttr,
&ioStatusBlock,
0,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ | FILE_SHARE_WRITE,
FILE_CREATE,
0x10000,
0,
0);
if(!NT_SUCCESS(Status))
{
DbgPrint("Can't create : %x h\n",Status);
return FALSE;
}
else
DbgPrint("Created! : %x h\n",Status);
ZwClose(FileHandle);
return TRUE;
}