GithubHelp home page GithubHelp logo

mahmoudzohdy / fileredirector Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 0.0 52 KB

FileRedirector

License: MIT License

C 80.99% C++ 19.01%
driver file-hider filesystem minifilter-driver driver-process-communication fileredirection port-communication anti-analysis kernel obfuscation

fileredirector's Introduction

FileRedirector

This Project is for Windows File System Access Redirection.

The Kernel Driver register for Pre Create Operation (IRP_MJ_CREATE) and Pre Network Query Open (IRP_MJ_NETWORK_QUERY_OPEN) with the Filter Manger, then when a User-Mode process try to access any file it send the DOS File Name and the Process ID of the requestor process to the User-Mode Client, then the User-Mode Client will check if the File Path needs to be redirected and if the process that is accessing it is authorized for this access and if not authorized it will redirect it to another path of your choose (Need to be a DOS file path).

In our case the User-Mode Client (UserClient.exe) checks if any access to the file File1.txt (in the same directory as UserClient.exe) it will redirect it to the file File2.txt.

for example, if UserClient.exe is in C:\Redirector\UserClient.exe and you try to access C:\Redirector\File1.txt it will be redirected to the file C:\Redirector\File2.txt

You can do the mapping as you like as long as the New Path is in the DOS format.

Testing

it is tested on windows 10 and windows 8.1 0x64/0x32 bit

Note

i do not redirect/check file access originated from the kernel, you can disable this by commenting the bellow in the following functions FileRedirectorPreNetworkQueryOpen, FileRedirectorPreCreate

    if (Cbd->RequestorMode == KernelMode)
        return FLT_PREOP_SUCCESS_NO_CALLBACK;

Kindly note that this is only for educational purposes only

Reference

https://github.com/microsoft/Windows-driver-samples/tree/main/filesys/miniFilter/simrep

License:

MIT

fileredirector's People

Contributors

mahmoudzohdy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.