pub trait GuestPlugin: Plugin {
// Required methods
fn on_start(&self, ctx: &Context) -> Result<()>;
fn on_stop(&self, ctx: &Context) -> Result<()>;
// Provided method
fn execute_sample(&self, sample_path: &Path) -> Result<LaunchResult> { ... }
}Expand description
Trait for malbox guest plugins that run inside an ephemeral VM.
The SDK owns the lifecycle sequence:
on_start- plugin sets up monitoring, receives contextexecute_sample- SDK calls this to launch the sample (default: platform launcher)- SDK waits for analysis timeout
on_stop- plugin flushes results and tears down
Required Methods§
Provided Methods§
Sourcefn execute_sample(&self, sample_path: &Path) -> Result<LaunchResult>
fn execute_sample(&self, sample_path: &Path) -> Result<LaunchResult>
Launch the sample at the given path. Called by the SDK after on_start.
The default implementation uses the platform’s process creation API. Override for non-EXE scenarios (DLL loading, COM dispatch, etc.).