Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bombini-common/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Config module represents data structures to initialize detectors maps.
pub mod filemon;
pub mod procmon;
pub mod rule;
15 changes: 15 additions & 0 deletions bombini-common/src/config/filemon.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use crate::event::file::FileEventNumber;

#[derive(Debug, Copy, Clone)]
#[repr(C)]
pub struct FileMonKernelConfig {
/// Option -> sandbox enabled, bool value deny_list
pub sandbox_mode: [Option<bool>; FileEventNumber::TotalFileEvents as usize],
}

#[cfg(feature = "user")]
pub mod user {
use super::*;

unsafe impl aya::Pod for FileMonKernelConfig {}
}
4 changes: 4 additions & 0 deletions bombini-common/src/config/procmon.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
use crate::event::process::ProcessEventNumber;

#[derive(Debug, Copy, Clone)]
#[repr(C)]
pub struct ProcMonKernelConfig {
pub ima_hash: bool,
/// Option -> sandbox enabled, bool value deny_list
pub sandbox_mode: [Option<bool>; ProcessEventNumber::TotalProcessEvents as usize],
}

#[cfg(feature = "user")]
Expand Down
1 change: 1 addition & 0 deletions bombini-common/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pub mod network;
pub mod process;

/// Generic event for ring buffer
#[repr(C)]
pub struct GenericEvent {
pub ktime: u64,
/// event enum discriminant for fast access
Expand Down
2 changes: 2 additions & 0 deletions bombini-common/src/event/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ pub struct FileMsg {
pub process: ProcessKey,
pub parent: ProcessKey,
pub event: FileEventVariant,
/// true if event is blocked by corresponding LSM hook
pub blocked: bool,
pub rule_idx: Option<u8>,
}

Expand Down
2 changes: 2 additions & 0 deletions bombini-common/src/event/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ pub struct ProcessMsg {
pub process: ProcessKey,
pub parent: ProcessKey,
pub event: ProcessEventVariant,
/// true if event is blocked by corresponding LSM hook
pub blocked: bool,
pub rule_idx: Option<u8>,
}

Expand Down
Loading
Loading