I used "Zw or NtquerySystemInformation" to obtain all the object handles but for using of NtquerySystemInformation the return value is NULL and for using of ZwquerySystemInformation some parts of return value is NULL or its memory is access denied.
The structure of the return value was casted to PSYSTEM_HANDLE_INFORMATION. I tested both 16 and 64 as the first input value for calling this function.
For example, the Object part of the return value has a FileName part that is a UNICODE_STRING, but for some enteries FileName has a Length and the MaxLength is not zero and the BUFFER value is 0 or pointed to the part of memory that has the "access violation" error.
I get this problem at this line of my code after calling this function:
DbgPrint("%wZ \r\n", FileObject->FileName);
Anybody can solve this problem and help me?
The structure of the return value was casted to PSYSTEM_HANDLE_INFORMATION. I tested both 16 and 64 as the first input value for calling this function.
For example, the Object part of the return value has a FileName part that is a UNICODE_STRING, but for some enteries FileName has a Length and the MaxLength is not zero and the BUFFER value is 0 or pointed to the part of memory that has the "access violation" error.
I get this problem at this line of my code after calling this function:
DbgPrint("%wZ \r\n", FileObject->FileName);
Anybody can solve this problem and help me?