#[non_exhaustive]pub struct Script {
pub file: Option<Box<File>>,
pub hashes: Option<Vec<Fingerprint>>,
pub name: Option<String>,
pub parent_uid: Option<String>,
pub script_content: Option<Box<LongString>>,
pub type: Option<String>,
pub type_id: Option<i64>,
pub uid: Option<String>,
}Expand description
Script
The Script object describes a script or command that can be executed by a shell, script engine, or interpreter. Examples include Bash, JavsScript, PowerShell, Python, VBScript, etc. Note that the term script here denotes not only a script contained within a file but also a script or command typed interactively by a user, supplied on the command line, or provided by some other file-less mechanism.
[] Category: | Name: script
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.file: Option<Box<File>>File
Present if this script is associated with a file. Not present in the case of a file-less script.
optional
hashes: Option<Vec<Fingerprint>>Hashes
An array of the script’s cryptographic hashes. Note that these hashes are calculated on the script in its original encoding, and not on the normalized UTF-8 encoding found in the script_content attribute.
recommended
name: Option<String>Name
Unique identifier for the script or macro, independent of the containing file, used for tracking, auditing, and security analysis.
optional
parent_uid: Option<String>Parent Unique ID
This attribute relates a sub-script to a parent script having the matching uid attribute. In the case of PowerShell, sub-script execution can be identified by matching the activity correlation ID of the raw ETW events provided by the OS.
optional
script_content: Option<Box<LongString>>Script Content
The script content, normalized to UTF-8 encoding irrespective of its original encoding. When emitting this attribute, it may be appropriate to truncate large scripts. When consuming this attribute, large scripts should be anticipated.
required
type: Option<String>Type
The script type, normalized to the caption of the type_id value. In the case of ‘Other’, it is defined by the event source.
optional
type_id: Option<i64>Type ID
The normalized script type ID.
required
uid: Option<String>Unique ID
Some script engines assign a unique ID to each individual execution of a given script. This attribute captures that unique ID. In the case of PowerShell, the unique ID corresponds to the ScriptBlockId in the raw ETW events provided by the OS.
optional