feat: add secmm-proc
This commit is contained in:
12
__security/secmem-proc/src/main.rs
Normal file
12
__security/secmem-proc/src/main.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
/// `secmem-proc` is a crate designed to harden a process against
|
||||
/// low-privileged attackers running on the same system trying
|
||||
/// to obtain secret memory contents of the current process.
|
||||
/// More specifically, the crate disables core dumps and tries
|
||||
/// to disable tracing on unix-like OSes.
|
||||
fn main() {
|
||||
if secmem_proc::harden_process().is_err() {
|
||||
println!("ERROR: could not harden process, exiting");
|
||||
return;
|
||||
}
|
||||
println!("Hello, world!");
|
||||
}
|
||||
Reference in New Issue
Block a user