lief::runtime::windows::peb

Struct PEB

pub struct PEB { /* private fields */ }
Expand description

This structure exposes a user-friendly interface over the Process Environment Block (PEB) of the current process.

It can be accessed through super::Process::peb.

Implementations§

§

impl PEB

pub fn being_debugged(&self) -> bool

Whether the current process is being debugged.

This mirrors the BeingDebugged field of the PEB and is equivalent to the result of the IsDebuggerPresent() API.

pub fn ldr(&self) -> u64

Address of the loader data structure (PEB_LDR_DATA) which holds the list of the modules loaded in the current process.

pub fn process_parameters(&self) -> u64

Address of the process parameters (RTL_USER_PROCESS_PARAMETERS) which holds information such as the command line or the current directory.

pub fn atl_thunk_slist_ptr(&self) -> u64

Address of the per-process ATL thunk SList (single-linked list).

pub fn atl_thunk_slist_ptr32(&self) -> u32

32-bit value of the ATL thunk SList pointer.

pub fn post_process_init_routine(&self) -> u64

Address of the routine called once the process completed its initialization (PostProcessInitRoutine).

pub fn session_id(&self) -> u32

Session ID associated with the current process.

pub fn entries(&self) -> LdrDataTableEntries

Return a forward iterator over the modules referenced by the loader data (Ldr) of the PEB, in load order.

Auto Trait Implementations§

§

impl Freeze for PEB

§

impl RefUnwindSafe for PEB

§

impl !Send for PEB

§

impl !Sync for PEB

§

impl Unpin for PEB

§

impl UnwindSafe for PEB

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.