39 #define LIX_KERNEL_MAX_PAGES 16384 41 #define LIX_BANNER_START "Linux version " 43 #define LIX_MODULE_MAPPING_SPACE_START 0xffffffffa0000000 44 #define LIX_MODULE_MAPPING_SPACE_END 0xfffffffffeffffff 46 #define LIX_KAISER_ENABLED_PCP_OFFSET_CAP 0xE000UL 88 for (
DWORD i = 0; i < 3; i++)
91 while (end < BufferLength && Buffer[end])
94 if (
'.' == Buffer[end] ||
' ' == Buffer[end] ||
'-' == Buffer[end] ||
'+' == Buffer[end])
97 hasBackport =
'-' == Buffer[end];
100 else if (Buffer[end] <
'0' || Buffer[end] >
'9')
113 if (end - start >=
sizeof(c))
115 WARNING(
"[WARNING] Version number too big (%d/%zu)\n", end - start,
sizeof(c));
119 memcpy(c, &Buffer[start], end - start);
129 gLixGuest->
Version.Sublevel = v[2];
133 TRACE(
"[LIXGUEST] No backport info!");
135 gLixGuest->
Version.Backport = 0;
140 while (end < BufferLength && Buffer[end] >=
'0' && Buffer[end] <=
'9')
145 if (end - start >=
sizeof(c))
147 WARNING(
"[WARNING] Backport number too big (%d/%zu)\n", end - start,
sizeof(c));
149 gLixGuest->
Version.Backport = 0;
153 memset(c, 0,
sizeof(c));
154 memcpy(c, &Buffer[start], end - start);
160 TRACE(
"[LIXGUEST] We run kernel version %d.%d.%d-%d (%08x)\n",
241 ERROR(
"[ERROR] IntPhysMemMap failed for %016llx (%016llx): 0x%08x\n", tr.
PhysicalAddress, gva, status);
247 DWORD verMax = parsed;
255 TRACE(
"[LIXGUEST] Found a 'Linux version ' at %llx. The start of rodata is at %llx\n", gva + parsed, gva);
268 if (pPage[verMax] ==
'\0')
270 LOG(
"[LIXGUEST] Linux version complete: %s\n", &pPage[parsed]);
316 WARNING(
"[WARNING] Could not find kernel version! Retry ...");
354 ERROR(
"[ERROR] IntVirtMemMap failed for %016llx: %08x\n", kernelBase, status);
368 ERROR(
"[ERROR] IntVirtMemMap failed for %016llx: %08x\n", kernelBase, status);
377 ERROR(
"[ERROR] Failed finding the base of the kernel, bailing out...\n");
417 ERROR(
"[ERROR] Could not load dist sigs from update buffer.");
424 WARNING(
"[WARNING] IntLixGuestFindKernelVersionAndRo failed for syscall %llx: %08x\n", SyscallHandler, status);
456 QWORD funcStart, funcEnd;
459 QWORD addrs[2] = { 0 };
464 ERROR(
"[ERROR] IntKsymFindByName could not find search_exception_tables\n");
468 while (funcStart < funcEnd)
473 ERROR(
"[ERROR] IntDecDecodeInstruction failed: %08x\n", status);
477 funcStart += instrux.Length;
479 if (ND_INS_MOV != instrux.Instruction || ND_OP_IMM != instrux.Operands[1].Type)
486 addrs[0] =
SIGN_EX_32(instrux.Operands[1].Info.Immediate.Imm);
490 addrs[1] =
SIGN_EX_32(instrux.Operands[1].Info.Immediate.Imm);
501 gLixGuest->
Layout.
ExTableEnd = ((addrs[0] > addrs[1]) ? addrs[0] : addrs[1]);
521 const char *memoryFuncs[] =
558 ERROR(
"[ERROR] IntKsymFindByName could not find do_exit\n");
562 while (gva < ksymEnd)
569 ERROR(
"[ERROR] Failed decoding instruction at 0x%016llx: %08x\n", gva, status);
573 gva += instrux.Length;
575 if (instrux.Instruction == ND_INS_MOV &&
576 instrux.OperandsCount == 2 &&
577 instrux.Operands[1].Type == ND_OP_MEM &&
578 instrux.Seg == ND_PREFIX_G2_SEG_GS)
608 QWORD cpuNumberAddress;
611 if (!cpuNumberAddress)
613 QWORD gva, functionEnd;
616 LOG(
"[WARNING] Failed finding 'cpu_number' will try with xen_halt");
621 WARNING(
"[WARNING] IntKsymFindByName could not find xen_halt\n");
625 while (gva < functionEnd)
630 ERROR(
"[ERROR] IntDecDecodeInstruction failed at %llx: %08x\n", gva, status);
634 gva += instrux.Length;
636 if (instrux.Instruction == ND_INS_MOV &&
637 instrux.OperandsCount == 2 &&
638 instrux.Operands[1].Type == ND_OP_MEM &&
639 instrux.Seg == ND_PREFIX_G2_SEG_GS)
641 DWORD cpuNumberOffset = instrux.Displacement;
643 if (instrux.IsRipRelative)
645 cpuNumberOffset += (
DWORD)gva;
650 LOG(
"[OFFSETS] 'current cpu' gs offset: 0x%x\n", cpuNumberOffset);
686 ERROR(
"[ERROR] IntKsymFindByName could not find set_tls_desc\n");
690 while (gva < ksymEnd)
697 ERROR(
"[ERROR] IntDecDecodeInstruction failed at %llx: %08x\n", gva, status);
701 if (instrux.Instruction == ND_INS_ADD &&
702 instrux.OperandsCount == 3 &&
703 instrux.Operands[1].Type == ND_OP_IMM &&
704 instrux.Operands[0].Type == ND_OP_REG &&
705 instrux.Operands[0].Info.Register.Reg == NDR_RDI)
707 if (instrux.Operands[1].Info.Immediate.Imm <
PAGE_SIZE * 3)
710 LOG(
"[OFFSETS] 'thread_struct' offset (task_struct): 0x%x\n",
717 WARNING(
"[WARNING] Candidate 'thread_struct' offset (0x%lx) is bigger than 0x%x ...\n",
718 instrux.Operands[1].Info.Immediate.Imm,
PAGE_SIZE * 3);
722 gva += instrux.Length;
747 DWORD paramReg = NDR_RDI;
752 WARNING(
"[WARNING] IntKsymFindByName could not find get_mm_exe_file\n");
756 while (gva < ksymEnd)
763 ERROR(
"[ERROR] IntDecDecodeInstruction failed at %llx: %08x\n", gva, status);
768 if (instrux.Instruction == ND_INS_MOV &&
769 instrux.OperandsCount == 2 &&
770 instrux.Operands[0].Type == ND_OP_REG &&
771 instrux.Operands[1].Type == ND_OP_REG &&
772 (instrux.Operands[1].Info.Register.Reg == NDR_RDI ||
773 instrux.Operands[1].Info.Register.Reg == paramReg))
775 paramReg = instrux.Operands[0].Info.Register.Reg;
778 if (instrux.Instruction == ND_INS_MOV &&
779 instrux.OperandsCount == 2 &&
780 instrux.Operands[1].Type == ND_OP_MEM &&
781 instrux.Operands[1].Info.Memory.HasBase &&
782 instrux.Operands[1].Info.Memory.HasDisp &&
783 (instrux.Operands[1].Info.Memory.Base == NDR_RDI ||
784 instrux.Operands[1].Info.Memory.Base == paramReg) &&
785 instrux.Operands[1].Info.Memory.Disp <
PAGE_SIZE &&
786 instrux.Operands[0].Type == ND_OP_REG &&
787 instrux.Operands[0].Info.Register.Type == ND_REG_GPR &&
790 LIX_FIELD(MmStruct, ExeFile) = (
DWORD)instrux.Operands[1].Info.Memory.Disp;
791 LOG(
"[OFFSETS] mm_struct->exe_file offset: 0x%x\n",
LIX_FIELD(MmStruct, ExeFile));
796 gva += instrux.Length;
827 QWORD currentSyscallAddress;
828 QWORD foundSyscallAddress = 0;
830 *ProperSyscallAddress = 0;
832 if ((SyscallAddress >> 31) & 1)
837 currentSyscallAddress = SyscallAddress;
839 while (currentSyscallAddress - SyscallAddress <
PAGE_SIZE)
845 if (!ND_SUCCESS(status))
847 ERROR(
"[ERROR] IntDecDecodeInstruction failed with status 0x%08X", status);
851 if (instrux.Instruction == ND_INS_MOV &&
852 instrux.OperandsCount == 2 &&
853 instrux.Operands[0].Info.Register.Reg == NDR_RDI &&
854 instrux.Operands[1].Type == ND_OP_IMM &&
857 foundSyscallAddress = instrux.Operands[1].Info.Immediate.Imm;
859 else if (0 != foundSyscallAddress &&
860 ((instrux.Instruction == ND_INS_CALLNR &&
861 instrux.Operands[0].Type == ND_OP_OFFS &&
862 instrux.Operands[0].Info.RelativeOffset.Rel < 0x20) ||
863 (instrux.Instruction == ND_INS_JMPNI &&
864 instrux.Operands[0].Type == ND_OP_REG &&
865 instrux.Operands[0].Info.Register.Reg == NDR_RDI)))
867 *ProperSyscallAddress = foundSyscallAddress;
871 currentSyscallAddress += instrux.Length;
894 ERROR(
"[ERROR] IntLixResolveCurrentProcessOffset failed: 0x%08x\n", status);
901 WARNING(
"[WARNING] IntLixResolveCurrentCpuOffset failed: 0x%08x\n", status);
908 WARNING(
"[WARNING] IntLixResolveExeFileOffset failed: 0x%08x\n", status);
915 ERROR(
"[ERROR] IntLixResolveThreadStructOffset failed: 0x%08x\n", status);
959 ERROR(
"[ERROR] IntLixKernelWriteProtect failed: 0x%08x\n", status);
960 returnStatus = status;
969 ERROR(
"[ERROR] IntLixKernelReadProtect failed: 0x%08x\n", status);
970 returnStatus = status;
979 ERROR(
"[ERROR] IntLixVdsoProtect failed: 0x%08x\n", status);
980 returnStatus = status;
999 ERROR(
"[ERROR] IntLixIdtProtectAll failed: 0x%08x\n", status);
1009 ERROR(
"[ERROR] IntMsrSyscallProtect failed: 0x%08x\n", status);
1010 returnStatus = status;
1019 ERROR(
"[ERROR] IntCr4Protect failed: 0x%08x\n", status);
1020 returnStatus = status;
1026 return returnStatus;
1068 ERROR(
"[ERROR] IntKernVirtMemRead failed for %llx: %08x\n", SyscallGva, status);
1072 for (
DWORD i = 0; i <
sizeof(pSyscall);)
1079 if (
sizeof(pSyscall) - i < ND_MAX_INSTRUCTION_LENGTH)
1084 ERROR(
"[ERROR] Invalid instruction in syscall @ %llx: %08x\n", SyscallGva, status);
1089 (instrux.Instruction == ND_INS_JMPNR &&
1090 instrux.Operands[0].Type == ND_OP_OFFS))
1092 LOG(
"[INFO] Found a JMP right after SWAPGS, skip until that (+%02x)\n", instrux.RelativeOffset);
1093 i += instrux.RelativeOffset;
1096 i += instrux.Length;
1098 if (instrux.Instruction == ND_INS_TEST &&
1099 instrux.Operands[0].Type == ND_OP_MEM &&
1100 instrux.Seg == ND_PREFIX_G2_SEG_GS)
1102 gsOffset = instrux.Displacement;
1105 if (instrux.Instruction == ND_INS_MOV_CR &&
1106 instrux.Operands[0].Type == ND_OP_REG &&
1107 instrux.Operands[0].Info.Register.Type == ND_REG_CR &&
1108 instrux.Operands[0].Info.Register.Reg == NDR_CR3 &&
1109 instrux.Operands[1].Type == ND_OP_REG &&
1110 instrux.Operands[1].Info.Register.Type == ND_REG_GPR)
1130 ERROR(
"[ERROR] The value of misplacement operand (0x%08x) from instruction 'TEST [GS:displacement], immediate' " 1139 ERROR(
"[ERROR] IntGsRead failed: %08x\n", status);
1152 WARNING(
"[WARNING] IntKernVirtMemFetchDword failed for %llx: %08x\n", gsBase + gsOffset, status);
1166 LOG(
"[LIXGUEST] KPTI cannot be reliable detected... Defer it!\n");
1194 QWORD gvaStart, gvaEnd;
1197 DWORD nrOfGvas = 0, iGva;
1203 ERROR(
"[ERROR] IntKsymFindByName failed for mark_rodata_ro\n");
1207 while (gvaStart < gvaEnd)
1212 WARNING(
"[WARNING] IntDecDecodeInstruction failed: %08x\n", status);
1216 gvaStart += instrux.Length;
1217 gva = instrux.Operands[1].Info.Immediate.Imm;
1219 if (!(instrux.Operands[0].Type == ND_OP_REG && instrux.Operands[1].Type == ND_OP_IMM) ||
1220 ((0xFFFFFFFF80000000 & gva) != 0xFFFFFFFF80000000))
1225 for (iGva = 0; iGva < nrOfGvas; iGva++)
1227 if (allGvas[iGva] == gva)
1233 if (nrOfGvas != iGva)
1238 for (iGva = nrOfGvas; (iGva > 0) && (allGvas[iGva - 1] > gva); iGva--)
1240 allGvas[iGva] = allGvas[iGva - 1];
1243 allGvas[iGva] = gva;
1262 for (iGva = 4; iGva < nrOfGvas; iGva++)
1312 QWORD ksymEnd, ksymEndAux;
1331 ERROR(
"[ERROR] IntKsymFindByName could not find arch_crash_save_vmcoreinfo\n");
1338 ERROR(
"[ERROR] IntKsymFindByName could not find vmcoreinfo_append_str\n");
1342 WORD funcCallCount = 0;
1343 while (ksymStart < ksymEnd)
1350 ERROR(
"[ERROR] IntDecDecodeInstruction failed at GVA %llx: 0x%08x.\n", ksymStart, status);
1355 if (instrux.Instruction == ND_INS_MOV &&
1356 instrux.Operands[0].Type == ND_OP_REG &&
1357 instrux.Operands[0].Info.Register.Reg == NDR_RDX &&
1358 instrux.Operands[1].Type == ND_OP_IMM)
1360 pgdAddr = instrux.Operands[1].Info.Immediate.Imm;
1363 if (instrux.Instruction == ND_INS_CALLNR)
1365 QWORD ksymRelAux = ksymStartAux - (ksymStart + 5);
1367 if (instrux.Operands[0].Info.RelativeOffset.Rel == ksymRelAux)
1372 if (funcCallCount == 2)
1379 ksymStart += instrux.Length;
1406 QWORD patchGva, address;
1416 list = gKernelDrivers.
Head;
1418 while (list != &gKernelDrivers)
1435 TRACE(
"[WARNING] Incoming patch at address 0x%llx with no corresponding driver. Will ignore!\n", patchGva);
1439 if (length >
sizeof(ActivePatch->Data))
1441 WARNING(
"[WARNING] Patch with size %d... We ignore it!\n", length);
1448 ERROR(
"[ERROR] IntKernVirtMemRead failed: 0x%08x. Patch at GVA 0x%llx will be ignored.\n", status, patchGva);
1452 ActivePatch->Gva = patchGva;
1453 ActivePatch->Length = length;
1519 ERROR(
"[ERROR] IntKernVirtMemFetchQword failed for %llx: %08x\n", jumpEntry, status);
1523 pActivePatch->
Gva = gva;
1524 pActivePatch->
Length = 5;
1554 ERROR(
"[ERROR] IntKsymInit failed: 0x%08x", status);
1561 ERROR(
"[ERROR] Failed finding '_etext' symbol\n");
1575 ERROR(
"[ERROR] IntKsymFindByName could not find _sinittext\n");
1582 ERROR(
"[ERROR] IntLixFindDataStart failed: %08x\n", status);
1589 WARNING(
"[WARNING] Could not find ex_table limits: 0x%08x\n", status);
1597 ERROR(
"[ERROR] IntKsymFindByName could not find _edata\n");
1604 ERROR(
"[ERROR] IntKsymFindByName could not find __start___ex_table\n");
1611 ERROR(
"[ERROR] IntKsymFindByName could not find __start_rodata\n");
1618 ERROR(
"[ERROR] IntKsymFindByName could not find __end_rodata\n");
1623 if (
LIX_FIELD(Info, HasAlternateSyscall))
1628 WARNING(
"[WARNING] Could not find proper syscall gva. Agent injection may fail!\n");
1636 TRACE(
"[LIXGUEST] .kernel : 0x%016llx - 0x%016llx (%4lld kB)\n",
1640 TRACE(
"[LIXGUEST] .text : 0x%016llx - 0x%016llx (%4lld kB)\n",
1643 TRACE(
"[LIXGUEST] .data : 0x%016llx - 0x%016llx (%4lld kB)\n",
1646 TRACE(
"[LIXGUEST] .rodata : 0x%016llx - 0x%016llx (%4lld kB)\n",
1653 ERROR(
"[ERROR] Failed initializing the linux kernel driver: 0x%08x\n", status);
1662 ERROR(
"[ERROR] IntLixGuestResolveOffsets failed: 0x%08x\n", status);
1694 ERROR(
"[ERROR] IntLixIdtUnprotectAll failed: 0x%08x\n", status);
1700 ERROR(
"[ERROR] IntCr4Unprotect failed: 0x%08x\n", status);
1718 TRACE(
"[INTRO-UNINIT] Uninit allocated guest memory ...\n");
1770 CHAR ksymbol[126] = { 0 };
1776 TRACE(
"[LIXGUEST] %s attempt on detour code from @0x%016llx (%s).\n",
1780 TRACE(
"[LIXGUEST] Instruction:");
1811 CHAR ksymbol[126] = { 0 };
1816 TRACE(
"[LIXGUEST] %s attempt on detour code from @0x%016llx (%s).\n",
1820 TRACE(
"[LIXGUEST] Instruction:");
1851 CHAR ksymbol[126] = { 0 };
1854 TRACE(
"[LIXGUEST] Write/Read attempt on agent content from @0x%016llx (%s).\n",
1857 TRACE(
"[LIXGUEST] Instruction:");
1905 if (
sizeof(*pHypercallPage) > gLixGuest->
MmAlloc.
Detour.Data.Length)
1907 ERROR(
"[ERROR] Linux hypercall page size exceed %d bytes", gLixGuest->
MmAlloc.
Detour.Data.Length);
1913 ERROR(
"[ERROR] Linux detours content size exceed %d bytes", gLixGuest->
MmAlloc.
Detour.Data.Length);
1919 ERROR(
"[ERROR] Linux agents content size exceed %d bytes", gLixGuest->
MmAlloc.
Detour.Data.Length);
1957 ERROR(
"[ERROR] IntKsymFindByName could not find 'd_path'\n");
1964 ERROR(
"[ERROR] IntKernVirtMemWrite failed: 0x%08x\n", status);
1968 TRACE(
"[LIXGUEST] Deployed detours (code/data) @0x%016llx.", gLixGuest->
MmAlloc.
Detour.Data.Address);
1973 ERROR(
"[ERROR] IntKernVirtMemWrite failed: 0x%08x\n", status);
1977 TRACE(
"[LIXGUEST] Deployed agents @0x%016llx.", gLixGuest->
MmAlloc.
Agent.Address);
2002 DWORD left = Length;
2012 ERROR(
"[ERROR] IntVirtMemMap failed for %llx: %08x\n", gva, status);
2022 }
while (gva < Gva + Length);
2045 ERROR(
"[ERROR] Failed to allocate guest virtual space for detours. Abort...\n");
2052 ERROR(
"[ERROR] The guest virtual address (0x%016llx) return by 'module_alloc' is not inside the module mapping " 2053 "region. Abort...\n", pRegs->
R8);
2061 TRACE(
"[LIXGUEST] Allocated guest virtual memory for detours data @ 0x%016llx (0x%x bytes)\n",
2067 TRACE(
"[LIXGUEST] Allocated guest virtual memory for detours code @ 0x%016llx (0x%x bytes)\n",
2074 TRACE(
"[LIXGUEST] Allocated guest virtual memory for agent code @ 0x%016llx (0x%x bytes)\n",
2082 ERROR(
"[ERROR] IntTranslateVirtualAddressEx failed with status: 0x%08x.\n", status);
2107 ERROR(
"[ERROR] IntHookObjectDestroy failed with status: 0x%08x\n", status);
2116 ERROR(
"[ERROR] IntHookObjectDestroy failed with status: 0x%08x\n", status);
2125 ERROR(
"[ERROR] IntHookObjectDestroy failed with status: 0x%08x\n", status);
2149 ERROR(
"[ERROR] IntHookObjectCreate failed: 0x%08x\n", status);
2164 ERROR(
"[ERROR] IntHookObjectHookRegion failed with status: 0x%x", status);
2179 ERROR(
"[ERROR] IntHookObjectHookRegion failed with status: 0x%x", status);
2188 ERROR(
"[ERROR] IntHookObjectCreate failed: 0x%08x\n", status);
2203 ERROR(
"[ERROR] IntHookObjectHookRegion failed with status: 0x%x", status);
2218 ERROR(
"[ERROR] IntHookObjectHookRegion failed with status: 0x%x", status);
2225 ERROR(
"[ERROR] IntHookObjectCreate failed: 0x%08x\n", status);
2240 ERROR(
"[ERROR] IntHookObjectHookRegion failed with status: 0x%x", status);
2266 static QWORD sysStateStart = 0;
2283 return (
int)systemState;
2325 WARNING(
"[WARNING] Trying to deploy init agent without clearing the memory: %d %d\n",
2330 if (pHandler == NULL)
2332 ERROR(
"[ERROR] Requested to deploy the uninit agent, but none was found!\n");
2345 TRACE(
"[LIXGUEST] Change page (0x%llx) attributes: Clear -> 0x%llx Set -> 0x%llx\n",
2348 LOG(
"[LIXGUEST] Deploy the uninit agent...\n");
2353 ERROR(
"[ERROR] IntLixAgentInject failed with status: 0x%08x.", status);
2379 ERROR(
"[ERROR] IntLixGuestAllocateFill failed with status: %08x\n", status);
2386 ERROR(
"[ERROR] IntLixGuestAllocateHook failed with status: %08x\n", status);
2393 ERROR(
"[ERROR] IntLixGuestAllocateDeploy failed with status: %08x", status);
2428 ERROR(
"[ERROR] IntLixGuestAllocateInit failed with status: 0x%08x.", status);
2484 ERROR(
"[ERROR] IntVirtMemSet failed for gva 0x%016llx with status: 0x%08x\n", addr, status);
2490 ERROR(
"[ERROR] IntLixTaskIterateGuestTasks failed, status = 0x%08x\n", status);
2499 ERROR(
"[ERROR] IntLixDrvIterateList failed, status = 0x%08x\n", status);
2509 ERROR(
"[ERROR] IntLixHookAll failed with status: 0x%08x", status);
2516 ERROR(
"[ERROR] IntLixGuestActivateProtection failed: 0x%08x\n", status);
2523 ERROR(
"[ERROR] IntNotifyIntroActive failed: 0x%08x\n", status);
2554 if (pHandler == NULL)
2566 ERROR(
"[ERROR] IntLixAgentInject failed with status: 0x%08x.", status);
2570 TRACE(
"[LIXGUEST] Allocation agent injected...");
2592 TRACE(
"[LIXGUEST] Clear the allocated guest memory...\n");
2597 ERROR(
"[ERROR] IntLixGuestClearGuestMemory failed with status: 0x%08x. (detour data)", status);
2603 ERROR(
"[ERROR] IntLixGuestClearGuestMemory failed with status: 0x%08x. (detour code)", status);
2609 ERROR(
"[ERROR] IntLixGuestClearGuestMemory failed with status: 0x%08x. (agent content)", status);
2634 QWORD originalSyscall, syscallGva, properSyscallGva, initPgd;
2648 memzero(gLixGuest,
sizeof(*gLixGuest));
2656 ERROR(
"[ERROR] IntSyscallRead failed: 0x%08x\n", status);
2660 originalSyscall = syscallGva;
2662 TRACE(
"[INTRO-INIT] Found SYSCALL handler @ %llx\n", syscallGva);
2667 syscallGva = properSyscallGva;
2669 TRACE(
"[INTRO-INIT] Found SYSCALL handler @ %llx (the proper one)", syscallGva);
2675 ERROR(
"[ERROR] IntLixGuestIsKptiActive failed: 0x%08x\n", status);
2682 WARNING(
"[WARNING] Failed locating the kernel image in memory starting from syscall %llx: %08X\n",
2683 syscallGva, status);
2697 ERROR(
"[ERROR] Unsupported guest OS loaded, will NOT activate protection!\n");
2709 ERROR(
"[ERROR] IntLixGuestInit failed, status = 0x%08x\n", status);
2718 ERROR(
"[ERROR] IntLixGuestFindPgd failed with status: 0x%08x\n", status);
2723 ERROR(
"[ERROR] Failed getting the init_mm: 0x%08x\n", status);
2730 ERROR(
"[ERROR] IntKernVirtMemFetchQword failed for %llx: 0x%08x\n",
2731 initMmGva +
LIX_FIELD(MmStruct, Pgd), status);
2739 ERROR(
"[ERROR] Translating init PGD failed, status = 0x%08x\n", status);
2753 ERROR(
"[ERROR] CPU %d doesn't appear to be used, skipping IDT...\n", i);
2770 ERROR(
"[ERROR] IntLixGuestAllocate failed with status: 0x%08x.", status);
2799 DWORD startOfDistroName = 0;
2801 DWORD endOfDistroName = 0;
2807 if (sizeOfString >= FullStringSize)
2812 while (startOfDistroName < sizeOfString && count != 3)
2819 ++startOfDistroName;
2827 if (startOfDistroName >= sizeOfString)
2832 endOfDistroName = startOfDistroName;
2833 while (endOfDistroName < sizeOfString &&
2838 endOfDistroName += 1;
2841 if (endOfDistroName >= sizeOfString)
2848 count = snprintf(VersionString, VersionStringSize,
"Kernel: %d.%d.%d-%d distro: ",
2853 if (count >= VersionStringSize)
2863 if (endOfDistroName - startOfDistroName >= VersionStringSize - count)
2870 if (strstr(FullString,
"el7uek"))
2872 snprintf(VersionString + count,
sizeof(
"Oracle"),
"%s",
"Oracle");
2876 snprintf(VersionString + count, endOfDistroName - startOfDistroName,
"%s", FullString + startOfDistroName);
#define INT_STATUS_GUEST_OS_NOT_SUPPORTED
Indicates that the guest operating system is not supported.
TIMER_FRIENDLY void IntDumpArchRegs(IG_ARCH_REGS const *Registers)
This function dumps the register values in a user friendly format.
BOOLEAN IntDetIsPtrInRelocatedCode(QWORD Ptr, DETOUR_TAG *Tag)
Checks if a guest pointer is inside the modified prologue of a function.
QWORD PhysicalAddress
The physical address to which VirtualAddress translates to.
DWORD CurrentCpuOffset
The offset of the CPU from GS.
LIX_OPAQUE_FIELDS OsSpecificFields
OS-dependent and specific information.
LIST_HEAD gKernelDrivers
List of all the drivers currently loaded inside the guest.
INTSTATUS IntIdtFindBase(DWORD CpuNumber, QWORD *Base, WORD *Limit)
Returns the IDT base and limit for a guest CPU.
#define CONTAINING_RECORD(List, Type, Member)
#define ROUND_UP(what, to)
INTSTATUS IntLixMmGetInitMm(QWORD *InitMm)
Find the address of the "init_mm" variable inside the kernel.
int IntLixGuestGetSystemState(void)
Get the system state of the Linux guest.
void IntGuestSetIntroErrorState(INTRO_ERROR_STATE State, INTRO_ERROR_CONTEXT *Context)
Updates the value of the gErrorState and the value of the gErrorStateContext.
HOOK_HEADER Header
Hook header.
Describes the information about a Linux active-patch.
INTSTATUS IntVirtMemUnmap(void **HostPtr)
Unmaps a memory range previously mapped with IntVirtMemMap.
Describes a handlers that contains the data required by the agent.
static INTSTATUS IntLixGuestFindPgd(QWORD *Pgd)
Searches for the system CR3.
QWORD OriginalPagesAttr
The original page protection-attributes for the allocated region.
INTSTATUS IntLixDrvCreateKernel(void)
Create the KERNEL_DRIVER object for the operating system kernel and activate the protection for it...
QWORD End
The end guest virtual address of ksym (exclusive).
static INTSTATUS IntLixResolveThreadStructOffset(void)
Decodes each instruction of the 'set_tls_desc' function and searches for 'MOV RDI, immediate' pattern in order to find the 'task_struct->thread_struct' offset.
QWORD ModuleAddress
The address of the allocated memory (module).
INTSTATUS IntKernVirtMemWrite(QWORD KernelGva, DWORD Length, void *Buffer)
Writes data to a guest kernel virtual memory range.
INTSTATUS IntHookObjectDestroy(HOOK_OBJECT_DESCRIPTOR **Object, DWORD Flags)
Destroy an entire hook object. All regions belonging to this object will be removed.
DWORD RoSize
The size of the .rodata (read-only).
IG_ARCH_REGS Regs
The current state of the guest registers.
LIX_ACTIVE_PATCH ActivePatch[lixActivePatchCount]
An array that contains information about the active-patches.
INTSTATUS IntIdtrProtect(void)
Enable IDTR protection.
struct _LIX_AGENT_UNINIT_ARGS::@104 Attr
INTSTATUS IntLixKernelReadProtect(void)
Activates kernel protection.
static INTSTATUS IntLixResolveCurrentCpuOffset(void)
Searches for the 'cpu_number' offset.
LIX_AGENT_HANDLER * IntLixAgentGetHandlerByTag(LIX_AGENT_TAG AgentTag)
Iterates through all agent handlers and search the entry that has the provided tag.
INTSTATUS IntLixTaskAdd(QWORD TaskGva, QWORD StaticDetected)
Creates and adds a Linux process in the internal list.
QWORD SystemCr3
The Cr3 used to map the kernel.
#define INT_STATUS_SUCCESS
#define PAGE_REMAINING(addr)
struct _LIX_GUEST_OS_SPECIFIC::@260 Inode
INT32 __cdecl strtol(const INT8 *nptr, INT8 **endptr, INT32 ibase)
static INTSTATUS IntLixResolveExeFileOffset(void)
Decodes each instruction of the 'get_mm_exe_file' function and searches for 'MOV REG, [RDI + Displacement]' pattern in order to find the 'mm_struct->exe_file' offset.
DWORD KernelSize
The size of the kernel.
#define INTRO_OPT_PROT_KM_LX
Enable kernel image protection (Linux only).
WORD IdtLimit
The current IDT limit.
struct _LIST_ENTRY * Flink
QWORD Start
The start guest virtual address of ksym.
QWORD RoDataStart
The guest virtual address where the read-only data starts.
INTSTATUS IntKsymFindByAddress(QWORD Gva, DWORD Length, char *SymName, QWORD *SymStart, QWORD *SymEnd)
Finds the symbol which is located at the given address.
static INTSTATUS IntLixGuestParseVersion(const char *Buffer, DWORD BufferLength)
Parses the 'linux_proc_banner' and searches for 'version.patch.sublevel-backport' pattern...
#define IN_RANGE_INCLUSIVE(x, start, end)
#define INT_SUCCESS(Status)
A critical structure was not found inside the guest kernel.
struct _LIST_ENTRY * Head
INTSTATUS IntResumeVcpus(void)
Resumes the VCPUs previously paused with IntPauseVcpus.
QWORD PerCpuAddress
The address of the allocated memory (per-CPU).
BOOLEAN ProtectionActivated
QWORD PerCpuLength
The per-CPU memory allocation size.
#define INTRO_OPT_PROT_KM_LX_TEXT_READS
Enable kernel '_text' section read protection (Linux only).
QWORD IntHookGetGlaFromGpaHook(HOOK_GPA const *Hook, QWORD Address)
Gets the GLA from a GPA hook.
WORD Length
The patch length.
BOOLEAN SafeToApplyOptions
True if the current options can be changed dynamically.
BYTE EptHookType
The type of the hook in EPT (see IG_EPT_HOOK_TYPE)
INTSTATUS IntLixGuestFindKernelVersionAndRo(QWORD StartGva)
Scans pages from guest memory, starting from the provided StartGva and tries to find the ...
unsigned int VmPrevOffset
#define INT_STATUS_NOT_NEEDED_HINT
Section will contain linux related information.
static INTSTATUS IntLixGuestResolveExTableLimits(void)
Decodes each instruction of the 'search_exception_tables' function and searches for 'MOV REG/RSI...
INTSTATUS IntLixAgentUninit(void)
Uninit the agents state.
INTSTATUS IntLixGuestNew(void)
Starts the initialization and enable protection for a new Linux guest.
DWORD IntPatternMatch(const BYTE *Buffer, DWORD SigCount, const PATTERN_SIGNATURE *Sigs)
Matches one of the given signatures on the given buffer.
int INTSTATUS
The status data type.
static INTSTATUS IntLixResolveCurrentProcessOffset(void)
Decodes each instruction of the 'do_exit' function and searches for 'MOV REG/MEM, [gs:displacement]' ...
The operating system version is not supported.
QWORD CodeEnd
The guest virtual address where the code ends.
QWORD CodeStart
The guest virtual address where the code starts.
INTSTATUS IntMsrSyscallProtect(void)
Enable protection for all SYSCALL and SYSENTER MSRs.
#define PAGE_OFFSET_MASK_2M
DWORD OSVersion
Os version.
QWORD gEventId
The ID of the current event.
static INTSTATUS IntLixGuestDetourCodeHandler(void **Context, void *Hook, QWORD Address, INTRO_ACTION *Action)
Dumps information about the read/write attempt.
LIX_MODULE_LAYOUT CoreLayout
The layout of the core section.
#define LIX_MODULE_MAPPING_SPACE_END
The end of module mapping region.
#define INT_STATUS_NOT_FOUND
unsigned char gLixAgents[]
static INTSTATUS IntLixGuestAgentContentHandler(void **Context, void *Hook, QWORD Address, INTRO_ACTION *Action)
Dumps information about the read/write attempt.
static INTSTATUS IntLixGuestAllocateInit(void)
Initialize the required information about the allocated memory zone for detours/agents.
struct _LIX_GUEST_OS_SPECIFIC::@254 Vma
DWORD ThreadStructOffset
The offset of the thread_struct from task_struct.
QWORD IntroActiveEventId
The event ID on which introcore became active.
static void IntLixGuestSetOsVersion(void)
Computes the OS version number using the version, patch and sublevel.
#define TRFLG_NONE
No special options.
INTSTATUS IntLixGuestFindProperSyscall(QWORD SyscallAddress, QWORD *ProperSyscallAddress)
Decodes each instruction from the provided syscall handler address and searches for a pattern if the ...
PVCPU_STATE VcpuArray
Array of the VCPUs assigned to this guest. The index in this array matches the VCPU number...
unsigned int DentryOffset
LIX_GUEST_OS_SPECIFIC OsSpecificFields
INTSTATUS IntCr4Unprotect(void)
Disables the CR4 protection.
struct _LINUX_GUEST::@125::@129 Agent
INTSTATUS IntPauseVcpus(void)
Pauses all the guest VCPUs.
void IntLixVdsoUnprotect(void)
Remove protection for the vDSO image and VSYSCALL.
#define INTRO_OPT_PROT_KM_IDT
INTRO_GUEST_TYPE OSType
The type of the guest.
INTSTATUS IntLixTextPokeHandler(void *Detour)
Handles the incoming 'text_poke' patches from the guest.
INTSTATUS IntNotifyIntroActive(void)
struct _LIX_AGENT_INIT_ARGS::@102 Allocate
#define INTRO_OPT_PROT_KM_VDSO
Enable vDSO image protection (Linux only).
Section will contain information about a supported OS.
Describes a kernel driver.
INTSTATUS IntGdtrProtect(void)
Enable GDTR protection.
#define PAGE_BASE_MASK_2M
BOOLEAN KptiActive
True if KPTI is enabled on this guest, False if it is not.
#define INTRO_OPT_PROT_KM_MSR_SYSCALL
static INTSTATUS IntLixGuestFindKernel(QWORD SyscallHandler)
Finds the most things required by Introcore to be able to initialize completely.
QWORD ExTableStart
The guest virtual address where the ex-table starts.
static INTSTATUS IntLixGuestDetourDataHandler(void **Context, void *Hook, QWORD Address, INTRO_ACTION *Action)
Dumps information about the read/write attempt.
DWORD MappingsCount
The number of entries inside the MappingsTrace and MappingsEntries arrays.
Used for 'arch_jump_label_transform'.
struct _LIX_AGENT_UNINIT_ARGS::@103 Free
void IntLixGuestUninit(void)
Uninitialize the Linux guest.
INTSTATUS IntLixTaskIterateGuestTasks(PFUNC_IterateListCallback Callback, QWORD Aux)
Iterates the guest process list and calls the provided callback for each process and thread found...
INTSTATUS IntVirtMemSet(QWORD VirtualAddress, DWORD Length, QWORD Cr3, BYTE Value)
INTSTATUS IntLixGuestAllocateHook(void)
Add EPT hooks for the detours and agents.
INTSTATUS IntLixIdtUnprotectAll(void)
Disable protection for IDT on all CPUs.
QWORD Flags
The entry that maps VirtualAddress to PhysicalAddress, together with all the control bits...
#define _In_reads_z_(expr)
INTSTATUS IntKernVirtMemFetchDword(QWORD GuestVirtualAddress, DWORD *Data)
Reads 4 bytes from the guest kernel memory.
INTSTATUS IntLixGuestIsKptiActive(QWORD SyscallGva)
Checks if the Linux guest has the KPTI active.
QWORD DataStart
The guest virtual address where the data starts.
unsigned int CurrentCpuOffset
static INTSTATUS IntLixGuestClearGuestMemory(QWORD Gva, DWORD Length)
Clear the provided memory zone.
#define IS_KERNEL_POINTER_LIX(p)
#define INT_STATUS_NOT_INITIALIZED
#define SIG_NOT_FOUND
Signals that a signature was not matched.
INTSTATUS IntKernVirtMemFetchQword(QWORD GuestVirtualAddress, QWORD *Data)
Reads 8 bytes from the guest kernel memory.
The kernel image was not found.
#define IG_CURRENT_VCPU
For APIs that take a VCPU number as a parameter, this can be used to specify that the current VCPU sh...
Used for 'text_poke'.
QWORD MappingsEntries[MAX_TRANSLATION_DEPTH]
Contains the entry in which paging table.
INTSTATUS IntGetVersionStringLinux(DWORD FullStringSize, DWORD VersionStringSize, CHAR *FullString, CHAR *VersionString)
Gets the version string for a Linux guest.
#define IN_RANGE(x, start, end)
struct _LIX_GUEST_OS_SPECIFIC::@256 Task
BOOLEAN Guest64
True if this is a 64-bit guest, False if it is a 32-bit guest.
QWORD Current
The currently used options.
struct _LIX_AGENT_HANDLER::@98 Args
PATTERN_SIGNATURE * gLinuxDistSigs
An array that contains the distro signatures.
#define INTRO_OPT_PROT_KM_IDTR
Enable interrupt descriptor-table registers protection.
QWORD IdtBase
Original IDT base.
CHAR VersionString[MAX_VERSION_LENGTH]
The version string.
INTSTATUS IntLixVdsoProtect(void)
Activates protection for the vDSO image and VSYSCALL.
INTSTATUS IntTranslateVirtualAddress(QWORD Gva, QWORD Cr3, QWORD *PhysicalAddress)
Translates a guest virtual address to a guest physical address.
struct _LIX_GUEST_OS_SPECIFIC::@259 Dentry
INTSTATUS IntDecDecodeInstructionFromBuffer(PBYTE Buffer, size_t BufferSize, IG_CS_TYPE CsType, void *Instrux)
Decode an instruction from the provided buffer.
BOOLEAN GuestInitialized
True if the OS-specific portion has been initialized.
static BOOLEAN IntLixGuestIsSupported(void)
Load OS information from CAMI if the guest is supported.
#define LIX_FIELD(Structure, Field)
Macro used to access fields inside the LIX_OPAQUE_FIELDS structure.
#define HpFreeAndNullWithTag(Add, Tag)
INTSTATUS IntGsRead(DWORD CpuNumber, QWORD *GsValue)
Reads the IA32_GS_BASE guest MSR.
unsigned int CurrentTaskOffset
#define INT_STATUS_INVALID_INTERNAL_STATE
QWORD KernelVa
The guest virtual address at which the kernel image.
#define LIX_KERNEL_MAX_PAGES
The maximum number of pages of kernel that will be scanned.
QWORD MaskSet
The page attributes that must be set.
LINUX_GUEST * gLixGuest
Global variable holding the state of a Linux guest.
LIX_SYMBOL MemoryFunctions[5]
The guest virtual address of memcpy, __memcpy, memset, __memset, memmove.
BYTE WordSize
Guest word size. Will be 4 for 32-bit guests and 8 for 64-bit guests.
#define LIX_BANNER_START
The start of the 'linux_proc_banner' string.
void IntLixGuestUnhookGuestCode(void)
Remove the EPT hooks from detours and agents.
Arguments of the uninit agent.
INTSTATUS IntKsymInit(void)
Initialize the kallsyms subsystem based on the os info provided by LIX_FIELD(Info, HasKsym*).
INTSTATUS IntTranslateVirtualAddressEx(QWORD Gva, QWORD Cr3, DWORD Flags, VA_TRANSLATION *Translation)
Translates a guest virtual address to a guest physical address.
static INTSTATUS IntLixGuestAllocate(void)
Injects the 'init' agent in order to allocate a memory zone inside the guest.
BOOLEAN IntLixGuestDeployUninitAgent(void)
Inject the 'uninit' agent to free the previously allocated memory for detours/agents.
LIX_KERNEL_MODULE Lix
Valid only for Linux guests.
static INTSTATUS IntLixGuestResolveOffsets(void)
Finds the offsets required by Introcore.
LIX_FUNCTION * Functions
An array of LIX_FUNCTION to be hooked.
DWORD CpuCount
The number of logical CPUs.
#define LIX_KAISER_ENABLED_PCP_OFFSET_CAP
The max value of 'kaiser_enabled_pcp' offset (the maximum observed was 0xD040 on CentOS - kernel 3...
struct _LIX_GUEST_OS_SPECIFIC::@257 Binprm
#define UNREFERENCED_PARAMETER(P)
unsigned int ProtectionBit
INTSTATUS IntLixApiHookAll(void)
Iterates through all APIs that can be hooked and sets requested hooks.
void IntDriverUninit(void)
Uninitializes the drivers submodule.
#define INT_STATUS_DATA_BUFFER_TOO_SMALL
static INTSTATUS IntLixPatchHandler(void *Detour, LIX_ACTIVE_PATCH *ActivePatch)
Handles the incoming patches (ftrace/text_poke) from the guest.
#define INT_STATUS_INVALID_DATA_VALUE
void IntLixAgentInit(void)
Initialize the agents state.
INTSTATUS IntLixDrvCreateFromAddress(QWORD DriverGva, QWORD StaticDetected)
Create the KERNEL_DRIVER object from the provided 'module struct' address and activate the protection...
INTSTATUS IntSyscallRead(DWORD CpuNumber, QWORD *SysStar, QWORD *SysLstar)
Queries the IA32_STAR, and IA32_LSTAR guest MSRs.
INTSTATUS IntLixGuestAllocateDeploy(void)
Deploys the content of Linux detours and the content of the Linux agents.
unsigned char gLixDetours[]
INTSTATUS IntLixFtraceHandler(void *Detour)
Handles the incoming 'text_poke' patches from the guest.
QWORD DataEnd
The guest virtual address where the data ends.
enum _INTRO_ACTION INTRO_ACTION
Event actions.
INTSTATUS IntLixAgentInject(LIX_AGENT_TAG Tag, PFUNC_AgentCallbackHypercall HypercallCallback, PFUNC_AgentCallbackCompletion CompletionCallback)
Schedule an agent injection inside the guest.
INTSTATUS IntLixDrvIterateList(PFUNC_IterateListCallback Callback, QWORD Aux)
Iterates the 'modules' list form the guest and activate protection for each driver that is initialize...
static INTSTATUS IntLixGuestAllocateFill(void)
Fill the required information about the allocated memory zone from the guest.
void IntLixFilesCacheUninit(void)
Removes and frees the entries of the dentry-cache.
QWORD RoDataEnd
The guest virtual address where the read-only data ends.
struct _LIX_GUEST_OS_SPECIFIC::@255 Mm
__must_check INTSTATUS IntVirtMemMap(QWORD Gva, DWORD Length, QWORD Cr3, DWORD Flags, void **HostPtr)
Maps a guest virtual memory range inside Introcore virtual address space.
#define LIX_MODULE_MAPPING_SPACE_START
The start of module mapping region.
void IntLixTaskUninit(void)
Uninitializes the Linux process subsystem.
struct _LINUX_GUEST::@125::@130 PerCpuData
MM Mm
Guest memory information, such as paging mode, system Cr3 value, etc.
static INTSTATUS IntLixGuestInitAgentHypercall(void *Context)
This callback is called when the 'init' agent has been allocated the memory zone from guest...
BOOLEAN IntLixTaskGuestTerminating(void)
Check whether the guest OS is terminating or not.
QWORD MaskClear
The page attributes that must be cleared.
void IntLixGuestUninitGuestCode(void)
Removes the EPT hooks from detours/agents memory zone and clears these memory zones.
GUEST_STATE gGuest
The current guest state.
struct _LINUX_GUEST::@125::@128 Detour
void * Content
The content of the arguments.
unsigned int VmNextOffset
QWORD PageSize
The page size used for this translation.
#define STATIC_ASSERT(Cond, Msg)
INTSTATUS IntKernVirtMemRead(QWORD KernelGva, DWORD Length, void *Buffer, DWORD *RetLength)
Reads data from a guest kernel virtual memory range.
DWORD gLinuxDistSigsCount
The number of distro signatures from gLinuxDistSigs.
LINUX_GUEST _LinuxGuest
Linux specific information. Valid when OSType is introGuestLinux.
BOOLEAN KptiInstalled
True if KPTI was detected as installed (not necessarily active).
struct _LINUX_GUEST::@123 Layout
INTSTATUS IntHookObjectHookRegion(void *Object, QWORD Cr3, QWORD Gla, SIZE_T Length, BYTE Type, void *Callback, void *Context, DWORD Flags, HOOK_REGION_DESCRIPTOR **Region)
Hook a contiguous region of virtual memory inside the provided virtual address space.
__must_check INTSTATUS IntPhysMemMap(QWORD PhysAddress, DWORD Length, DWORD Flags, void **HostPtr)
Maps a guest physical address inside Introcore VA space.
INTSTATUS IntLixIdtProtectAll(void)
Activates protection for IDT on all CPUs.
Encapsulates information about a virtual to physical memory translation.
QWORD SyscallAddress
The guest virtual address of the syscall.
static INTSTATUS IntLixGuestFindKernelBase(QWORD StartGva)
Scans pages from guest memory, starting from the provided StartGva, until we find a signature that ma...
#define INT_STATUS_INVALID_PARAMETER_1
#define INT_STATUS_NOT_SUPPORTED
VCPU_STATE * gVcpu
The state of the current VCPU.
static INTSTATUS IntLixGuestActivateProtection(void)
Activates the protection for a Linux guest.
static INTSTATUS IntLixGuestInit(void)
Initializes a new Linux guest.
static INTSTATUS IntLixFindDataStart(void)
Decodes each instruction of the 'mark_rodata_ro' function and searches for end of ...
QWORD Base
The base GVA of the section.
Describes a signature that can be used for searching or matching guest contents.
DWORD ActiveCpuCount
The number of CPUs actually used by the guest.
#define INTRO_OPT_PROT_KM_CR4
Enable CR4.SMEP and CR4.SMAP protection.
void IntDisasmGva(QWORD Gva, DWORD Length)
This function disassembles a code buffer (given its GVA) and then dumps the instructions (textual dis...
Used for 'ftrace'.
Section will contain distribution signatures.
INTSTATUS IntLixJumpLabelHandler(void *Detour)
Handles the incoming read (arch_jmp_label_transform) from the guest.
BOOLEAN DisableOnReturn
Set to True if after returning from this event handler, introcore must be unloaded.
QWORD Gva
The start of the region which follows to be patched.
BYTE Version
The version field of the version string.
static void IntLixGuestResolveSymbols(void)
Searches for the 'memcpy', '__memcpy', 'memset', '__memset' and 'memmove' ksyms.
QWORD IntKsymFindByName(const char *Name, QWORD *SymEnd)
Searches the given Name in kallsyms and returns the Start & End offset.
INTSTATUS IntLixKernelWriteProtect(void)
Activates kernel protection.
INTSTATUS IntCr4Protect(void)
Activates the Cr4 protection.
DWORD CurrentTaskOffset
The offset of the current task from GS.
static INTSTATUS IntLixGuestInitAgentCompletion(void *Context)
This callback is called when the 'init' agent completed the execution and the protection can be activ...
struct _LIX_GUEST_OS_SPECIFIC::@258 File
INTSTATUS IntPhysMemUnmap(void **HostPtr)
Unmaps an address previously mapped with IntPhysMemMap.
struct _LINUX_GUEST::@125 MmAlloc
INTSTATUS IntNotifyIntroDetectedOs(INTRO_GUEST_TYPE OsType, DWORD OsVersion, BOOLEAN Is64)
Wrapper over GLUE_IFACE.NotifyIntrospectionDetectedOs.
INTRO_PROT_OPTIONS CoreOptions
The activation and protection options for this guest.
INTSTATUS IntDecDecodeInstruction(IG_CS_TYPE CsType, QWORD Gva, void *Instrux)
Decode an instruction from the provided guest linear address.
QWORD ExTableEnd
The guest virtual address where the ex-table ends.
INTSTATUS IntHookObjectCreate(DWORD ObjectType, QWORD Cr3, void **Object)
Create a new hook object.
Arguments of the init agent.
QWORD PropperSyscallGva
The guest virtual address of the 'real' syscall.
#define INTRO_OPT_PROT_KM_GDTR
Enable global descriptor-table registers protection.
void IntLixAgentEnableInjection(void)
Enables agent injections.
INTSTATUS IntCamiLoadSection(DWORD CamiSectionHint)
Load CAMI objects from section with given hint.
#define INT_STATUS_INSUFFICIENT_RESOURCES