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 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).
Sourcepub fn as_thread(&self) -> Result<Option<WindowsThread<'a, Driver>>, VmiError>
pub fn as_thread(&self) -> Result<Option<WindowsThread<'a, Driver>>, VmiError>
Returns the object as a thread (_ETHREAD).
Trait Implementations§
Source§impl<Driver> Debug for WindowsObject<'_, Driver>
impl<Driver> Debug for WindowsObject<'_, Driver>
Source§impl<'a, Driver> From<WindowsDirectoryObject<'a, Driver>> for WindowsObject<'a, Driver>
impl<'a, Driver> From<WindowsDirectoryObject<'a, Driver>> for WindowsObject<'a, Driver>
Source§fn from(value: WindowsDirectoryObject<'a, Driver>) -> Self
fn from(value: WindowsDirectoryObject<'a, Driver>) -> Self
Source§impl<'a, Driver> From<WindowsFileObject<'a, Driver>> for WindowsObject<'a, Driver>
impl<'a, Driver> From<WindowsFileObject<'a, Driver>> for WindowsObject<'a, Driver>
Source§fn from(value: WindowsFileObject<'a, Driver>) -> Self
fn from(value: WindowsFileObject<'a, Driver>) -> Self
Source§impl<'a, Driver> From<WindowsObjectType<'a, Driver>> for WindowsObject<'a, Driver>
impl<'a, Driver> From<WindowsObjectType<'a, Driver>> for WindowsObject<'a, Driver>
Source§fn from(value: WindowsObjectType<'a, Driver>) -> Self
fn from(value: WindowsObjectType<'a, Driver>) -> Self
Source§impl<'a, Driver> From<WindowsProcess<'a, Driver>> for WindowsObject<'a, Driver>
impl<'a, Driver> From<WindowsProcess<'a, Driver>> for WindowsObject<'a, Driver>
Source§fn from(value: WindowsProcess<'a, Driver>) -> Self
fn from(value: WindowsProcess<'a, Driver>) -> Self
Source§impl<'a, Driver> From<WindowsSectionObject<'a, Driver>> for WindowsObject<'a, Driver>
impl<'a, Driver> From<WindowsSectionObject<'a, Driver>> for WindowsObject<'a, Driver>
Source§fn from(value: WindowsSectionObject<'a, Driver>) -> Self
fn from(value: WindowsSectionObject<'a, Driver>) -> Self
Source§impl<'a, Driver> From<WindowsThread<'a, Driver>> for WindowsObject<'a, Driver>
impl<'a, Driver> From<WindowsThread<'a, Driver>> for WindowsObject<'a, Driver>
Source§fn from(value: WindowsThread<'a, Driver>) -> Self
fn from(value: WindowsThread<'a, Driver>) -> Self
Source§impl<'a, Driver> From<WindowsToken<'a, Driver>> for WindowsObject<'a, Driver>
impl<'a, Driver> From<WindowsToken<'a, Driver>> for WindowsObject<'a, Driver>
Source§fn from(value: WindowsToken<'a, Driver>) -> Self
fn from(value: WindowsToken<'a, Driver>) -> Self
Source§impl<'a, Driver> From<WindowsTrapFrame<'a, Driver>> for WindowsObject<'a, Driver>
impl<'a, Driver> From<WindowsTrapFrame<'a, Driver>> for WindowsObject<'a, Driver>
Source§fn from(value: WindowsTrapFrame<'a, Driver>) -> Self
fn from(value: WindowsTrapFrame<'a, Driver>) -> Self
Source§impl<'a, Driver> FromWindowsObject<'a, Driver> for WindowsObject<'a, Driver>
impl<'a, Driver> FromWindowsObject<'a, Driver> for WindowsObject<'a, Driver>
Source§fn from_object(
object: WindowsObject<'a, Driver>,
) -> Result<Option<Self>, VmiError>
fn from_object( object: WindowsObject<'a, Driver>, ) -> Result<Option<Self>, VmiError>
WindowsObject into a specific object type.Source§impl<Driver> VmiVa for WindowsObject<'_, Driver>
impl<Driver> VmiVa for WindowsObject<'_, Driver>
Auto Trait Implementations§
impl<'a, Driver> !RefUnwindSafe for WindowsObject<'a, Driver>
impl<'a, Driver> !Send for WindowsObject<'a, Driver>
impl<'a, Driver> !Sync for WindowsObject<'a, Driver>
impl<'a, Driver> !UnwindSafe for WindowsObject<'a, Driver>
impl<'a, Driver> Freeze for WindowsObject<'a, Driver>
impl<'a, Driver> Unpin for WindowsObject<'a, Driver>
impl<'a, Driver> UnsafeUnpin for WindowsObject<'a, Driver>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.