38 if (NULL == Registers)
45 memset(agentEvent, 0,
sizeof(*agentEvent));
46 memset(&header, 0,
sizeof(header));
49 dataAddr =
gGuest.
Guest64 ? Registers->Rbx : (Registers->Rsi & 0xFFFFFFFF);
53 ERROR(
"[ERROR] Data address is 0!\n");
81 ERROR(
"[ERROR] IntVirtMemRead failed: 0x%08x\n", status);
102 ERROR(
"[ERROR] IntVirtMemRead failed: 0x%08x\n", status);
103 goto resume_and_exit;
110 goto resume_and_exit;
117 TRACE(
"[LOGTOOL] Data from %s: %d bytes\n",
136 ERROR(
"[ERROR] IntNotifyIntroEvent failed: 0x%08x\n", status);
struct _AGENT_LGT_EVENT::@333::@335 DataEvent
Collected data.
#define INT_STATUS_SUCCESS
AGENT_EVENT_TYPE Event
The type of the agent.
#define INT_SUCCESS(Status)
Describes an event sent by the log gathering tool.
INTSTATUS IntResumeVcpus(void)
Resumes the VCPUs previously paused with IntPauseVcpus.
Event structure for agent injection and termination.
INTSTATUS IntAgentHandleLogGatherVmcall(void *Reserved, PIG_ARCH_REGS Registers)
Handle a VMCALL issued by a log gather agent.
int INTSTATUS
The status data type.
#define INT_STATUS_NOT_FOUND
INTRO_PROCESS CurrentProcess
The agent process.
INTSTATUS IntPauseVcpus(void)
Pauses all the guest VCPUs.
INTRO_GUEST_TYPE OSType
The type of the guest.
DWORD ErrorCode
The error code of the event. Success is 0.
GENERIC_ALERT gAlert
Global alert buffer.
#define LGT_EVENT_SIZE
Log gather agent event size.
INTSTATUS IntNotifyIntroEvent(INTRO_EVENT_TYPE EventClass, void *Param, size_t EventSize)
Notifies the integrator about an introspection alert.
BOOLEAN Guest64
True if this is a 64-bit guest, False if it is a 32-bit guest.
struct _AGENT_LGT_EVENT::@333::@336 ErrorEvent
Error report.
#define LGT_EVENT_VERSION
Log gather agent event version.
Informational event sent when the remediation tool is injected or terminated. See EVENT_AGENT_EVENT...
DWORD AgentTag
Unique agent tag. See INTRO_DEP_AG_TAGS.
void IntAlertFillWinProcessCurrent(INTRO_PROCESS *EventProcess)
Saves information about the current Windows process inside an alert.
#define UNREFERENCED_PARAMETER(P)
The agent sent a message.
GUEST_STATE gGuest
The current guest state.
INTSTATUS IntVirtMemRead(QWORD Gva, DWORD Length, QWORD Cr3, void *Buffer, DWORD *RetLength)
Reads data from a guest virtual memory range.
DWORD EventType
Event type.
DWORD Size
Event size. Should match LGT_EVENT_SIZE/.
char * utf16_for_log(const WCHAR *WString)
Converts a UTF-16 to a UTF-8 string to be used inside logging macros.
#define INT_STATUS_NOT_SUPPORTED
void IntAlertFillLixCurrentProcess(INTRO_PROCESS *EventProcess)
Saves the current Linux process inside an event.
AGENT_LGT_EVENT LogGatherEvent
Log gather tool event.
#define INT_STATUS_INVALID_PARAMETER_2
Common header for all log gather tool events.
#define INT_STATUS_INVALID_DATA_SIZE
DWORD Version
Event version. Should match LGT_EVENT_VERSION.