feat: implement malware quarantine vault in SystemAgent (#416)#418
Open
Viidhii19 wants to merge 1 commit into
Open
feat: implement malware quarantine vault in SystemAgent (#416)#418Viidhii19 wants to merge 1 commit into
Viidhii19 wants to merge 1 commit into
Conversation
Contributor
Author
|
Hye @VyomKulshrestha ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements the Filesystem Quarantine Vault within the SystemAgent's process termination flow to securely isolate malware executables after mitigation, preventing reinfection while preserving the binaries for forensic analysis.
Closes #416
Type of change
Changes made
daemon/pilot/agents/executor.py(_exec_process_kill):psutil.Process(pid).exe()to securely trace and map the targeted PID to its binary executable path prior to process termination.psutil.Process.wait(timeout=3.0)blocking phase to ensure the operating system releases active file handles, eliminating file-lock race conditions specifically present on Windows systems.shutil.move()to transfer the executable to~/.heliox/quarantine/renamed with a timestamp hash to prevent collisions.os.chmod(..., 0o600)to strip execution capabilities from the file.try/excepthandling forNoSuchProcessandAccessDeniedconstraints.How to test
SystemAgentvia Heliox OS to kill the process by providing its PID.~/.heliox/quarantine/and confirm that the executable file has been relocated here, renamed with a timestamp, and can no longer be executed.[Quarantine Vault]success audit entry was properly appended.Checklist
pytestfor backend,npm run testfor frontend)Screenshots / recordings (if UI change)
N/A - Backend SystemAgent operation.
GSSoC declaration