检测app.any.run沙箱环境,先写了个遍历进程的demo传上去,看看进程列表有什么沙箱特有的进程。
发现个进程很奇怪,路径是:c:\windows\system32\host.exe ,竟然没有随机名
正常的系统下是没有这个文件的,所以就拿这个来做了,效果图
检测代码:
#include "stdafx.h"
#include <windows.h>
#include <string>
#include <fstream>
#include <iostream>
using namespace std;
inline bool exists_test0(const std::string& name) {
ifstream f(name.c_str());
return f.good();
}
int _tmain(int argc, _TCHAR* argv[])
{
string test_file = "c:\\windows\\system32\\host.exe";
if (exists_test0(test_file))
{
cout << "detected sandbox" << endl;
}
else
{
cout << "executing malicious code" << endl;
}
system("pause");
return 0;
}