Bitdefender Hypervisor Memory Introspection
|
#include "lixnet.h"
#include "alerts.h"
#include "guests.h"
#include "intronet.h"
#include "introstatus.h"
Go to the source code of this file.
Data Structures | |
struct | _SOCK_PROTO |
An internal structure used to cache the "struct proto" addresses of required connection types. More... | |
Macros | |
#define | LIX_FDTABLE_MAX_FDS_CAP 2048u |
The maximum number of file descriptors to be iterated. More... | |
Typedefs | |
typedef struct _SOCK_PROTO | SOCK_PROTO |
An internal structure used to cache the "struct proto" addresses of required connection types. More... | |
Functions | |
static void | IntLixNetSendConnectionEvent (INTRONET_ENDPOINT *Connection) |
Sends a connection event to the integrator. More... | |
static INTSTATUS | IntLixNetGetConnectionFromSocket (QWORD SocketGva, INTRONET_ENDPOINT *Connection) |
Fills an INTRONET_ENDPOINT structure from a TCP/IP socket GVA. More... | |
static BOOLEAN | IntLixNetFileIsSocket (QWORD StructFileGva, QWORD *SocketGva) |
Check if a give file object is a socked and return the socket GVA. More... | |
INTSTATUS | IntLixNetIterateTaskConnections (LIX_TASK_OBJECT *Task, PFUNC_IterateConnectionsCallback Callback) |
Iterates all TCP/IP connections of a process and supplies them to callback. More... | |
static void | IntLixNetProcessConnection (INTRONET_ENDPOINT *Endpoint) |
Callback for IntLixNetIterateTaskConnections that processes each TCP/IP connection. More... | |
INTSTATUS | IntLixNetSendTaskConnections (LIX_TASK_OBJECT *Task) |
Logs and sends to the integrator all connections opened by a Linux proces.. More... | |
INTSTATUS | IntLixNetSendGuestConnections (void) |
Sends all active in-guest TCP/IP connections as events to the integrator. More... | |
#define LIX_FDTABLE_MAX_FDS_CAP 2048u |
The maximum number of file descriptors to be iterated.
Definition at line 11 of file lixnet.c.
Referenced by IntLixNetIterateTaskConnections().
typedef struct _SOCK_PROTO SOCK_PROTO |
An internal structure used to cache the "struct proto" addresses of required connection types.
Check if a give file object is a socked and return the socket GVA.
[in] | StructFileGva | The GVA of the file structure. |
[out] | SocketGva | Will contain the GVA of the socket structure corresponding to the given file structure when the returned value is TRUE |
Definition at line 216 of file lixnet.c.
Referenced by IntLixNetIterateTaskConnections().
|
static |
Fills an INTRONET_ENDPOINT structure from a TCP/IP socket GVA.
This function is able to retrieve the connection details starting from the address of a socket object. If the connection type is not either IPv4 or IPv6 it will be ignored.
[in] | SocketGva | The GVA of a socket object. |
[out] | Connection | Upon successful return this structure will be filled with the connection details. |
Definition at line 50 of file lixnet.c.
Referenced by IntLixNetIterateTaskConnections().
INTSTATUS IntLixNetIterateTaskConnections | ( | LIX_TASK_OBJECT * | Task, |
PFUNC_IterateConnectionsCallback | Callback | ||
) |
Iterates all TCP/IP connections of a process and supplies them to callback.
This function will iterate all file descriptors for the given process and for those that refer to a socket will attempt to extract the connection details if the protocol used is TCP IPv4 or IPv6.
[in] | Task | The Linux process. |
[in] | Callback | The callback that will be called for each connection. |
Definition at line 273 of file lixnet.c.
Referenced by IntLixNetSendTaskConnections().
|
static |
Callback for IntLixNetIterateTaskConnections that processes each TCP/IP connection.
This function will log the connection details and send to the integrator an event.
[in] | Endpoint | The TCP/IP connection. |
Definition at line 390 of file lixnet.c.
Referenced by IntLixNetSendTaskConnections().
|
static |
Sends a connection event to the integrator.
[in] | Connection | The TCP/IP connection. |
Definition at line 24 of file lixnet.c.
Referenced by IntLixNetProcessConnection().
INTSTATUS IntLixNetSendGuestConnections | ( | void | ) |
Sends all active in-guest TCP/IP connections as events to the integrator.
This function will iterate all processes running inside the guest and send all their active TCP/IP connections.
INTSTATUS IntLixNetSendTaskConnections | ( | LIX_TASK_OBJECT * | Task | ) |
Logs and sends to the integrator all connections opened by a Linux proces..
[in] | Task | The Linux process. |
Definition at line 413 of file lixnet.c.
Referenced by IntLixNetSendGuestConnections(), and IntLixVmaHandlePageExecution().