pub struct LinuxOs<Driver>where
Driver: VmiDriver,{ /* private fields */ }Expand description
VMI operations for the Linux operating system.
LinuxOs provides methods and utilities for introspecting a Linux-based
virtual machine. It encapsulates Linux-specific knowledge and operations,
allowing for high-level interactions with the guest OS structures and processes.
Implementations§
Source§impl<Driver> LinuxOs<Driver>where
Driver: VmiRead,
Driver::Architecture: ArchAdapter<Driver>,
impl<Driver> LinuxOs<Driver>where
Driver: VmiRead,
Driver::Architecture: ArchAdapter<Driver>,
Locates and retrieves the Linux banner string from kernel memory.
The banner string typically contains kernel version information and build details.
Sourcepub fn kaslr_offset(vmi: VmiState<'_, Self>) -> Result<u64, VmiError>
pub fn kaslr_offset(vmi: VmiState<'_, Self>) -> Result<u64, VmiError>
Returns the KASLR (Kernel Address Space Layout Randomization) offset.
This value represents the randomized offset applied to the kernel’s base address when KASLR is enabled.
Sourcepub fn per_cpu(vmi: VmiState<'_, Self>) -> Va
pub fn per_cpu(vmi: VmiState<'_, Self>) -> Va
Retrieves the per-CPU base address for the current CPU.
Linux maintains per-CPU data structures, and this method returns the base address for accessing such data on the current processor.
Sourcepub fn linked_list<'a>(
vmi: VmiState<'a, Self>,
list_head: Va,
offset: u64,
) -> Result<impl Iterator<Item = Result<Va, VmiError>> + use<'a, Driver>, VmiError>
pub fn linked_list<'a>( vmi: VmiState<'a, Self>, list_head: Va, offset: u64, ) -> Result<impl Iterator<Item = Result<Va, VmiError>> + use<'a, Driver>, VmiError>
Returns an iterator over a doubly-linked list of LIST_ENTRY structures.
This method is used to iterate over a doubly-linked list of LIST_ENTRY
structures in memory. It returns an iterator that yields the virtual
addresses of each LIST_ENTRY structure in the list.
Sourcepub fn construct_path(
_vmi: VmiState<'_, Self>,
path: &LinuxPath<'_, Driver>,
root: &LinuxPath<'_, Driver>,
) -> Result<String, VmiError>
pub fn construct_path( _vmi: VmiState<'_, Self>, path: &LinuxPath<'_, Driver>, root: &LinuxPath<'_, Driver>, ) -> Result<String, VmiError>
Constructs a file path string from path components in the kernel.
This method walks the dentry chain to build a complete path, handling
mount points and filesystem boundaries appropriately. Both the path
and root arguments should be pointers to struct path objects.
Trait Implementations§
Source§impl<Driver> VmiOs for LinuxOs<Driver>where
Driver: VmiRead,
Driver::Architecture: ArchAdapter<Driver>,
impl<Driver> VmiOs for LinuxOs<Driver>where
Driver: VmiRead,
Driver::Architecture: ArchAdapter<Driver>,
Source§type Architecture = <Driver as VmiDriver>::Architecture
type Architecture = <Driver as VmiDriver>::Architecture
Source§type Process<'a> = LinuxTaskStruct<'a, Driver>
type Process<'a> = LinuxTaskStruct<'a, Driver>
Source§type Thread<'a> = LinuxThread
type Thread<'a> = LinuxThread
Source§type Image<'a> = LinuxImage
type Image<'a> = LinuxImage
Source§type Module<'a> = LinuxModule
type Module<'a> = LinuxModule
Source§type UserModule<'a> = LinuxUserModule
type UserModule<'a> = LinuxUserModule
Source§type Region<'a> = LinuxVmAreaStruct<'a, Driver>
type Region<'a> = LinuxVmAreaStruct<'a, Driver>
Source§type Mapped<'a> = LinuxMapped
type Mapped<'a> = LinuxMapped
Source§fn kernel_image_base(_vmi: VmiState<'_, Self>) -> Result<Va, VmiError>
fn kernel_image_base(_vmi: VmiState<'_, Self>) -> Result<Va, VmiError>
Source§fn kernel_information_string(
_vmi: VmiState<'_, Self>,
) -> Result<String, VmiError>
fn kernel_information_string( _vmi: VmiState<'_, Self>, ) -> Result<String, VmiError>
Source§fn kpti_enabled(_vmi: VmiState<'_, Self>) -> Result<bool, VmiError>
fn kpti_enabled(_vmi: VmiState<'_, Self>) -> Result<bool, VmiError>
Source§fn modules<'a>(
_vmi: VmiState<'a, Self>,
) -> Result<impl Iterator<Item = Result<Self::Module<'a>, VmiError>> + use<'a, Driver>, VmiError>
fn modules<'a>( _vmi: VmiState<'a, Self>, ) -> Result<impl Iterator<Item = Result<Self::Module<'a>, VmiError>> + use<'a, Driver>, VmiError>
Source§fn processes<'a>(
vmi: VmiState<'a, Self>,
) -> Result<impl Iterator<Item = Result<Self::Process<'a>, VmiError>> + use<'a, Driver>, VmiError>
fn processes<'a>( vmi: VmiState<'a, Self>, ) -> Result<impl Iterator<Item = Result<Self::Process<'a>, VmiError>> + use<'a, Driver>, VmiError>
Source§fn process(
vmi: VmiState<'_, Self>,
process: ProcessObject,
) -> Result<Self::Process<'_>, VmiError>
fn process( vmi: VmiState<'_, Self>, process: ProcessObject, ) -> Result<Self::Process<'_>, VmiError>
Source§fn current_process(
vmi: VmiState<'_, Self>,
) -> Result<Self::Process<'_>, VmiError>
fn current_process( vmi: VmiState<'_, Self>, ) -> Result<Self::Process<'_>, VmiError>
Source§fn system_process(
vmi: VmiState<'_, Self>,
) -> Result<Self::Process<'_>, VmiError>
fn system_process( vmi: VmiState<'_, Self>, ) -> Result<Self::Process<'_>, VmiError>
Source§fn thread(
_vmi: VmiState<'_, Self>,
_thread: ThreadObject,
) -> Result<Self::Thread<'_>, VmiError>
fn thread( _vmi: VmiState<'_, Self>, _thread: ThreadObject, ) -> Result<Self::Thread<'_>, VmiError>
Source§fn current_thread(
_vmi: VmiState<'_, Self>,
) -> Result<Self::Thread<'_>, VmiError>
fn current_thread( _vmi: VmiState<'_, Self>, ) -> Result<Self::Thread<'_>, VmiError>
Source§fn image(
_vmi: VmiState<'_, Self>,
_image_base: Va,
) -> Result<Self::Image<'_>, VmiError>
fn image( _vmi: VmiState<'_, Self>, _image_base: Va, ) -> Result<Self::Image<'_>, VmiError>
Source§fn module(
_vmi: VmiState<'_, Self>,
_module: Va,
) -> Result<Self::Module<'_>, VmiError>
fn module( _vmi: VmiState<'_, Self>, _module: Va, ) -> Result<Self::Module<'_>, VmiError>
Source§fn user_module(
_vmi: VmiState<'_, Self>,
_module: Va,
_root: Pa,
) -> Result<Self::UserModule<'_>, VmiError>
fn user_module( _vmi: VmiState<'_, Self>, _module: Va, _root: Pa, ) -> Result<Self::UserModule<'_>, VmiError>
Source§fn region(
vmi: VmiState<'_, Self>,
region: Va,
) -> Result<Self::Region<'_>, VmiError>
fn region( vmi: VmiState<'_, Self>, region: Va, ) -> Result<Self::Region<'_>, VmiError>
Source§fn syscall_argument(
vmi: VmiState<'_, Self>,
index: u64,
) -> Result<u64, VmiError>
fn syscall_argument( vmi: VmiState<'_, Self>, index: u64, ) -> Result<u64, VmiError>
Source§fn function_argument(
vmi: VmiState<'_, Self>,
index: u64,
) -> Result<u64, VmiError>
fn function_argument( vmi: VmiState<'_, Self>, index: u64, ) -> Result<u64, VmiError>
Auto Trait Implementations§
impl<Driver> !Freeze for LinuxOs<Driver>
impl<Driver> !RefUnwindSafe for LinuxOs<Driver>
impl<Driver> !Sync for LinuxOs<Driver>
impl<Driver> Send for LinuxOs<Driver>where
PhantomData<Driver>: Send,
impl<Driver> Unpin for LinuxOs<Driver>where
PhantomData<Driver>: Unpin,
impl<Driver> UnsafeUnpin for LinuxOs<Driver>where
PhantomData<Driver>: UnsafeUnpin,
impl<Driver> UnwindSafe for LinuxOs<Driver>where
PhantomData<Driver>: UnwindSafe,
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.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> VmiOsExt for Twhere
T: VmiOs,
impl<T> VmiOsExt for Twhere
T: VmiOs,
Source§fn find_process<'a>(
vmi: VmiState<'a, Self>,
predicate: impl ProcessPredicate<Self>,
) -> Result<Option<Self::Process<'a>>, VmiError>
fn find_process<'a>( vmi: VmiState<'a, Self>, predicate: impl ProcessPredicate<Self>, ) -> Result<Option<Self::Process<'a>>, VmiError>
predicate, or Ok(None)
if no live process matches.Source§fn filter_processes<'a>(
vmi: VmiState<'a, Self>,
predicate: impl ProcessPredicate<Self>,
) -> Result<impl Iterator<Item = Result<Self::Process<'a>, VmiError>>, VmiError>
fn filter_processes<'a>( vmi: VmiState<'a, Self>, predicate: impl ProcessPredicate<Self>, ) -> Result<impl Iterator<Item = Result<Self::Process<'a>, VmiError>>, VmiError>
predicate.Source§fn find_module<'a>(
vmi: VmiState<'a, Self>,
predicate: impl ModulePredicate<Self>,
) -> Result<Option<Self::Module<'a>>, VmiError>
fn find_module<'a>( vmi: VmiState<'a, Self>, predicate: impl ModulePredicate<Self>, ) -> Result<Option<Self::Module<'a>>, VmiError>
predicate, or
Ok(None) if no loaded module matches.