c++ - 从 C++ 连接到 Windows 文件复制 API

标签 c++ windows hook c++builder file-copying

我需要 hook copyfile 以便在复制恶意文件时停止进程。看到猫人问的一个问题

Hook into the Windows File Copy API from C#

他提到在 C++ 中有一个解决这个问题的方法。我正在使用 embarcadero c++ builder(非 MFC)。此解决方案是否适用于 C++ 构建器?如果适用,任何人都可以发布链接或提示我如何在 C++ 中挂接复制文件吗?

最佳答案

您没有具体说明“停止进程”的含义 - 是否有您感兴趣的特定进程,或者您是否想阻止整个系统中的所有文件拷贝。如果您想阻止整个系统中的所有文件拷贝,那么您正在寻找的是 file system filter driver .这是非常高级的,因为您将编写内核模式驱动程序。 Not for the faint of heart .另请注意,您最终可能会自己被标记为恶意软件,因为恶意软件会尝试 Hook 文件系统以隐藏自己。

关于c++ - 从 C++ 连接到 Windows 文件复制 API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8201352/

相关文章:

c++ - 将字符发送到控制台应用程序

Windows 10 在 Bash Ubuntu 中打开目录

multithreading - 低级键盘 Hook 不在 UI 线程

c++ - 暂停低级 Hook 的最佳方法(winapi)

c++ - 使用 C++ 和 EasyHook 注入(inject) x64 进程 Hook x86-DLL 的 x64-DLL 失败

c++ - C++ 错误 : redefinition of class constructor using templates

c++ - 'compiling and linking' 和 'compiling'(使用 g++)有什么区别?

windows - NTFS 文件系统的 USN Journal 是否可以大于其声明的大小?

c++ - 以特定值拆分数组 C++

linux - CMake/CPack : Preferred package generators for different platforms