447 BYTE MaxHeapValPageContent[0x1000];
579 #define MAX_SERIALIZER_LENGTH (16 * ONE_KILOBYTE) 589 const char gBase64Chars[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
591 #define Base64EncSize(Length) (((((Length) + 2) / 3) * 4) + 1) 612 Out[1] =
gBase64Chars[((In[0] & 0x03) << 4) | ((In[1] & 0xf0) >> 4)];
613 Out[2] = (
BYTE) (Length > 1 ?
gBase64Chars[((In[1] & 0x0f) << 2) | ((In[2] & 0xc0) >> 6)] :
'=');
637 for (
size_t i = 0; i < len; i += 3)
639 size_t size = ((len - i) < 4) ? (len - i) : 4;
724 for (
DWORD index = 0; index < length; index += 1000)
726 TRACE(
"[SERIALIZER] %.1000s", pBase64 + index);
748 ERROR(
"[ERROR] Serilizer buffer overflows! Current offset = 0x%llx, Buffer Size = 0x%0llx, " 749 "Required size = 0x%x\n",
814 _In_ const void *String,
826 const BYTE *pStr = String;
828 for (
DWORD index = 0; index <
Size; index++)
830 if (pStr[index] > 0x7f)
875 Header->Size += (
WORD)(
sizeof(*pObject) + pObject->
Length);
890 pObject->
Length = Size / 2;
894 Header->Size += (
WORD)(
sizeof(*pObject) + pObject->
Length);
910 Header->Size += (
WORD)(
sizeof(*pObject) + pObject->
Length *
sizeof(
WCHAR));
916 LOG(
"[ERROR] Should not reach here. Encode %d \n", Encode);
930 Header->Size +=
sizeof(*pObject);
949 #define VICTIM_SERIALIZER_EPT_VERSION 1 963 pObject->
Gva = Ept->Gva;
964 pObject->
Gpa = Ept->Gpa;
980 pHeader->
Size =
sizeof(*pObject);
996 #define VICTIM_SERIALIZER_CR_VERSION 1 1010 pObject->
Cr = Cr->Cr;
1012 pHeader->
Size =
sizeof(*pObject);
1028 #define VICTIM_SERIALIZER_IDT_VERSION 1 1042 pObject->
Entry = (
DWORD)((Victim->Ept.Gva - Victim->Object.BaseAddress) /
1045 pHeader->
Size =
sizeof(*pObject);
1061 #define VICTIM_SERIALIZER_MSR_VERSION 1 1075 pObject->
Msr = Msr->Msr;
1077 pHeader->
Size =
sizeof(*pObject);
1093 #define VICTIM_SERIALIZER_DTR_VERSION 1 1107 pObject->
Type = Dtr->Type;
1109 pHeader->
Size =
sizeof(*pObject);
1127 #define VICTIM_SERIALIZER_INJECTION_VERSION 1 1141 pObject->
Gva = Injection->Gva;
1142 pObject->
Length = Injection->Length;
1165 pHeader->
Size =
sizeof(*pObject);
1183 if (Process == NULL)
1188 #define WIN_PROCESS_SERIALIZER_VERSION 1 1205 pObject->
Cr3 = Process->Cr3;
1206 pObject->
UserCr3 = Process->UserCr3;
1207 pObject->
Pid = Process->Pid;
1211 pObject->
Flags = Process->Flags;
1213 pHeader->
Size =
sizeof(*pObject);
1218 Process->Path != NULL ? Process->Path->PathSize : 0,
1237 if (Process == NULL)
1242 #define LIX_PROCESS_SERIALIZER_VERSION 1 1256 pObject->
Gva = Process->Gva;
1258 pObject->
Parent = Process->Parent;
1260 pObject->
MmGva = Process->MmGva;
1261 pObject->
Cr3 = Process->Cr3;
1262 pObject->
Pid = Process->Pid;
1263 pObject->
Tgid = Process->Tgid;
1265 pHeader->
Size =
sizeof(*pObject);
1269 Process->Path != NULL ? (
DWORD)Process->Path->NameLength : 0,
1273 Process->Path != NULL ? (
DWORD)Process->Path->PathLength : 0,
1318 #define WIN_VAD_SERIALIZER_VERSION 1 1333 pObject->
EndPage = Vad->EndPage;
1334 pObject->
VadGva = Vad->VadGva;
1336 pObject->
VadType = Vad->VadType;
1339 pObject->
Flags = Vad->StaticScan | Vad->IsStack | Vad->HugeVad | Vad->IsIgnored | Vad->NoChange |
1340 Vad->PrivateFixup | Vad->DeleteInProgress;
1342 pHeader->
Size =
sizeof(*pObject);
1346 Vad->Path != NULL ? Vad->Path->PathSize : 0,
1367 #define LIX_VMA_SERIALIZER_VERSION 1 1370 char *pFilePath = NULL;
1371 DWORD filePathLength = 0;
1385 pObject->
Start = Vma->Start;
1386 pObject->
End = Vma->End;
1387 pObject->
Gva = Vma->Gva;
1388 pObject->
Flags = Vma->Flags;
1389 pObject->
File = Vma->File;
1391 pHeader->
Size =
sizeof(*pObject);
1408 _In_ const void *Vad
1444 #define WIN_KERNEL_DRIVER_SERIALIZER_VERSION 1 1460 pHeader->
Size =
sizeof(*pObject);
1479 #define LIX_KERNEL_MODULE_SERIALIZER_VERSION 1 1502 pHeader->
Size =
sizeof(*pObject);
1519 if (DrvObject == NULL)
1523 #define KERNEL_DRV_OBJECT_SERIALIZER_VERSION 1 1538 pObject->
Gva = DrvObject->DriverObjectGva;
1539 pObject->
Gpa = DrvObject->DriverObjectGpa;
1542 pHeader->
Size =
sizeof(*pObject);
1563 #define KERNEL_DRIVER_SERIALIZER_VERSION 1 1566 const CHAR *pSection = NULL;
1574 if (Originator == NULL)
1581 pDriver = Originator->Original.Driver;
1582 pSection = Originator->Original.Section;
1586 pDriver = Originator->Return.Driver;
1587 pSection = Originator->Return.Section;
1595 if (pDriver == NULL)
1617 pHeader->
Size =
sizeof(*pObject);
1620 if (pSection != NULL)
1661 #define WIN_PROCESS_MODULE_SERIALIZER_VERSION 1 1676 pObject->
Size = Module->Size;
1678 pHeader->
Size =
sizeof(*pObject);
1687 _In_ INSTRUX *Instruction,
1697 if (Instruction == NULL)
1702 #define INSTRUX_SERIALIZER_VERSION 1 1717 memcpy(pObject->
Bytes, Instruction->InstructionBytes,
sizeof(pObject->
Bytes));
1719 pHeader->
Size =
sizeof(*pObject);
1739 #define WRITE_INFO_SERIALIZER_VERSION 1 1753 pObject->
AccessSize = Victim->WriteInfo.AccessSize;
1757 pHeader->
Size =
sizeof(*pObject);
1777 #define READ_INFO_SERIALIZER_VERSION 1 1791 pObject->
AccessSize = Victim->ReadInfo.AccessSize;
1794 pHeader->
Size =
sizeof(*pObject);
1814 #define EXEC_INFO_SERIALIZER_VERSION 1 1828 pObject->
Rsp = Victim->ExecInfo.Rsp;
1829 pObject->
Length = Victim->ExecInfo.Length;
1830 pObject->
StackBase = Victim->ExecInfo.StackBase;
1831 pObject->
StackLimit = Victim->ExecInfo.StackLimit;
1833 pHeader->
Size =
sizeof(*pObject);
1880 if (Originator == NULL)
1885 #define RAW_DUMP_SERIALIZER_VERSION 1 1899 pObject->
Length = Victim->Injection.Length;
1903 IntVirtMemRead(Originator->SourceVA, Victim->Injection.Length, Originator->LixProc->Cr3, pObject->
Raw, NULL);
1907 IntVirtMemRead(Originator->SourceVA, Victim->Injection.Length, Originator->WinProc->Cr3, pObject->
Raw, NULL);
1924 #define RIP_CODE_SERIALIZER_VERSION 1 1942 ERROR(
"[ERROR] IntGetCurrentMode failed: 0x%08x\n", status);
1973 DWORD startOffset = 0;
1974 DWORD endOffset = 0;
2005 *Start = startOffset;
2074 for (
DWORD index = 0; index < Count; index++)
2076 if (index == 0 && CodeBlocks[index].OffsetStart >= ripOffset)
2081 else if (index == Count - 1 || (previous <= ripOffset && ripOffset <=
gCodeBlocks[index].OffsetStart))
2111 Object->StartAddress = (Rip &
PAGE_MASK) + CodeBlocks[startCb].OffsetStart;
2115 for (
DWORD index = startCb; index < Count; index++)
2117 Object->Content[Object->Count] =
Crc32Compute(CodeBlocks[index].Chunks,
2123 Object->RipCbIndex = Object->Count;
2158 void *pContent = NULL;
2160 DWORD startOffset = 0;
2161 DWORD endOffset = 0;
2168 ERROR(
"[ERROR] IntGetCurrentMode failed: 0x%08x\n", status);
2174 ERROR(
"[ERROR] Unsupported CS type: %d\n", mode);
2185 WARNING(
"[WARNING] Failed to map range [0x%016llx - 0x%016llx], try to map range [0x%016llx - 0x%016llx]",
2186 (Rip & PAGE_MASK) + startOffset, (Rip & PAGE_MASK) + startOffset + (endOffset - startOffset),
2187 (Rip & PAGE_MASK) + startOffset, (Rip & PAGE_MASK) + startOffset + (
PAGE_SIZE - startOffset));
2195 WARNING(
"[WARNING] IntVirtMemMap failed for RIP %llx and cr3 %llx: 0x%08x\n",
2196 Rip & PAGE_MASK, Cr3, status);
2204 WARNING(
"[WARNING] IntVirtMemMap failed for RIP %llx and cr3 %llx: 0x%08x\n",
2205 Rip & PAGE_MASK, Cr3, status);
2212 endOffset - startOffset,
2222 WARNING(
"[WARNNING] Buffer too small to extract codeblocks (size %d): 0x%08x\n",
2223 endOffset - startOffset,
2228 ERROR(
"[ERROR] IntFragExtractCodePattern: 0x%08x\n", status);
2236 WARNING(
"[WARNING] Could not extract enough code-blocks from RIP %llx: %d\n",
2312 #define CODE_BLOCKS_SERIALIZER_VERSION 1 2331 memzero(pObject,
sizeof(*pObject));
2336 WARNING(
"[WARNING] IntSerializeExtractCodeBlocks failed with status: 0x%08x\n", status);
2352 #define ARCH_REGS_SERIALIZER_VERSION 1 2366 memcpy(pObject, &
gVcpu->
Regs,
sizeof(*pObject));
2368 pHeader->
Size +=
sizeof(*pObject);
2385 #define DPI_WIN_DEBUG_SERIALIZER_VERSION 1 2408 pHeader->
Size +=
sizeof(*pObject);
2427 #define DPI_WIN_PIVOTET_STACK_SERIALIZER_VERSION 1 2462 pHeader->
Size +=
sizeof(*pObject);
2479 #define DPI_WIN_STOLEN_TOKEN_SERIALIZER_VERSION 1 2503 pHeader->
Size +=
sizeof(*pObject);
2522 #define DPI_WIN_HEAP_SPRAY_SERIALIZER_VERSION 1 2526 WORD maxNumberOfHeapVals = 0;
2527 DWORD detectedPage = 0;
2528 DWORD maxPageHeapVals = 0;
2552 DWORD checkedPage = ((val << 24) | (val << 16) | (val << 8) | val) &
PAGE_MASK;
2564 detectedPage = checkedPage;
2572 maxPageHeapVals = checkedPage;
2578 if (0 != detectedPage)
2585 pHeader->
Size +=
sizeof(*pObject);
2602 #define DPI_WIN_TOKEN_PRIVS_SERIALIZER_VERSION 1 2630 pHeader->
Size +=
sizeof(*pObject);
2647 #define DPI_WIN_THREAD_START_SERIALIZER_VERSION 1 2675 pHeader->
Size +=
sizeof(*pObject);
2692 switch (Originator->PcType)
2734 #define DPI_SERIALIZER_VERSION 1 2748 pObject->
Flags = Originator->PcType;
2750 pHeader->
Size +=
sizeof(*pObject);
2767 if (Victim->Object.Library.Export == NULL)
2773 pExport = Victim->Object.Library.Export;
2781 #define EXPORT_SERIALIZER_VERSION 1 2796 pObject->
Delta = (
DWORD)(Victim->Ept.Gva - Victim->Object.Library.WinMod->VirtualBase - pExport->
Rva);
2798 pHeader->
Size =
sizeof(*pObject);
2827 if (Originator->Return.Library && Originator->Return.Rip != Originator->Rip)
2869 #define START_ORIGINATOR_SERIALZIER_VERSION 1 2870 #define END_ORIGINATOR_SERIALZIER_VERSION 1 2899 #define LIX_VICTIM_SERIALIZER_VERSION 1 2915 pObject->
Type = Victim->Object.Type;
2916 pObject->
ZoneType = Victim->ZoneType;
2919 pHeader->
Size =
sizeof(*pObject);
2941 #define WIN_VICTIM_SERIALIZER_VERSION 1 2956 pObject->
Type = Victim->Object.Type;
2957 pObject->
ZoneType = Victim->ZoneType;
2960 pHeader->
Size =
sizeof(*pObject);
3019 if (Originator->PcType)
3049 if (Originator->PcType)
3077 #define START_MISC_SERIALZIER_VERSION 1 3078 #define END_MISC_SERIALZIER_VERSION 1 3107 #define START_VICTIM_SERIALZIER_VERSION 1 3108 #define END_VICTIM_SERIALZIER_VERSION 1 3137 #define KM_ORIGINATOR_SERIALZIER_VERSION 1 3158 #define KM_ORIGINATOR_SERIALZIER_VERSION 1 3208 #define WIN_KM_VICTIM_SERIALIZER_VERSION 1 3224 pObject->
Type = Victim->Object.Type;
3225 pObject->
ZoneType = Victim->ZoneType;
3228 pHeader->
Size =
sizeof(*pObject);
3231 switch (Victim->ZoneType)
3252 switch (Victim->Object.Type)
3288 #define LIX_KM_VICTIM_SERIALIZER_VERSION 1 3304 pObject->
Type = Victim->Object.Type;
3305 pObject->
ZoneType = Victim->ZoneType;
3308 pHeader->
Size =
sizeof(*pObject);
3311 switch (Victim->ZoneType)
3333 switch (Victim->Object.Type)
3441 #define START_MISC_SERIALZIER_VERSION 1 3442 #define END_MISC_SERIALZIER_VERSION 1 3482 pHeader->
Event = EventClass;
3492 _In_ const void *Originator,
3493 _In_ const void *Victim,
3514 _In_ const void *Originator,
3515 _In_ const void *Victim,
3536 _In_ const void *Originator,
3537 _In_ const void *Victim,
3571 _In_ void *Originator,
3613 ERROR(
"[ERROR] Unsupported exception type (%d) ...", Type);
struct _SERIALIZER_WIN_PROCESS SERIALIZER_WIN_PROCESS
Describes a serialized intObjWinProcess object.
static void IntSerializeLixVma(const LIX_VMA *Vma)
Serialize the provided LIX_VMA object.
struct _SERIALIZER_WIN_VAD * PSERIALIZER_WIN_VAD
#define DPI_WIN_DEBUG_SERIALIZER_VERSION
#define CODE_BLOCKS_SERIALIZER_VERSION
struct _SERIALIZER_ARCH_REGS SERIALIZER_ARCH_REGS
Describes a serialized intObjArchRegs object.
QWORD Gva
The guest virtual address of the vm_area_struct this structure is based on.
Used for the windows process object.
static void IntSerializeWinDpiInfo(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the DPI extra information.
QWORD UserCr3
Process user PDBR. Includes PCID.
struct _SERIALIZER_DPI_WIN_HEAP_SPRAY * PSERIALIZER_DPI_WIN_HEAP_SPRAY
struct _SERIALIZER_EXCEPTION_VICTIM SERIALIZER_EXCEPTION_VICTIM
Describes a serialized intObjVictim object.
enum _INTRO_ACTION_REASON INTRO_ACTION_REASON
The reason for which an INTRO_ACTION was taken.
#define DESCRIPTOR_SIZE_32
static void IntSerializeString(const void *String, DWORD Size, DWORD Encode, SERIALIZER_OBJECT_HEADER *Header)
Serialize the provided string.
struct _SERIALIZER_DPI_WIN_THREAD_START * PSERIALIZER_DPI_WIN_THREAD_START
Describes a serialized intObjRawDump object.
#define EXPORT_SERIALIZER_VERSION
Describes a serialized intObjMsr object.
void IntSerializeLixKmOriginator(const EXCEPTION_KM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the information about Linux kernel-mode originator.
struct _SERIALIZER_DPI * PSERIALIZER_DPI
Describes a serialized string.
QWORD StartAddress
The address where the thread started executing.
QWORD Flags
The protection flags.
Used for the victim object.
QWORD File
The guest virtual address of the file this VMA maps to.
#define HEAP_SPRAY_NR_PAGES
Describes the header of the serializer buffer.
char * utf16toutf8(char *Destination, const WCHAR *Source, DWORD DestinationMaxLength)
INTSTATUS IntVirtMemUnmap(void **HostPtr)
Unmaps a memory range previously mapped with IntVirtMemMap.
static void IntSerializeRipCode(void)
Serialize the guest memory page that contains the RIP at which the violation attempt was detected...
The creation of a process was attempted while the parent had its heap sprayed.
Describes a serialized intObjLixProcess object.
DWORD Event
The intro event type.
A mov using a segment:offset.
Kernel module (ntoskrnl.exe, hal.dll, etc.)
Describes a serialized intObjDpiWinDebug.
INTSTATUS IntFragExtractCodePattern(PBYTE Buffer, DWORD StartOffset, DWORD MaxBufferSize, IG_CS_TYPE CsType, CB_EXTRACT_LEVEL ExtractLevel, DWORD PatternSize, CODE_BLOCK_PATTERN *Pattern, DWORD *TotalExtracted)
Extract a pattern of code-blocks from the given code buffer.
Describes a serialized intObjDpiPivotedStack.
struct _SERIALIZER_KERNEL_DRV_OBJECT SERIALIZER_KERNEL_DRV_OBJECT
Describes a serialized intObjKernelDrvObject object.
QWORD StolenFrom
The process from which the token was stolen.
static BYTE * gCurrentPtr
IG_ARCH_REGS Regs
The current state of the guest registers.
DWORD Flags
The flags of the VAD.
#define WRITE_INFO_SERIALIZER_VERSION
DWORD Crc32Compute(const void *Buffer, size_t Size, DWORD InitialCrc)
Computes the CRC for a byte array.
struct _SERIALIZER_IDT * PSERIALIZER_IDT
struct _SERIALIZER_RAW_DUMP * PSERIALIZER_RAW_DUMP
struct _CODE_BLOCK_PATTERN CODE_BLOCK_PATTERN
struct _SERIALIZER_ARCH_REGS * PSERIALIZER_ARCH_REGS
QWORD SystemCr3
The Cr3 used to map the kernel.
#define INT_STATUS_SUCCESS
QWORD StartPage
The first page in the VAD.
struct _SERIALIZER_KERNEL_DRIVER * PSERIALIZER_KERNEL_DRIVER
static QWORD IntSerializeCurrentId(void)
Increment the current serializer alert ID and returns it.
Fast IO Dispatch (Windows only)
Describes a serialized intObjVictim object.
Used for the windows driver obj object.
This represents an attempt of modifying the context of another thread.
QWORD ActualParent
The guest virtual address of the parent process.
static void IntSerializeProcess(void *Process, const DWORD ObjectType)
Serialize the provided process object.
static char gBase64Buffer[Base64EncSize(sizeof(gSerializerBuffer))]
Used to notify the deserializer that the next objects contains the victim.
struct _SERIALIZER_WIN_PROCESS * PSERIALIZER_WIN_PROCESS
Non-conditional jump, of any kind.
#define RIP_CODE_SERIALIZER_VERSION
DWORD Size
The total size of the section.
static void IntSerializeCodeBlocksPattern(CODE_BLOCK *CodeBlocks, DWORD Count, QWORD Rip, BOOLEAN Execute, SERIALIZER_CODE_BLOCKS *Object)
Iterates through all extracted code-blocks patterns and serialize the patterns.
struct _SERIALIZER_MSR SERIALIZER_MSR
Describes a serialized intObjMsr object.
User-mode non executable zone.
struct _SERIALIZER_CR SERIALIZER_CR
Describes a serialized intObjCr object.
Used for the read info object.
QWORD TrapFrameAddress
The address of the trap frame. Used for more information gathering when sending the alert...
Describes a serialized intObjWriteInfo object.
static void IntSerializeKmVictim(const EXCEPTION_KM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the information about kernel-mode victim.
QWORD Wow64StackLimit
The known stack limit in WoW64 mode. Valid only if the process is WoW64.
Used for the windows return module object.
QWORD Peb32Address
PEB 32 address (on pure x64 processes, this will be 0).
Describes a serialized intObjDpiWinThreadStart.
QWORD NewEnabled
The new value from parent's token Privileges.Enabled field, which was deemed malicious.
#define RAW_DUMP_SERIALIZER_VERSION
DWORD OffsetStart
The start of the extracted codeblock (not actually relevant)
QWORD BaseVa
The guest virtual address of the kernel module that owns this driver object.
static BYTE gSerializerBuffer[MAX_SERIALIZER_LENGTH]
struct _SERIALIZER_EXPORT * PSERIALIZER_EXPORT
DWORD NumberOfOffsets
Number of symbols pointing to the exported RVA.
static SERIALIZER_OBJECT_HEADER * IntSerializeObjectHeader(const DWORD Version, const DWORD Type)
Creates a SERIALIZER_OBJECT_HEADER object and fill the fields with the provided parameters.
Describes a serialized intObjLixVma object.
static void IntSerializeCr(const EXCEPTION_VICTIM_CR *Cr)
Serialize the provided CR object.
static void IntSerializeExecInfo(const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the execution violation information.
DWORD Entry
The modified entry from the IDT.
#define INT_SUCCESS(Status)
struct _SERIALIZER_DPI_PIVOTED_STACK * PSERIALIZER_DPI_PIVOTED_STACK
Used for the windows kernel driver object.
QWORD StackBase
The stack base for the thread that attempted the execution.
static void IntSerializeLixProcess(const LIX_TASK_OBJECT *Process, const DWORD ObjectType)
Serialize the provided LIX_TASK_OBJECT object.
WORD Size
Code block size, in patterns.
QWORD StartAddress
The address on which the parent's thread started execution.
Used to notify the deserializer that the next objects contains the misc.
#define WIN_KERNEL_DRIVER_SERIALIZER_VERSION
struct _SERIALIZER_DPI_WIN_HEAP_SPRAY SERIALIZER_DPI_WIN_HEAP_SPRAY
Describes a serialized intObjDpiWinHeapSpray.
static void IntSerializeKmMisc(const EXCEPTION_KM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the misc information for kernel-mode alert.
Describes a serialized intObjRipCode object.
The modified object is inside an EPT hook.
struct _SERIALIZER_WIN_KERNEL_DRIVER SERIALIZER_WIN_KERNEL_DRIVER
Describes a serialized intObjWinKernelDriver object.
CHAR String[0]
The content of the string.
struct _SERIALIZER_DPI_WIN_DEBUG * PSERIALIZER_DPI_WIN_DEBUG
#define DPI_WIN_THREAD_START_SERIALIZER_VERSION
Describes a serialized intObjKmOriginator object.
struct _SERIALIZER_RIP_CODE * PSERIALIZER_RIP_CODE
DWORD AccessSize
The original value. Only the first Size bytes are valid.
BYTE MaxHeapValPageContent[0x1000]
The copied page which has the most heap values in it.
static void IntSerializeCodeBlocks(QWORD Rip, QWORD Cr3, BOOLEAN Execute)
Serialize the extracted code-blocks for the current exception.
DWORD Offset
The offset of the instruction in the page.
#define CODE_BLOCK_CHUNKS_COUNT
Number of chunks (CODE_INS) per codeblock.
struct _SERIALIZER_WRITE_INFO * PSERIALIZER_WRITE_INFO
QWORD Gva
The guest virtual address of the task_struct.
Describes a user-mode originator.
Used for the windows parent process object.
Describes a serialized intObjWinModule object.
QWORD MainModuleAddress
The address of the main module.
Describes a serialized intObjDpi object.
Describes a serialized intObjWinVad object.
QWORD Start
Start of the memory described by the VMA.
Describes a serialized intObjCodeBlocks object.
QWORD StolenFromEprocess
The EPROCESS address from which the token was stolen.
Describes the header for each serialized item.
int INTSTATUS
The status data type.
QWORD Size
The size of the kernel module that owns this driver object.
struct _SERIALIZER_READ_INFO SERIALIZER_READ_INFO
Describes a serialized intObjExecInfo object.
static INTSTATUS IntSerializeExtractCodeBlocks(QWORD Rip, QWORD Cr3, BOOLEAN Execute, SERIALIZER_CODE_BLOCKS *Object)
Extract the code-blocks for the current exception.
#define KERNEL_DRV_OBJECT_SERIALIZER_VERSION
struct _SERIALIZER_DPI_WIN_STOLEN_TOKEN * PSERIALIZER_DPI_WIN_STOLEN_TOKEN
Used for the Linux task object.
QWORD Value[8]
The read value. Only the first Size bytes are valid.
Describes a serialized intObjArchRegs object.
Describes a serialized intObjDpiWinHeapSpray.
static void IntSerializeReadInfo(const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the read violation information.
#define MAX_SERIALIZER_LENGTH
struct _SERIALIZER_OBJECT_HEADER SERIALIZER_OBJECT_HEADER
Describes the header for each serialized item.
static void IntSerializeWinUmOriginator(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the information about windows user-mode originator.
struct _SERIALIZER_LIX_PROCESS * PSERIALIZER_LIX_PROCESS
QWORD DebuggerEprocess
This will keep the EPROCESS of the debugger process (if any).
Describes a serialized intObjEpt object.
static void IntSerializeLixUmVictim(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the information about Linux user-mode victim.
static void IntSerializeIncrementCurrentPtr(const DWORD Size)
Increment the current pointer to the serializer buffer with the provided size.
static void IntSerializeCodeBlocksGetExtractRange(QWORD Rip, BOOLEAN Execute, DWORD *Start, DWORD *End)
Computes the range from which the code-blocks should be extracted.
Used for the Linux kernel module object.
Describes a kernel-mode originator.
struct _SERIALIZER_IDT SERIALIZER_IDT
Describes a serialized intObjIdt object.
QWORD StartAddress
The guest linear address from which the code blocks were extracted.
Used for the Linux kernel module object.
struct _SERIALIZER_LIX_KERNEL_MODULE::@251 CoreLayout
struct _SERIALIZER_EXCEPTION_KM_ORIGINATOR * PSERIALIZER_EXCEPTION_KM_ORIGINATOR
QWORD StackBase
The known stack base of the parent process.
static BOOLEAN IntSerializeValidObjectSize(DWORD Size)
Checks if the serializer buffer overflows.
#define ALERT_MAX_CODEBLOCKS
The maximum number of code blocks included in an alert structure.
Used for the execution info object.
QWORD EprocessAddress
This will be the address of the EPROCESS.
static void IntSerializeWinUmMisc(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the misc information for windows user-mode alert.
INTRO_GUEST_TYPE OSType
The type of the guest.
QWORD Wow64StackBase
The known stack base in WoW64 mode. Valid only if the process is WoW64.
Describes a serialized intObjInjection object.
void IntSerializeWinVad(const VAD *Vad)
Serialize the provided VAD object.
#define END_ORIGINATOR_SERIALZIER_VERSION
#define _Out_writes_(expr)
static void IntSerializeLixKmVictim(const EXCEPTION_KM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the information about Linux kernel-mode victim.
struct _SERIALIZER_DPI_WIN_STOLEN_TOKEN SERIALIZER_DPI_WIN_STOLEN_TOKEN
Describes a serialized intObjDpiWinStolenToken.
QWORD VadGva
The guest virtual address at which the corresponding Windows _MMVAD structure is located.
QWORD Gpa
The guest physical address of the guest _DRIVER_OBJECT represented by this structure.
BYTE Type
The violation type.
QWORD Size
The size of the kernel module that owns this driver object.
DWORD AccessSize
The original value. Only the first Size bytes are valid.
#define READ_INFO_SERIALIZER_VERSION
Describes a serialized intObjDpiWinTokenPrivs.
#define WIN_KM_VICTIM_SERIALIZER_VERSION
enum _ZONE_TYPE ZONE_TYPE
Describes the zone types that can be excepted.
QWORD Peb64Address
PEB 64 address (on x86 OSes, this will be 0).
Describes a serialized intObjExport object.
BYTE Bytes[16]
The instruction bytes.
static void IntSerializeRawDump(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the raw dump for the injection violation.
struct _SERIALIZER_WRITE_INFO SERIALIZER_WRITE_INFO
Describes a serialized intObjWriteInfo object.
QWORD ShellcodeFlags
The shellcode flags given by shemu on the detected page.
static CB_EXTRACT_LEVEL IntSerializeCodeBlocksGetExtractLevel(QWORD Rip)
Get the code-blocks extraction level.
#define LIX_PROCESS_SERIALIZER_VERSION
Describes a kernel driver.
Used for user-mode exceptions.
BYTE Chunks[CODE_BLOCK_CHUNKS_COUNT]
The actual CODE_INS values representing the instruction pattern.
QWORD Base
The base guest virtual address of the section.
DWORD Size
Virtual size of the module.
enum _SERIALIZER_EXCEPTION_TYPE SERIALIZER_EXCEPTION_TYPE
Describes the serialized exception type.
static void IntSerializeKernelUserException(const void *Originator, const void *Victim, INTRO_EVENT_TYPE EventClass)
Serialize the kernel-user mode exception.
struct _SERIALIZER_DTR SERIALIZER_DTR
Describes a serialized intObjDtr object.
QWORD Rip
The guest virtual address of the instruction.
#define LIX_KERNEL_MODULE_SERIALIZER_VERSION
struct _SERIALIZER_INJECTION SERIALIZER_INJECTION
Describes a serialized intObjInjection object.
void IntSerializeException(void *Victim, void *Originator, DWORD Type, INTRO_ACTION Action, INTRO_ACTION_REASON Reason, INTRO_EVENT_TYPE EventClass)
The entry point of the serializer; will serialize the provided exception if the violation is blocked ...
DWORD Length
The length of the injection.
Used for kernel-mode exceptions.
BYTE TrapFrameContent[512]
The content of the trap frame where the current stack has been found.
The string encoding type 'utf-16'.
QWORD Flags
Flags for the VMA.
DWORD TextSize
The size of the .text (code usually).
#define Base64EncSize(Length)
The string encoding type 'utf-8'.
static DWORD gCodeBlocksPatternLength
void IntSerializeStart(void)
Set the current serializer pointer to the beginning of the buffer and generated a new alert-ID...
QWORD Cr3
Process PDBR. Includes PCID.
the modified object is IDTR/GDTR.
INTSTATUS IntGetCurrentMode(DWORD CpuNumber, DWORD *Mode)
Read the current CS type.
struct _DPI_EXTRA_INFO::@202 DpiHeapSprayExtraInfo
static void IntSerializeAccessInfo(const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the read/write/exec violation information.
QWORD Gva
The guest virtual address in which the injection occurs.
struct _SERIALIZER_CR * PSERIALIZER_CR
QWORD EntryPoint
The entry point of this driver.
#define START_MISC_SERIALZIER_VERSION
DWORD Protection
VAD protection as represented by Introcore.
DWORD Guest
The operation system.
enum _INTRO_OBJECT_TYPE INTRO_OBJECT_TYPE
The type of the object protected by an EPT hook.
#define DPI_SERIALIZER_VERSION
struct _SERIALIZER_RIP_CODE SERIALIZER_RIP_CODE
Describes a serialized intObjRipCode object.
struct _DPI_EXTRA_INFO::@200 DpiPivotedStackExtraInfo
static void IntSerializeWinKmVictim(const EXCEPTION_KM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the information about Windows kernel-mode victim.
Used to notify the deserializer that the all the misc objects has been parsed.
static void IntSerializeWinModule(const WIN_PROCESS_MODULE *Module, const DWORD ObjectType)
Serialize the provided WIN_PROCESS_MODULE object.
static BOOLEAN IntSerializeStringIsWcharAscii(const void *String, DWORD Size)
Checks if the provided string contains WCHARS.
static void IntSerializeUmMisc(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the misc information for user-mode alert.
struct _SERIALIZER_DPI_WIN_THREAD_START SERIALIZER_DPI_WIN_THREAD_START
Describes a serialized intObjDpiWinThreadStart.
struct _SERIALIZER_WIN_MODULE * PSERIALIZER_WIN_MODULE
#define START_VICTIM_SERIALZIER_VERSION
static void IntSerializeLixUmMisc(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the misc information for Linux user-mode alert.
QWORD StackLimit
The stack limit for the thread that attempted the execution.
#define INITIAL_CRC_VALUE
QWORD Wow64StackLimit
The known stack limit of the parent process in WoW64 mode.
#define VICTIM_SERIALIZER_CR_VERSION
Describes a serialized intObjInstrux object.
DWORD Flags
The protection flags.
static CODE_BLOCK gCodeBlocks[PAGE_SIZE/sizeof(CODE_BLOCK)]
#define IS_KERNEL_POINTER_LIX(p)
struct _SERIALIZER_LIX_VMA SERIALIZER_LIX_VMA
Describes a serialized intObjLixVma object.
#define EXCEPTION_CODEBLOCKS_OFFSET
The maximum offset for codeblocks extraction.
static void IntSerializeMsr(const EXCEPTION_VICTIM_MSR *Msr)
Serialize the provided MSR object.
Describes a serialized intObjKernelDrvObject object.
Used for the DPI heap spray object.
#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...
QWORD StackLimit
The known stack limit of the parent process.
struct _SERIALIZER_EXCEPTION_UM_ORIGINATOR SERIALIZER_EXCEPTION_UM_ORIGINATOR
Describes a serialized intObjUmOriginator object.
struct _SERIALIZER_WIN_KERNEL_DRIVER * PSERIALIZER_WIN_KERNEL_DRIVER
struct _KTRAP_FRAME64 KTRAP_FRAME64
#define ZONE_EXECUTE
Used for execute violation.
QWORD ZoneFlags
The zone-flags of the victim object.
Holds information about a driver object.
static void IntSerializeWinProcess(const WIN_PROCESS_OBJECT *Process, const DWORD ObjectType)
Serialize the provided WIN_PROCESS_OBJECT object.
The parent of a process has a stolen access token when it created the child.
This represents an attempt to queue an APC into the victim process.
static void IntSerializeDpi(const EXCEPTION_UM_ORIGINATOR *Originator)
Serialize the DPI flags.
BOOLEAN Guest64
True if this is a 64-bit guest, False if it is a 32-bit guest.
#define ZONE_PROC_THREAD_APC
Used for the APC thread hijacking technique.
static void IntSerializeUmException(const void *Originator, const void *Victim, INTRO_EVENT_TYPE EventClass)
Serialize the user-mode exception.
DWORD Arch
The architecture of the current guest.
Used to notify the deserializer that the next objects contains the originator.
void IntSerializeKmOriginator(const EXCEPTION_KM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the information about kernel-mode originator.
static CODE_BLOCK_PATTERN gCodeBlocksPattern[PAGE_SIZE/sizeof(CODE_BLOCK_PATTERN)]
QWORD Debugger
The debugger of the current process. May or may not be the parent.
The creation of a process was attempted with token privileges altered in a malicious way...
static void IntSerializeKernelDriver(const EXCEPTION_KM_ORIGINATOR *Originator, const KERNEL_DRIVER *Driver, const DWORD ObjectType)
Serialize the provided KERNEL_DRIVER object.
static void IntSerializeWinUmVictim(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the information about user-mode windows victim.
DWORD Detected
The bit is set if the i-th page was detected as malicious by shemu.
#define IS_KERNEL_POINTER_WIN(is64, p)
Checks if a guest virtual address resides inside the Windows kernel address space.
DWORD SerializedType
The type of the serialized exception (SERIALIZER_EXCEPTION_TYPE)
DWORD Version
The version of the serialized object (used for compatibility).
QWORD BaseVa
The guest virtual address of the kernel module that owns this driver object.
The parent of a process had a pivoted stack when it created the child.
Describes a serialized intObjDtr object.
QWORD CurrentWow64Stack
The current stack of the process in WoW64 mode. Valid only if the process is WoW64.
This is a classic code injection attempt that simply modifies the memory of the victim process...
#define VICTIM_SERIALIZER_DTR_VERSION
struct _SERIALIZER_EXPORT SERIALIZER_EXPORT
Describes a serialized intObjExport object.
static void IntSerializeWinKernelDriver(const KERNEL_DRIVER *Driver, DWORD ObjectType)
Serialize the provided KERNEL_DRIVER object.
This includes instructions until codeInsBt.
Used for the DPI pivoted stack object.
QWORD ShellcodeFlags
The shellcode flags given by shemu on the detected page.
struct _SERIALIZER_INSTRUX SERIALIZER_INSTRUX
Describes a serialized intObjInstrux object.
Executions inside the SharedUserData region.
Used for the windows kernel driver object.
DPI_EXTRA_INFO DpiExtraInfo
Represents the gathered extra info while checking the DPI heuristics.
struct _SERIALIZER_DTR * PSERIALIZER_DTR
QWORD NewPresent
The new Privileges.Present value in the parent's token, which was deemed malicious.
QWORD Rsp
The value of the guest RSP register at the moment of execution.
static void IntSerializeDpiWinDebug(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the DPI debug flags info (Windows).
QWORD NewPresent
The new value from parent's token Privileges.Present field, which was deemed malicious.
struct _DPI_EXTRA_INFO::@204 DpiThreadStartExtraInfo
QWORD CurrentStack
The current stack of the process at the point of process creation.
static QWORD gSerializerCurrentId
static void IntSerializeLixKmMisc(const EXCEPTION_KM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the misc information for Linux kernel-mode alert.
static void IntSerializeDpiWinStolenToken(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the DPI stolen token info (Windows).
static void IntSerializeDump(void)
Dumps the serialized buffer (base64 format).
QWORD RealParent
The guest virtual address of the task_struct->real_parent.
QWORD NewValue[8]
The size of the access.
Used for the code-blocks object.
#define DESCRIPTOR_SIZE_64
Used to notify the deserializer that the all the originator's objects has been parsed.
DWORD Length
The length of the string.
WORD Size
The size (bytes) of the serializer buffer.
The modified object is a MSR.
static void IntSerializeExport(const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the modified exports.
Used for the Linux parent task object.
Used for the Linux VMA object.
BYTE Value
The CODE_INS value describing the instruction type.
DWORD Msr
The written MSR.
#define END_MISC_SERIALZIER_VERSION
Used for the write info object.
#define LIX_KM_VICTIM_SERIALIZER_VERSION
static void IntSerializeLixKernelModule(const KERNEL_DRIVER *Driver, DWORD ObjecType)
Serialize the provided KERNEL_DRIVER object.
DWORD TimeDateStamp
The driver's internal timestamp (from the _IMAGE_FILE_HEADER).
struct _SERIALIZER_MSR * PSERIALIZER_MSR
#define WIN_PROCESS_MODULE_SERIALIZER_VERSION
DWORD Length
The length of the code array.
#define EXEC_INFO_SERIALIZER_VERSION
static void IntSerializeArchRegs(void)
Serialize the guest registers.
DWORD Length
The length of the instruction.
struct _SERIALIZER_LIX_KERNEL_MODULE SERIALIZER_LIX_KERNEL_MODULE
Describes a serialized intObjLixKernelModule object.
Describes the modified zone.
static void IntSerializeDpiWinTokenPrivs(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the DPI token privs info (Windows).
#define UNREFERENCED_PARAMETER(P)
Describes a serialized intObjUmOriginator object.
Used to notify the deserializer that the all the victim's objects has been parsed.
This includes instructions until codeInsFlags.
struct _SERIALIZER_EXCEPTION_KM_ORIGINATOR SERIALIZER_EXCEPTION_KM_ORIGINATOR
Describes a serialized intObjKmOriginator object.
#define INT_STATUS_DATA_BUFFER_TOO_SMALL
struct _SERIALIZER_DPI SERIALIZER_DPI
Describes a serialized intObjDpi object.
#define LIX_VMA_SERIALIZER_VERSION
DWORD Rva
The RVA of this export.
ZONE_TYPE ZoneType
The zone-type of the victim object.
static char * IntSerializerBase64Get(DWORD *Length)
Converts the serialized buffer to base64.
The Virtualization exception agent injected inside the guest.
#define KERNEL_DRIVER_SERIALIZER_VERSION
struct _SERIALIZER_INSTRUX * PSERIALIZER_INSTRUX
#define VICTIM_SERIALIZER_MSR_VERSION
static void IntSerializeEpt(const EXCEPTION_VICTIM_EPT *Ept, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the provided EPT object.
#define INSTRUX_SERIALIZER_VERSION
QWORD StackBase
The known stack base present in TIB at the moment of process creation.
Describes a serialized intObjWinProcess object.
static void IntSerializeDpiWinPivotedStack(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the DPI pivoted stack info (Windows).
Used for the Injection object.
Used for the registers object.
struct _DPI_EXTRA_INFO::@202::@205 HeapPages[HEAP_SPRAY_NR_PAGES]
Describes a serialized intObjIdt object.
BYTE Encode
The encode type of the string (utf-8, utf-16).
struct _SERIALIZER_KERNEL_DRIVER SERIALIZER_KERNEL_DRIVER
Describes a serialized intObjKernelDriver object.
enum _INTRO_ACTION INTRO_ACTION
Event actions.
DWORD RoSize
The size of the .rodata (read-only).
struct _DPI_EXTRA_INFO::@201 DpiStolenTokenExtraInfo
struct _DPI_EXTRA_INFO::@203 DpiTokenPrivsExtraInfo
struct _SERIALIZER_STRING * PSERIALIZER_STRING
Describes a serialized intObjExecInfo object.
struct _SERIALIZER_CODE_BLOCKS * PSERIALIZER_CODE_BLOCKS
const char gBase64Chars[]
No access type. This can be used for swap hooks.
DWORD Pid
Process ID (the one used by Windows).
The action was allowed, but it has the BETA flag (Introcore is in log-only mode). ...
DWORD Flags
The DPI flags.
struct _SERIALIZER_LIX_PROCESS SERIALIZER_LIX_PROCESS
Describes a serialized intObjLixProcess object.
static void IntSerializeIdt(const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the provided IDT object.
QWORD Gva
The written/read/exec guest virtual address.
#define VICTIM_SERIALIZER_INJECTION_VERSION
static void IntSerializeWinKmMisc(const EXCEPTION_KM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the misc information for windows kernel-mode alert.
struct _SERIALIZER_EXCEPTION_UM_ORIGINATOR * PSERIALIZER_EXCEPTION_UM_ORIGINATOR
static void IntSerializeKmException(const void *Originator, const void *Victim, INTRO_EVENT_TYPE EventClass)
Serialize the kernel-mode exception.
__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.
DWORD HeapValCount
The number of heap values in the page. Since the max value can be 1024, 11 bits are needed...
Used for the injection raw dump object.
DWORD NameLens[MAX_OFFSETS_PER_NAME]
Length of each name pointing to this RVA.
MM Mm
Guest memory information, such as paging mode, system Cr3 value, etc.
struct _WIN_PROCESS_OBJECT::@227 CreationInfo
void IntSerializeWinKmOriginator(const EXCEPTION_KM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the information about windows kernel-mode originator.
struct _SERIALIZER_DPI_PIVOTED_STACK SERIALIZER_DPI_PIVOTED_STACK
Describes a serialized intObjDpiPivotedStack.
The parent of a process tried to obtain debug privileges over the child.
void IntSerializeLixUmOriginator(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the information about Linux user-mode originator.
static void IntSerializeKernelDrvObject(const WIN_DRIVER_OBJECT *DrvObject)
Serialize the provided WIN_DRIVER_OBJECT object.
DWORD CsType
The type of the code segment. Can be one of the IG_CS_TYPE values.
static DWORD IntSerializeCurrentOffset(void)
Get the current offset (length) of the serialized buffer.
GUEST_STATE gGuest
The current guest state.
The modified object is inside a process.
QWORD Wow64CurrentStack
The current stack of the parent process in WoW64 mode.
struct _SERIALIZER_RAW_DUMP SERIALIZER_RAW_DUMP
Describes a serialized intObjRawDump object.
Used for the DPI token privs object.
#define LIX_VICTIM_SERIALIZER_VERSION
INTSTATUS IntVirtMemRead(QWORD Gva, DWORD Length, QWORD Cr3, void *Buffer, DWORD *RetLength)
Reads data from a guest virtual memory range.
#define DPI_WIN_HEAP_SPRAY_SERIALIZER_VERSION
Describes a serialized intObjKernelDriver object.
QWORD Cr3
Process PDBR. Includes PCID.
QWORD ParentEprocess
The EPROCESS of the parent process.
#define START_ORIGINATOR_SERIALZIER_VERSION
Used for kernel-user mode exceptions.
BYTE Raw[0]
The raw dump of the injection.
static void IntSerializeUmOriginator(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the information about user-mode originator.
Used for the Integrity object.
struct _SERIALIZER_EPT SERIALIZER_EPT
Describes a serialized intObjEpt object.
struct _SERIALIZER_EXEC_INFO SERIALIZER_EXEC_INFO
Describes a serialized intObjExecInfo object.
struct _SERIALIZER_LIX_KERNEL_MODULE * PSERIALIZER_LIX_KERNEL_MODULE
QWORD Parent
The guest virtual address of the task_struct->parent.
QWORD OldValue[8]
The written value. Only the first Size bytes are valid.
static void * IntSerializeCurrentPtr(DWORD Size)
Returns the current pointer to serializer buffer and checks for overflows.
static void IntSerializeIncrementCurrentId(void)
Increment the current serializer alert ID.
Used for the kernel driver object.
PWIN_PROCESS_OBJECT IntWinProcFindObjectByEprocess(QWORD Eprocess)
Finds a process by the address of its _EPROCESS structure.
static void IntSerializeDpiWinHeapSpray(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the DPI heap spray info (Windows).
#define END_VICTIM_SERIALZIER_VERSION
The thread which created the process has started execution on some suspicious code.
Virtual SYSCALL (user-mode, Linux-only)
#define VICTIM_SERIALIZER_IDT_VERSION
struct _SERIALIZER_EXEC_INFO * PSERIALIZER_EXEC_INFO
struct _CODE_BLOCK CODE_BLOCK
QWORD VirtualBase
Guest virtual address of the loaded module.
#define ZONE_READ
Used for read violation.
Used for the windows VAD object.
#define DPI_WIN_STOLEN_TOKEN_SERIALIZER_VERSION
struct _SERIALIZER_DPI_WIN_HEAP_SPRAY::@252 HeapPages[0xF]
#define DPI_WIN_PIVOTET_STACK_SERIALIZER_VERSION
WINUM_CACHE_EXPORT * IntWinUmCacheGetExportFromRange(WIN_PROCESS_MODULE *Module, QWORD Gva, DWORD Length)
Tries to find an export in the range [Gva - Length, Gva].
struct _SERIALIZER_KERNEL_DRV_OBJECT * PSERIALIZER_KERNEL_DRV_OBJECT
Describes a serialized intObjDpiWinStolenToken.
BYTE DetectedPage[0x1000]
The page which was detected through shemu as malicious.
#define DPI_WIN_TOKEN_PRIVS_SERIALIZER_VERSION
struct _SERIALIZER_EXCEPTION_VICTIM * PSERIALIZER_EXCEPTION_VICTIM
QWORD Gpa
The written/read/exec guest physical address.
Used for the DPI debug object.
Used for the DPI stolen token object.
PCHAR Names[MAX_OFFSETS_PER_NAME]
The names pointing to this RVA. Each name will point inside the Names structure inside WINUM_CACHE_EX...
Virtual dynamic shared object (user-mode, Linux-only)
WORD Size
The size of the serialized object.
Describes a serialized intObjCr object.
DWORD Type
The injection type.
struct _SERIALIZER_EPT * PSERIALIZER_EPT
struct _SERIALIZER_DPI_WIN_TOKEN_PRIVS SERIALIZER_DPI_WIN_TOKEN_PRIVS
Describes a serialized intObjDpiWinTokenPrivs.
LIX_TASK_OBJECT * IntLixTaskFindByGva(QWORD TaskStruct)
Finds Linux process with the provided "task_struct" guest virtual address.
The modified object is a CR.
static void IntSerializeDtr(const EXCEPTION_VICTIM_DTR *Dtr)
Serialize the provided DTR object.
BYTE StartPage[0x1000]
The copied page from where the thread started executing.
Kernel-User mode exception.
VCPU_STATE * gVcpu
The state of the current VCPU.
#define VICTIM_SERIALIZER_EPT_VERSION
DWORD VadType
The type of the VAD.
enum _INTRO_EVENT_TYPE INTRO_EVENT_TYPE
Event classes.
DWORD Delta
The offset inside the affected function at which the access was made.
QWORD RealParentEprocess
The active EPROCESS at the moment of creation.
DWORD Count
The number of the exports.
static void IntSerializeBlockToBase64(const BYTE *In, BYTE *Out, size_t Length)
Converts the provided binary buffer to base64.
Describes a serialized intObjWinKernelDriver object.
#define WIN_VICTIM_SERIALIZER_VERSION
#define ZONE_PROC_THREAD_CTX
Used for the CONTEXT structure of a thread.
struct _SERIALIZER_WIN_MODULE SERIALIZER_WIN_MODULE
Describes a serialized intObjWinModule object.
static void IntSerializeWriteInfo(const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the write violation information.
struct _SERIALIZER_DPI_WIN_TOKEN_PRIVS * PSERIALIZER_DPI_WIN_TOKEN_PRIVS
struct _SERIALIZER_WIN_VAD SERIALIZER_WIN_VAD
Describes a serialized intObjWinVad object.
DWORD Type
The type of the modified DTR.
QWORD Wow64StackBase
The known stack base of the parent process in WoW64 mode.
QWORD EntryPoint
The entry point of this driver.
struct _SERIALIZER_STRING SERIALIZER_STRING
Describes a serialized string.
A mov involving memory (either as the destination or as the source).
static void IntSerializeHeader(SERIALIZER_EXCEPTION_TYPE SerializerType, INTRO_EVENT_TYPE EventClass)
Serialize the header of the serializer buffer.
struct _SERIALIZER_LIX_VMA * PSERIALIZER_LIX_VMA
QWORD Gva
The guest virtual address of the guest _DRIVER_OBJECT represented by this structure.
#define UNREFERENCED_LOCAL_VARIABLE(V)
struct _SERIALIZER_LIX_KERNEL_MODULE::@250 InitLayout
static void IntSerializeDpiWinThreadStart(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the DPI start thread info (Windows).
DWORD Count
The number of available entries in the CodeBlocks array.
#define WIN_VAD_SERIALIZER_VERSION
struct _SERIALIZER_HEADER SERIALIZER_HEADER
Describes the header of the serializer buffer.
QWORD ShellcodeFlags
Contains the flags on the first page which was detected through shemu.
DWORD Executable
True if the page is executable in the translation.
Used for the code object.
Used for the export object.
This represents a read done from another process.
void IntSerializeInstruction(INSTRUX *Instruction, const QWORD Rip)
Serialize the provided INSTRUX object.
struct _SERIALIZER_READ_INFO * PSERIALIZER_READ_INFO
BYTE Code[0]
The contents of the guest memory page that contains the RIP.
QWORD CurrentStack
The current stack of the parent process.
static void IntSerializeUmVictim(const EXCEPTION_UM_ORIGINATOR *Originator, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the information about user-mode victim.
A representation of a Windows VAD structure.
Describes a serialized intObjLixKernelModule object.
struct _SERIALIZER_DPI_WIN_DEBUG SERIALIZER_DPI_WIN_DEBUG
Describes a serialized intObjDpiWinDebug.
QWORD NewEnabled
The new Privileges.Enabled value in the parent's token, which was deemed malicious.
QWORD ObjectGva
The guest virtual address at which this object resides.
_SERIALIZER_EXCEPTION_TYPE
Describes the serialized exception type.
#define ZONE_WRITE
Used for write violation.
struct _SERIALIZER_INJECTION * PSERIALIZER_INJECTION
DWORD Reserved
Reserved for further use.
DWORD ExecCount
The number of execution violations triggered by pages inside this VAD.
WORD Type
The type of the sterilized object.
DWORD Length
The length of the Raw field.
Used for the windows module object.
DWORD VadProtection
The protection as represented inside the Windows kernel.
static void IntSerializeInjection(const EXCEPTION_VICTIM_INJECTION *Injection, const EXCEPTION_VICTIM_ZONE *Victim)
Serialize the provided Injection object.
DWORD Offset
The offset where the detection on the given page was given, if Detection is equal to 1...
Used for the return kernel driver object.
struct _SERIALIZER_CODE_BLOCKS SERIALIZER_CODE_BLOCKS
Describes a serialized intObjCodeBlocks object.
INTSTATUS IntLixFileGetPath(QWORD FileStructGva, char **Path, DWORD *Length)
Gets the path that corresponds to the provided FileStructGva (guest virtual address of the 'struct fi...
INTRO_OBJECT_TYPE Type
The type of the victim object.
Describes a serialized intObjExecInfo object.
Used for the DPI thread start object.
This structure describes a running process inside the guest.
static void IntSerializeVad(const void *Vad)
Serialize the provided VAD/vma object.
#define WIN_PROCESS_SERIALIZER_VERSION
Used for the instruction object.
QWORD MmGva
The guest virtual address of the task_struct->mm.