Skip to main content

DeviceConnection

Struct DeviceConnection 

Source
pub struct DeviceConnection {
Show 20 fields pub bus: Bus, pub device_class_guid: Option<String>, pub vid: Option<u16>, pub pid: Option<u16>, pub device_serial: Option<String>, pub serial_is_os_generated: bool, pub friendly_name: Option<String>, pub device_instance_id: String, pub first_install: Option<Stamp>, pub last_install: Option<Stamp>, pub last_arrival: Option<Stamp>, pub last_removal: Option<Stamp>, pub parent_id_prefix: Option<String>, pub volume_guid: Option<String>, pub drive_letter: Option<char>, pub volume_serial: Option<u32>, pub disk_signature: Option<u32>, pub dma_capable: bool, pub mitre: Vec<MitreRef>, pub source: Provenance,
}
Expand description

One external-device connection, normalized across sources.

The forensic cautions are baked into the type, not just the docs:

  • device_serial is the USB iSerial and is a distinct field from volume_serial (a filesystem volume serial), so the two can never be conflated.
  • serial_is_os_generated records that the device had no real iSerial (Windows synthesized one), weakening attribution.
  • Each timestamp is a Stamp carrying its authoritative-vs-inferred Confidence.

Fields§

§bus: Bus

The classified bus.

§device_class_guid: Option<String>

Device setup-class GUID, when known.

§vid: Option<u16>

USB vendor id (VID_xxxx).

§pid: Option<u16>

USB product id (PID_xxxx).

§device_serial: Option<String>

The USB iSerial — the device-unique serial reported by the device. DISTINCT from any volume_serial.

§serial_is_os_generated: bool

true when the instance-id serial was synthesized by Windows (the serial’s 2nd character is &) — the device exposed no real iSerial, so attribution is weaker.

§friendly_name: Option<String>

Human-readable friendly name, when present.

§device_instance_id: String

The full device instance id (e.g. USB\VID_0781&PID_5583\1234567890AB) — the primary key.

§first_install: Option<Stamp>

First-seen / first-install — authoritative when from the setupapi section header.

§last_install: Option<Stamp>

Last install/driver event.

§last_arrival: Option<Stamp>

Last arrival (connect). INFERRED — derived from the undocumented registry 0066 device property (v0.2).

§last_removal: Option<Stamp>

Last removal (disconnect). INFERRED — derived from the undocumented registry 0067 device property (v0.2).

§parent_id_prefix: Option<String>

ParentIdPrefix — joins the storage device to its volume.

§volume_guid: Option<String>

Volume GUID (\\?\Volume{...}).

§drive_letter: Option<char>

Mounted drive letter.

§volume_serial: Option<u32>

Filesystem volume serial (NTFS/FAT) — DISTINCT from the device’s USB device_serial.

§disk_signature: Option<u32>

MBR disk signature.

§dma_capable: bool

Whether the bus is bus-mastering DMA-capable (see Bus::is_dma_capable).

§mitre: Vec<MitreRef>

MITRE ATT&CK techniques this connection is consistent with.

§source: Provenance

Where this record came from (source file + 1-based line).

Trait Implementations§

Source§

impl Clone for DeviceConnection

Source§

fn clone(&self) -> DeviceConnection

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 DeviceConnection

Source§

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

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

impl Eq for DeviceConnection

Source§

impl PartialEq for DeviceConnection

Source§

fn eq(&self, other: &DeviceConnection) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for DeviceConnection

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.