49 if (*(
char *)Driver->Name)
51 ret = snprintf(Line, MaxLength,
"%s(%-*s", Header, NameAlignment, (
char *)Driver->Name);
60 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
69 ret = snprintf(Line, MaxLength,
" [0x%08x], %016llx", Driver->NameHash, Driver->BaseVa);
73 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
82 ret = snprintf(Line, MaxLength,
")");
118 wName = Module->Win.Path ? Module->Win.Path : Module->Name ? Module->Name : NULL;
131 ret = snprintf(Line, MaxLength,
"%s(%-*s", Header, NameAlignment, name);
135 ret = snprintf(Line, MaxLength,
"%s(%s", Header, name);
140 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
149 ret = snprintf(Line, MaxLength,
" [0x%08x], %0*llx", Module->NameHash,
gGuest.
WordSize * 2, Module->BaseVa);
152 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
161 if (Module->Win.TimeDateStamp)
163 ret = snprintf(Line, MaxLength,
", VerInfo: %x:%llx", Module->Win.TimeDateStamp, Module->Size);
167 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
177 ret = snprintf(Line, MaxLength,
")");
202 const char *msrName = NULL;
203 int ret = 0, total = 0;
205 ret = snprintf(Line, MaxLength,
"%s: (%08x", Header, Victim->Msr.Msr);
209 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
220 msrName =
"SYSENTER_CS";
224 msrName =
"SYSENTER_ESP";
228 msrName =
"SYSENTER_EIP";
241 ret = snprintf(Line, MaxLength,
", %s", msrName);
245 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
255 ret = snprintf(Line, MaxLength,
")");
259 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
268 ret = snprintf(Line, MaxLength,
", WriteInfo: (%016llx -> %016llx)",
269 Victim->WriteInfo.OldValue[0],
270 Victim->WriteInfo.NewValue[0]);
273 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
282 if (Victim->Msr.NewDriverBase)
314 ret = snprintf(Line, MaxLength,
", %s", symbol);
318 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
352 int ret = 0, total = 0;
354 ret = snprintf(Line, MaxLength,
"%s%u", Header, Victim->Cr.Cr);
358 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
367 if (Victim->Cr.Smep && Victim->Cr.Smap)
369 ret = snprintf(Line, MaxLength,
", (SMAP, SMEP)");
373 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
382 else if (Victim->Cr.Smap)
384 ret = snprintf(Line, MaxLength,
", (SMEP)");
388 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
397 else if (Victim->Cr.Smep)
399 ret = snprintf(Line, MaxLength,
", (SMAP)");
403 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
413 ret = snprintf(Line, MaxLength,
", WriteInfo: (%u, %016llx -> %016llx)",
414 Victim->WriteInfo.AccessSize,
415 Victim->WriteInfo.OldValue[0],
416 Victim->WriteInfo.NewValue[0]);
419 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
450 int ret = 0, total = 0;
451 QWORD entry, entryNo;
456 entry = Victim->Object.BaseAddress + Victim->Integrity.Offset;
462 entry = Victim->Ept.Gva;
463 entryNo = (Victim->Ept.Gva - Victim->Object.BaseAddress) /
468 ret = snprintf(Line, MaxLength,
"%s (IDT Base Address: %llx, IDT Entry modified: %llu (0x%016llx) (%s)",
469 Header, Victim->Object.BaseAddress, entryNo, entry, prot);
472 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
481 ret = snprintf(Line, MaxLength,
", WriteInfo: (%u", Victim->WriteInfo.AccessSize);
484 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
493 for (
DWORD i = 0; i *
sizeof(Victim->WriteInfo.NewValue[0]) < Victim->WriteInfo.AccessSize; i++)
495 ret = snprintf(Line, MaxLength,
", %016llx -> 0x%016llx",
496 Victim->WriteInfo.OldValue[i],
497 Victim->WriteInfo.NewValue[i]);
500 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
510 ret = snprintf(Line, MaxLength,
")");
513 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
544 const char *dtrName = NULL;
545 int ret = 0, total = 0;
547 ret = snprintf(Line, MaxLength,
"%s(", Header);
551 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
573 ret = snprintf(Line, MaxLength,
"%s", dtrName);
577 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
586 ret = snprintf(Line, MaxLength,
")");
590 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
599 ret = snprintf(Line, MaxLength,
", WriteInfo: (%016llx -> %016llx)",
600 Victim->WriteInfo.OldValue[0],
601 Victim->WriteInfo.NewValue[0]);
604 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
613 ret = snprintf(Line, MaxLength,
", DtrLimit: (%04llx -> %04llx)",
614 Victim->WriteInfo.OldValue[1],
615 Victim->WriteInfo.NewValue[1]);
618 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
649 DWORD modNameAlignment;
654 pDriver = Originator->Original.Driver;
655 pRetDriver = Originator->Return.Driver;
657 modNameAlignment = 0;
662 if (pModDriver && pDriver && pRetDriver)
667 if (pModDriver && pRetDriver)
669 if (modNameAlignment > 0)
692 char instr[ND_MIN_BUF_SIZE];
695 if (Originator->Instruction)
697 NDSTATUS s = NdToText(Originator->Instruction, Originator->Original.Rip,
sizeof(instr), instr);
725 ret = snprintf(l, rem,
", RIP %016llx", Originator->Original.Rip);
729 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
737 if (Originator->Original.Section[0] != 0)
739 ret = snprintf(l, rem,
" (%s)", Originator->Original.Section);
743 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
754 ret = snprintf(l, rem,
" (%s)", symbol);
758 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
769 ret = snprintf(l, rem,
", Instr: %s", instr);
773 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
800 if (pRetDriver && Originator->Original.Rip != Originator->Return.Rip)
822 ret = snprintf(l, rem,
", RIP %016llx", Originator->Return.Rip);
826 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
834 if (Originator->Return.Section[0] != 0)
836 ret = snprintf(l, rem,
"(%s)", Originator->Return.Section);
840 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
851 ret = snprintf(l, rem,
" (%s)", symbol);
855 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
881 pDriver = Victim->Object.Module.Module;
891 ret = snprintf(l, rem,
"Victim -> Module: %*s", modNameAlignment,
"[vdso]");
897 ret = snprintf(l, rem,
"Victim -> Module: %*s", modNameAlignment,
"[vsyscall]");
902 ret = snprintf(l, rem,
", Address: (%0llx, %0llx)",
903 Victim->Ept.Gva, Victim->Ept.Gpa);
907 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
923 ret = snprintf(l, rem,
", %s", symbol);
927 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
939 ret = snprintf(l, rem,
", WriteInfo: (%u, %016llx -> %016llx)", Victim->WriteInfo.AccessSize,
940 Victim->WriteInfo.OldValue[0], Victim->WriteInfo.NewValue[0]);
944 ret = snprintf(l, rem,
", ReadInfo: (%u, %016llx)", Victim->ReadInfo.AccessSize, Victim->ReadInfo.Value[0]);
949 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
957 if (Victim->ZoneFlags)
959 ret = snprintf(l, rem,
", Flags:%s%s%s%s%s (0x%llx)",
965 (
unsigned long long)Victim->ZoneFlags);
969 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
998 ret = snprintf(l, rem,
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%sROOTKIT (kernel-mode) ",
1003 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1014 ret = snprintf(l, rem,
"(no sig)");
1017 ret = snprintf(l, rem,
"(no exc)");
1020 ret = snprintf(l, rem,
"(extra)");
1023 ret = snprintf(l, rem,
"(error)");
1026 ret = snprintf(l, rem,
"(value)");
1029 ret = snprintf(l, rem,
"(export)");
1032 ret = snprintf(l, rem,
"(value code)");
1035 ret = snprintf(l, rem,
"(idt)");
1038 ret = snprintf(l, rem,
"(version os)");
1041 ret = snprintf(l, rem,
"(version intro)");
1044 ret = snprintf(l, rem,
"(process creation)");
1047 ret = snprintf(l, rem,
"(unknown)");
1050 ret = snprintf(l, rem,
"(%d)", Reason);
1056 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1064 snprintf(l, rem,
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
1068 for (
DWORD t = 0; t < Originator->StackTrace.NumberOfTraces; t++)
1070 if (NULL != Originator->StackTrace.Traces[t].ReturnModule)
1090 LOG(
"[STACK TRACE] [at %llx] returning to [%s at %llx] %s",
1091 Originator->StackTrace.Traces[t].CurrentRip,
1092 (
char *)((
KERNEL_DRIVER *)Originator->StackTrace.Traces[t].ReturnModule)->Name,
1093 Originator->StackTrace.Traces[t].ReturnAddress, symbol);
1097 LOG(
"[STACK TRACE] [at %llx]", Originator->StackTrace.Traces[t].CurrentRip);
1132 ret = snprintf(Line, MaxLength,
"%s(%s", Header, name);
1136 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1145 ret = snprintf(Line, MaxLength,
" [0x%08x], %0*llx, %0llx",
1146 DrvObj->NameHash,
gGuest.
WordSize * 2, DrvObj->DriverObjectGva, DrvObj->DriverObjectGpa);
1150 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1159 if (DrvObj->FastIOTableAddress)
1161 ret = snprintf(Line, MaxLength,
", %0*llx",
gGuest.
WordSize * 2, DrvObj->FastIOTableAddress);
1165 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1175 ret = snprintf(Line, MaxLength,
")");
1179 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1207 DWORD modNameAlignment;
1211 pDriver = Originator->Original.Driver;
1212 pRetDriver = Originator->Return.Driver;
1214 modNameAlignment = 0;
1219 if (pModDriver && pDriver)
1224 if (pModDriver && pRetDriver)
1226 if (modNameAlignment > 0)
1254 char instr[ND_MIN_BUF_SIZE];
1256 if (Originator->Instruction)
1258 NDSTATUS ndstatus = NdToText(Originator->Instruction, Originator->Original.Rip,
sizeof(instr), instr);
1259 if (!ND_SUCCESS(ndstatus))
1273 ret = snprintf(l, rem,
", RIP %0*llx",
gGuest.
WordSize * 2, Originator->Original.Rip);
1277 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1285 if (Originator->Original.Section[0] != 0)
1287 ret = snprintf(l, rem,
" (%s)", Originator->Original.Section);
1291 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1302 ret = snprintf(l, rem,
", Instr: %s", instr);
1306 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1317 if (Originator->Return.Driver && Originator->Original.Rip != Originator->Return.Rip)
1326 ret = snprintf(l, rem,
", RIP %0*llx",
gGuest.
WordSize * 2, Originator->Return.Rip);
1330 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1338 if (Originator->Return.Section[0] != 0)
1340 ret = snprintf(l, rem,
"(%s)", Originator->Return.Section);
1344 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1370 pDriver = Victim->Object.Module.Module;
1376 ret = snprintf(l, rem,
", Address: (%0*llx, %0*llx)",
1381 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1391 ret = snprintf(l, rem,
", WriteInfo: (%u, %016llx -> %016llx)", Victim->WriteInfo.AccessSize,
1392 Victim->WriteInfo.OldValue[0], Victim->WriteInfo.NewValue[0]);
1396 ret = snprintf(l, rem,
", ReadInfo: (%u, %016llx)", Victim->ReadInfo.AccessSize, Victim->ReadInfo.Value[0]);
1401 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1409 if (Victim->ZoneFlags)
1411 ret = snprintf(l, rem,
", Flags:%s%s%s%s%s (0x%llx)",
1417 (
unsigned long long)Victim->ZoneFlags);
1420 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1456 ret = snprintf(l, rem,
", WriteInfo: (%u, %016llx -> %016llx)",
1457 Victim->WriteInfo.AccessSize,
1458 Victim->WriteInfo.OldValue[0],
1459 Victim->WriteInfo.NewValue[0]);
1462 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1472 ret = snprintf(l, rem,
", INTEGRITY");
1476 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1495 LOG(
"Victim -> Hal interrupt controller: (%0*llx, %0*llx), WriteInfo: (%d, %016llx -> %016llx)\n",
1497 Victim->WriteInfo.AccessSize,
1498 Victim->WriteInfo.OldValue[0], Victim->WriteInfo.NewValue[0]);
1502 LOG(
"Victim -> Hal heap execute: (%0*llx, %0*llx)\n",
1507 LOG(
"Victim -> SharedUserData execute: (%0*llx, %0*llx)\n",
1518 LOG(
"Victim -> Self map entry: %s [0x%08x] (%016llx, %016llx), " 1519 "WriteInfo: (%d, %016llx -> %016llx), Index: %08x\n",
1520 Victim->Object.Name, Victim->Object.NameHash,
1521 Victim->Ept.Gva, Victim->Ept.Gpa,
1522 Victim->WriteInfo.AccessSize,
1523 Victim->WriteInfo.OldValue[0],
1524 Victim->WriteInfo.NewValue[0],
1531 LOG(
"Victim -> Circular Kernel Context Logger (%016llx, %016llx), " 1532 "WriteInfo: (%d, %016llx -> %016llx), INTEGRITY\n",
1533 Victim->Integrity.StartVirtualAddress,
1534 Victim->Integrity.StartVirtualAddress + Victim->Integrity.TotalLength,
1535 Victim->WriteInfo.AccessSize,
1536 Victim->WriteInfo.OldValue[0],
1537 Victim->WriteInfo.NewValue[0]);
1541 LOG(
"Victim -> Circular Kernel Context Logger (%016llx, %016llx), " 1542 "WriteInfo: (%d, %016llx -> %016llx), EPT\n",
1543 Victim->Ept.Gva, Victim->Ept.Gpa,
1544 Victim->WriteInfo.AccessSize,
1545 Victim->WriteInfo.OldValue[0],
1546 Victim->WriteInfo.NewValue[0]);
1560 LOG(
"Victim -> Token privileges (%s [0x%08x] %d), WriteInfo: (Present: 0x%016llx, " 1561 "Enabled: 0x%016llx -> Present: 0x%016llx, Enabled: 0x%016llx), INTEGRITY\n",
1562 Victim->Object.WinProc->Name,
1563 Victim->Object.WinProc->NameHash,
1564 Victim->Object.WinProc->Pid,
1565 Victim->WriteInfo.OldValue[0],
1566 Victim->WriteInfo.OldValue[1],
1567 Victim->WriteInfo.NewValue[0],
1568 Victim->WriteInfo.NewValue[1]);
1572 LOG(
"Victim -> Token privileges (%s [0x%08x] %d), WriteInfo: (%d, %016llx -> %016llx), EPT\n",
1573 Victim->Object.WinProc->Name,
1574 Victim->Object.WinProc->NameHash,
1575 Victim->Object.WinProc->Pid,
1576 Victim->WriteInfo.AccessSize,
1577 Victim->WriteInfo.OldValue[0],
1578 Victim->WriteInfo.NewValue[0]);
1587 ret = snprintf(l, rem,
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%sROOTKIT (kernel-mode) ",
1591 ERROR(
"[ERROR] Encoding error with snprintf: %d\n", ret);
1602 ret = snprintf(l, rem,
"(no sig)");
1605 ret = snprintf(l, rem,
"(no exc)");
1608 ret = snprintf(l, rem,
"(extra)");
1611 ret = snprintf(l, rem,
"(error)");
1614 ret = snprintf(l, rem,
"(value)");
1617 ret = snprintf(l, rem,
"(export)");
1620 ret = snprintf(l, rem,
"(value code)");
1623 ret = snprintf(l, rem,
"(idt)");
1626 ret = snprintf(l, rem,
"(version os)");
1629 ret = snprintf(l, rem,
"(version intro)");
1632 ret = snprintf(l, rem,
"(process creation)");
1635 ret = snprintf(l, rem,
"(unknown)");
1638 ret = snprintf(l, rem,
"(%d)", Reason);
1645 snprintf(l, rem,
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
1649 for (
DWORD t = 0; t < Originator->StackTrace.NumberOfTraces; t++)
1651 if (NULL != Originator->StackTrace.Traces[t].ReturnModule)
1653 LOG(
"[STACK TRACE] [at 0x%016llx] returning to [%s at 0x%016llx]\n",
1654 Originator->StackTrace.Traces[t].CurrentRip,
1656 Originator->StackTrace.Traces[t].ReturnAddress);
1660 LOG(
"[STACK TRACE] [at 0x%016llx]\n", Originator->StackTrace.Traces[t].CurrentRip);
1754 Originator->StackTrace.Traces = Originator->StackElements;
1759 if (!
INT_SUCCESS(status) && 0 == Originator->StackTrace.NumberOfTraces)
1761 WARNING(
"[WARNING] Failed getting a stack trace: 0x%08x. Skip checking for exported functions!\n",
1765 for (
DWORD t = 0; t < Originator->StackTrace.NumberOfTraces; t++)
1768 if (NULL == pRetMod)
1773 Originator->Return.Driver = pRetMod;
1774 Originator->Return.Rip = Originator->StackTrace.Traces[t].ReturnAddress;
1779 if (NULL == Originator->Return.Driver)
1781 for (
DWORD t = 0; t < Originator->StackTrace.NumberOfTraces; t++)
1784 if (NULL == pRetMod)
1796 Originator->Return.Driver = pRetMod;
1797 Originator->Return.Rip = Originator->StackTrace.Traces[t].ReturnAddress;
1803 if (NULL == Originator->Original.Driver && NULL == Originator->Return.Driver)
1809 if (NULL != Originator->Original.Driver)
1811 rip = Originator->Original.Rip;
1812 pDriver = Originator->Original.Driver;
1820 Originator->Original.NameHash = pDriver->
NameHash;
1830 if (NULL != Originator->Return.Driver)
1832 rip = Originator->Return.Rip;
1833 pDriver = Originator->Return.Driver;
1841 Originator->Return.NameHash = pDriver->
NameHash;
1878 DWORD currentTrace = 0;
1885 stackDepth = (NULL == Originator->Original.Driver) ? 3 : 1;
1888 Originator->StackTrace.Traces = Originator->StackElements;
1891 if (!
INT_SUCCESS(status) && (Originator->StackTrace.NumberOfTraces == 0))
1893 WARNING(
"[WARNING] Failed getting a stack trace: 0x%08x. Skip checking for exported functions!\n",
1899 if (NULL == Originator->Original.Driver)
1903 for (t = 0; t < Originator->StackTrace.NumberOfTraces; t++)
1905 if (NULL == Originator->StackTrace.Traces[t].ReturnModule)
1910 Originator->Return.Driver = Originator->StackTrace.Traces[t].ReturnModule;
1912 Originator->Return.Rip = Originator->StackTrace.Traces[t].ReturnAddress;
1920 Originator->Return.Driver = Originator->Original.Driver;
1923 if (NULL == Originator->Original.Driver && NULL != Originator->Return.Driver)
1925 TRACE(
"[WARNING] The RIP 0x%016llx is not inside any module, but it returns to one 0x%016llx " 1926 "(BaseVa 0x%016llx).\n",
1927 Originator->Original.Rip,
1928 Originator->Return.Rip,
1929 Originator->Return.Driver->BaseVa);
1931 else if (NULL == Originator->Original.Driver && NULL == Originator->Return.Driver)
1939 pDriver = Originator->Return.Driver;
1940 pOriginalDriver = Originator->Original.Driver;
1952 (
DWORD)(Originator->Return.Rip - pDriver->
BaseVa),
1956 ERROR(
"[ERROR] Failed getting section details for Rip 0x%016llx: 0x%08x\n",
1957 Originator->Original.Rip, status);
1958 goto _cleanup_and_break;
1962 WARNING(
"[WARNING] Rip 0x%016llx isn't inside any section. ModuleBase: 0x%016llx\n",
1963 Originator->Original.Rip, pDriver->
BaseVa);
1968 goto _cleanup_and_break;
1972 if (Originator->Original.Driver != NULL &&
1973 0 == Originator->Original.Section[0])
1975 memcpy(Originator->Original.Section, sectionHeader.
Name,
sizeof(sectionHeader.
Name));
1978 memcpy(Originator->Return.Section, sectionHeader.
Name,
sizeof(sectionHeader.
Name));
1982 0 == memcmp(Originator->Return.Section,
"PAGEVRF", 7))
1984 WARNING(
"[WARNING] The RIP is inside the kernel section %s, the VERIFIER is active...\n",
1985 Originator->Return.Section);
1993 WARNING(
"[WARNING] Code executed from a section that doesn't contain code (RIP 0x%016llx). " \
1994 "Characteristics: 0x%08x, Name: %s\n",
1995 Originator->Return.Rip, sectionHeader.
Characteristics, Originator->Return.Section);
2000 goto _cleanup_and_break;
2003 0 == memcmp(Originator->Return.Section,
"INIT", 4))
2007 Originator->IsEntryPoint =
TRUE;
2010 goto _cleanup_and_break;
2013 if (0 == Originator->StackTrace.NumberOfTraces ||
2014 NULL == Originator->Original.Driver)
2018 goto _cleanup_and_break;
2030 (
DWORD)(Originator->Return.Rip - pDriver->
BaseVa));
2037 (
DWORD)(Originator->Return.Rip - pDriver->
BaseVa));
2044 goto _cleanup_and_break;
2051 if (pDriver == Originator->StackTrace.Traces[currentTrace].ReturnModule)
2054 goto _cleanup_and_break;
2067 goto _cleanup_and_break;
2072 if (NULL == Originator->StackTrace.Traces[currentTrace].ReturnModule)
2074 WARNING(
"[WARNING] RIP 0x%016llx returning to an address that isn't inside a driver 0x%016llx. " 2075 "Block the attempt\n",
2076 Originator->Original.Rip,
2077 Originator->StackTrace.Traces[currentTrace].ReturnAddress);
2103 Originator->Return.Rip = Originator->StackTrace.Traces[currentTrace].ReturnAddress;
2105 pDriver = Originator->StackTrace.Traces[currentTrace].ReturnModule;
2106 if (NULL == pDriver)
2111 Originator->Return.Driver = pDriver;
2114 }
while (currentTrace < Originator->StackTrace.NumberOfTraces);
2129 Originator->Return.NameHash = pDriver->
NameHash;
2133 if (pOriginalDriver)
2147 Originator->Original.NameHash = pOriginalDriver->
NameHash;
2175 if (NULL == Originator)
2190 Originator->Instruction = NULL;
2237 if (NULL == Originator)
2244 ERROR(
"[ERROR] Integrity alerts are not supported on guests %d\n",
gGuest.
OSType);
2248 Originator->IsIntegrity =
TRUE;
2256 if (Victim->WriteInfo.NewValue[0] < 0x60 || Victim->WriteInfo.NewValue[0] > 0x200)
2258 WARNING(
"[WARNING] The new size 0x%016llx is too big...\n", Victim->WriteInfo.NewValue[0]);
2265 WARNING(
"[WARNING] Not writing on size field & writing non-pointer value: 0x%016llx\n",
2266 Victim->WriteInfo.NewValue[0]);
2293 addr = Victim->WriteInfo.NewValue[0];
2301 if (NULL == Originator->Return.Driver)
2305 WARNING(
"[WARNING] Written value is not a kernel pointer or inside any driver: 0x%016llx\n", addr);
2315 else if (0 ==
wstrcasecmp(Originator->Return.Driver->Name, u
"hal.dll") ||
2316 0 ==
wstrcasecmp(Originator->Return.Driver->Name, u
"halmacpi.dll") ||
2317 0 ==
wstrcasecmp(Originator->Return.Driver->Name, u
"halacpi.dll"))
2323 Originator->Return.NameHash = Originator->Return.Driver->NameHash;
2327 Originator->Original.NameHash = Originator->Return.NameHash;
2328 Originator->Original.Driver = Originator->Return.Driver;
2362 if (NULL == NewValue)
2367 if (NULL == OldValue)
2377 Victim->Object.Type = Type;
2380 Victim->WriteInfo.NewValue[0] = NewValue->Base;
2381 Victim->WriteInfo.NewValue[1] = NewValue->Limit;
2382 Victim->Dtr.Type = Type;
2383 Victim->WriteInfo.OldValue[0] = OldValue->Base;
2384 Victim->WriteInfo.OldValue[1] = OldValue->Limit;
2418 Victim->Object.Type = 0;
2421 Victim->WriteInfo.NewValue[0] = NewValue;
2422 Victim->Msr.Msr = Msr;
2423 Victim->WriteInfo.OldValue[0] = OldValue;
2426 Victim->Msr.NewDriverBase = 0;
2432 Victim->Msr.NewDriverBase = pDriver->
BaseVa;
2466 BYTE *pPage, *pOriginal;
2470 if (NULL == IntegrityRegion)
2487 ERROR(
"[ERROR] Integrity alerts are not supported on guests %d\n",
gGuest.
OSType);
2491 pOriginal = IntegrityRegion->OriginalContent;
2497 ERROR(
"[ERROR] Failed mapping/reading at GVA 0x%016llx, with length %x: 0x%08x\n",
2498 IntegrityRegion->Gva, IntegrityRegion->Length, status);
2503 for (i = *Offset; i < IntegrityRegion->Length; i++)
2505 if (pPage[i] != pOriginal[i])
2515 *Offset = IntegrityRegion->Length;
2516 goto _cleanup_and_leave;
2524 switch (IntegrityRegion->Type)
2537 Victim->Object.Type = IntegrityRegion->Type;
2540 Victim->Integrity.StartVirtualAddress = IntegrityRegion->Gva;
2541 Victim->Integrity.TotalLength = IntegrityRegion->Length;
2542 Victim->Integrity.Offset = i;
2544 switch (IntegrityRegion->Type)
2549 Victim->WriteInfo.AccessSize =
sizeof(
IDT_ENTRY64);
2553 Victim->WriteInfo.AccessSize =
sizeof(
IDT_ENTRY32);
2568 if (i + Victim->WriteInfo.AccessSize > IntegrityRegion->Length)
2570 Victim->WriteInfo.AccessSize = IntegrityRegion->Length - i;
2573 memcpy(Victim->WriteInfo.OldValue, pOriginal + i, Victim->WriteInfo.AccessSize);
2574 memcpy(Victim->WriteInfo.NewValue, pPage + i, Victim->WriteInfo.AccessSize);
2576 switch (IntegrityRegion->Type)
2583 if (NULL == pDrvObj)
2585 LOG(
"We must have a integrity context (a driver object)\n");
2587 goto _cleanup_and_leave;
2590 Victim->Object.NameHash = pDrvObj->
NameHash;
2591 Victim->Object.DriverObject = pDrvObj;
2603 Victim->Object.BaseAddress = IntegrityRegion->Gva;
2608 LOG(
"Invalid integrity region type: %d\n", IntegrityRegion->Type);
2652 Victim->Object.Type = (
DWORD) -1;
2654 Victim->WriteInfo.NewValue[0] = NewValue;
2655 Victim->WriteInfo.OldValue[0] = OldValue;
2658 Victim->WriteInfo.AccessSize =
sizeof(
QWORD);
2660 Victim->Cr.Smap = ((OldValue &
CR4_SMAP) != 0) && ((NewValue &
CR4_SMAP) == 0);
2661 Victim->Cr.Smep = ((OldValue &
CR4_SMEP) != 0) && ((NewValue &
CR4_SMEP) == 0);
2750 (Originator->Original.Driver != NULL))
2781 Exception->VictimNameHash == Victim->Object.NameHash)
2788 Originator->Return.Driver : Originator->Original.Driver;
2794 match = Victim->Object.BaseAddress == pDriver->
BaseVa;
2823 switch (Exception->Type)
2978 LOG(
"[ERROR] This is a corruption in the update/exception. Type = %d!\n", Exception->Type);
2993 (Victim->WriteInfo.OldValue[0] == 0))
3004 match = 0 == memcmp(Originator->Return.Section,
"INIT", 4);
3008 match = 0 == memcmp(Originator->Return.Section,
"init", 4);
3016 match = 0 == memcmp(Originator->Original.Section,
"INIT", 4);
3020 match = 0 == memcmp(Originator->Original.Section,
"init", 4);
3024 else if (Originator->IsEntryPoint)
3029 else if (Victim->WriteInfo.OldValue[0] == 0)
3105 if (NULL == Originator)
3129 goto _match_ex_alert;
3134 goto _match_ex_alert;
3137 if (pEx->OriginatorNameHash > Originator->Original.NameHash)
3141 else if (pEx->OriginatorNameHash != Originator->Original.NameHash)
3179 if (Originator->Original.Driver && Originator->Return.Driver &&
3180 (Originator->Original.Rip == Originator->Return.Rip))
3202 if (pEx->OriginatorNameHash > Originator->Original.NameHash)
3206 else if (pEx->OriginatorNameHash != Originator->Original.NameHash)
3227 goto _beta_exceptions;
3246 if (pEx->OriginatorNameHash > Originator->Return.NameHash)
3250 else if (pEx->OriginatorNameHash != Originator->Return.NameHash)
3284 if (pEx->OriginatorNameHash != Originator->Return.NameHash)
3291 if (pEx->OriginatorNameHash != Originator->Original.NameHash)
#define IMAGE_SCN_MEM_EXECUTE
INTSTATUS IntExceptKernelGetOriginator(EXCEPTION_KM_ORIGINATOR *Originator, DWORD Options)
This function is used to get the information about the kernel-mode originator.
#define EXCEPTION_NO_INSTRUCTION
QWORD DriverObjectGva
The guest virtual address of the guest _DRIVER_OBJECT represented by this structure.
enum _INTRO_ACTION_REASON INTRO_ACTION_REASON
The reason for which an INTRO_ACTION was taken.
#define DESCRIPTOR_SIZE_32
#define INT_STATUS_EXCEPTION_NOT_MATCHED
INTSTATUS IntPeGetSectionHeaderByRva(QWORD ImageBase, BYTE *ImageBaseBuffer, DWORD GuestRva, IMAGE_SECTION_HEADER *SectionHeader)
Given a relative virtual address, return the section header which describes the section the RVA lies ...
static int IntExceptPrintDrvObjInfo(WIN_DRIVER_OBJECT *DrvObj, char *Header, char *Line, int MaxLength)
Print the information about the WIN_DRIVER_OBJECT.
#define IG_IA32_SYSENTER_ESP
char * utf16toutf8(char *Destination, const WCHAR *Source, DWORD DestinationMaxLength)
INTSTATUS IntVirtMemUnmap(void **HostPtr)
Unmaps a memory range previously mapped with IntVirtMemMap.
An internal error occurred (no memory, pages not present, etc.).
INTSTATUS IntExceptGetVictimMsr(QWORD NewValue, QWORD OldValue, DWORD Msr, EXCEPTION_VICTIM_ZONE *Victim)
This function is used to get the information about the MSR victim.
QWORD End
The end guest virtual address of ksym (exclusive).
Kernel module (ntoskrnl.exe, hal.dll, etc.)
BYTE Unknown
Set if the function at this RIP is not exported.
INTSTATUS IntExceptGetVictimIntegrity(INTEGRITY_REGION *IntegrityRegion, DWORD *Offset, EXCEPTION_VICTIM_ZONE *Victim)
This function is used to get the information about the modified zone from the integrity region...
static int IntExceptPrintIdtInfo(EXCEPTION_VICTIM_ZONE *Victim, char *Header, char *Line, int MaxLength)
Print the information about the modified IDT entry.
WINDOWS_GUEST * gWinGuest
Global variable holding the state of a Windows guest.
IG_ARCH_REGS Regs
The current state of the guest registers.
The modified object is anything inside the HAL heap zone.
QWORD SystemCr3
The Cr3 used to map the kernel.
#define INT_STATUS_SUCCESS
Fast IO Dispatch (Windows only)
LIST_HEAD NoNameKernelExceptions
Linked list used for kernel-mode exceptions that don't have a valid originator (-).
The name can be any string.
INTSTATUS IntExceptGetVictimCr(QWORD NewValue, QWORD OldValue, DWORD Cr, EXCEPTION_VICTIM_ZONE *Victim)
This function is used to get the information about the CR victim.
Infinity hook modifications of WMI_LOGGER_CONTEXT.GetCpuClock.
WIN_KERNEL_DRIVER Win
Valid only for Windows guests.
The modified object is only the driver's EAT.
struct _IDT_ENTRY32 IDT_ENTRY32
INTSTATUS IntLixStackTraceGetReg(QWORD Cr3, PIG_ARCH_REGS Registers, DWORD MaxNumberOfTraces, QWORD Flags, STACK_TRACE *StackTrace)
Retrieves a Kernel stack backtrace based on the register values.
#define ZONE_LIB_RESOURCES
Used for the resources section (usually .rsrc inside a driver or dll).
QWORD Start
The start guest virtual address of ksym.
INTSTATUS IntKsymFindByAddress(QWORD Gva, DWORD Length, char *SymName, QWORD *SymStart, QWORD *SymEnd)
Finds the symbol which is located at the given address.
QWORD BaseVa
The guest virtual address of the kernel module that owns this driver object.
The exception will take into consideration the return driver/dll.
#define IMAGE_SCN_MEM_WRITE
#define INT_SUCCESS(Status)
#define EXCEPTION_NO_NAME
The modified object is inside an EPT hook.
BOOLEAN KernelBetaDetections
True if the kernel protection is in beta (log-only) mode.
#define INT_STATUS_EXCEPTION_CHECKS_OK
void IntDriverCacheCreateExport(const QWORD Rip)
Adds a new export entry to the gDriverExportCache.
static INTSTATUS IntExceptLixKernelGetOriginator(EXCEPTION_KM_ORIGINATOR *Originator)
This function is used to get the information about the kernel-mode originator (Linux guest)...
DWORD PathLength
The driver`s path length (number of WCHARS).
The exception is valid only for read violation.
#define EXCEPTION_KM_ORIGINATOR_OPT_DO_NOT_BLOCK
Flags that can be passed to IntExceptKernelGetOriginator if the action should not be blocked...
PBYTE MzPeHeaders
The driver`s MZ/PE headers (cached internally).
QWORD Parent
Depends if this is a thread or a process.
#define IG_IA32_SYSENTER_EIP
Describes a user-mode originator.
INTSTATUS IntPeFindExportByRvaInBuffer(QWORD ImageBase, BYTE *Buffer, DWORD BufferSize, DWORD Rva)
Check if the indicated Rva belongs to an exported function.
INTSTATUS IntExceptGetVictimDtr(DTR *NewValue, DTR *OldValue, INTRO_OBJECT_TYPE Type, EXCEPTION_VICTIM_ZONE *Victim)
This function is used to get the information about the DTR victim.
The modified object is only the driver's data sections.
INTSTATUS IntExceptMatchException(void *Victim, void *Originator, void *Exception, EXCEPTION_TYPE ExceptionType, INTRO_ACTION *Action, INTRO_ACTION_REASON *Reason)
This function tries to find a exception for the current violation..
int INTSTATUS
The status data type.
The _FAST_IO_DISPATCH structure used by 32-bit guests.
LIX_MODULE_LAYOUT CoreLayout
The layout of the core section.
#define INT_STATUS_NOT_FOUND
The exception will match only for the init phase of a driver/process.
LIST_HEAD KernelAlertExceptions
Linked list used for kernel-mode exceptions that are added from alert.
#define MAX_PATH
The maximum size of a path (260 characters on windows).
INTSTATUS IntExceptGetOriginatorFromModification(EXCEPTION_VICTIM_ZONE *Victim, EXCEPTION_KM_ORIGINATOR *Originator)
This function is used for integrity violations to get the information about the kernel-mode originato...
Describes a kernel-mode originator.
The modified object is only the driver's IAT.
int IntExceptPrintWinKmModInfo(KERNEL_DRIVER *Module, char *Header, char *Line, int MaxLength, DWORD NameAlignment)
Print the information about the provided KERNEL_DRIVER (windows guest).
INTRO_GUEST_TYPE OSType
The type of the guest.
INSTRUX Instruction
The current instruction, pointed by the guest RIP.
struct _DRIVER_EXPORT_CACHE_ENTRY::@23 Type
The exception is valid only for write violation.
The modified object is anything inside the driver.
Describes a kernel driver.
#define ZONE_INTEGRITY
Used for integrity zone.
DWORD NameHash
The hash of the name.
the modified object is IDTR/GDTR.
enum _INTRO_OBJECT_TYPE INTRO_OBJECT_TYPE
The type of the object protected by an EPT hook.
The exception is valid only for CR4.SMEP write.
static int IntExceptPrintMsrInfo(EXCEPTION_VICTIM_ZONE *Victim, char *Header, char *Line, int MaxLength)
Print the information about the modified MSR.
#define ZONE_LIB_CODE
Used for a generic code zone.
#define INITIAL_CRC_VALUE
#define INT_STATUS_EXCEPTION_BLOCK
Hal interrupt controller.
EXCEPTIONS * Exceptions
The exceptions that are currently loaded.
#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...
The modified object is inside an integrity hook.
The exception is valid only for CR4.SMAP write.
SIZE_T NameLength
The length of the Name. This is the number of characters in the Name buffer.
#define ZONE_EXECUTE
Used for execute violation.
LIST_HEAD KernelFeedbackExceptions
Linked list used for kernel-mode exceptions that have the feedback flag.
Holds information about a driver object.
CPU_STATE State
The state of this VCPU. Describes what action is the VCPU currently doing.
The exception is valid only for execute violation.
BOOLEAN Guest64
True if this is a 64-bit guest, False if it is a 32-bit guest.
The modified object is only the driver's code sections.
The name is the operating system kernel name.
DWORD NameHash
Hash of the Name.
DRIVER_EXPORT_CACHE_ENTRY * IntDriverCacheExportFind(const QWORD Rip)
Finds an entry inside the gDriverExportCache.
INTSTATUS IntExceptKernelMatchVictim(EXCEPTION_VICTIM_ZONE *Victim, EXCEPTION_KM_ORIGINATOR *Originator, KM_EXCEPTION *Exception)
This function checks if the exception matches the originator and the modified zone.
#define INT_STATUS_INVALID_PARAMETER_4
static BOOLEAN IntExceptLixKernelIsMemoryFunc(QWORD Rip)
This function is used to check if the write has been made using any of "memcpy","__memcpy", "memset", "__memset", "memmove" function.
#define IS_KERNEL_POINTER_WIN(is64, p)
Checks if a guest virtual address resides inside the Windows kernel address space.
Executions inside the SharedUserData region.
Allow modification of it's own driver object.
#define INT_STATUS_INVALID_INTERNAL_STATE
The modified object is SSDT (valid only on windows x86).
static int IntExceptPrintCrInfo(EXCEPTION_VICTIM_ZONE *Victim, char *Header, char *Line, int MaxLength)
Print the information about the modified CR.
The modified object is the self map entry inside PDBR.
void * Name
The name of the driver.
QWORD KernelVa
The guest virtual address at which the kernel image.
struct _IDT_ENTRY64 IDT_ENTRY64
LIX_SYMBOL MemoryFunctions[5]
The guest virtual address of memcpy, __memcpy, memset, __memset, memmove.
QWORD DriverObjectGpa
The guest physical address of the guest _DRIVER_OBJECT represented by this structure.
BYTE WordSize
Guest word size. Will be 4 for 32-bit guests and 8 for 64-bit guests.
INTSTATUS IntWinStackTraceGet(QWORD StackFrame, QWORD Rip, DWORD MaxNumberOfTraces, QWORD Flags, STACK_TRACE *StackTrace)
Get a kernel stack trace starting from the current stack pointer for 64 bit systems.
#define DESCRIPTOR_SIZE_64
void IntLixDrvGetSecName(KERNEL_DRIVER *Driver, QWORD Gva, CHAR *SectionName)
Get the section of the driver that contains the provided guest virtual address.
The modified object is a MSR.
void IntExceptKernelLogInformation(EXCEPTION_VICTIM_ZONE *Victim, EXCEPTION_KM_ORIGINATOR *Originator, INTRO_ACTION Action, INTRO_ACTION_REASON Reason)
Print the information about a kernel-mode violation and dumps the code-blocks.
LIX_KERNEL_MODULE Lix
Valid only for Linux guests.
#define EXCEPTION_NO_SYMBOL
The exception will take into consideration the return driver.
#define ZONE_LIB_EXPORTS
Used for the exports of a dll, driver, etc.
DWORD SelfMapIndex
The self map index.
The modified object is the privileges field inside the nt!_TOKEN structure.
The modified object is SMEP and/or SMAP bits of CR4.
#define IDT_DESC_SIZE64
The size of a 64-bit interrupt descriptor.
A descriptor table register. Valid for IDTR and GDTR.
#define LIX_SYMBOL_NAME_LEN
The max length of the ksym as defined by Linux kernel.
Describes the modified zone.
#define UNREFERENCED_PARAMETER(P)
The modified object is IDTR.
Describe a kernel-mode exception.
#define for_each_km_exception(_ex_head, _var_name)
static int IntExceptPrintLixKmDrvInfo(KERNEL_DRIVER *Driver, char *Header, char *Line, int MaxLength, DWORD NameAlignment)
Print the information about the provided KERNEL_DRIVER (Linux guest).
Describe a user-mode exception.
The Virtualization exception agent injected inside the guest.
DWORD KernelBufferSize
The size of the KernelBuffer.
The exception is valid only for integrity zone.
The modified object is anything inside the driver's fast IO dispatch table.
The modified object is any with the modified name.
enum _INTRO_ACTION INTRO_ACTION
Event actions.
#define IMAGE_SCN_CNT_CODE
INTSTATUS IntExceptKernelVerifyExtra(EXCEPTION_VICTIM_ZONE *Victim, EXCEPTION_UM_ORIGINATOR *Originator, UM_EXCEPTION *Exception)
This function is used as an extra step in exception mechanism.
LIST_HEAD GenericKernelExceptions
Linked list used for kernel-mode exceptions that have a generic originator (*).
The action was allowed, but it has the BETA flag (Introcore is in log-only mode). ...
__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.
MM Mm
Guest memory information, such as paging mode, system Cr3 value, etc.
The modified object represents an execution inside SharedUserData.
Self mapping index in PDBR.
GUEST_STATE gGuest
The current guest state.
The _FAST_IO_DISPATCH structure used by 64-bit guests.
The modified object is any IDT entry.
char gExcLogLine[2 *ONE_KILOBYTE]
The exception log line.
KERNEL_DRIVER * IntDriverFindByBase(QWORD Gva)
Searches a driver object by its module base.
#define EXCEPTION_TABLE_ID(H)
#define FIELD_OFFSET(type, field)
Virtual SYSCALL (user-mode, Linux-only)
static INTSTATUS IntExceptWinKernelGetOriginator(EXCEPTION_KM_ORIGINATOR *Originator, DWORD Options)
This function is used to get the information about the kernel-mode originator (windows guest)...
int wstrcasecmp(const WCHAR *buf1, const WCHAR *buf2)
LIST_HEAD KernelExceptions[EXCEPTION_TABLE_SIZE]
Array of linked lists used for kernel-mode exceptions.
INTSTATUS IntPeFindExportByRva(QWORD ImageBase, BYTE *ImageBaseBuffer, DWORD Rva)
Check if a RVA lies inside an exported function.
KERNEL_DRIVER * IntDriverFindByAddress(QWORD Gva)
Returns the driver in which Gva resides.
#define ZONE_READ
Used for read violation.
The modified object is WMI_LOGGER_CONTEXT.GetCpuClock used by InfinityHook (valid only on windows)...
static void IntExceptKernelLogLinuxInformation(EXCEPTION_VICTIM_ZONE *Victim, EXCEPTION_KM_ORIGINATOR *Originator, INTRO_ACTION Action, INTRO_ACTION_REASON Reason)
Print the information about a kernel-mode violation (Linux guest).
The action was blocked because no exception signature matched.
void IntExceptDumpSignatures(void *Originator, EXCEPTION_VICTIM_ZONE *Victim, BOOLEAN KernelMode, BOOLEAN ReturnDrv)
Dump code blocks from the originator's RIP.
Virtual dynamic shared object (user-mode, Linux-only)
BYTE * KernelBuffer
A buffer containing the entire kernel image.
KERNEL_DRIVER * KernelDriver
Points to the driver object that describes the kernel image.
char * utf16_for_log(const WCHAR *WString)
Converts a UTF-16 to a UTF-8 string to be used inside logging macros.
int IntExceptPrintLixTaskInfo(const LIX_TASK_OBJECT *Task, char *Header, char *Line, int MaxLength, DWORD NameAlignment)
Print the information about the provided LIX_TASK_OBJECT.
LIX_TASK_OBJECT * IntLixTaskFindByGva(QWORD TaskStruct)
Finds Linux process with the provided "task_struct" guest virtual address.
The modified object is a CR.
#define INT_STATUS_INVALID_PARAMETER_1
#define INT_STATUS_NOT_SUPPORTED
VCPU_STATE * gVcpu
The state of the current VCPU.
The action was blocked because there was no exception for it.
void IntDriverCacheCreateUnknown(const QWORD Rip)
Adds a new entry to the gDriverExportCache.
LIX_TASK_OBJECT * IntLixTaskGetCurrent(DWORD CpuNumber)
Finds the task that is currently running on the given CPU.
UINT8 Name[IMAGE_SIZEOF_SHORT_NAME]
Describes an entry in the gDriverExportCache.
QWORD Base
The base GVA of the section.
#define ZONE_LIB_IMPORTS
Used for the imports of a dll, driver, etc.
The original RIP is outside a driver and it returns into a driver (which is the originator name)...
static void IntExceptKernelLogWindowsInformation(EXCEPTION_VICTIM_ZONE *Victim, EXCEPTION_KM_ORIGINATOR *Originator, INTRO_ACTION Action, INTRO_ACTION_REASON Reason)
Print the information about a kernel-mode violation (windows guest).
QWORD EntryPoint
The entry point of this driver.
PWIN_DRIVER_OBJECT DriverObject
The driver object.
The exception is valid only on 32 bit systems/process.
#define EXPORT_NAME_UNKNOWN
The modified object is anything inside the driver object.
INTSTATUS IntExceptKernel(EXCEPTION_VICTIM_ZONE *Victim, EXCEPTION_KM_ORIGINATOR *Originator, INTRO_ACTION *Action, INTRO_ACTION_REASON *Reason)
This function iterates through exception lists and tries to find an exception that matches the origin...
#define IDT_DESC_SIZE32
The size of a 32-bit interrupt descriptor.
The modified object is only the driver's resources sections.
#define ZONE_WRITE
Used for write violation.
#define INT_STATUS_INVALID_PARAMETER_2
static int IntExceptPrintDtrInfo(EXCEPTION_VICTIM_ZONE *Victim, char *Header, char *Line, int MaxLength)
Print the information about the modified IDTR/GDTR.
The name is the operating system HAL name (valid only for windows).
#define IG_IA32_SYSENTER_CS
LINUX_GUEST * gLixGuest
Global variable holding the state of a Linux guest.
The modified object is a MSR.
#define INT_STATUS_EXCEPTION_ALLOW
The exception (and signature, where's the case) matched, but the extra checks failed.
#define INT_STATUS_INVALID_PARAMETER_3