Repository navigation
Implement ephemeral password randomization for VesselUser sessions - #42
Conversation
- Remove hardcoded VESSEL_PASS constant - Generate a high-entropy, memory-resident password for VesselUser on every engine startup - Update VesselUser account dynamically via net user command - Use memory-resident password for authentication - Comply with Windows local account complexity requirements - Ensure zero persistent storage of the password
|
Test it hard if it's working or not |
|
I have extensively tested the password generation and environment synchronization. I identified and fixed a bug where the randomly generated password was failing to sync properly to existing |
|
This branch has conflicts with merge. See what is the issue. Fix it |
|
I've successfully resolved the merge conflicts with the |
|
Check failed |
|
[CI/CD Fix Attempt 1] I fixed a compilation error on Windows where |
|
I have investigated and fixed the failed Windows check. The issue occurred because |
|
I've addressed the remaining check failures. The issue was caused by a redundant |
|
Merge issue. Fix it |
…on-randomization-js1-6149186f-0860-4929-9a9e-d7ab04f48a95 # Conflicts: # crates/security-engine/src/windows.rs
|
I've successfully resolved the merge conflict in |
Overview
This PR implements Ephemeral Session Randomization for the security engine to eliminate the risks associated with static, hardcoded credentials. By transitioning from a constant password to a cryptographically secure, memory-resident secret generated at runtime, we effectively neutralize credential harvesting and unauthorized local access to the
VesselUserenvironment.Why these changes are necessary
The previous implementation relied on a hardcoded
VESSEL_PASSconstant. This presented a significant security vulnerability where any local process could potentially authenticate as the restricted user. By rotating the password on every engine startup, we ensure that:Key Changes
VESSEL_PASSconstant fromsrc/windows.rs, ensuring no static secrets remain in the source code.randcrate to generate 20-character high-entropy passwords that satisfy Windows complexity requirements (mixing alphanumeric and special characters).get_or_create_vessel_password()using aOnceLocksingleton.create_vessel_user()to apply the generated password via system administration commands (net user) during initialization.get_restricted_tokento pull the active secret from memory for use with theLogonUserWAPI.Technical Rationale
OnceLockfor Singletons: We choseOnceLockto ensure thread-safe initialization of the password. This prevents race conditions where multiple threads might attempt to generate or set different passwords during the startup sequence.Verification Results
VESSEL_PASSis no longer present in the codebase.VesselUserprocesses successfully authenticate using the new randomized flow.