Skip to main content

KbEntry

Struct KbEntry 

Source
pub struct KbEntry {
    pub id: String,
    pub matcher: Matcher,
    pub example: Option<String>,
    pub description: String,
    pub techniques: Vec<Technique>,
    pub telemetry: Vec<String>,
    pub detections: Vec<Detection>,
    pub noise: u8,
}
Expand description

One entry in the knowledge base: a rule that maps a shell action to the techniques it implements, the telemetry it emits, and the detections that would fire.

Matching is driven by the structured Matcher under the required match key. (The legacy substring fields command / args_contains / raw_contains were removed once every knowledge base finished migrating.)

Fields§

§id: String

Stable kebab-case identifier, unique within its knowledge base. Surfaces as a finding’s rule_id.

§matcher: Matcher

The structured matcher that decides whether this entry applies to a line.

§example: Option<String>

A representative command line this entry should match, used to synthesize an example event for --verify-detections / --scaffold and to drive the self-consistency guard. Required for entries whose matcher uses a regex leaf (a pattern cannot be reversed into a literal); optional otherwise, where it overrides the literal-derived representative.

§description: String

One line describing what a defender would observe — written from the defender’s side, not the operator’s.

§techniques: Vec<Technique>

The ATT&CK technique(s) this action implements.

§telemetry: Vec<String>

The concrete host events this action produces, in the platform’s own vocabulary (Sysmon EID 1, auditd execve, ESF NOTIFY_EXEC, …).

§detections: Vec<Detection>

Representative detections that would fire. Authored claims — run --verify-detections against a real ruleset to find out which hold.

§noise: u8

Detectability on a 0-100 scale: how likely this action is to surface in defensive telemetry. Higher = louder.

Implementations§

Source§

impl KbEntry

Source

pub fn representative_line(&self) -> Option<String>

A representative command line this entry matches: the author-supplied example when present, otherwise one derived from the matcher’s literals. None only for a bare matcher with neither — which the self-consistency guard rejects.

Trait Implementations§

Source§

impl Clone for KbEntry

Source§

fn clone(&self) -> KbEntry

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 KbEntry

Source§

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

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

impl<'de> Deserialize<'de> for KbEntry

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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.