Skip to main content

ServiceEntry

Struct ServiceEntry 

Source
pub struct ServiceEntry {
    pub name: String,
    pub display_name: String,
    pub image_path: String,
    pub service_dll: Option<String>,
    pub failure_command: Option<String>,
    pub start_type: u32,
    pub service_type: u32,
    pub object_name: String,
    pub description: String,
    pub is_suspicious: bool,
    pub suspicious_reason: Option<String>,
    pub last_written: Option<DateTime<Utc>>,
}
Expand description

A single service entry extracted from the SYSTEM registry hive.

Fields§

§name: String

Subkey name (the internal service name, e.g. "Dnscache").

§display_name: String

Human-readable display name (DisplayName value).

§image_path: String

Path to the service binary (ImagePath value).

§service_dll: Option<String>

The DLL a shared-process / svchost-hosted service loads, read from Parameters\ServiceDll. None when the service hosts no DLL. Kept raw (REG_EXPAND_SZ env vars like %SystemRoot% are NOT pre-expanded), matching how image_path is handled. This is the actual code a svchost-hosted service runs — and a common persistence vector (T1543.003).

§failure_command: Option<String>

A recovery-action command line (FailureCommand value) run when the service fails — abused for persistence. None when absent.

§start_type: u32

Numeric start type: 0=Boot, 1=System, 2=Auto, 3=Manual, 4=Disabled.

§service_type: u32

Numeric service type: 1=KernelDriver, 2=FsDriver, 16=OwnProcess, 32=ShareProcess.

§object_name: String

Account the service runs as (ObjectName value), e.g. "LocalSystem".

§description: String

Service description (Description value); empty string when absent.

§is_suspicious: bool

true when the service matches one or more anomaly patterns.

§suspicious_reason: Option<String>

Human-readable explanation when is_suspicious is true.

§last_written: Option<DateTime<Utc>>

The service key’s LastWriteTime — approximately the service install/modify time. None when the key carries no timestamp.

Trait Implementations§

Source§

impl Clone for ServiceEntry

Source§

fn clone(&self) -> ServiceEntry

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ServiceEntry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for ServiceEntry

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.