Class ProcessHardening
- Namespace
- FishMMO.Auth.Implementation
- Assembly
- FishMMO-AuthShared.dll
OS-level hardening hooks invoked early during server startup to reduce the risk that sensitive in-memory key material (TOTP KEK, signing keys, SRP verifier) leaks via process core dumps or ptrace from unprivileged peers.
public static class ProcessHardening
- Inheritance
-
ProcessHardening
- Inherited Members
Remarks
On Linux, calling prctl(PR_SET_DUMPABLE, 0) disables core
dumps and prevents non-root processes from attaching ptrace regardless of the
global ptrace_scope setting. This call is a no-op on non-Linux platforms.
Methods
TryDisableCoreDumpAndPtrace(out string)
Attempts to disable core dumps and unprivileged ptrace on Linux. Returns true
if the syscall succeeded; returns false on non-Linux platforms or if the
syscall is unavailable. Failure is non-fatal — callers should log and continue.
public static bool TryDisableCoreDumpAndPtrace(out string status)
Parameters
statusstring