14 #ifdef INT_COMPILER_MSVC 15 # include "../../autogen/ver.h" 16 #endif // INT_COMPILER_MSVC 31 .
Build = INTRO_VERSION_BUILDNUMBER & 0xFFFF,
32 .Revision = INTRO_VERSION_REVISION,
33 .Minor = INTRO_VERSION_MINOR,
34 .Major = INTRO_VERSION_MAJOR
75 0x0000000000000000, 0x00000000000000ff, 0x000000000000ff00, 0x000000000000ffff,
76 0x0000000000ff0000, 0x0000000000ff00ff, 0x0000000000ffff00, 0x0000000000ffffff,
77 0x00000000ff000000, 0x00000000ff0000ff, 0x00000000ff00ff00, 0x00000000ff00ffff,
78 0x00000000ffff0000, 0x00000000ffff00ff, 0x00000000ffffff00, 0x00000000ffffffff,
79 0x000000ff00000000, 0x000000ff000000ff, 0x000000ff0000ff00, 0x000000ff0000ffff,
80 0x000000ff00ff0000, 0x000000ff00ff00ff, 0x000000ff00ffff00, 0x000000ff00ffffff,
81 0x000000ffff000000, 0x000000ffff0000ff, 0x000000ffff00ff00, 0x000000ffff00ffff,
82 0x000000ffffff0000, 0x000000ffffff00ff, 0x000000ffffffff00, 0x000000ffffffffff,
83 0x0000ff0000000000, 0x0000ff00000000ff, 0x0000ff000000ff00, 0x0000ff000000ffff,
84 0x0000ff0000ff0000, 0x0000ff0000ff00ff, 0x0000ff0000ffff00, 0x0000ff0000ffffff,
85 0x0000ff00ff000000, 0x0000ff00ff0000ff, 0x0000ff00ff00ff00, 0x0000ff00ff00ffff,
86 0x0000ff00ffff0000, 0x0000ff00ffff00ff, 0x0000ff00ffffff00, 0x0000ff00ffffffff,
87 0x0000ffff00000000, 0x0000ffff000000ff, 0x0000ffff0000ff00, 0x0000ffff0000ffff,
88 0x0000ffff00ff0000, 0x0000ffff00ff00ff, 0x0000ffff00ffff00, 0x0000ffff00ffffff,
89 0x0000ffffff000000, 0x0000ffffff0000ff, 0x0000ffffff00ff00, 0x0000ffffff00ffff,
90 0x0000ffffffff0000, 0x0000ffffffff00ff, 0x0000ffffffffff00, 0x0000ffffffffffff,
91 0x00ff000000000000, 0x00ff0000000000ff, 0x00ff00000000ff00, 0x00ff00000000ffff,
92 0x00ff000000ff0000, 0x00ff000000ff00ff, 0x00ff000000ffff00, 0x00ff000000ffffff,
93 0x00ff0000ff000000, 0x00ff0000ff0000ff, 0x00ff0000ff00ff00, 0x00ff0000ff00ffff,
94 0x00ff0000ffff0000, 0x00ff0000ffff00ff, 0x00ff0000ffffff00, 0x00ff0000ffffffff,
95 0x00ff00ff00000000, 0x00ff00ff000000ff, 0x00ff00ff0000ff00, 0x00ff00ff0000ffff,
96 0x00ff00ff00ff0000, 0x00ff00ff00ff00ff, 0x00ff00ff00ffff00, 0x00ff00ff00ffffff,
97 0x00ff00ffff000000, 0x00ff00ffff0000ff, 0x00ff00ffff00ff00, 0x00ff00ffff00ffff,
98 0x00ff00ffffff0000, 0x00ff00ffffff00ff, 0x00ff00ffffffff00, 0x00ff00ffffffffff,
99 0x00ffff0000000000, 0x00ffff00000000ff, 0x00ffff000000ff00, 0x00ffff000000ffff,
100 0x00ffff0000ff0000, 0x00ffff0000ff00ff, 0x00ffff0000ffff00, 0x00ffff0000ffffff,
101 0x00ffff00ff000000, 0x00ffff00ff0000ff, 0x00ffff00ff00ff00, 0x00ffff00ff00ffff,
102 0x00ffff00ffff0000, 0x00ffff00ffff00ff, 0x00ffff00ffffff00, 0x00ffff00ffffffff,
103 0x00ffffff00000000, 0x00ffffff000000ff, 0x00ffffff0000ff00, 0x00ffffff0000ffff,
104 0x00ffffff00ff0000, 0x00ffffff00ff00ff, 0x00ffffff00ffff00, 0x00ffffff00ffffff,
105 0x00ffffffff000000, 0x00ffffffff0000ff, 0x00ffffffff00ff00, 0x00ffffffff00ffff,
106 0x00ffffffffff0000, 0x00ffffffffff00ff, 0x00ffffffffffff00, 0x00ffffffffffffff,
107 0xff00000000000000, 0xff000000000000ff, 0xff0000000000ff00, 0xff0000000000ffff,
108 0xff00000000ff0000, 0xff00000000ff00ff, 0xff00000000ffff00, 0xff00000000ffffff,
109 0xff000000ff000000, 0xff000000ff0000ff, 0xff000000ff00ff00, 0xff000000ff00ffff,
110 0xff000000ffff0000, 0xff000000ffff00ff, 0xff000000ffffff00, 0xff000000ffffffff,
111 0xff0000ff00000000, 0xff0000ff000000ff, 0xff0000ff0000ff00, 0xff0000ff0000ffff,
112 0xff0000ff00ff0000, 0xff0000ff00ff00ff, 0xff0000ff00ffff00, 0xff0000ff00ffffff,
113 0xff0000ffff000000, 0xff0000ffff0000ff, 0xff0000ffff00ff00, 0xff0000ffff00ffff,
114 0xff0000ffffff0000, 0xff0000ffffff00ff, 0xff0000ffffffff00, 0xff0000ffffffffff,
115 0xff00ff0000000000, 0xff00ff00000000ff, 0xff00ff000000ff00, 0xff00ff000000ffff,
116 0xff00ff0000ff0000, 0xff00ff0000ff00ff, 0xff00ff0000ffff00, 0xff00ff0000ffffff,
117 0xff00ff00ff000000, 0xff00ff00ff0000ff, 0xff00ff00ff00ff00, 0xff00ff00ff00ffff,
118 0xff00ff00ffff0000, 0xff00ff00ffff00ff, 0xff00ff00ffffff00, 0xff00ff00ffffffff,
119 0xff00ffff00000000, 0xff00ffff000000ff, 0xff00ffff0000ff00, 0xff00ffff0000ffff,
120 0xff00ffff00ff0000, 0xff00ffff00ff00ff, 0xff00ffff00ffff00, 0xff00ffff00ffffff,
121 0xff00ffffff000000, 0xff00ffffff0000ff, 0xff00ffffff00ff00, 0xff00ffffff00ffff,
122 0xff00ffffffff0000, 0xff00ffffffff00ff, 0xff00ffffffffff00, 0xff00ffffffffffff,
123 0xffff000000000000, 0xffff0000000000ff, 0xffff00000000ff00, 0xffff00000000ffff,
124 0xffff000000ff0000, 0xffff000000ff00ff, 0xffff000000ffff00, 0xffff000000ffffff,
125 0xffff0000ff000000, 0xffff0000ff0000ff, 0xffff0000ff00ff00, 0xffff0000ff00ffff,
126 0xffff0000ffff0000, 0xffff0000ffff00ff, 0xffff0000ffffff00, 0xffff0000ffffffff,
127 0xffff00ff00000000, 0xffff00ff000000ff, 0xffff00ff0000ff00, 0xffff00ff0000ffff,
128 0xffff00ff00ff0000, 0xffff00ff00ff00ff, 0xffff00ff00ffff00, 0xffff00ff00ffffff,
129 0xffff00ffff000000, 0xffff00ffff0000ff, 0xffff00ffff00ff00, 0xffff00ffff00ffff,
130 0xffff00ffffff0000, 0xffff00ffffff00ff, 0xffff00ffffffff00, 0xffff00ffffffffff,
131 0xffffff0000000000, 0xffffff00000000ff, 0xffffff000000ff00, 0xffffff000000ffff,
132 0xffffff0000ff0000, 0xffffff0000ff00ff, 0xffffff0000ffff00, 0xffffff0000ffffff,
133 0xffffff00ff000000, 0xffffff00ff0000ff, 0xffffff00ff00ff00, 0xffffff00ff00ffff,
134 0xffffff00ffff0000, 0xffffff00ffff00ff, 0xffffff00ffffff00, 0xffffff00ffffffff,
135 0xffffffff00000000, 0xffffffff000000ff, 0xffffffff0000ff00, 0xffffffff0000ffff,
136 0xffffffff00ff0000, 0xffffffff00ff00ff, 0xffffffff00ffff00, 0xffffffff00ffffff,
137 0xffffffffff000000, 0xffffffffff0000ff, 0xffffffffff00ff00, 0xffffffffff00ffff,
138 0xffffffffffff0000, 0xffffffffffff00ff, 0xffffffffffffff00, 0xffffffffffffffff,
156 if (regs[2] & (1 << 20))
209 status =
IntGlueInit(GlueInterface, UpperInterface);
247 LOG(
"IntroCore initialised: version %d.%d.%d, build %05d, changeset %s, built on %s %s from branch %s\n",
248 INTRO_VERSION_MAJOR, INTRO_VERSION_MINOR, INTRO_VERSION_REVISION, INTRO_VERSION_BUILDNUMBER,
249 INTRO_VERSION_CHANGESET, __DATE__, __TIME__, INTRO_VERSION_BRANCH);
254 ERROR(
"[ERROR] IntSpinLockInit failed: %08x\n", status);
281 TRACE(
"[INFO] Unloading introspection library...\n");
288 ERROR(
"[ERROR] IntDisableIntro failed: 0x%08x\n", status);
297 list = gMultiPageMaps.
Flink;
298 while (list != &gMultiPageMaps)
357 QWORD gva = VirtualAddress;
358 BYTE *buffer = Buffer;
382 goto cleanup_and_exit;
387 memcpy(p, buffer, size);
391 memcpy(buffer, p, size);
399 }
while (gva < VirtualAddress + Length);
404 if (RetLength != NULL)
406 *RetLength = Length - left;
423 QWORD gva = VirtualAddress;
450 memset(p, Value, size);
455 }
while (gva < VirtualAddress + Length);
500 QWORD gpa = PhysicalAddress;
501 BYTE *buffer = Buffer;
508 while (gpa < PhysicalAddress + Length)
516 goto cleanup_and_exit;
521 memcpy(p, buffer, size);
525 memcpy(buffer, p, size);
538 if (RetLength != NULL)
540 *RetLength = Length - left;
582 DWORD copiedSize = 0;
597 TRACE(
"[ERROR] IntPhysMemMap failed: 0x%08x\n", status);
598 goto cleanup_and_exit;
603 memcpy(p, Buffer, Length);
607 memcpy(Buffer, p, Length);
617 if (RetLength != NULL)
619 *RetLength = copiedSize;
1086 pBuf = (
PCHAR)Buffer;
1089 while (i < MaxLength)
1099 for (j = 0; j <
MIN(8u, MaxLength - i); j++)
1101 pBuf[i++] = (
CHAR)chunk;
1104 if (pBuf[i - 1] == 0)
1204 Translation->Pointer64 =
FALSE;
1213 goto cleanup_and_exit;
1218 Translation->MappingsTrace[Translation->MappingsCount] =
CLEAN_PHYS_ADDRESS32(Cr3) + 4ull * pdi;
1219 Translation->MappingsEntries[Translation->MappingsCount] = pde;
1220 Translation->MappingsCount++;
1222 if ((pde &
PD_P) == 0)
1225 goto cleanup_and_exit;
1228 Translation->IsUser = Translation->IsUser && !!(pde &
PT_US);
1229 Translation->IsWritable = Translation->IsWritable && !!(pde &
PT_RW);
1232 if (0 != (pde &
PD_PS))
1235 Translation->Flags = pde;
1238 pf = (pde & 0xFFC00000) | ((pde & 0x003FE000) << 19);
1239 pf += (Gva & 0x3FFFFF);
1249 goto cleanup_and_exit;
1254 Translation->MappingsTrace[Translation->MappingsCount] =
CLEAN_PHYS_ADDRESS32(pde) + 4ull * pti;
1255 Translation->MappingsEntries[Translation->MappingsCount] = pte;
1256 Translation->MappingsCount++;
1258 Translation->Flags = pte;
1261 if ((pte & PD_P) == 0)
1267 Translation->IsUser = Translation->IsUser && !!(pte &
PT_US);
1268 Translation->IsWritable = Translation->IsWritable && !!(pte &
PT_RW);
1271 pf += (Gva & 0xFFF);
1275 Translation->PhysicalAddress = pf;
1319 UINT64 pdpe, pde, pte, pf;
1322 pdp = pd = pt = NULL;
1323 pdpe = pde = pte = 0;
1325 Translation->Pointer64 =
TRUE;
1334 goto cleanup_and_exit_pae;
1344 Translation->MappingsEntries[Translation->MappingsCount] = pdpe;
1345 Translation->MappingsCount++;
1349 if ((pdpe &
PDP_P) == 0)
1352 goto cleanup_and_exit_pae;
1362 goto cleanup_and_exit_pae;
1368 Translation->MappingsEntries[Translation->MappingsCount] = pde;
1369 Translation->MappingsCount++;
1371 if ((pde &
PD_P) == 0)
1374 goto cleanup_and_exit_pae;
1377 Translation->IsUser = Translation->IsUser && !!(pde &
PT_US);
1378 Translation->IsWritable = Translation->IsWritable && !!(pde &
PT_RW);
1379 Translation->IsExecutable = Translation->IsExecutable && !(pde &
PT_XD);
1385 Translation->Flags = pde;
1389 pf += (Gva & 0x1FFFFF);
1391 goto using_2m_page_pae;
1400 goto cleanup_and_exit_pae;
1406 Translation->MappingsEntries[Translation->MappingsCount] = pte;
1407 Translation->MappingsCount++;
1409 Translation->Flags = pte;
1412 if ((pte &
PT_P) == 0)
1418 Translation->IsUser = Translation->IsUser && !!(pte &
PT_US);
1419 Translation->IsWritable = Translation->IsWritable && !!(pte &
PT_RW);
1420 Translation->IsExecutable = Translation->IsExecutable && !(pte &
PT_XD);
1423 pf += (Gva & 0xFFF);
1427 Translation->PhysicalAddress = pf;
1431 cleanup_and_exit_pae:
1477 UINT64 pml4e, pdpe, pde, pte, pf;
1478 UINT64 *pml4, *pdp, *pd, *pt;
1480 pml4 = pdp = pd = pt = NULL;
1481 pml4e = pdpe = pde = pte = 0;
1483 Translation->Pointer64 =
TRUE;
1490 goto cleanup_and_exit_4_level;
1493 pml4e = pml4[pml4i];
1495 Translation->MappingsTrace[Translation->MappingsCount] =
CLEAN_PHYS_ADDRESS64(Cr3) + 8ull * pml4i;
1496 Translation->MappingsEntries[Translation->MappingsCount] = pml4e;
1497 Translation->MappingsCount++;
1499 if ((pml4e &
PD_P) == 0)
1502 goto cleanup_and_exit_4_level;
1505 Translation->IsUser = Translation->IsUser && !!(pml4e &
PT_US);
1506 Translation->IsWritable = Translation->IsWritable && !!(pml4e &
PT_RW);
1507 Translation->IsExecutable = Translation->IsExecutable && !(pml4e &
PT_XD);
1514 goto cleanup_and_exit_4_level;
1519 Translation->MappingsTrace[Translation->MappingsCount] =
CLEAN_PHYS_ADDRESS64(pml4e) + 8ull * pdpi;
1520 Translation->MappingsEntries[Translation->MappingsCount] = pdpe;
1521 Translation->MappingsCount++;
1523 if ((pdpe & PD_P) == 0)
1526 goto cleanup_and_exit_4_level;
1529 Translation->IsUser = Translation->IsUser && !!(pdpe &
PT_US);
1530 Translation->IsWritable = Translation->IsWritable && !!(pdpe &
PT_RW);
1531 Translation->IsExecutable = Translation->IsExecutable && !(pdpe &
PT_XD);
1537 Translation->Flags = pdpe;
1541 pf += (Gva & 0x3FFFFFFF);
1543 goto using_1g_page_4_level;
1550 goto cleanup_and_exit_4_level;
1555 Translation->MappingsTrace[Translation->MappingsCount] =
CLEAN_PHYS_ADDRESS64(pdpe) + 8ull * pdi;
1556 Translation->MappingsEntries[Translation->MappingsCount] = pde;
1557 Translation->MappingsCount++;
1559 if ((pde & PD_P) == 0)
1562 goto cleanup_and_exit_4_level;
1565 Translation->IsUser = Translation->IsUser && !!(pde &
PT_US);
1566 Translation->IsWritable = Translation->IsWritable && !!(pde &
PT_RW);
1567 Translation->IsExecutable = Translation->IsExecutable && !(pde &
PT_XD);
1573 Translation->Flags = pde;
1577 pf += (Gva & 0x1FFFFF);
1579 goto using_2m_page_4_level;
1586 goto cleanup_and_exit_4_level;
1591 Translation->MappingsTrace[Translation->MappingsCount] =
CLEAN_PHYS_ADDRESS64(pde) + 8ull * pti;
1592 Translation->MappingsEntries[Translation->MappingsCount] = pte;
1593 Translation->MappingsCount++;
1595 Translation->Flags = pte;
1598 if ((pte & PD_P) == 0)
1606 Translation->IsUser = Translation->IsUser && !!(pte &
PT_US);
1607 Translation->IsWritable = Translation->IsWritable && !!(pte &
PT_RW);
1608 Translation->IsExecutable = Translation->IsExecutable && !(pte &
PT_XD);
1611 pf += (Gva & 0xFFF);
1614 using_1g_page_4_level:
1615 using_2m_page_4_level:
1616 Translation->PhysicalAddress = pf;
1620 cleanup_and_exit_4_level:
1672 UINT64 pml5e, pml4e, pdpe, pde, pte, pf;
1673 UINT64 *pml5, *pml4, *pdp, *pd, *pt;
1675 pml5 = pml4 = pdp = pd = pt = NULL;
1676 pml5e = pml4e = pdpe = pde = pte = 0;
1678 Translation->Pointer64 =
TRUE;
1684 goto cleanup_and_exit_5_level;
1687 pml5e = pml5[pml5i];
1689 Translation->MappingsTrace[Translation->MappingsCount] =
CLEAN_PHYS_ADDRESS64(Cr3) + 8ull * pml5i;
1690 Translation->MappingsEntries[Translation->MappingsCount] = pml5e;
1691 Translation->MappingsCount++;
1693 if ((pml5e &
PD_P) == 0)
1696 goto cleanup_and_exit_5_level;
1703 goto cleanup_and_exit_5_level;
1706 pml4e = pml4[pml4i];
1708 Translation->MappingsTrace[Translation->MappingsCount] =
CLEAN_PHYS_ADDRESS64(Cr3) + 8ull * pml4i;
1709 Translation->MappingsEntries[Translation->MappingsCount] = pml4e;
1710 Translation->MappingsCount++;
1712 if ((pml4e & PD_P) == 0)
1715 goto cleanup_and_exit_5_level;
1718 Translation->IsUser = Translation->IsUser && !!(pml4e &
PT_US);
1719 Translation->IsWritable = Translation->IsWritable && !!(pml4e &
PT_RW);
1720 Translation->IsExecutable = Translation->IsExecutable && !(pml4e &
PT_XD);
1726 goto cleanup_and_exit_5_level;
1731 Translation->MappingsTrace[Translation->MappingsCount] =
CLEAN_PHYS_ADDRESS64(pml4e) + 8ull * pdpi;
1732 Translation->MappingsEntries[Translation->MappingsCount] = pdpe;
1733 Translation->MappingsCount++;
1735 if ((pdpe & PD_P) == 0)
1738 goto cleanup_and_exit_5_level;
1741 Translation->IsUser = Translation->IsUser && !!(pdpe &
PT_US);
1742 Translation->IsWritable = Translation->IsWritable && !!(pdpe &
PT_RW);
1743 Translation->IsExecutable = Translation->IsExecutable && !(pdpe &
PT_XD);
1749 Translation->Flags = pdpe;
1753 pf += (Gva & 0x3FFFFFFF);
1755 goto using_1g_page_5_level;
1762 goto cleanup_and_exit_5_level;
1767 Translation->MappingsTrace[Translation->MappingsCount] =
CLEAN_PHYS_ADDRESS64(pdpe) + 8ull * pdi;
1768 Translation->MappingsEntries[Translation->MappingsCount] = pde;
1769 Translation->MappingsCount++;
1771 if ((pde & PD_P) == 0)
1774 goto cleanup_and_exit_5_level;
1777 Translation->IsUser = Translation->IsUser && !!(pde &
PT_US);
1778 Translation->IsWritable = Translation->IsWritable && !!(pde &
PT_RW);
1779 Translation->IsExecutable = Translation->IsExecutable && !(pde &
PT_XD);
1785 Translation->Flags = pde;
1789 pf += (Gva & 0x1FFFFF);
1791 goto using_2m_page_5_level;
1798 goto cleanup_and_exit_5_level;
1803 Translation->MappingsTrace[Translation->MappingsCount] =
CLEAN_PHYS_ADDRESS64(pde) + 8ull * pti;
1804 Translation->MappingsEntries[Translation->MappingsCount] = pte;
1805 Translation->MappingsCount++;
1807 Translation->Flags = pte;
1810 if ((pte & PD_P) == 0)
1818 Translation->IsUser = Translation->IsUser && !!(pte &
PT_US);
1819 Translation->IsWritable = Translation->IsWritable && !!(pte &
PT_RW);
1820 Translation->IsExecutable = Translation->IsExecutable && !(pte &
PT_XD);
1823 pf += (Gva & 0xFFF);
1826 using_1g_page_5_level:
1827 using_2m_page_5_level:
1828 Translation->PhysicalAddress = pf;
1832 cleanup_and_exit_5_level:
1893 if (Translation == NULL)
1898 memzero(Translation,
sizeof(*Translation));
1902 switch (Flags & TRFLG_MODE_MASK)
1932 Translation->VirtualAddress =
Gva;
1933 Translation->Cr3 = Cr3;
1934 Translation->IsUser = Translation->IsWritable = Translation->IsExecutable =
TRUE;
1935 Translation->PagingMode = pagingMode;
1956 Translation->PhysicalAddress =
Gva;
1973 patIndex |= (Translation->Flags &
PT_PAT) >> 5;
1974 patIndex |= (Translation->Flags &
PT_PCD) >> 3;
1975 patIndex |= (Translation->Flags &
PT_PWT) >> 3;
1990 Translation->CachingAttribute = (msr.
Value >> (patIndex * 8)) & 0x7;
2027 if (NULL == PhysicalAddress)
2037 ERROR(
"[ERROR] IntCr3Read failed: 0x%08x\n", status);
2082 void *pAlloc, *pAlignedAlloc;
2096 status =
IntVirtMemRead(GuestVirtualAddress, Length, Cr3, pAlignedAlloc, &readSize);
2103 else if (readSize != Length)
2119 pPage->
Gva = GuestVirtualAddress;
2121 pPage->
HostPtr = pAlignedAlloc;
2126 *HostPtr = pAlignedAlloc;
2256 ERROR(
"[ERROR] IntPhysMemUnmap failed for (%p %p): 0x%08x\n", HostPtr, *HostPtr, status);
2297 ERROR(
"[ERROR] An exception injection is already pending on CPU %d: vector %d, CR2 0x%016llx, " 2298 "error code 0x%08x",
2346 ERROR(
"[ERROR] GluePauseVcpus failed: 0x%08x\n", status);
2379 ERROR(
"[ERROR] GlueResumeVcpus failed: 0x%08x\n", status);
2403 LOG(
"[DEBUGGER] IntEnterDebugger called from %s:%d\n", File, Line);
2424 const char *commands[] =
2439 LOG(
"[CRITICAL] IntDbgEnterDebugger called from %s:%d\n", File, Line);
2440 LOG(
"Bug check generated! Dumps follow:\n");
2447 LOG(
"Bug check dump complete!\n");
2472 CHAR pat[255] = {0};
2476 char *wild = strchr(Pattern,
'*');
2478 if (wild && ((
size_t)(wild - Pattern + 1) <
sizeof(pat) - 1))
2480 memcpy(pat, Pattern, (
size_t)(wild - Pattern + 1));
2523 _In_ void const *Detour
2551 LOG(
"[INFO] Guest reached %s handler. Will attempt to uninit!\n", func);
2553 TRACE(
"[INFO] Will dump RIPs for all VCPUs\n");
2584 if (Process == NULL)
2642 if (Process == NULL)
2674 if (NULL == Process)
2734 _In_ void const *Process,
2921 if (0 == MinimumLength ||
PAGE_SIZE < MinimumLength)
2928 if (NULL != StringLength)
2946 ERROR(
"[ERROR] IntVirtMemMap failed for GVA 0x%016llx with size %x: 0x%08x\n",
2947 gva, remaining, status);
2959 while ((
DWORD)i < remaining && *p)
2965 if ((
DWORD)i < MinimumLength)
2982 if (i < (
int)remaining && i > 0)
3000 if (NULL == *String)
3017 ERROR(
"[ERROR] IntKernVirtMemRead failed for gva 0x%016llx, length %x: 0x%08x\n", StrGva, strLen, status);
3022 str[strLen - 1] = 0;
3026 if (NULL != StringLength)
3028 *StringLength = strLen;
3034 if (NULL != StringLength)
#define INT_STATUS_PAGE_NOT_PRESENT
Indicates that a virtual address is not present.
QWORD PhysicalAddress
The physical address to which VirtualAddress translates to.
enum _INTRO_ACTION_REASON INTRO_ACTION_REASON
The reason for which an INTRO_ACTION was taken.
#define CONTAINING_RECORD(List, Type, Member)
Exposes the types, constants and functions used to handle Windows processes events (creation...
INTSTATUS IntInit(GLUE_IFACE *GlueInterface, UPPER_IFACE const *UpperInterface)
Initializes introcore.
INTSTATUS IntKernVirtMemWrite(QWORD KernelGva, DWORD Length, void *Buffer)
Writes data to a guest kernel virtual memory range.
static INTSTATUS IntMapGpaForTranslation(QWORD Gpa, void **HostPtr)
Maps a guest physical address used for memory translation in Introcore address space.
PAGING_MODE PagingMode
The paging mode used for this translation.
char * utf16toutf8(char *Destination, const WCHAR *Source, DWORD DestinationMaxLength)
static QWORD IntLixProcGetProtOption(const LIX_TASK_OBJECT *Process)
Returns the introcore options related to user mode protection.
QWORD Value
The value of the MSR.
INTSTATUS IntResumeVcpus(void)
Resumes the VCPUs previously paused with IntPauseVcpus.
INTSTATUS IntReadString(QWORD StrGva, DWORD MinimumLength, BOOLEAN AnsiOnly, char **String, DWORD *StringLength)
Reads a string from the guest kernel memory.
INTSTATUS IntProcessDebugCommand(void *GuestHandle, DWORD CpuNumber, DWORD Argc, CHAR *Argv[])
Executes a debugger command.
BYTE Vector
The injected exception number.
INTSTATUS GluePauseVcpus(void)
IG_ARCH_REGS Regs
The current state of the guest registers.
INTSTATUS IntVirtMemPatchWordSize(QWORD GuestVirtualAddress, QWORD Cr3, QWORD Data)
Writes a guest pointer inside the guest memory.
INTSTATUS IntIterateVaSpace(void *GuestHandle, QWORD Cr3, PFUNC_VirtualAddressSpaceCallback Callback)
Iterates over the guest virtual address space.
void IntGlueReset(void)
Resets the global glue state (gIface. gUpIface, gIntHandle, gEventId, etc)
INTSTATUS GlueResumeVcpus(void)
#define CLEAN_PHYS_ADDRESS64(x)
QWORD SystemCr3
The Cr3 used to map the kernel.
#define INT_STATUS_SUCCESS
BOOLEAN glob_match_utf8(char const *Pattern, char const *String, BOOLEAN IgnoreCase, BOOLEAN Truncated)
#define INT_STATUS_REMOVE_DETOUR_AND_SET_RIP
#define PAGE_REMAINING(addr)
INTSTATUS IntPhysicalMemRead(QWORD PhysicalAddress, DWORD Length, void *Buffer, DWORD *RetLength)
Reads data from a guest physical memory range, but only for a single page.
void IntPreinit(void)
Initializes the global variables used throughout the project.
INTSTATUS IntKernVirtMemRead(QWORD KernelGva, DWORD Length, void *Buffer, DWORD *RetLength)
Reads data from a guest kernel virtual memory range.
INTSTATUS IntKernVirtMemPatchWordSize(QWORD GuestVirtualAddress, QWORD Data)
Writes a guest pointer inside the guest kernel memory.
#define _Out_writes_bytes_(expr)
INTSTATUS IntGetExceptionsVersion(void *GuestHandle, WORD *MajorVersion, WORD *MinorVersion, DWORD *BuildNumber)
Get the current exceptions version.See PFUNC_IntGetExceptionsVersion for details. ...
#define TRFLG_MODE_MASK
Mask used to isolate only the paging mode flags.
struct _LIST_ENTRY * Flink
INTSTATUS IntVirtMemFetchQword(QWORD GuestVirtualAddress, QWORD Cr3, QWORD *Data)
Reads 8 bytes from the guest memory.
INTSTATUS IntVirtMemFetchString(QWORD Gva, DWORD MaxLength, QWORD Cr3, void *Buffer)
Reads a NULL-terminated string from the guest.
INTSTATUS IntGetSupportVersion(void *GuestHandle, DWORD *MajorVersion, DWORD *MinorVersion, DWORD *BuildNumber)
Get the current version of CAMI.
BOOLEAN Initialized
True if this structure was initialized and can be used.
QWORD Feedback
Options that will be forced to feedback only mode.
Interface that exposes basic services to the introspection engines.
static BOOLEAN IntLixProcPolicyIsFeedback(const LIX_TASK_OBJECT *Process, QWORD Flag)
Verifies whether a specific process protection flag is in feedback only mode or not for a Linux proce...
void IntEnterDebugger2(PCHAR File, DWORD Line)
Traps to a debugger.
#define INT_SUCCESS(Status)
INTSTATUS IntGetGuestInfo(void *GuestHandle, GUEST_INFO *GuestInfo)
Get a description of the introspected guest.
static BOOLEAN IntWinProcPolicyIsFeedback(const WIN_PROCESS_OBJECT *Process, QWORD Flag)
Checks if the given process is protected with the provided flag (in feedback mode).
BOOLEAN KernelBetaDetections
True if the kernel protection is in beta (log-only) mode.
INTSTATUS IntAddExceptionFromAlert(void *GuestHandle, const void *Event, INTRO_EVENT_TYPE Type, BOOLEAN Exception, QWORD Context)
Adds an exception for an alert reported by introcore.See PFUNC_IntAddExceptionFromAlert for details...
QWORD IntPolicyGetProcProt(const void *Process)
Gets the protection policy for a process.
__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 INT_STATUS_NOT_NEEDED_HINT
#define PAGE_COUNT_4K(addr, bytes)
#define HpAllocWithTag(Len, Tag)
int INTSTATUS
The status data type.
INTSTATUS IntDisableIntro(void *GuestHandle, QWORD Flags)
Disables and unloads the introspection engine.
BOOLEAN IntPolicyIsCoreOptionFeedback(QWORD Flag)
Checks if a core protection option is in feedback-only mode.
#define INT_STATUS_NOT_FOUND
INTSTATUS IntQueryGuestInfo(DWORD InfoClass, void *InfoParam, void *Buffer, DWORD BufferLength)
INTSTATUS IntTranslateVirtualAddressEx(QWORD Gva, QWORD Cr3, DWORD Flags, VA_TRANSLATION *Translation)
Translates a guest virtual address to a guest physical address.
#define PAGE_COUNT(addr, bytes)
#define TRFLG_NONE
No special options.
INTSTATUS IntUpdateSupport(void *GuestHandle, PBYTE Buffer, DWORD Length)
Loads a new CAMI version.
PVCPU_STATE VcpuArray
Array of the VCPUs assigned to this guest. The index in this array matches the VCPU number...
PFUNC_IntEnterDebugger GlueEnterDebugger
The API used to break into the debugger.
INTRO_GUEST_TYPE OSType
The type of the guest.
static INTSTATUS IntTranslateVa64(UINT64 Gva, UINT64 Cr3, VA_TRANSLATION *Translation)
Translates a guest virtual address when 4-level paging is used.
INTSTATUS IntKernVirtMemPatchQword(QWORD GuestVirtualAddress, QWORD Data)
Writes 8 bytes in the guest kernel memory.
void * gIntHandle
The guest handle provided by the integrator at initialization.
struct _MULTI_PAGE_MAP * PMULTI_PAGE_MAP
Interface used for communicating between the introspection engine and the integrator.
char * utf16_for_log(const WCHAR *WString)
Converts a UTF-16 to a UTF-8 string to be used inside logging macros.
#define INTRO_MATCH_TRUNCATED
If set, matching functions like IntMatchPatternUtf8 will match up until the first wild char encounter...
LIST_ENTRY Link
Entry inside the gMultiPageMaps list.
INTSTATUS IntSpinLockUnInit(void **SpinLock)
QWORD Beta
Options that were forced to beta (log-only) mode.
BOOLEAN gSse42Supported
Set to True if support for SSE 4.2 was detected.
INTSTATUS IntAddRemoveProtectedProcessUtf8(void *GuestHandle, const CHAR *FullPath, DWORD ProtectionMask, BOOLEAN Add, QWORD Context)
Toggles protection options for a process.
BOOLEAN IntPolicyProcForceBetaIfNeeded(QWORD Flag, void *Process, INTRO_ACTION *Action)
Checks if a forced action should be taken even if the process log-only mode is active.
INTSTATUS IntUninit(void)
Disables and uninitializes Introcore.
INTSTATUS IntSetLogLevel(void *GuestHandle, IG_LOG_LEVEL LogLevel)
Sets the log level.
INTSTATUS IntGuestUninitOnBugcheck(void const *Detour)
Prepares Introcore unload in case of a guest crash in order to clean up the code and data injected in...
Holds information about page mappings that contain multiple pages.
static BOOLEAN IntWinProcPolicyIsBeta(const WIN_PROCESS_OBJECT *Process, QWORD Flag)
Checks if the given process is protected with the provided flag (in beta mode).
INTSTATUS IntVirtMemPatchDword(QWORD GuestVirtualAddress, QWORD Cr3, DWORD Data)
Writes 4 bytes in the guest memory.
INTSTATUS IntGpaCacheRelease(PGPA_CACHE Cache, QWORD Gpa)
Release a previously used cached entry.
#define POLICY_KM_BETA_FLAGS
Aggregates all the flags that are affected by the INTRO_OPT_ENABLE_KM_BETA_DETECTIONS flag...
const INT_VERSION_INFO IntHviVersion
The version of the introcore library.
int is_str_ansi(const char *Buffer, size_t MaxBufferSize, size_t MinSize)
INTSTATUS IntNotifyGuestPowerStateChange(void *GuestHandle, IG_GUEST_POWER_STATE PowerState)
Handles guest power state transitions.
INTSTATUS IntInjectExceptionInGuest(BYTE Vector, QWORD Cr2, DWORD ErrorCode, DWORD CpuNumber)
Injects an exception inside the guest.
INTSTATUS IntUpdateExceptions(void *GuestHandle, PBYTE Buffer, DWORD Length, DWORD Flags)
Loads a new exceptions version.See PFUNC_IntUpdateExceptions for details.
static QWORD IntWinProcGetProtOption(const WIN_PROCESS_OBJECT *Process)
Get the protection type for the given process.
INTSTATUS IntRemoveException(void *GuestHandle, QWORD Context)
Removes a custom exception added with GLUE_IFACE.AddExceptionFromAlert.See PFUNC_IntRemoveException f...
QWORD Flags
The entry that maps VirtualAddress to PhysicalAddress, together with all the control bits...
#define CLEAN_PHYS_ADDRESS32PAE_ROOT(x)
BOOLEAN gAbortLoad
Set to True if introcore should abort the initialization process.
#define _Inout_updates_bytes_(expr)
The context of an error state.
INTSTATUS IntRemoveAllProtectedProcesses(void *GuestHandle)
Removes the protection policies for all processes.
#define INT_STATUS_ALREADY_INITIALIZED
#define IS_KERNEL_POINTER_LIX(p)
#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...
INTSTATUS IntVirtMemFetchDword(QWORD GuestVirtualAddress, QWORD Cr3, DWORD *Data)
Reads 4 bytes from the guest memory.
INTSTATUS IntTranslateVirtualAddress(QWORD Gva, QWORD Cr3, QWORD *PhysicalAddress)
Translates a guest virtual address to a guest physical address.
#define IG_DISABLE_IGNORE_SAFENESS
static BOOLEAN RemoveEntryList(LIST_ENTRY *Entry)
static INTSTATUS IntTranslateVa32Pae(UINT64 Gva, UINT64 Cr3, VA_TRANSLATION *Translation)
Translates a guest virtual address when 32-bit PAE paging is used.
BOOLEAN IntPolicyProcIsBeta(const void *Process, QWORD Flag)
Checks if a process protection policy is in log-only mode.
BOOLEAN Guest64
True if this is a 64-bit guest, False if it is a 32-bit guest.
QWORD Current
The currently used options.
#define CLEAN_PHYS_ADDRESS32PAE(x)
INTSTATUS IntGetCurrentIntroOptions(void *GuestHandle, QWORD *IntroOptions)
Get the currently used introcore options.
INTSTATUS IntKernVirtMemFetchQword(QWORD GuestVirtualAddress, QWORD *Data)
Reads 8 bytes from the guest kernel memory.
INTSTATUS IntFlushAlertExceptions(void *GuestHandle)
Removes all the custom exceptions added with GLUE_IFACE.AddExceptionFromAlert.See PFUNC_IntFlushAlert...
BOOLEAN gInsideDebugger
Set to True when introcore is inside a debugger.
static INTSTATUS IntTranslateVa32(UINT32 Gva, UINT32 Cr3, VA_TRANSLATION *Translation)
Translates a guest virtual address when 32-bit paging is used.
INTSTATUS IntVirtMemWrite(QWORD Gva, DWORD Length, QWORD Cr3, void *Buffer)
Writes data to a guest virtual memory range.
static BOOLEAN IntLixProcPolicyIsBeta(const LIX_TASK_OBJECT *Process, QWORD Flag)
Verifies whether a specific process protection flag is in beta mode or not for a Linux process...
void * GpaCache
The currently used GPA cache.
#define INT_STATUS_INVALID_PARAMETER_4
#define IS_KERNEL_POINTER_WIN(is64, p)
Checks if a guest virtual address resides inside the Windows kernel address space.
DWORD gCurLogBuffer
Used for utf16_for_log to support calling that function 8 times in a single macro.
DWORD MsrId
The ID of the MSR, as defined by Intel.
const QWORD gByteMaskToBitMask[256]
Converts a byte number to a mask having the bits in those bytes set.
#define HpFreeAndNullWithTag(Add, Tag)
INTSTATUS IntInjectProcessAgentInGuest(void *GuestHandle, DWORD AgentTag, PBYTE AgentContent, DWORD AgentSize, const CHAR *Name, const CHAR *Args)
Requests a process agent injection inside the guest.
#define INT_STATUS_INVALID_INTERNAL_STATE
#define TRFLG_4_LEVEL_MODE
Hint that the paging mode is PAGING_4_LEVEL_MODE.
INTSTATUS IntDbgProcessCommand(DWORD Argc, const char *Argv[])
BOOLEAN IntPolicyCoreForceBetaIfNeeded(QWORD Flag, INTRO_ACTION *Action)
Checks if a forced action should be taken even if the log-only mode is active.
static INTSTATUS IntPhysMemReadWrite(QWORD PhysicalAddress, DWORD Length, void *Buffer, DWORD *RetLength, BOOLEAN Write)
Transfers memory between a guest physical memory range and Introcore, but only for a single memory pa...
#define TRFLG_PAE_MODE
Hint that the paging mode is PAGING_PAE_MODE.
BYTE WordSize
Guest word size. Will be 4 for 32-bit guests and 8 for 64-bit guests.
INTSTATUS IntKernVirtMemPatchDword(QWORD GuestVirtualAddress, DWORD Data)
Writes 4 bytes in the guest kernel memory.
static void InsertTailList(LIST_ENTRY *ListHead, LIST_ENTRY *Entry)
BOOLEAN IntPolicyCoreTakeAction(QWORD Flag, INTRO_ACTION *Action, INTRO_ACTION_REASON *Reason)
Returns the action that should be taken for a core introspection option.
QWORD Cr2
The Cr2. Valid only if Vector is 14 (Page Fault)
struct _INT_VERSION_INFO::@339 VersionInfo
Structured version information.
#define _Outptr_result_bytebuffer_(expr)
INTSTATUS IntPhysicalMemWrite(QWORD PhysicalAddress, DWORD Length, void *Buffer)
Writes data to a guest physical memory range, but only for a single page.
QWORD Gva
Guest virtual address to map.
INTSTATUS IntSpinLockInit(void **SpinLock, char *Name)
unsigned long long UINT64
DWORD CpuCount
The number of logical CPUs.
LIST_HEAD gMultiPageMaps
List of all the currently valid multi page maps.
INTSTATUS IntGetCurrentInstructionLength(void *GuestHandle, DWORD CpuNumber, BYTE *Length)
Returns the length of the instruction at which the current guest RIP points.
#define UNREFERENCED_PARAMETER(P)
INTSTATUS IntVirtMemFetchWordSize(QWORD GuestVirtualAddress, QWORD Cr3, void *Data)
Reads a guest pointer from the guest memory.
INTSTATUS IntVirtMemPatchQword(QWORD GuestVirtualAddress, QWORD Cr3, QWORD Data)
Writes 8 bytes in the guest memory.
INTSTATUS IntGetCurrentInstructionMnemonic(void *GuestHandle, DWORD CpuNumber, CHAR *Mnemonic)
Returns the mnemonic of the instruction at which the current guest RIP points.
void * HostPtr
The virtual address to which Gva was mapped. Page aligned.
static void __cpuid(int32_t info[4], int32_t level)
#define CLEAN_PHYS_ADDRESS32(x)
BOOLEAN IntPolicyCoreIsOptionBeta(QWORD Flag)
Checks if one of the kernel protection options is in log-only mode.
enum _INTRO_ACTION INTRO_ACTION
Event actions.
#define IG_PHYSMAP_NO_CACHE
Signals that a physical mapping request should bypass any existing caches.
#define _In_reads_bytes_(expr)
INTSTATUS IntInjectFileAgentInGuest(void *GuestHandle, PBYTE AgentContent, DWORD AgentSize, const CHAR *Name)
Drops a file on the guest hard disk.
struct _MULTI_PAGE_MAP MULTI_PAGE_MAP
Holds information about page mappings that contain multiple pages.
The action was allowed, but it has the BETA flag (Introcore is in log-only mode). ...
#define TRFLG_5_LEVEL_MODE
Hint that the paging mode is PAGING_5_LEVEL_MODE.
#define IntDbgEnterDebugger()
INTSTATUS IntModifyDynamicOptions(void *GuestHandle, QWORD NewOptions)
Modifies the introcore options.
INTSTATUS IntVirtMemUnmap(void **HostPtr)
Unmaps a memory range previously mapped with IntVirtMemMap.
MM Mm
Guest memory information, such as paging mode, system Cr3 value, etc.
INTSTATUS IntAbortEnableIntro(void *GuestHandle, BOOLEAN Abort)
Abort the introcore loading process.
#define INTRO_OPT_BUGCHECK_CLEANUP
Enable memory cleanup after an OS crash (Windows).
INTSTATUS IntVirtMemSet(QWORD VirtualAddress, DWORD Length, QWORD Cr3, BYTE Value)
INTSTATUS IntAddRemoveProtectedProcessUtf16(void *GuestHandle, const WCHAR *FullPath, DWORD ProtectionMask, BOOLEAN Add, QWORD Context)
Toggles protection options for a process.
GUEST_STATE gGuest
The current guest state.
BOOLEAN IntPolicyProcIsFeedback(const void *Process, QWORD Flag)
Checks if a process protection policy is in feedback-only mode.
static INTSTATUS IntPhysMemReadWriteAnySize(QWORD PhysicalAddress, DWORD Length, void *Buffer, DWORD *RetLength, BOOLEAN Write)
Transfers memory between a guest physical memory range and Introcore.
BOOLEAN IntPolicyProcTakeAction(QWORD Flag, void const *Process, INTRO_ACTION *Action, INTRO_ACTION_REASON *Reason)
Returns the action that should be taken for a process protection option.
#define _When_(expr, arg)
DWORD ErrorCode
The error code, for exceptions that have an error code.
Introspection version info.
QWORD PageSize
The page size used for this translation.
struct _VCPU_STATE::@80 Exception
The exception to be injected in guest.
INTSTATUS IntPhysicalMemWriteAnySize(QWORD PhysicalAddress, DWORD Length, void *Buffer)
Writes data to a guest physical memory range, regardless of how many pages it spans across...
INTSTATUS IntInjectTrap(DWORD CpuNumber, BYTE TrapNumber, DWORD ErrorCode, QWORD Cr2)
INTSTATUS IntGpaCacheFindAndAdd(PGPA_CACHE Cache, QWORD Gpa, void **Hva)
Search for an entry in the GPA cache, and add it, if it wasn't found.
INTSTATUS IntNewGuestNotification(void *GuestHandle, QWORD Options, PBYTE UpdateBuffer, DWORD BufferLength)
Handles a new guest. It is essentially the Introcore entry point.
#define INT_STATUS_NO_MAPPING_STRUCTURES
Indicates that not all mapping structures of a virtual address are present.
PAGING_MODE Mode
The paging mode used by the guest.
INTSTATUS IntCr3Read(DWORD CpuNumber, QWORD *Cr3Value)
Reads the value of the guest CR3.
#define LIST_HEAD_INIT(Name)
DWORD Length
The size to map.
#define _Out_writes_z_(expr)
__must_check INTSTATUS IntPhysMemMap(QWORD PhysAddress, DWORD Length, DWORD Flags, void **HostPtr)
Maps a guest physical address inside Introcore VA space.
INTSTATUS IntPhysicalMemReadAnySize(QWORD PhysicalAddress, DWORD Length, void *Buffer, DWORD *RetLength)
Reads data from a guest physical memory range, regardless of how many pages it spans across...
Encapsulates information about a virtual to physical memory translation.
BOOLEAN Valid
True if the fields are valid; False if they are not.
#define INT_STATUS_INVALID_PARAMETER_1
VCPU_STATE * gVcpu
The state of the current VCPU.
static INTSTATUS IntVirtMemMapMultiPage(QWORD GuestVirtualAddress, DWORD Length, QWORD Cr3, void **HostPtr)
Maps a guest kernel virtual memory range inside Introcore virtual address space regardless of the num...
INTRO_ERROR_CONTEXT gErrorContext
Global storage for the error context used by GLUE_IFACE.NotifyIntrospectionErrorState.
static INTSTATUS IntUnmapGpaForTranslation(QWORD Gpa, void **HostPtr)
Unmaps an address that was previously mapped with IntMapGpaForTranslation.
static BOOLEAN IntVirtMemUnmapMultiPage(void **HostPtr)
Unamps a memory range previously mapped with IntVirtMemMapMultiPage.
BOOLEAN BugCheckInProgress
#define TRFLG_CACHING_ATTR
Obtain caching information from the guest's IA32_PAT MSR.
INTSTATUS IntVirtMemRead(QWORD Gva, DWORD Length, QWORD Cr3, void *Buffer, DWORD *RetLength)
Reads data from a guest virtual memory range.
Get the value of a MSR for a VCPU. Buffer points to a IG_QUERY_MSR structure.
unsigned long long * PQWORD
static INTSTATUS IntVirtMemReadWrite(QWORD VirtualAddress, DWORD Length, QWORD Cr3, void *Buffer, DWORD *RetLength, BOOLEAN Write)
Transfers memory between a guest virtual memory range and Introcore.
#define list_for_each(_head, _struct_type, _var)
INTSTATUS IntFlushGpaCache(void *GuestHandle)
Flushed the introcore GPA cache.
INTSTATUS IntKernVirtMemFetchWordSize(QWORD GuestVirtualAddress, void *Data)
Reads a guest pointer from the guest kernel memory.
INTSTATUS IntKernVirtMemFetchDword(QWORD GuestVirtualAddress, DWORD *Data)
Reads 4 bytes from the guest kernel memory.
void IntDbgEnterDebugger2(PCHAR File, DWORD Line)
Traps to a debugger and dumps the Introcore state.
INTSTATUS IntPhysMemUnmap(void **HostPtr)
Unmaps an address previously mapped with IntPhysMemMap.
#define INT_STATUS_INVALID_PARAMETER_2
INTRO_PROT_OPTIONS CoreOptions
The activation and protection options for this guest.
INTSTATUS IntGlueInit(GLUE_IFACE const *GlueInterface, UPPER_IFACE const *UpperInterface)
Initializes the instances of GLUE_IFACE and UPPER_IFACE that will be used.
#define TRFLG_NORMAL_MODE
Hint that the paging mode is PAGING_NORMAL_MODE.
BOOLEAN IntMatchPatternUtf8(const CHAR *Pattern, const CHAR *String, DWORD Flags)
Matches a pattern using glob match.
INTSTATUS IntGetVersionString(DWORD FullStringSize, DWORD VersionStringSize, CHAR *FullString, CHAR *VersionString)
Get the version string information for the current guest.
BOOLEAN IntMatchPatternUtf16(const WCHAR *Pattern, const WCHAR *String, DWORD Flags)
Matches a pattern using glob match.
void * OrigAlloc
The original allocation, which may bot be page aligned.
static INTSTATUS IntTranslateVa64La57(UINT64 Gva, UINT64 Cr3, VA_TRANSLATION *Translation)
Translates a guest virtual address when 5-level paging is used.
static BOOLEAN IsSse42Supported(void)
Checks if support for SSE 4.2 is present.
#define INT_STATUS_INSUFFICIENT_RESOURCES
#define INT_STATUS_INVALID_PARAMETER_3
INTSTATUS IntPauseVcpus(void)
Pauses all the guest VCPUs.
void * gLock
A lock that ensures that all the events are serialized inside introcore.