pub struct WindowsObject<'a, Driver>{ /* private fields */ }Expand description
A Windows object.
A Windows object is a kernel-managed entity that can be referenced by handles or pointers. It includes processes, threads, files, and other system resources managed by the Windows Object Manager.
§Implementation Details
Corresponds to _OBJECT_HEADER.Body.
Implementations§
Source§impl<'a, Driver> WindowsObject<'a, Driver>
impl<'a, Driver> WindowsObject<'a, Driver>
Sourcepub fn new(vmi: VmiState<'a, Driver, WindowsOs<Driver>>, va: Va) -> Self
pub fn new(vmi: VmiState<'a, Driver, WindowsOs<Driver>>, va: Va) -> Self
Creates a new Windows object.
Sourcepub fn header(&self) -> Va
pub fn header(&self) -> Va
Returns the virtual address of the _OBJECT_HEADER structure.
§Implementation Details
_OBJECT_HEADER is always at the beginning of the object.
Sourcepub fn name_info(
&self,
) -> Result<Option<WindowsObjectHeaderNameInfo<'a, Driver>>, VmiError>
pub fn name_info( &self, ) -> Result<Option<WindowsObjectHeaderNameInfo<'a, Driver>>, VmiError>
Returns the name information of the object.
Sourcepub fn directory(&self) -> Result<Option<WindowsObject<'a, Driver>>, VmiError>
pub fn directory(&self) -> Result<Option<WindowsObject<'a, Driver>>, VmiError>
Returns the directory object associated with the object name.
Shortcut for self.name_info()?.directory().
Sourcepub fn name(&self) -> Result<Option<String>, VmiError>
pub fn name(&self) -> Result<Option<String>, VmiError>
Returns the name of the object.
Shortcut for self.name_info()?.name().
Sourcepub fn full_path(&self) -> Result<Option<String>, VmiError>
pub fn full_path(&self) -> Result<Option<String>, VmiError>
Constructs the full path of a named object from its name information.
Shortcut for self.name_info()?.full_path().
Sourcepub fn object_type(&self) -> Result<WindowsObjectType<'a, Driver>, VmiError>
pub fn object_type(&self) -> Result<WindowsObjectType<'a, Driver>, VmiError>
Returns the type of a Windows kernel object.
This method analyzes the object header of a kernel object and returns
its type object (_OBJECT_TYPE). It handles the obfuscation introduced
by the object header cookie, ensuring accurate type identification even
on systems with this security feature enabled.
Sourcepub fn type_name(&self) -> Result<String, VmiError>
pub fn type_name(&self) -> Result<String, VmiError>
Returns the object type name.
Shortcut for self.object_type()?.name().
Sourcepub fn type_kind(&self) -> Result<Option<WindowsObjectTypeKind>, VmiError>
pub fn type_kind(&self) -> Result<Option<WindowsObjectTypeKind>, VmiError>
Returns the object type kind.
Shortcut for self.object_type()?.kind().
Sourcepub fn kind(&self) -> Result<Option<WindowsObjectKind<'a, Driver>>, VmiError>
pub fn kind(&self) -> Result<Option<WindowsObjectKind<'a, Driver>>, VmiError>
Returns the specific kind of this object.
Sourcepub fn as_directory(
&self,
) -> Result<Option<WindowsDirectoryObject<'a, Driver>>, VmiError>
pub fn as_directory( &self, ) -> Result<Option<WindowsDirectoryObject<'a, Driver>>, VmiError>
Returns the object as a directory (_OBJECT_DIRECTORY).
Sourcepub fn as_file(&self) -> Result<Option<WindowsFileObject<'a, Driver>>, VmiError>
pub fn as_file(&self) -> Result<Option<WindowsFileObject<'a, Driver>>, VmiError>
Returns the object as a file (_FILE_OBJECT).
Sourcepub fn as_key(&self) -> Result<Option<WindowsKey<'a, Driver>>, VmiError>
pub fn as_key(&self) -> Result<Option<WindowsKey<'a, Driver>>, VmiError>
Returns the object as a key (_CM_KEY_BODY).
Sourcepub fn as_process(&self) -> Result<Option<WindowsProcess<'a, Driver>>, VmiError>
pub fn as_process(&self) -> Result<Option<WindowsProcess<'a, Driver>>, VmiError>
Returns the object as a process (_EPROCESS).
Sourcepub fn as_section(
&self,
) -> Result<Option<WindowsSectionObject<'a, Driver>>, VmiError>
pub fn as_section( &self, ) -> Result<Option<WindowsSectionObject<'a, Driver>>, VmiError>
Returns the object as a section (_SECTION_OBJECT).