https://github.com/0blu/dokanfilereplacer
Virtual filesystem that is able to replace files at runtime (Great for TOCTOU exploits)
https://github.com/0blu/dokanfilereplacer
Last synced: 7 months ago
JSON representation
Virtual filesystem that is able to replace files at runtime (Great for TOCTOU exploits)
- Host: GitHub
- URL: https://github.com/0blu/dokanfilereplacer
- Owner: 0blu
- License: apache-2.0
- Created: 2020-02-20T23:44:28.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-21T12:50:43.000Z (over 6 years ago)
- Last Synced: 2025-06-02T05:15:21.015Z (about 1 year ago)
- Language: C#
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dokan File Replacer
This is just a simple project to create a virtual filesystem with [Dokan](https://github.com/dokan-dev/dokan-dotnet)
which is able to replace files on the fly (even if there are already opened from another process).
Works best with access behaviors that open a file just once (like `File.ReadAllText(...)`).
## Example
The example shows how to use this library to intercept every second request that is made.
Output:
```
--- Reading files with File.ReadAllText("R:\hello world.txt") ---
[PROXY] File '\hello world.txt' was requested
Output 1: >> 'Just hello world' <<
[PROXY] File '\hello world.txt' was requested
[PROXY] Replace file!
Output 2: >> 'Definitely not the real file!' <<
...
```
---
The example mirror driver from Dokan was used and modified for this project.
License: [Apache License 2.0](./LICENSE.txt)