2

I have to write an on-the-fly encryptor for Windows to encrypt all copied files, To implement this I need some detail about how windows FileCopy works.

So I need a description such as the following: the CreateFile is called, creates a destination file and then reads from source file and then writes to the destination file using WriteFile...

Note that I cannot use any (File system) filter driver; I've to use a user-mode hook.

tshepang
  • 12,111
  • 21
  • 91
  • 136
Kamran
  • 387
  • 1
  • 3
  • 19
  • 1
    You won't be able to achieve this reliably: Files can be copied in many ways, and you cannot intercept them all. If you want to reliably encrypt file contents you *must* do so at the filesystem level. – Nik Bougalis Jun 14 '14 at 13:25
  • @NikBougalis Thanks, your right but if i want to use Drivers i need to Code Sign Certificate too, unfortunately i don't have any Code sign now! and have to doing it using user-land solutions! – Kamran Jun 14 '14 at 13:32
  • 1
    I think you should limit the amount of Windows calls you want to cover. The OS won't even be able to distinguish between copying and writing an entirely new file if all is done in software. – Maarten Bodewes Jun 14 '14 at 13:53
  • @owlstead Thanks for your help, It's interesting when i set a global hook on `CopyFile` API function and then copy a file anything not happens !! – Kamran Jun 15 '14 at 05:03
  • I think i should to replace default windows copy something like "teracopy" tool, I asked new question about this at [How teracopy replace default windows copy](http://stackoverflow.com/questions/24227116/how-teracopy-replace-default-windows-copy) – Kamran Jun 15 '14 at 06:27

0 Answers0