目录
-
用户界面伪装检测方法
-
1.检查操作系统中是否存在具有特定类名的窗口
-
2.检查顶层窗口数量是否过少
-
识别标志
-
反制措施
-
归功于
用户界面伪装检测方法
这一组描述的技术滥用了这样一个事实:一些窗口的名称只存在于虚拟环境中,而不是通常的主机操作系统。此外,主机操作系统包含大量的窗口,而虚拟机和沙盒则倾向于将打开的窗口保持在最低水平。它们的数量被检查出来,并得出结论,这是否是一个虚拟机。
1.检查操作系统中是否存在具有特定类名的窗口
检测表
检查操作系统中是否存在具有以下类别名称的窗口: |
|
检测 |
类别名称 |
VirtualBox |
VBoxTrayToolWndClass |
VBoxTrayToolWnd |
代码样本
1
2
3
4
5
6
7
8
9
10
|
BOOL vbox_window_class() { HWND hClass = FindWindow(_T( "VBoxTrayToolWndClass" ), NULL); HWND hWindow = FindWindow(NULL, _T( "VBoxTrayToolWnd" )); if (hClass || hWindow) return TRUE; else return FALSE; } |
该代码样本的作者:al-khaser project
2.检查顶层窗口数量是否过少
如上所述,主机操作系统包含大量的窗口,而虚拟机和沙盒则努力将打开的窗口保持在可能的最低限度。窗口数量被测量,并得出结论,这是否是一个虚拟机。
如果操作系统中的窗口太少,这可能是虚拟环境的一个迹象。常规的主机有很多(>10)顶级窗口。
代码样本
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
BOOL CALLBACK enumProc( HWND , LPARAM lParam) { if ( LPDWORD pCnt = reinterpret_cast < LPDWORD >(lParam)) *pCnt++; return TRUE; } bool enumWindowsCheck( bool & detected) { DWORD winCnt = 0; if (!EnumWindows(enumProc, LPARAM (&winCnt))) { std::cerr << "EnumWindows() failed\n" ; return false ; } return winCnt < 10; } |
识别标志
没有为这个规避技术提供识别标志,因为很难说代码的目的是执行某种规避技术而不是 “合法 “行动。
反制措施
-
versus windows with certain class names: Exclude windows with particular names from enumeration or modify these names.
-
versus checking top level windows’ number: Create fake windows in the system so that their number will not be small or equal to the predefined numbers.
暂无评论内容