The SafeWrite Hook demonstrates how to intercept file writes on a Windows system. Instead of writing directly to disk, changes are stored in memory until you decide whether to commit them or not. This approach allows you to test updates, modifications, or temporary data without risking permanent changes. It’s a sandbox-like mechanism that helps protect your files and system integrity. Thus, a VirtualSpace Proof Of Concept. 🤝
- Intercept & Queue: Captures all file-write operations before they reach the disk using minhook.
- Controlled Commits: Lets you choose to apply (commit) or discard queued data in your sandbox.
- Optional Encryption: Keeps queued data safe in memory/sandbox. Using standard XOR for POC purposes.
- Partial or Full Writes: Commit only parts of your changes or everything at once, essential for debugging.
- Run the Tool – It hooks into the Windows
WriteFile
function at runtime. - Make Changes – As you or another program attempts to write data, it gets stored (and encrypted) in memory.
- Choose an Action – Commit some or all changes, or discard them altogether.
- See Results – Check the target file on disk to view the final outcome.
- Developers who need a safe testing environment.
- Security Enthusiasts looking at data interception techniques.
- Anyone interested in controlling how data is written to disk.
This project is released under the MIT License. Feel free to fork, modify, and share!