问大家一个关于 Windows 安全中心的问题。
同事问我 Windows 安全中心的勒索软件防护是不是只防写不防读,
于是我自己写了个 C++程序测试了一下,源代码如下:
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main() {
string data;
ifstream txtfile;
txtfile.open("I:\\test.txt");
txtfile >> data;
cout << "受保护的文本内容为:" << endl;
cout << data << endl;
txtfile.close();
ofstream txtfile2;
txtfile2.open("I:\\test.txt");
string input;
cout << "请输入要写入的内容:" << endl;
cin >> input;
txtfile2 << input << endl;
txtfile2.close();
cin.get();
return 0;
}
结果正如视频中所见,该程序对 exFAT 的移动 SSD ( I 盘)的 test.txt 进行读操作,Windows 安全中心没有提示,写操作则有提示拦截,但仍然被写入,未拦截成功。这是为什么呢?
补充:同事在 NTFS 的系统盘上做实验,可以成功拦截写入,但也无法拦截读取。

