-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Integrated Secure File Erasure After Moving Sensitive Files into Encrypted VeraCrypt Volumes (VERASER) - Close Data Recovery Vulnerability #1627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Implemented secure deletion engine (DoD/NIST/SSD-TRIM) and cross-platform wxWidgets GUI dialogs.
9dc1ad2 to
70464aa
Compare
|
It is recommended to add a cascading erasure similar to VeraCrypt's cascading algorithm, following the sequence: AES-CTR > Random Number XOR Encryption > ChaCha20 Encryption > Zero-Filled Padding. |
Thank you for the suggestion and taking the time to review the code. I appreciate it. I agree with the rationale. Relying on hardware AES implies trusting the controller implementation, so introducing a distinct algorithm like ChaCha20 in a cascade (AES-CTR > Random XOR > ChaCha20 > Zero) to improve security. For implementation I will integrate RFC-compliant ChaCha20 implementation directly into veraser.c This keeps the plugin portable and avoids linking dependencies with VeraCrypt's core. I will add this as a specific new option as "SSD (Cascading)". This is because SSDs have a limited write lifespan. If the SSD enters a four-step cycle for each move to disk, its lifespan will be depleted four times faster. Since cascading is computationally more expensive, it fits for users requiring maximum security. I'll start the implementation and push the updates to this PR shortly. |
That's fantastic! It would be even better if metadata such as file names and file sizes could also undergo cascading erasure. The specific process should be implemented after erasing the file (before deleting it): 10 rounds of random renaming,random modification of file timestamps → 3 rounds of overwriting with same-named files (0 bytes) → file deletion → clearing of file system metadata. |
issue : #1623
repo : https://github.com/canomer/VERASER-VeraCrypt-Secure-Copy-Delete-Plugin
Desired behavior
When you copy a file into a mounted encrypted volume, most of users think that the file is “safe” once it’s inside the container. The reality is, the original file remains on the host drive (temporary files, metadata, the original copy itself), and can be recovered by using forensic tools. So I wanted to close this gap.
What I made: an independent plugin that adds two simple, focused actions:
• Secure Copy : stream the source file that you want to encrypt forever, directly into the mounted encrypted volume so you avoid creating extra temp files.
• Secure Delete : after a verified copy, overwrite the original using a careful fsync-aware routine, then unlink and sync the parent directory to reduce leftover artifacts.
For HDDs and many classic file-system setups this workflow meaningfully reduces the chance that a forensic recovery will find the original. It’s not a absolute solution (SSDs, TRIM, snapshots and backups are robust. The repo documents the limitations) but it increases security for users who copy sensitive files.
How it works :
• copy target file to the destination
• verify it copied
• overwrite-with-sync
• remove the overwrited original file
All operations prioritize avoiding extra plaintext and minimizing race conditions (O_NOFOLLOW/open-by-fd, inode checks, fsync where needed).
the code is open and compilable.
https://github.com/canomer/VERASER-VeraCrypt-Secure-Copy-Delete-Plugin
Note: Works for VeraCrypt latest master (1.26.27) and tested on Windows 10/11 and Ubuntu 18.04/22.04
Hardware note: This workflow is most effective on conventional (CMR) HDDs. Overwrite-based secure deletion is not reliably effective on many SSDs, SMR drives, or devices using a flash translation layer (FTL)/TRIM.
Warning note: This plug-in developed on VeraCrypt version 1.26.27
Problem Statement
When users copy sensitive files into VeraCrypt encrypted volumes, the original unencrypted file remains recoverable on the source drive even after standard deletion. This creates a critical security vulnerability:
Deleteonly removes directory entries, leaving file data intact in unallocated spaceReal-World Attack Scenario:
Proposed Solution: VERASER Plugin
VERASER (VeraCrypt Erasure) integrates cryptographically secure file deletion directly into VeraCrypt's interface:
Core Features
1. Secure Copy Operation
2. Secure Delete Operation
Algorithm Suite (7 Options)
Implementation Details
Integration Points:
File Hierarchy
Technical Specifications:
Code Changes:
veraser.c(950 lines),veraser.h(120 lines)Why This Feature Should Be Added
1. Closes Critical Security Gap
2. Standards Compliance
3. User Experience
4. Competitive Advantage
5. Implementation Quality
Screenshots/Mockup/Designs
Additional information
Implementation Status
This is not a proposal - it is a complete, tested, production-ready implementation.
Completed Work
Code Implementation (v1.0):
Documentation:
Integration Safety
Non-Invasive Design:
Regression Testing:
Deployment Readiness
Build System:
Cross-Platform Roadmap:
Deliverables Ready for Review
References
Standards Documentation:
Competitive Analysis:
Repository & Demo
Available for Review:
Contact Information:
Your Environment
Please tell us more about your environment
VeraCrypt version: 1.26.27
Operating system and version: Windows 10 22H2 (Build 19045.6216) & Windows 11 23H2 (Build 22631)
System type: 64-bit (x64)
Development Environment:
Followed exact same steps with VeraCrypt building docs (https://veracrypt.io/en/CompilingGuidelineWin.html)
Testing Environment:
In VMware
Primary System:
Hardware Tested: AMD, NVMe SSD, SATA HDD
Thank you for considering this feature! I believe VERASER would significantly enhance VeraCrypt's security posture by providing a complete data protection lifecycle solution.