feat: add secmm-proc

This commit is contained in:
2022-07-27 23:25:03 +08:00
parent 3e755b465c
commit acf61e1520
3 changed files with 134 additions and 0 deletions

View 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!");
}