Documentation
¶
Overview ¶
Package model holds model related files
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds the security profile data model ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files ¶
Package model holds model related files
Index ¶
- Constants
- Variables
- func EventTypeDependsOnInterfaceTracking(eventType eval.EventType) bool
- func FilterEnvs(allEnvVars []string, desiredKeys map[string]bool) []string
- func GetDefaultLegacyFields(field eval.Field) (eval.Field, bool)
- func GetDefaultLegacyFieldsKeys() []eval.Field
- func GetEventTypePerCategory(categories ...EventCategory) map[EventCategory][]eval.EventType
- func IsAlphaNumeric(r rune) bool
- func IsFakeInode(inode uint64) bool
- func IsPrintable(s string) bool
- func IsPrintableASCII(s string) bool
- func MarshalBinary(data []byte, binaryMarshalers ...BinaryMarshaler) (int, error)
- func MountFlagsStrings(flags uint32) []string
- func MountOriginToString(origin MountOrigin) string
- func MountSourceToString(source MountSource) string
- func NewEventZeroer() func(*Event)
- func NormalizeMountFlagsFromAttr(attr uint64) uint32
- func NormalizeMountFlagsFromOptions(options string) uint32
- func NormalizeMountFlagsFromVFS(mntFlags uint32) uint32
- func NullTerminatedBytes(d []byte) []byte
- func NullTerminatedString(d []byte) string
- func ProcessSourceToString(source uint64) string
- func SECLConstants() map[string]interface{}
- func SSHAuthMethodToString(t usersession.AuthType) string
- func SetAncestorFields(pce *ProcessCacheEntry, subField string, _ interface{}) (bool, error)
- func SetDefaultLegacyFields(legacyFields map[eval.Field]eval.Field)
- func SetInterpreterFields(bprm *LinuxBinprm, subField string, _ interface{}) (bool, error)
- func SliceToArray(src []byte, dst []byte)
- func StringifyHelpersList(input []uint32) []string
- func UnmarshalBinary(data []byte, binaryUnmarshalers ...BinaryUnmarshaler) (int, error)
- func UnmarshalPrintableString(data []byte, size int) (string, error)
- func UnmarshalString(data []byte, size int) (string, error)
- func UnmarshalStringArray(data []byte) ([]string, error)
- func UserSessionTypeToString(t usersession.Type) string
- type ABI
- type AWSIMDSEvent
- type AWSSecurityCredentials
- type AWSSecurityCredentialsIterator
- func (it *AWSSecurityCredentialsIterator) At(ctx *eval.Context, regID eval.RegisterID, pos int) *AWSSecurityCredentials
- func (it *AWSSecurityCredentialsIterator) Front(_ *eval.Context) *AWSSecurityCredentials
- func (it *AWSSecurityCredentialsIterator) Len(_ *eval.Context) int
- func (it *AWSSecurityCredentialsIterator) Next(_ *eval.Context) *AWSSecurityCredentials
- type AcceptEvent
- type ActionReport
- type ActivityDumpLoadConfig
- type AddressFamily
- type Architecture
- type ArgsEntry
- type ArgsEnvs
- type ArgsEnvsEvent
- type BPFAttachType
- type BPFCmd
- type BPFEvent
- type BPFHelperFunc
- type BPFMap
- type BPFMapType
- type BPFProgram
- type BPFProgramType
- type BaseEvent
- type BaseExtraFieldHandlers
- type BinaryMarshaler
- type BinaryUnmarshaler
- type BindEvent
- type CGroupContext
- func (cg *CGroupContext) Equals(cg2 *CGroupContext) bool
- func (cg *CGroupContext) Hash() eval.ScopeHashKey
- func (cg *CGroupContext) IsNull() bool
- func (cg *CGroupContext) IsResolved() bool
- func (cg *CGroupContext) ParentScope() (eval.VariableScope, bool)
- func (cg *CGroupContext) UnixCreatedAt() time.Time
- func (e *CGroupContext) UnmarshalBinary(data []byte) (int, error)
- type CGroupSource
- type CapabilitiesEvent
- type CapsetEvent
- type CgroupTracingEvent
- type CgroupWriteEvent
- type ChdirEvent
- type ChmodEvent
- type ChownEvent
- type CloneFlags
- type CompressionType
- type ConnectEvent
- type ContainerContext
- type ContainerSource
- type CredentialSource
- type Credentials
- type DNSEvent
- type DNSQuestion
- type DNSResponse
- type DelayabledEvent
- type EnvsEntry
- type ErrInvalidKeyPath
- type ErrProcessBrokenLineage
- type ErrProcessIncompleteLineage
- type ErrProcessMissingParentNode
- type ErrProcessWrongParentNode
- type Event
- func (e *Event) AddToFlags(flag uint32)
- func (e *Event) DeepCopy() *Event
- func (e *Event) GetActionReports() []ActionReport
- func (e *Event) GetContainerID() string
- func (ev *Event) GetEventService() string
- func (e *Event) GetEventType() EventType
- func (ev *Event) GetExecCmdargv() []string
- func (ev *Event) GetExecFilePath() string
- func (ev *Event) GetExitCode() uint32
- func (ev *Event) GetFieldMetadata(field eval.Field) (eval.EventType, reflect.Kind, string, bool, error)
- func (ev *Event) GetFieldValue(field eval.Field) (interface{}, error)
- func (ev *Event) GetFields() []eval.Field
- func (e *Event) GetFileField(field string) (*FileEvent, error)
- func (ev *Event) GetMountMountpointPath() string
- func (ev *Event) GetMountRootPath() string
- func (ev *Event) GetProcessEnvp() []string
- func (ev *Event) GetProcessExecTime() time.Time
- func (ev *Event) GetProcessExitTime() time.Time
- func (ev *Event) GetProcessForkTime() time.Time
- func (ev *Event) GetProcessGid() uint32
- func (ev *Event) GetProcessGroup() string
- func (ev *Event) GetProcessPid() uint32
- func (ev *Event) GetProcessPpid() uint32
- func (e *Event) GetProcessTracerMetadata() tracermetadata.TracerMetadata
- func (ev *Event) GetProcessUid() uint32
- func (ev *Event) GetProcessUser() string
- func (e *Event) GetTags() []string
- func (ev *Event) GetTimestamp() time.Time
- func (e *Event) GetType() string
- func (e *Event) GetWorkloadID() string
- func (e *Event) HasActiveActivityDump() bool
- func (e *Event) Init()
- func (e *Event) IsActivityDumpSample() bool
- func (e *Event) IsAnomalyDetectionEvent() bool
- func (e *Event) IsEventFromReplay() bool
- func (e *Event) IsEventInternal() bool
- func (e *Event) IsInProfile() bool
- func (e *Event) IsSavedByActivityDumps() bool
- func (e *Event) RemoveFromFlags(flag uint32)
- func (e *Event) ResetAnomalyDetectionEvent()
- func (e *Event) ResolveEventTime() time.Time
- func (ev *Event) ResolveFields()
- func (ev *Event) ResolveFieldsForAD()
- func (e *Event) ResolveProcessCacheEntry(newEntryCb func(*ProcessCacheEntry, error)) (*ProcessCacheEntry, bool)
- func (e *Event) ResolveService() string
- func (ev *Event) SetFieldValue(field eval.Field, value interface{}) error
- func (ev *Event) SetPathResolutionError(fileFields *FileEvent, err error)
- func (e *Event) UnmarshalBinary(data []byte) (int, error)
- func (e *Event) ValidateFileField(field string) error
- type EventCategory
- type EventFilteringProfileState
- type EventSource
- type EventType
- type ExecEvent
- type ExitEvent
- type ExtraFieldHandlers
- type FailedDNSEvent
- type FakeFieldHandlers
- func (dfh *FakeFieldHandlers) ResolveAWSSecurityCredentials(_ *Event, _ *Process) []AWSSecurityCredentials
- func (dfh *FakeFieldHandlers) ResolveAcceptHostnames(ev *Event, e *AcceptEvent) []string
- func (dfh *FakeFieldHandlers) ResolveAsync(ev *Event) bool
- func (dfh *FakeFieldHandlers) ResolveCGroupVersion(ev *Event, e *CGroupContext) int
- func (dfh *FakeFieldHandlers) ResolveCapabilitiesAttempted(ev *Event, e *CapabilitiesEvent) int
- func (dfh *FakeFieldHandlers) ResolveCapabilitiesAttemptedHostUserNS(ev *Event, e *CapabilitiesEvent) int
- func (dfh *FakeFieldHandlers) ResolveCapabilitiesUsed(ev *Event, e *CapabilitiesEvent) int
- func (dfh *FakeFieldHandlers) ResolveCapabilitiesUsedHostUserNS(ev *Event, e *CapabilitiesEvent) int
- func (dfh *FakeFieldHandlers) ResolveChownGID(ev *Event, e *ChownEvent) string
- func (dfh *FakeFieldHandlers) ResolveChownUID(ev *Event, e *ChownEvent) string
- func (dfh *FakeFieldHandlers) ResolveConnectHostnames(ev *Event, e *ConnectEvent) []string
- func (dfh *FakeFieldHandlers) ResolveContainerTags(ev *Event, e *ContainerContext) []string
- func (dfh *FakeFieldHandlers) ResolveEventTime(ev *Event, e *BaseEvent) time.Time
- func (dfh *FakeFieldHandlers) ResolveEventTimestamp(ev *Event, e *BaseEvent) int
- func (dfh *FakeFieldHandlers) ResolveFileBasename(ev *Event, e *FileEvent) string
- func (dfh *FakeFieldHandlers) ResolveFileExtension(ev *Event, e *FileEvent) string
- func (dfh *FakeFieldHandlers) ResolveFileFieldsGroup(ev *Event, e *FileFields) string
- func (dfh *FakeFieldHandlers) ResolveFileFieldsInUpperLayer(ev *Event, e *FileFields) bool
- func (dfh *FakeFieldHandlers) ResolveFileFieldsUser(ev *Event, e *FileFields) string
- func (dfh *FakeFieldHandlers) ResolveFileFilesystem(ev *Event, e *FileEvent) string
- func (dfh *FakeFieldHandlers) ResolveFileMetadataABI(ev *Event, e *FileMetadata) int
- func (dfh *FakeFieldHandlers) ResolveFileMetadataArchitecture(ev *Event, e *FileMetadata) int
- func (dfh *FakeFieldHandlers) ResolveFileMetadataCompression(ev *Event, e *FileMetadata) int
- func (dfh *FakeFieldHandlers) ResolveFileMetadataIsExecutable(ev *Event, e *FileMetadata) bool
- func (dfh *FakeFieldHandlers) ResolveFileMetadataIsGarbleObfuscated(ev *Event, e *FileMetadata) bool
- func (dfh *FakeFieldHandlers) ResolveFileMetadataIsUPXPacked(ev *Event, e *FileMetadata) bool
- func (dfh *FakeFieldHandlers) ResolveFileMetadataSize(ev *Event, e *FileMetadata) int
- func (dfh *FakeFieldHandlers) ResolveFileMetadataType(ev *Event, e *FileMetadata) int
- func (dfh *FakeFieldHandlers) ResolveFilePath(ev *Event, e *FileEvent) string
- func (dfh *FakeFieldHandlers) ResolveHashes(_ EventType, _ *Process, _ *FileEvent) []string
- func (dfh *FakeFieldHandlers) ResolveHashesFromEvent(ev *Event, e *FileEvent) []string
- func (dfh *FakeFieldHandlers) ResolveHostname(ev *Event, e *BaseEvent) string
- func (dfh *FakeFieldHandlers) ResolveIsIPPublic(ev *Event, e *IPPortContext) bool
- func (dfh *FakeFieldHandlers) ResolveK8SGroups(ev *Event, e *K8SSessionContext) []string
- func (dfh *FakeFieldHandlers) ResolveK8SUID(ev *Event, e *K8SSessionContext) string
- func (dfh *FakeFieldHandlers) ResolveK8SUserSessionContext(_ *Event, _ *K8SSessionContext)
- func (dfh *FakeFieldHandlers) ResolveK8SUsername(ev *Event, e *K8SSessionContext) string
- func (dfh *FakeFieldHandlers) ResolveModuleArgs(ev *Event, e *LoadModuleEvent) string
- func (dfh *FakeFieldHandlers) ResolveModuleArgv(ev *Event, e *LoadModuleEvent) []string
- func (dfh *FakeFieldHandlers) ResolveMountPointPath(ev *Event, e *MountEvent) string
- func (dfh *FakeFieldHandlers) ResolveMountRootPath(ev *Event, e *MountEvent) string
- func (dfh *FakeFieldHandlers) ResolveMountSourcePath(ev *Event, e *MountEvent) string
- func (dfh *FakeFieldHandlers) ResolveNetworkDeviceIfName(ev *Event, e *NetworkDeviceContext) string
- func (dfh *FakeFieldHandlers) ResolveOnDemandArg1Str(ev *Event, e *OnDemandEvent) string
- func (dfh *FakeFieldHandlers) ResolveOnDemandArg1Uint(ev *Event, e *OnDemandEvent) int
- func (dfh *FakeFieldHandlers) ResolveOnDemandArg2Str(ev *Event, e *OnDemandEvent) string
- func (dfh *FakeFieldHandlers) ResolveOnDemandArg2Uint(ev *Event, e *OnDemandEvent) int
- func (dfh *FakeFieldHandlers) ResolveOnDemandArg3Str(ev *Event, e *OnDemandEvent) string
- func (dfh *FakeFieldHandlers) ResolveOnDemandArg3Uint(ev *Event, e *OnDemandEvent) int
- func (dfh *FakeFieldHandlers) ResolveOnDemandArg4Str(ev *Event, e *OnDemandEvent) string
- func (dfh *FakeFieldHandlers) ResolveOnDemandArg4Uint(ev *Event, e *OnDemandEvent) int
- func (dfh *FakeFieldHandlers) ResolveOnDemandArg5Str(ev *Event, e *OnDemandEvent) string
- func (dfh *FakeFieldHandlers) ResolveOnDemandArg5Uint(ev *Event, e *OnDemandEvent) int
- func (dfh *FakeFieldHandlers) ResolveOnDemandArg6Str(ev *Event, e *OnDemandEvent) string
- func (dfh *FakeFieldHandlers) ResolveOnDemandArg6Uint(ev *Event, e *OnDemandEvent) int
- func (dfh *FakeFieldHandlers) ResolveOnDemandName(ev *Event, e *OnDemandEvent) string
- func (dfh *FakeFieldHandlers) ResolvePackageEpoch(ev *Event, e *FileEvent) int
- func (dfh *FakeFieldHandlers) ResolvePackageName(ev *Event, e *FileEvent) string
- func (dfh *FakeFieldHandlers) ResolvePackageRelease(ev *Event, e *FileEvent) string
- func (dfh *FakeFieldHandlers) ResolvePackageSourceEpoch(ev *Event, e *FileEvent) int
- func (dfh *FakeFieldHandlers) ResolvePackageSourceRelease(ev *Event, e *FileEvent) string
- func (dfh *FakeFieldHandlers) ResolvePackageSourceVersion(ev *Event, e *FileEvent) string
- func (dfh *FakeFieldHandlers) ResolvePackageVersion(ev *Event, e *FileEvent) string
- func (dfh *FakeFieldHandlers) ResolveProcessArgs(ev *Event, e *Process) string
- func (dfh *FakeFieldHandlers) ResolveProcessArgsFlags(ev *Event, e *Process) []string
- func (dfh *FakeFieldHandlers) ResolveProcessArgsOptions(ev *Event, e *Process) []string
- func (dfh *FakeFieldHandlers) ResolveProcessArgsScrubbed(ev *Event, e *Process) string
- func (dfh *FakeFieldHandlers) ResolveProcessArgsTruncated(ev *Event, e *Process) bool
- func (dfh *FakeFieldHandlers) ResolveProcessArgv(ev *Event, e *Process) []string
- func (dfh *FakeFieldHandlers) ResolveProcessArgv0(ev *Event, e *Process) string
- func (dfh *FakeFieldHandlers) ResolveProcessArgvScrubbed(ev *Event, e *Process) []string
- func (dfh *FakeFieldHandlers) ResolveProcessCacheEntry(ev *Event, _ func(*ProcessCacheEntry, error)) (*ProcessCacheEntry, bool)
- func (fh *FakeFieldHandlers) ResolveProcessCacheEntryFromPID(pid uint32) *ProcessCacheEntry
- func (dfh *FakeFieldHandlers) ResolveProcessCmdArgv(ev *Event, e *Process) []string
- func (dfh *FakeFieldHandlers) ResolveProcessCreatedAt(ev *Event, e *Process) int
- func (dfh *FakeFieldHandlers) ResolveProcessEnvp(ev *Event, e *Process) []string
- func (dfh *FakeFieldHandlers) ResolveProcessEnvs(ev *Event, e *Process) []string
- func (dfh *FakeFieldHandlers) ResolveProcessEnvsTruncated(ev *Event, e *Process) bool
- func (dfh *FakeFieldHandlers) ResolveProcessIsThread(ev *Event, e *Process) bool
- func (dfh *FakeFieldHandlers) ResolveRights(ev *Event, e *FileFields) int
- func (dfh *FakeFieldHandlers) ResolveSELinuxBoolName(ev *Event, e *SELinuxEvent) string
- func (dfh *FakeFieldHandlers) ResolveService(ev *Event, e *BaseEvent) string
- func (dfh *FakeFieldHandlers) ResolveSessionID(ev *Event, e *UserSessionContext) string
- func (dfh *FakeFieldHandlers) ResolveSessionIdentity(ev *Event, e *UserSessionContext) string
- func (dfh *FakeFieldHandlers) ResolveSessionType(ev *Event, e *UserSessionContext) int
- func (dfh *FakeFieldHandlers) ResolveSetSockOptFilterHash(ev *Event, e *SetSockOptEvent) string
- func (dfh *FakeFieldHandlers) ResolveSetSockOptFilterInstructions(ev *Event, e *SetSockOptEvent) string
- func (dfh *FakeFieldHandlers) ResolveSetSockOptUsedImmediates(ev *Event, e *SetSockOptEvent) []int
- func (dfh *FakeFieldHandlers) ResolveSetgidEGroup(ev *Event, e *SetgidEvent) string
- func (dfh *FakeFieldHandlers) ResolveSetgidFSGroup(ev *Event, e *SetgidEvent) string
- func (dfh *FakeFieldHandlers) ResolveSetgidGroup(ev *Event, e *SetgidEvent) string
- func (dfh *FakeFieldHandlers) ResolveSetuidEUser(ev *Event, e *SetuidEvent) string
- func (dfh *FakeFieldHandlers) ResolveSetuidFSUser(ev *Event, e *SetuidEvent) string
- func (dfh *FakeFieldHandlers) ResolveSetuidUser(ev *Event, e *SetuidEvent) string
- func (dfh *FakeFieldHandlers) ResolveSignature(ev *Event) string
- func (dfh *FakeFieldHandlers) ResolveSource(ev *Event, e *BaseEvent) string
- func (dfh *FakeFieldHandlers) ResolveSpanContext(ev *Event) *SpanContext
- func (dfh *FakeFieldHandlers) ResolveSyscallCtxArgs(_ *Event, _ *SyscallContext)
- func (dfh *FakeFieldHandlers) ResolveSyscallCtxArgsInt1(ev *Event, e *SyscallContext) int
- func (dfh *FakeFieldHandlers) ResolveSyscallCtxArgsInt2(ev *Event, e *SyscallContext) int
- func (dfh *FakeFieldHandlers) ResolveSyscallCtxArgsInt3(ev *Event, e *SyscallContext) int
- func (dfh *FakeFieldHandlers) ResolveSyscallCtxArgsStr1(ev *Event, e *SyscallContext) string
- func (dfh *FakeFieldHandlers) ResolveSyscallCtxArgsStr2(ev *Event, e *SyscallContext) string
- func (dfh *FakeFieldHandlers) ResolveSyscallCtxArgsStr3(ev *Event, e *SyscallContext) string
- func (dfh *FakeFieldHandlers) ResolveXAttrName(ev *Event, e *SetXAttrEvent) string
- func (dfh *FakeFieldHandlers) ResolveXAttrNamespace(ev *Event, e *SetXAttrEvent) string
- type FieldHandlers
- type FileEvent
- type FileFields
- func (f *FileFields) Equals(o *FileFields) bool
- func (f *FileFields) HasHardLinks() bool
- func (f *FileFields) IsDir() bool
- func (f *FileFields) IsFileless() bool
- func (f *FileFields) IsInLowerLayer() bool
- func (f *FileFields) IsInUpperLayer() bool
- func (e *FileFields) MarshalBinary(data []byte) (int, error)
- func (e *FileFields) UnmarshalBinary(data []byte) (int, error)
- type FileMetadata
- type FileMode
- type FileType
- type FiveTuple
- type Flow
- type FlowsIterator
- type GoLabelsContext
- type HashAlgorithm
- type HashState
- type IMDSEvent
- type IPPortContext
- type InodeMode
- type InvalidateDentryEvent
- type Iterator
- type K8SSessionContext
- type KernelCapability
- type L3Protocol
- type L4Protocol
- type LinkEvent
- type LinkageType
- type LinuxBinprm
- type LoadModuleEvent
- type LoginUIDWriteEvent
- type MMapEvent
- type MMapFlag
- type MProtectEvent
- type MatchedRule
- type MkdirEvent
- type Model
- func (_ *Model) GetEvaluator(field eval.Field, regID eval.RegisterID, offset int) (eval.Evaluator, error)
- func (_ *Model) GetEventTypes() []eval.EventType
- func (_ *Model) GetFieldRestrictions(field eval.Field) []eval.EventType
- func (m *Model) NewEvent() eval.Event
- func (m *Model) SetLegacyFields(legacyFields map[eval.Field]eval.Field)
- func (m *Model) ValidateField(field eval.Field, fieldValue eval.FieldValue) error
- func (m *Model) ValidateRule(rule *eval.Rule) error
- type Mount
- type MountEvent
- type MountEventSource
- type MountOrigin
- type MountReleasedEvent
- type MountSource
- type NetDevice
- type NetDeviceEvent
- type NetworkContext
- type NetworkDeviceContext
- type NetworkDirection
- type NetworkFlowMonitorEvent
- type NetworkProtocolType
- type NetworkStats
- type OTelProcessCtxEvent
- type OnDemandEvent
- type OpenEvent
- type OpenFlags
- type PIDContext
- type PTraceEvent
- type PTraceRequest
- type PathKey
- type PathLeaf
- type PipeBufFlag
- type PrCtlEvent
- type PrCtlOption
- type Process
- func (p *Process) GetPathResolutionError() string
- func (p *Process) GetProcessArgv() ([]string, bool)
- func (p *Process) GetProcessArgv0() (string, bool)
- func (p *Process) HasInterpreter() bool
- func (p *Process) IsNotKworker() bool
- func (e *Process) MarshalPidCache(data []byte, bootTime time.Time) (int, error)
- func (e *Process) MarshalProcCache(data []byte, bootTime time.Time) (int, error)
- func (p *Process) SetSpanContext(sc SpanContext)
- func (p *Process) SetSpanContextAttributes(attrs map[string]string)
- func (e *Process) UnmarshalBinary(data []byte) (int, error)
- func (e *Process) UnmarshalPidCacheBinary(data []byte) (int, error)
- func (e *Process) UnmarshalProcEntryBinary(data []byte) (int, error)
- type ProcessAncestorsIterator
- func (it *ProcessAncestorsIterator) At(ctx *eval.Context, regID eval.RegisterID, pos int) *ProcessCacheEntry
- func (it *ProcessAncestorsIterator) Front(_ *eval.Context) *ProcessCacheEntry
- func (it *ProcessAncestorsIterator) Len(ctx *eval.Context) int
- func (it *ProcessAncestorsIterator) Next(_ *eval.Context) *ProcessCacheEntry
- type ProcessCacheEntry
- func (pc *ProcessCacheEntry) AppendReleaseCallback(callback func())
- func (pc *ProcessCacheEntry) ApplyExecTimeOf(entry *ProcessCacheEntry)
- func (pc *ProcessCacheEntry) Equals(entry *ProcessCacheEntry) bool
- func (pc *ProcessCacheEntry) Exec(entry *ProcessCacheEntry)
- func (pc *ProcessCacheEntry) Exit(exitTime time.Time)
- func (pc *ProcessCacheEntry) Fork(child *ProcessCacheEntry)
- func (pc *ProcessCacheEntry) GetAncestorsPIDs() []uint32
- func (pc *ProcessCacheEntry) GetContainerPIDs() ([]uint32, []string)
- func (pc *ProcessCacheEntry) HasValidLineage() (bool, error)
- func (pc *ProcessCacheEntry) Hash() eval.ScopeHashKey
- func (pc *ProcessCacheEntry) IsContainerRoot() bool
- func (pc *ProcessCacheEntry) ParentScope() (eval.VariableScope, bool)
- func (pc *ProcessCacheEntry) Reparent(newParent *ProcessCacheEntry)
- func (pc *ProcessCacheEntry) Reset()
- func (pc *ProcessCacheEntry) SetAsExec()
- func (pc *ProcessCacheEntry) SetExecParent(parent *ProcessCacheEntry)
- func (pc *ProcessCacheEntry) SetForkParent(parent *ProcessCacheEntry)
- func (pc *ProcessCacheEntry) StopExecution(stopTime time.Time)
- type ProcessContext
- type Protection
- type QClass
- type QType
- type RawPacketEvent
- type Releasable
- type RenameEvent
- type RetValError
- type RlimitResource
- type RmdirEvent
- type RuleContext
- type SELinuxEvent
- type SELinuxEventKind
- type SSHSessionContext
- type SampleRefreshEvent
- type SecurityProfileContext
- type SetSockOptEvent
- type SetSockOptLevel
- type SetSockOptOptNameIP
- type SetSockOptOptNameIPv6
- type SetSockOptOptNameSolSocket
- type SetSockOptOptNameTCP
- type SetXAttrEvent
- type SetgidEvent
- type SetrlimitEvent
- type SetuidEvent
- type Signal
- type SignalEvent
- type SnapshottedBoundSocket
- type SocketDomain
- type SocketEvent
- type SocketFamily
- type SocketProtocol
- type SocketType
- type SpanContext
- type SpliceEvent
- type SysCtlAction
- type SysCtlEvent
- type Syscall
- type SyscallContext
- type SyscallDriftEventReason
- type SyscallEvent
- type SyscallsEvent
- type TLSContext
- type TLSVersion
- type Tracer
- type TracerMemfdSealEvent
- type TracerMetadataSource
- type UmountEvent
- type UnlinkEvent
- type UnlinkFlags
- type UnloadModuleEvent
- type UnshareEvent
- type UnshareMountNSEvent
- type UserSessionContext
- type UtimesEvent
- type VMFlag
- type VethPairEvent
Constants ¶
const ( // MaxSegmentLength defines the maximum length of each segment of a path MaxSegmentLength = 255 // MaxPathDepth defines the maximum depth of a path // see pkg/security/ebpf/c/dentry_resolver.h: DR_MAX_TAIL_CALL * DR_MAX_ITERATION_DEPTH MaxPathDepth = 1160 // MaxBpfObjName defines the maximum length of a Bpf object name MaxBpfObjName = 16 // PathSuffix defines the suffix used for path fields PathSuffix = ".path" // NameSuffix defines the suffix used for name fields NameSuffix = ".name" // ContainerIDLen defines the length of a container ID ContainerIDLen = sha256.Size * 2 // MaxSymlinks maximum symlinks captured MaxSymlinks = 2 // MaxTracedCgroupsCount hard limit for the count of traced cgroups MaxTracedCgroupsCount = 128 )
const ( // EventFlagsAsync async event EventFlagsAsync = 1 << iota // EventFlagsSavedByAD saved by ad EventFlagsSavedByAD // EventFlagsActivityDumpSample an AD sample EventFlagsActivityDumpSample // EventFlagsSecurityProfileInProfile true if the event was found in a profile EventFlagsSecurityProfileInProfile // EventFlagsAnomalyDetectionEvent true if the event is marked as being an anomaly EventFlagsAnomalyDetectionEvent // EventFlagsInternal true if the event is an internal event used to keep caches & internal resources up-to-date EventFlagsInternal // EventFlagsHasActiveActivityDump true if the event has an active activity dump associated to it EventFlagsHasActiveActivityDump // EventFlagsFromReplay is true if the event is generated from a replay EventFlagsFromReplay )
const ( // IMDSRequestType is used to specify that the event is an IDMS request event IMDSRequestType = "request" // IMDSResponseType is used to specify that the event is an IMDS response event IMDSResponseType = "response" // IMDSAWSCloudProvider is used to report that the IMDS event is for AWS IMDSAWSCloudProvider = "aws" // IMDSGCPCloudProvider is used to report that the IMDS event is for GCP IMDSGCPCloudProvider = "gcp" // IMDSAzureCloudProvider is used to report that the IMDS event is for Azure IMDSAzureCloudProvider = "azure" // IMDSIBMCloudProvider is used to report that the IMDS event is for ibm IMDSIBMCloudProvider = "ibm" // IMDSOracleCloudProvider is used to report that the IMDS event is for Oracle IMDSOracleCloudProvider = "oracle" )
const ( LowerLayer = 1 << iota UpperLayer )
File flags
const ( OverlayFS = "overlay" // OverlayFS overlay filesystem TmpFS = "tmpfs" // TmpFS tmpfs UnknownFS = "unknown" // UnknownFS unknown filesystem ErrPathMustBeAbsolute = "all the path have to be absolute" // ErrPathMustBeAbsolute tells when a path is not absolute ErrPathMustBeClean = "paths must be in canonical form" // ErrPathMustBeClean tells when a path contains a trailing slash, `.` segments or duplicate slashes ErrPathDepthLimit = "path depths have to be shorter than" // ErrPathDepthLimit tells when a path is too long ErrPathSegmentLimit = "each segment of a path must be shorter than" // ErrPathSegmentLimit tells when a patch reached the segment limit // SizeOfCookie size of cookie SizeOfCookie = 8 )
const ( ProcessCacheEntryFromUnknown = iota // ProcessCacheEntryFromUnknown defines a process cache entry from unknown ProcessCacheEntryFromPlaceholder // ProcessCacheEntryFromPlaceholder defines the source of a placeholder process cache entry ProcessCacheEntryFromEvent // ProcessCacheEntryFromEvent defines a process cache entry from event ProcessCacheEntryFromKernelMap // ProcessCacheEntryFromKernelMap defines a process cache entry from kernel map ProcessCacheEntryFromProcFS // ProcessCacheEntryFromProcFS defines a process cache entry from procfs. Note that some exec parent may be missing. ProcessCacheEntryFromSnapshot // ProcessCacheEntryFromSnapshot defines a process cache entry from snapshot ProcessCacheEntryFromUnknownLoader // ProcessCacheEntryFromUnknownLoader defines a synthetic process cache entry attached to a snapshot event whose real loader could not be identified )
const ( MountAttrReadOnly = uint32(0x00000001) MountAttrNoSUID = uint32(0x00000002) MountAttrNoDev = uint32(0x00000004) MountAttrNoExec = uint32(0x00000008) MountAttrNoSymFollow = uint32(0x00200000) )
Canonical per-mount attribute bits. This is the normalized representation of the security-relevant mount flags, adopting the stable UAPI MOUNT_ATTR_* layout (linux/mount.h) so that values coming from statmount(2) map through unchanged. eBPF (vfsmount MNT_*) and procfs option strings are translated into this layout so the same mount always yields the same value regardless of the source that observed it. The values are declared as literals rather than pulled from golang.org/x/sys/unix so the package builds on every platform.
const DNSPreallocSize = 256
DNSPreallocSize defines DNS pre-alloc size
const (
// FileFieldsSize is the size used by the file_t structure
FileFieldsSize = 72
)
const OnDemandParsedArgsCount = 6
OnDemandParsedArgsCount is the number of parsed arguments in the on-demand event
const OnDemandPerArgSize = 64
OnDemandPerArgSize is the size of each argument in Data in the on-demand event
const PathKeySize = 16
PathKeySize defines the path key size
const PathLeafSize = PathKeySize + MaxSegmentLength + 1 + 2 + 6 // path_key + name + len + padding
PathLeafSize defines path_leaf struct size
const (
// PidCacheEntrySize is the size of the pid_cache_t
PidCacheEntrySize = 96
)
Variables ¶
var ( // DNSQTypeConstants see https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml // generate_constants:DNS qtypes,DNS qtypes are the supported DNS query types. DNSQTypeConstants = map[string]int{ "None": 0, "A": 1, "NS": 2, "MD": 3, "MF": 4, "CNAME": 5, "SOA": 6, "MB": 7, "MG": 8, "MR": 9, "NULL": 10, "PTR": 12, "HINFO": 13, "MINFO": 14, "MX": 15, "TXT": 16, "RP": 17, "AFSDB": 18, "X25": 19, "ISDN": 20, "RT": 21, "NSAPPTR": 23, "SIG": 24, "KEY": 25, "PX": 26, "GPOS": 27, "AAAA": 28, "LOC": 29, "NXT": 30, "EID": 31, "NIMLOC": 32, "SRV": 33, "ATMA": 34, "NAPTR": 35, "KX": 36, "CERT": 37, "DNAME": 39, "OPT": 41, "APL": 42, "DS": 43, "SSHFP": 44, "RRSIG": 46, "NSEC": 47, "DNSKEY": 48, "DHCID": 49, "NSEC3": 50, "NSEC3PARAM": 51, "TLSA": 52, "SMIMEA": 53, "HIP": 55, "NINFO": 56, "RKEY": 57, "TALINK": 58, "CDS": 59, "CDNSKEY": 60, "OPENPGPKEY": 61, "CSYNC": 62, "ZONEMD": 63, "SVCB": 64, "HTTPS": 65, "SPF": 99, "UINFO": 100, "UID": 101, "GID": 102, "UNSPEC": 103, "NID": 104, "L32": 105, "L64": 106, "LP": 107, "EUI48": 108, "EUI64": 109, "URI": 256, "CAA": 257, "AVC": 258, "TKEY": 249, "TSIG": 250, "IXFR": 251, "AXFR": 252, "MAILB": 253, "MAILA": 254, "ANY": 255, "TA": 32768, "DLV": 32769, "Reserved": 65535, } // DNSQClassConstants see https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml // generate_constants:DNS qclasses,DNS qclasses are the supported DNS query classes. DNSQClassConstants = map[string]int{ "CLASS_INET": 1, "CLASS_CSNET": 2, "CLASS_CHAOS": 3, "CLASS_HESIOD": 4, "CLASS_NONE": 254, "CLASS_ANY": 255, } // DNSResponseCodeConstants see https://datatracker.ietf.org/doc/html/rfc2929 // generate_constants:DNS Responses,DNS Responses are the supported response codes DNSResponseCodeConstants = map[string]int{ "NOERROR": 0, "FORMERR": 1, "SERVFAIL": 2, "NXDOMAIN": 3, "NOTIMP": 4, "REFUSED": 5, "YXDOMAIN": 6, "YXRRSET": 7, "NXRRSET": 8, "NOTAUTH": 9, "NOTZONE": 10, "BADVERS": 16, "BADSIG": 16, "BADKEY": 17, "BADTIME": 18, "BADMODE": 19, "BADNAME": 20, "BADALG": 21, } // BooleanConstants holds the evaluator for boolean constants // generate_constants:Boolean constants,Boolean constants are the supported boolean constants. BooleanConstants = map[string]interface{}{ "true": &eval.BoolEvaluator{Value: true}, "false": &eval.BoolEvaluator{Value: false}, } // L3ProtocolConstants is the list of supported L3 protocols // generate_constants:L3 protocols,L3 protocols are the supported Layer 3 protocols. L3ProtocolConstants = map[string]L3Protocol{ "ETH_P_LOOP": EthPLOOP, "ETH_P_PUP": EthPPUP, "ETH_P_PUPAT": EthPPUPAT, "ETH_P_TSN": EthPTSN, "ETH_P_IP": EthPIP, "ETH_P_X25": EthPX25, "ETH_P_ARP": EthPARP, "ETH_P_BPQ": EthPBPQ, "ETH_P_IEEEPUP": EthPIEEEPUP, "ETH_P_IEEEPUPAT": EthPIEEEPUPAT, "ETH_P_BATMAN": EthPBATMAN, "ETH_P_DEC": EthPDEC, "ETH_P_DNADL": EthPDNADL, "ETH_P_DNARC": EthPDNARC, "ETH_P_DNART": EthPDNART, "ETH_P_LAT": EthPLAT, "ETH_P_DIAG": EthPDIAG, "ETH_P_CUST": EthPCUST, "ETH_P_SCA": EthPSCA, "ETH_P_TEB": EthPTEB, "ETH_P_RARP": EthPRARP, "ETH_P_ATALK": EthPATALK, "ETH_P_AARP": EthPAARP, "ETH_P_8021_Q": EthP8021Q, "ETH_P_ERSPAN": EthPERSPAN, "ETH_P_IPX": EthPIPX, "ETH_P_IPV6": EthPIPV6, "ETH_P_PAUSE": EthPPAUSE, "ETH_P_SLOW": EthPSLOW, "ETH_P_WCCP": EthPWCCP, "ETH_P_MPLSUC": EthPMPLSUC, "ETH_P_MPLSMC": EthPMPLSMC, "ETH_P_ATMMPOA": EthPATMMPOA, "ETH_P_PPPDISC": EthPPPPDISC, "ETH_P_PPPSES": EthPPPPSES, "ETH_P__LINK_CTL": EthPLinkCTL, "ETH_P_ATMFATE": EthPATMFATE, "ETH_P_PAE": EthPPAE, "ETH_P_AOE": EthPAOE, "ETH_P_8021_AD": EthP8021AD, "ETH_P_802_EX1": EthP802EX1, "ETH_P_TIPC": EthPTIPC, "ETH_P_MACSEC": EthPMACSEC, "ETH_P_8021_AH": EthP8021AH, "ETH_P_MVRP": EthPMVRP, "ETH_P_1588": EthP1588, "ETH_P_NCSI": EthPNCSI, "ETH_P_PRP": EthPPRP, "ETH_P_FCOE": EthPFCOE, "ETH_P_IBOE": EthPIBOE, "ETH_P_TDLS": EthPTDLS, "ETH_P_FIP": EthPFIP, "ETH_P_80221": EthP80221, "ETH_P_HSR": EthPHSR, "ETH_P_NSH": EthPNSH, "ETH_P_LOOPBACK": EthPLOOPBACK, "ETH_P_QINQ1": EthPQINQ1, "ETH_P_QINQ2": EthPQINQ2, "ETH_P_QINQ3": EthPQINQ3, "ETH_P_EDSA": EthPEDSA, "ETH_P_IFE": EthPIFE, "ETH_P_AFIUCV": EthPAFIUCV, "ETH_P_8023_MIN": EthP8023MIN, "ETH_P_IPV6_HOP_BY_HOP": EthPIPV6HopByHop, "ETH_P_8023": EthP8023, "ETH_P_AX25": EthPAX25, "ETH_P_ALL": EthPALL, "ETH_P_8022": EthP8022, "ETH_P_SNAP": EthPSNAP, "ETH_P_DDCMP": EthPDDCMP, "ETH_P_WANPPP": EthPWANPPP, "ETH_P_PPPMP": EthPPPPMP, "ETH_P_LOCALTALK": EthPLOCALTALK, "ETH_P_CAN": EthPCAN, "ETH_P_CANFD": EthPCANFD, "ETH_P_PPPTALK": EthPPPPTALK, "ETH_P_TR8022": EthPTR8022, "ETH_P_MOBITEX": EthPMOBITEX, "ETH_P_CONTROL": EthPCONTROL, "ETH_P_IRDA": EthPIRDA, "ETH_P_ECONET": EthPECONET, "ETH_P_HDLC": EthPHDLC, "ETH_P_ARCNET": EthPARCNET, "ETH_P_DSA": EthPDSA, "ETH_P_TRAILER": EthPTRAILER, "ETH_P_PHONET": EthPPHONET, "ETH_P_IEEE802154": EthPIEEE802154, "ETH_P_CAIF": EthPCAIF, "ETH_P_XDSA": EthPXDSA, "ETH_P_MAP": EthPMAP, } // L4ProtocolConstants is the list of supported L4 protocols // generate_constants:L4 protocols,L4 protocols are the supported Layer 4 protocols. L4ProtocolConstants = map[string]L4Protocol{ "IP_PROTO_IP": IPProtoIP, "IP_PROTO_ICMP": IPProtoICMP, "IP_PROTO_IGMP": IPProtoIGMP, "IP_PROTO_IPIP": IPProtoIPIP, "IP_PROTO_TCP": IPProtoTCP, "IP_PROTO_EGP": IPProtoEGP, "IP_PROTO_IGP": IPProtoIGP, "IP_PROTO_PUP": IPProtoPUP, "IP_PROTO_UDP": IPProtoUDP, "IP_PROTO_IDP": IPProtoIDP, "IP_PROTO_TP": IPProtoTP, "IP_PROTO_DCCP": IPProtoDCCP, "IP_PROTO_IPV6": IPProtoIPV6, "IP_PROTO_RSVP": IPProtoRSVP, "IP_PROTO_GRE": IPProtoGRE, "IP_PROTO_ESP": IPProtoESP, "IP_PROTO_AH": IPProtoAH, "IP_PROTO_ICMPV6": IPProtoICMPV6, "IP_PROTO_MTP": IPProtoMTP, "IP_PROTO_BEETPH": IPProtoBEETPH, "IP_PROTO_ENCAP": IPProtoENCAP, "IP_PROTO_PIM": IPProtoPIM, "IP_PROTO_COMP": IPProtoCOMP, "IP_PROTO_SCTP": IPProtoSCTP, "IP_PROTO_UDPLITE": IPProtoUDPLITE, "IP_PROTO_MPLS": IPProtoMPLS, "IP_PROTO_RAW": IPProtoRAW, } // NetworkProtocolTypeConstants is the list of supported network protocol specific types // generate_constants:Network Protocol Types,Types of specific network protocols. NetworkProtocolTypeConstants = map[string]NetworkProtocolType{ "ICMP_ECHO_REQUEST": ICMPTypeEchoRequest, "ICMP_ECHO_REPLY": ICMPTypeEchoReply, "ICMP_ROUTER_SOLICITATION": ICMPTypeRouterSolicitation, "ICMP_ROUTER_ADVERTISEMENT": ICMPTypeRouterAdvertisement, "ICMP_NEIGHBOR_SOLICITATION": ICMPTypeNeighborSolicitation, "ICMP_NEIGHBOR_ADVERTISEMENT": ICMPTypeNeighborAdvertisement, "ICMP_V6_ECHO_REQUEST": ICMPv6TypeEchoRequest, "ICMP_V6_ECHO_REPLY": ICMPv6TypeEchoReply, "ICMP_V6_ROUTER_SOLICITATION": ICMPv6TypeRouterSolicitation, "ICMP_V6_ROUTER_ADVERTISEMENT": ICMPv6TypeRouterAdvertisement, "ICMP_V6_NEIGHBOR_SOLICITATION": ICMPv6TypeNeighborSolicitation, "ICMP_V6_NEIGHBOR_ADVERTISEMENT": ICMPv6TypeNeighborAdvertisement, } // NetworkDirectionConstants is the list of supported network directions // generate_constants:Network directions,Network directions are the supported directions of network packets. NetworkDirectionConstants = map[string]NetworkDirection{ "INGRESS": Ingress, "EGRESS": Egress, } // CredentialSourceConstants is the list of supported credential sources // generate_constants:Credential sources,Credential sources are the endpoints that can serve cloud credentials. CredentialSourceConstants = map[string]CredentialSource{ "IMDS": CredentialSourceIMDS, "EKS_POD_IDENTITY": CredentialSourceEKSPodIdentity, "ECS": CredentialSourceECS, } // ABIConstants defines ABI constants // generate_constants:ABI,ABI used for binary compilation. ABIConstants = map[string]ABI{ "BIT32": Bit32, "BIT64": Bit64, "UNKNOWN_ABI": UnknownABI, } // ArchitectureConstants defines architecture constants // generate_constants:Architecture,Architecture of the binary. ArchitectureConstants = map[string]Architecture{ "X86": X86, "X86_64": X8664, "ARM": ARM, "ARM64": ARM64, "UNKNOWN_ARCHITECTURE": UnknownArch, } // CompressionTypeConstants defines compression type constants // generate_constants:CompressionType,Compression algorithm. CompressionTypeConstants = map[string]CompressionType{ "NONE": NoCompression, "GZIP": GZip, "ZIP": Zip, "ZSTD": Zstd, "7Z": SevenZip, "BZIP2": BZip2, "XZ": XZ, } // FileTypeConstants defines file type constants // generate_constants:FileType,File types. FileTypeConstants = map[string]FileType{ "EMPTY": Empty, "SHELL_SCRIPT": ShellScript, "TEXT": Text, "COMPRESSED": Compressed, "ENCRYPTED": Encrypted, "BINARY": Binary, "LINUX_EXECUTABLE": ELFExecutable, "WINDOWS_EXECUTABLE": PEExecutable, "MACOS_EXECUTABLE": MachOExecutable, "FILE_LESS": FileLess, } // LinkageTypeConstants defines linkage type constants // generate_constants:LinkageType,Linkage types. LinkageTypeConstants = map[string]LinkageType{ "NONE": None, "STATIC": Static, "DYNAMIC": Dynamic, } // UserSessionTypes are the supported user session types // generate_constants:UserSessionTypes,UserSessionTypes are the supported user session types. UserSessionTypes = map[string]usersession.Type{ "unknown": usersession.UserSessionTypeUnknown, "k8s": usersession.UserSessionTypeK8S, "ssh": usersession.UserSessionTypeSSH, } // SSHAuthMethodConstants are the supported SSH authentication methods // generate_constants:SSHAuthMethod,SSH authentication methods. SSHAuthMethodConstants = map[string]usersession.AuthType{ "password": usersession.SSHAuthMethodPassword, "public_key": usersession.SSHAuthMethodPublicKey, "unknown": usersession.SSHAuthMethodUnknown, } )
var ( // KernelCapabilityConstants list of kernel capabilities // generate_constants:Kernel Capability constants,Kernel Capability constants are the supported Linux Kernel Capability. KernelCapabilityConstants = map[string]uint64{ "CAP_AUDIT_CONTROL": 1 << unix.CAP_AUDIT_CONTROL, "CAP_AUDIT_READ": 1 << unix.CAP_AUDIT_READ, "CAP_AUDIT_WRITE": 1 << unix.CAP_AUDIT_WRITE, "CAP_BLOCK_SUSPEND": 1 << unix.CAP_BLOCK_SUSPEND, "CAP_BPF": 1 << unix.CAP_BPF, "CAP_CHECKPOINT_RESTORE": 1 << unix.CAP_CHECKPOINT_RESTORE, "CAP_CHOWN": 1 << unix.CAP_CHOWN, "CAP_DAC_OVERRIDE": 1 << unix.CAP_DAC_OVERRIDE, "CAP_DAC_READ_SEARCH": 1 << unix.CAP_DAC_READ_SEARCH, "CAP_FOWNER": 1 << unix.CAP_FOWNER, "CAP_FSETID": 1 << unix.CAP_FSETID, "CAP_IPC_LOCK": 1 << unix.CAP_IPC_LOCK, "CAP_IPC_OWNER": 1 << unix.CAP_IPC_OWNER, "CAP_KILL": 1 << unix.CAP_KILL, "CAP_LEASE": 1 << unix.CAP_LEASE, "CAP_LINUX_IMMUTABLE": 1 << unix.CAP_LINUX_IMMUTABLE, "CAP_MAC_ADMIN": 1 << unix.CAP_MAC_ADMIN, "CAP_MAC_OVERRIDE": 1 << unix.CAP_MAC_OVERRIDE, "CAP_MKNOD": 1 << unix.CAP_MKNOD, "CAP_NET_ADMIN": 1 << unix.CAP_NET_ADMIN, "CAP_NET_BIND_SERVICE": 1 << unix.CAP_NET_BIND_SERVICE, "CAP_NET_BROADCAST": 1 << unix.CAP_NET_BROADCAST, "CAP_NET_RAW": 1 << unix.CAP_NET_RAW, "CAP_PERFMON": 1 << unix.CAP_PERFMON, "CAP_SETFCAP": 1 << unix.CAP_SETFCAP, "CAP_SETGID": 1 << unix.CAP_SETGID, "CAP_SETPCAP": 1 << unix.CAP_SETPCAP, "CAP_SETUID": 1 << unix.CAP_SETUID, "CAP_SYSLOG": 1 << unix.CAP_SYSLOG, "CAP_SYS_ADMIN": 1 << unix.CAP_SYS_ADMIN, "CAP_SYS_BOOT": 1 << unix.CAP_SYS_BOOT, "CAP_SYS_CHROOT": 1 << unix.CAP_SYS_CHROOT, "CAP_SYS_MODULE": 1 << unix.CAP_SYS_MODULE, "CAP_SYS_NICE": 1 << unix.CAP_SYS_NICE, "CAP_SYS_PACCT": 1 << unix.CAP_SYS_PACCT, "CAP_SYS_PTRACE": 1 << unix.CAP_SYS_PTRACE, "CAP_SYS_RAWIO": 1 << unix.CAP_SYS_RAWIO, "CAP_SYS_RESOURCE": 1 << unix.CAP_SYS_RESOURCE, "CAP_SYS_TIME": 1 << unix.CAP_SYS_TIME, "CAP_SYS_TTY_CONFIG": 1 << unix.CAP_SYS_TTY_CONFIG, "CAP_WAKE_ALARM": 1 << unix.CAP_WAKE_ALARM, } // SignalConstants are the supported signals for the kill syscall // generate_constants:Signal constants,Signal constants are the supported signals for the kill syscall. SignalConstants = map[string]int{ "SIGHUP": int(unix.SIGHUP), "SIGINT": int(unix.SIGINT), "SIGQUIT": int(unix.SIGQUIT), "SIGILL": int(unix.SIGILL), "SIGTRAP": int(unix.SIGTRAP), "SIGABRT": int(unix.SIGABRT), "SIGIOT": int(unix.SIGIOT), "SIGBUS": int(unix.SIGBUS), "SIGFPE": int(unix.SIGFPE), "SIGKILL": int(unix.SIGKILL), "SIGUSR1": int(unix.SIGUSR1), "SIGSEGV": int(unix.SIGSEGV), "SIGUSR2": int(unix.SIGUSR2), "SIGPIPE": int(unix.SIGPIPE), "SIGALRM": int(unix.SIGALRM), "SIGTERM": int(unix.SIGTERM), "SIGSTKFLT": int(unix.SIGSTKFLT), "SIGCHLD": int(unix.SIGCHLD), "SIGCONT": int(unix.SIGCONT), "SIGSTOP": int(unix.SIGSTOP), "SIGTSTP": int(unix.SIGTSTP), "SIGTTIN": int(unix.SIGTTIN), "SIGTTOU": int(unix.SIGTTOU), "SIGURG": int(unix.SIGURG), "SIGXCPU": int(unix.SIGXCPU), "SIGXFSZ": int(unix.SIGXFSZ), "SIGVTALRM": int(unix.SIGVTALRM), "SIGPROF": int(unix.SIGPROF), "SIGWINCH": int(unix.SIGWINCH), "SIGIO": int(unix.SIGIO), "SIGPOLL": int(unix.SIGPOLL), "SIGPWR": int(unix.SIGPWR), "SIGSYS": int(unix.SIGSYS), } // BPFCmdConstants is the list of BPF commands // generate_constants:BPF commands,BPF commands are used to specify a command to a bpf syscall. BPFCmdConstants = map[string]BPFCmd{ "BPF_MAP_CREATE": BpfMapCreateCmd, "BPF_MAP_LOOKUP_ELEM": BpfMapLookupElemCmd, "BPF_MAP_UPDATE_ELEM": BpfMapUpdateElemCmd, "BPF_MAP_DELETE_ELEM": BpfMapDeleteElemCmd, "BPF_MAP_GET_NEXT_KEY": BpfMapGetNextKeyCmd, "BPF_PROG_LOAD": BpfProgLoadCmd, "BPF_OBJ_PIN": BpfObjPinCmd, "BPF_OBJ_GET": BpfObjGetCmd, "BPF_PROG_ATTACH": BpfProgAttachCmd, "BPF_PROG_DETACH": BpfProgDetachCmd, "BPF_PROG_TEST_RUN": BpfProgTestRunCmd, "BPF_PROG_RUN": BpfProgTestRunCmd, "BPF_PROG_GET_NEXT_ID": BpfProgGetNextIDCmd, "BPF_MAP_GET_NEXT_ID": BpfMapGetNextIDCmd, "BPF_PROG_GET_FD_BY_ID": BpfProgGetFdByIDCmd, "BPF_MAP_GET_FD_BY_ID": BpfMapGetFdByIDCmd, "BPF_OBJ_GET_INFO_BY_FD": BpfObjGetInfoByFdCmd, "BPF_PROG_QUERY": BpfProgQueryCmd, "BPF_RAW_TRACEPOINT_OPEN": BpfRawTracepointOpenCmd, "BPF_BTF_LOAD": BpfBtfLoadCmd, "BPF_BTF_GET_FD_BY_ID": BpfBtfGetFdByIDCmd, "BPF_TASK_FD_QUERY": BpfTaskFdQueryCmd, "BPF_MAP_LOOKUP_AND_DELETE_ELEM": BpfMapLookupAndDeleteElemCmd, "BPF_MAP_FREEZE": BpfMapFreezeCmd, "BPF_BTF_GET_NEXT_ID": BpfBtfGetNextIDCmd, "BPF_MAP_LOOKUP_BATCH": BpfMapLookupBatchCmd, "BPF_MAP_LOOKUP_AND_DELETE_BATCH": BpfMapLookupAndDeleteBatchCmd, "BPF_MAP_UPDATE_BATCH": BpfMapUpdateBatchCmd, "BPF_MAP_DELETE_BATCH": BpfMapDeleteBatchCmd, "BPF_LINK_CREATE": BpfLinkCreateCmd, "BPF_LINK_UPDATE": BpfLinkUpdateCmd, "BPF_LINK_GET_FD_BY_ID": BpfLinkGetFdByIDCmd, "BPF_LINK_GET_NEXT_ID": BpfLinkGetNextIDCmd, "BPF_ENABLE_STATS": BpfEnableStatsCmd, "BPF_ITER_CREATE": BpfIterCreateCmd, "BPF_LINK_DETACH": BpfLinkDetachCmd, "BPF_PROG_BIND_MAP": BpfProgBindMapCmd, } // BPFHelperFuncConstants is the list of BPF helper func constants // generate_constants:BPF helper functions,BPF helper functions are the supported BPF helper functions. BPFHelperFuncConstants = map[string]BPFHelperFunc{}/* 166 elements not displayed */ // BPFMapTypeConstants is the list of BPF map type constants // generate_constants:BPF map types,BPF map types are the supported eBPF map types. BPFMapTypeConstants = map[string]BPFMapType{ "BPF_MAP_TYPE_UNSPEC": BpfMapTypeUnspec, "BPF_MAP_TYPE_HASH": BpfMapTypeHash, "BPF_MAP_TYPE_ARRAY": BpfMapTypeArray, "BPF_MAP_TYPE_PROG_ARRAY": BpfMapTypeProgArray, "BPF_MAP_TYPE_PERF_EVENT_ARRAY": BpfMapTypePerfEventArray, "BPF_MAP_TYPE_PERCPU_HASH": BpfMapTypePercpuHash, "BPF_MAP_TYPE_PERCPU_ARRAY": BpfMapTypePercpuArray, "BPF_MAP_TYPE_STACK_TRACE": BpfMapTypeStackTrace, "BPF_MAP_TYPE_CGROUP_ARRAY": BpfMapTypeCgroupArray, "BPF_MAP_TYPE_LRU_HASH": BpfMapTypeLruHash, "BPF_MAP_TYPE_LRU_PERCPU_HASH": BpfMapTypeLruPercpuHash, "BPF_MAP_TYPE_LPM_TRIE": BpfMapTypeLpmTrie, "BPF_MAP_TYPE_ARRAY_OF_MAPS": BpfMapTypeArrayOfMaps, "BPF_MAP_TYPE_HASH_OF_MAPS": BpfMapTypeHashOfMaps, "BPF_MAP_TYPE_DEVMAP": BpfMapTypeDevmap, "BPF_MAP_TYPE_SOCKMAP": BpfMapTypeSockmap, "BPF_MAP_TYPE_CPUMAP": BpfMapTypeCPUmap, "BPF_MAP_TYPE_XSKMAP": BpfMapTypeXskmap, "BPF_MAP_TYPE_SOCKHASH": BpfMapTypeSockhash, "BPF_MAP_TYPE_CGROUP_STORAGE": BpfMapTypeCgroupStorage, "BPF_MAP_TYPE_REUSEPORT_SOCKARRAY": BpfMapTypeReuseportSockarray, "BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE": BpfMapTypePercpuCgroupStorage, "BPF_MAP_TYPE_QUEUE": BpfMapTypeQueue, "BPF_MAP_TYPE_STACK": BpfMapTypeStack, "BPF_MAP_TYPE_SK_STORAGE": BpfMapTypeSkStorage, "BPF_MAP_TYPE_DEVMAP_HASH": BpfMapTypeDevmapHash, "BPF_MAP_TYPE_STRUCT_OPS": BpfMapTypeStructOps, "BPF_MAP_TYPE_RINGBUF": BpfMapTypeRingbuf, "BPF_MAP_TYPE_INODE_STORAGE": BpfMapTypeInodeStorage, "BPF_MAP_TYPE_TASK_STORAGE": BpfMapTypeTaskStorage, } // BPFProgramTypeConstants is the list of BPF program type constants // generate_constants:BPF program types,BPF program types are the supported eBPF program types. BPFProgramTypeConstants = map[string]BPFProgramType{ "BPF_PROG_TYPE_UNSPEC": BpfProgTypeUnspec, "BPF_PROG_TYPE_SOCKET_FILTER": BpfProgTypeSocketFilter, "BPF_PROG_TYPE_KPROBE": BpfProgTypeKprobe, "BPF_PROG_TYPE_SCHED_CLS": BpfProgTypeSchedCls, "BPF_PROG_TYPE_SCHED_ACT": BpfProgTypeSchedAct, "BPF_PROG_TYPE_TRACEPOINT": BpfProgTypeTracepoint, "BPF_PROG_TYPE_XDP": BpfProgTypeXdp, "BPF_PROG_TYPE_PERF_EVENT": BpfProgTypePerfEvent, "BPF_PROG_TYPE_CGROUP_SKB": BpfProgTypeCgroupSkb, "BPF_PROG_TYPE_CGROUP_SOCK": BpfProgTypeCgroupSock, "BPF_PROG_TYPE_LWT_IN": BpfProgTypeLwtIn, "BPF_PROG_TYPE_LWT_OUT": BpfProgTypeLwtOut, "BPF_PROG_TYPE_LWT_XMIT": BpfProgTypeLwtXmit, "BPF_PROG_TYPE_SOCK_OPS": BpfProgTypeSockOps, "BPF_PROG_TYPE_SK_SKB": BpfProgTypeSkSkb, "BPF_PROG_TYPE_CGROUP_DEVICE": BpfProgTypeCgroupDevice, "BPF_PROG_TYPE_SK_MSG": BpfProgTypeSkMsg, "BPF_PROG_TYPE_RAW_TRACEPOINT": BpfProgTypeRawTracepoint, "BPF_PROG_TYPE_CGROUP_SOCK_ADDR": BpfProgTypeCgroupSockAddr, "BPF_PROG_TYPE_LWT_SEG6LOCAL": BpfProgTypeLwtSeg6local, "BPF_PROG_TYPE_LIRC_MODE2": BpfProgTypeLircMode2, "BPF_PROG_TYPE_SK_REUSEPORT": BpfProgTypeSkReuseport, "BPF_PROG_TYPE_FLOW_DISSECTOR": BpfProgTypeFlowDissector, "BPF_PROG_TYPE_CGROUP_SYSCTL": BpfProgTypeCgroupSysctl, "BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE": BpfProgTypeRawTracepointWritable, "BPF_PROG_TYPE_CGROUP_SOCKOPT": BpfProgTypeCgroupSockopt, "BPF_PROG_TYPE_TRACING": BpfProgTypeTracing, "BPF_PROG_TYPE_STRUCT_OPS": BpfProgTypeStructOps, "BPF_PROG_TYPE_EXT": BpfProgTypeExt, "BPF_PROG_TYPE_LSM": BpfProgTypeLsm, "BPF_PROG_TYPE_SK_LOOKUP": BpfProgTypeSkLookup, } // BPFAttachTypeConstants is the list of BPF attach type constants // generate_constants:BPF attach types,BPF attach types are the supported eBPF program attach types. BPFAttachTypeConstants = map[string]BPFAttachType{ "BPF_CGROUP_INET_INGRESS": BpfCgroupInetIngress, "BPF_CGROUP_INET_EGRESS": BpfCgroupInetEgress, "BPF_CGROUP_INET_SOCK_CREATE": BpfCgroupInetSockCreate, "BPF_CGROUP_SOCK_OPS": BpfCgroupSockOps, "BPF_SK_SKB_STREAM_PARSER": BpfSkSkbStreamParser, "BPF_SK_SKB_STREAM_VERDICT": BpfSkSkbStreamVerdict, "BPF_CGROUP_DEVICE": BpfCgroupDevice, "BPF_SK_MSG_VERDICT": BpfSkMsgVerdict, "BPF_CGROUP_INET4_BIND": BpfCgroupInet4Bind, "BPF_CGROUP_INET6_BIND": BpfCgroupInet6Bind, "BPF_CGROUP_INET4_CONNECT": BpfCgroupInet4Connect, "BPF_CGROUP_INET6_CONNECT": BpfCgroupInet6Connect, "BPF_CGROUP_INET4_POST_BIND": BpfCgroupInet4PostBind, "BPF_CGROUP_INET6_POST_BIND": BpfCgroupInet6PostBind, "BPF_CGROUP_UDP4_SENDMSG": BpfCgroupUDP4Sendmsg, "BPF_CGROUP_UDP6_SENDMSG": BpfCgroupUDP6Sendmsg, "BPF_LIRC_MODE2": BpfLircMode2, "BPF_FLOW_DISSECTOR": BpfFlowDissector, "BPF_CGROUP_SYSCTL": BpfCgroupSysctl, "BPF_CGROUP_UDP4_RECVMSG": BpfCgroupUDP4Recvmsg, "BPF_CGROUP_UDP6_RECVMSG": BpfCgroupUDP6Recvmsg, "BPF_CGROUP_GETSOCKOPT": BpfCgroupGetsockopt, "BPF_CGROUP_SETSOCKOPT": BpfCgroupSetsockopt, "BPF_TRACE_RAW_TP": BpfTraceRawTp, "BPF_TRACE_FENTRY": BpfTraceFentry, "BPF_TRACE_FEXIT": BpfTraceFexit, "BPF_MODIFY_RETURN": BpfModifyReturn, "BPF_LSM_MAC": BpfLsmMac, "BPF_TRACE_ITER": BpfTraceIter, "BPF_CGROUP_INET4_GETPEERNAME": BpfCgroupInet4Getpeername, "BPF_CGROUP_INET6_GETPEERNAME": BpfCgroupInet6Getpeername, "BPF_CGROUP_INET4_GETSOCKNAME": BpfCgroupInet4Getsockname, "BPF_CGROUP_INET6_GETSOCKNAME": BpfCgroupInet6Getsockname, "BPF_XDP_DEVMAP": BpfXdpDevmap, "BPF_CGROUP_INET_SOCK_RELEASE": BpfCgroupInetSockRelease, "BPF_XDP_CPUMAP": BpfXdpCPUmap, "BPF_SK_LOOKUP": BpfSkLookup, "BPF_XDP": BpfXdp, "BPF_SK_SKB_VERDICT": BpfSkSkbVerdict, } // PipeBufFlagConstants is the list of pipe buffer flags // generate_constants:Pipe buffer flags,Pipe buffer flags are the supported flags for a pipe buffer. PipeBufFlagConstants = map[string]PipeBufFlag{ "PIPE_BUF_FLAG_LRU": PipeBufFlagLRU, "PIPE_BUF_FLAG_ATOMIC": PipeBufFlagAtomic, "PIPE_BUF_FLAG_GIFT": PipeBufFlagGift, "PIPE_BUF_FLAG_PACKET": PipeBufFlagPacket, "PIPE_BUF_FLAG_CAN_MERGE": PipeBufFlagCanMerge, "PIPE_BUF_FLAG_WHOLE": PipeBufFlagWhole, "PIPE_BUF_FLAG_LOSS": PipeBufFlagLoss, } // SysCtlActionConstants is the list of available actions for sysctl events // generate_constants:SysCtl Actions,SysCtl Actions are the supported actions for the sysctl event. SysCtlActionConstants = map[string]SysCtlAction{ "SYSCTL_READ": SysCtlReadAction, "SYSCTL_WRITE": SysCtlWriteAction, } // CloneFlagsConstants are the clone flags accepted by the unshare syscall // generate_constants:Clone flags,Clone flags are the supported namespace flags for the unshare syscall. CloneFlagsConstants = map[string]uint64{ "CLONE_NEWNS": unix.CLONE_NEWNS, "CLONE_NEWCGROUP": unix.CLONE_NEWCGROUP, "CLONE_NEWUTS": unix.CLONE_NEWUTS, "CLONE_NEWIPC": unix.CLONE_NEWIPC, "CLONE_NEWUSER": unix.CLONE_NEWUSER, "CLONE_NEWPID": unix.CLONE_NEWPID, "CLONE_NEWNET": unix.CLONE_NEWNET, "CLONE_NEWTIME": unix.CLONE_NEWTIME, "CLONE_FILES": unix.CLONE_FILES, "CLONE_FS": unix.CLONE_FS, "CLONE_SYSVSEM": unix.CLONE_SYSVSEM, "CLONE_THREAD": unix.CLONE_THREAD, "CLONE_SIGHAND": unix.CLONE_SIGHAND, "CLONE_VM": unix.CLONE_VM, } // RlimitConstants are the supported resource limit types for setrlimit // generate_constants:Resource limit types,Resource limit types are the supported resource types for setrlimit syscall. RlimitConstants = map[string]int{ "RLIMIT_CPU": unix.RLIMIT_CPU, "RLIMIT_FSIZE": unix.RLIMIT_FSIZE, "RLIMIT_DATA": unix.RLIMIT_DATA, "RLIMIT_STACK": unix.RLIMIT_STACK, "RLIMIT_CORE": unix.RLIMIT_CORE, "RLIMIT_RSS": unix.RLIMIT_RSS, "RLIMIT_NPROC": unix.RLIMIT_NPROC, "RLIMIT_NOFILE": unix.RLIMIT_NOFILE, "RLIMIT_MEMLOCK": unix.RLIMIT_MEMLOCK, "RLIMIT_AS": unix.RLIMIT_AS, "RLIMIT_LOCKS": unix.RLIMIT_LOCKS, "RLIMIT_SIGPENDING": unix.RLIMIT_SIGPENDING, "RLIMIT_MSGQUEUE": unix.RLIMIT_MSGQUEUE, "RLIMIT_NICE": unix.RLIMIT_NICE, "RLIMIT_RTPRIO": unix.RLIMIT_RTPRIO, "RLIMIT_RTTIME": unix.RLIMIT_RTTIME, } // SocketDomainConstants is the list of socket domains // generate_constants:Socket domains,Socket domains are the supported socket domains. SocketDomainConstants = map[string]int{ "AF_UNSPEC": syscall.AF_UNSPEC, "AF_INET": syscall.AF_INET, "AF_INET6": syscall.AF_INET6, "AF_UNIX": syscall.AF_UNIX, } // SocketTypeConstants is the list of socket types // generate_constants:Socket types,Socket types are the supported socket types. SocketTypeConstants = map[string]int{ "SOCK_STREAM": syscall.SOCK_STREAM, "SOCK_DGRAM": syscall.SOCK_DGRAM, "SOCK_RAW": syscall.SOCK_RAW, "SOCK_RDM": syscall.SOCK_RDM, "SOCK_SEQPACKET": syscall.SOCK_SEQPACKET, "SOCK_DCCP": syscall.SOCK_DCCP, "SOCK_PACKET": syscall.SOCK_PACKET, } // SocketProtocolConstants is the list of socket protocols // generate_constants:Socket protocols,Socket protocols are the supported socket protocols. SocketProtocolConstants = map[string]int{ "IPPROTO_IP": syscall.IPPROTO_IP, "IPPROTO_TCP": syscall.IPPROTO_TCP, "IPPROTO_UDP": syscall.IPPROTO_UDP, "IPPROTO_ICMP": syscall.IPPROTO_ICMP, "IPPROTO_IPV6": syscall.IPPROTO_IPV6, "IPPROTO_ICMPV6": syscall.IPPROTO_ICMPV6, } // SetSockoptLevelConstants is the list of available levels for setsockopt events // generate_constants:SetSockopt Levels,SetSockopt Levels are the supported levels for the setsockopt event. SetSockoptLevelConstants = map[string]int{ "IPPROTO_IP": syscall.IPPROTO_IP, "SOL_SOCKET": syscall.SOL_SOCKET, "IPPROTO_TCP": syscall.IPPROTO_TCP, "IPPROTO_UDP": syscall.IPPROTO_UDP, "IPPROTO_IPV6": syscall.IPPROTO_IPV6, "IPPROTO_ICMPV6": syscall.IPPROTO_ICMPV6, } // SetSockOptOptNameConstantsIP is the list of available options for setsockopt events when the level is IPPROTO_IP // generate_constants:SetSockopt Options,SetSockopt Options are the supported options for the setsockopt event when the level is IPPROTO_IP. SetSockOptOptNameConstantsIP = map[string]int{ "IP_TOS": syscall.IP_TOS, "IP_TTL": syscall.IP_TTL, "IP_HDRINCL": syscall.IP_HDRINCL, "IP_OPTIONS": syscall.IP_OPTIONS, "IP_ROUTER_ALERT": syscall.IP_ROUTER_ALERT, "IP_RECVOPTS": syscall.IP_RECVOPTS, "IP_RETOPTS": syscall.IP_RETOPTS, "IP_PKTINFO": syscall.IP_PKTINFO, "IP_PKTOPTIONS": unix.IP_PKTOPTIONS, "IP_MTU_DISCOVER": syscall.IP_MTU_DISCOVER, "IP_RECVERR": syscall.IP_RECVERR, "IP_RECVTTL": syscall.IP_RECVTTL, "IP_RECVTOS": syscall.IP_RECVTOS, "IP_MTU": unix.IP_MTU, "IP_FREEBIND": syscall.IP_FREEBIND, "IP_IPSEC_POLICY": unix.IP_IPSEC_POLICY, "IP_XFRM_POLICY": unix.IP_XFRM_POLICY, "IP_PASSSEC": syscall.IP_PASSSEC, "IP_TRANSPARENT": syscall.IP_TRANSPARENT, "IP_ORIGDSTADDR": syscall.IP_ORIGDSTADDR, "IP_MINTTL": syscall.IP_MINTTL, "IP_NODEFRAG": unix.IP_NODEFRAG, "IP_CHECKSUM": unix.IP_CHECKSUM, "IP_BIND_ADDRESS_NO_PORT": unix.IP_BIND_ADDRESS_NO_PORT, "IP_RECVFRAGSIZE": unix.IP_RECVFRAGSIZE, "IP_RECVERR_RFC4884": unix.IP_RECVERR_RFC4884, "IP_MULTICAST_IF": unix.IP_MULTICAST_IF, "IP_MULTICAST_TTL": syscall.IP_MULTICAST_TTL, "IP_MULTICAST_LOOP": syscall.IP_MULTICAST_LOOP, "IP_ADD_MEMBERSHIP": unix.IP_ADD_MEMBERSHIP, "IP_DROP_MEMBERSHIP": unix.IP_DROP_MEMBERSHIP, "IP_UNBLOCK_SOURCE": unix.IP_UNBLOCK_SOURCE, "IP_BLOCK_SOURCE": unix.IP_BLOCK_SOURCE, "IP_ADD_SOURCE_MEMBERSHIP": unix.IP_ADD_SOURCE_MEMBERSHIP, "IP_DROP_SOURCE_MEMBERSHIP": unix.IP_DROP_SOURCE_MEMBERSHIP, "IP_MSFILTER": unix.IP_MSFILTER, "MCAST_JOIN_GROUP": unix.MCAST_JOIN_GROUP, "MCAST_BLOCK_SOURCE": unix.MCAST_BLOCK_SOURCE, "MCAST_UNBLOCK_SOURCE": unix.MCAST_UNBLOCK_SOURCE, "MCAST_LEAVE_GROUP": unix.MCAST_LEAVE_GROUP, "MCAST_JOIN_SOURCE_GROUP": unix.MCAST_JOIN_SOURCE_GROUP, "MCAST_LEAVE_SOURCE_GROUP": unix.MCAST_LEAVE_SOURCE_GROUP, "MCAST_MSFILTER": unix.MCAST_MSFILTER, "IP_MULTICAST_ALL": unix.IP_MULTICAST_ALL, "IP_UNICAST_IF": unix.IP_UNICAST_IF} // SetSockOptOptNameConstantsSolSocket is the list of available options for setsockopt events when the level is SOL_SOCKET // generate_constants:SetSockopt Options,SetSockopt Options are the supported options for the setsockopt event when the level is SOL_SOCKET. SetSockOptOptNameConstantsSolSocket = map[string]int{ "SO_DEBUG": syscall.SO_DEBUG, "SO_REUSEADDR": syscall.SO_REUSEADDR, "SO_TYPE": syscall.SO_TYPE, "SO_ERROR": syscall.SO_ERROR, "SO_DONTROUTE": syscall.SO_DONTROUTE, "SO_BROADCAST": syscall.SO_BROADCAST, "SO_SNDBUF": syscall.SO_SNDBUF, "SO_RCVBUF": syscall.SO_RCVBUF, "SO_KEEPALIVE": syscall.SO_KEEPALIVE, "SO_OOBINLINE": syscall.SO_OOBINLINE, "SO_NO_CHECK": syscall.SO_NO_CHECK, "SO_PRIORITY": syscall.SO_PRIORITY, "SO_LINGER": syscall.SO_LINGER, "SO_BSDCOMPAT": syscall.SO_BSDCOMPAT, "SO_REUSEPORT": unix.SO_REUSEPORT, "SO_PASSCRED": syscall.SO_PASSCRED, "SO_PEERCRED": syscall.SO_PEERCRED, "SO_RCVLOWAT": syscall.SO_RCVLOWAT, "SO_SNDLOWAT": syscall.SO_SNDLOWAT, "SO_RCVTIMEO_OLD": unix.SO_RCVTIMEO_OLD, "SO_SNDTIMEO_OLD": unix.SO_SNDTIMEO_OLD, "SO_SECURITY_AUTHENTICATION": syscall.SO_SECURITY_AUTHENTICATION, "SO_SECURITY_ENCRYPTION_TRANSPORT": syscall.SO_SECURITY_ENCRYPTION_TRANSPORT, "SO_SECURITY_ENCRYPTION_NETWORK": syscall.SO_SECURITY_ENCRYPTION_NETWORK, "SO_BINDTODEVICE": syscall.SO_BINDTODEVICE, "SO_ATTACH_FILTER": syscall.SO_ATTACH_FILTER, "SO_DETACH_FILTER": syscall.SO_DETACH_FILTER, "SO_PEERNAME": syscall.SO_PEERNAME, "SO_TIMESTAMP_OLD": unix.SO_TIMESTAMP_OLD, "SO_ACCEPTCONN": syscall.SO_ACCEPTCONN, "SO_PEERSEC": syscall.SO_PEERSEC, "SO_SNDBUFFORCE": syscall.SO_SNDBUFFORCE, "SO_RCVBUFFORCE": syscall.SO_RCVBUFFORCE, "SO_PASSSEC": syscall.SO_PASSSEC, "SO_TIMESTAMPNS_OLD": unix.SO_TIMESTAMPNS_OLD, "SO_MARK": syscall.SO_MARK, "SO_TIMESTAMPING_OLD": unix.SO_TIMESTAMPING_OLD, "SO_PROTOCOL": syscall.SO_PROTOCOL, "SO_DOMAIN": syscall.SO_DOMAIN, "SO_RXQ_OVFL": syscall.SO_RXQ_OVFL, "SO_WIFI_STATUS": unix.SO_WIFI_STATUS, "SO_PEEK_OFF": unix.SO_PEEK_OFF, "SO_NOFCS": unix.SO_NOFCS, "SO_LOCK_FILTER": unix.SO_LOCK_FILTER, "SO_SELECT_ERR_QUEUE": unix.SO_SELECT_ERR_QUEUE, "SO_BUSY_POLL": unix.SO_BUSY_POLL, "SO_MAX_PACING_RATE": unix.SO_MAX_PACING_RATE, "SO_BPF_EXTENSIONS": unix.SO_BPF_EXTENSIONS, "SO_INCOMING_CPU": unix.SO_INCOMING_CPU, "SO_ATTACH_BPF": unix.SO_ATTACH_BPF, "SO_ATTACH_REUSEPORT_CBPF": unix.SO_ATTACH_REUSEPORT_CBPF, "SO_ATTACH_REUSEPORT_EBPF": unix.SO_ATTACH_REUSEPORT_EBPF, "SO_CNX_ADVICE": unix.SO_CNX_ADVICE, "SCM_TIMESTAMPING_OPT_STATS": unix.SCM_TIMESTAMPING_OPT_STATS, "SO_MEMINFO": unix.SO_MEMINFO, "SO_INCOMING_NAPI_ID": unix.SO_INCOMING_NAPI_ID, "SO_COOKIE": unix.SO_COOKIE, "SCM_TIMESTAMPING_PKTINFO": unix.SCM_TIMESTAMPING_PKTINFO, "SO_PEERGROUPS": unix.SO_PEERGROUPS, "SO_ZEROCOPY": unix.SO_ZEROCOPY, "SO_TXTIME": unix.SO_TXTIME, "SO_BINDTOIFINDEX": unix.SO_BINDTOIFINDEX, "SO_TIMESTAMP_NEW": unix.SO_TIMESTAMP_NEW, "SO_TIMESTAMPNS_NEW": unix.SO_TIMESTAMPNS_NEW, "SO_TIMESTAMPING_NEW": unix.SO_TIMESTAMPING_NEW, "SO_RCVTIMEO_NEW": unix.SO_RCVTIMEO_NEW, "SO_SNDTIMEO_NEW": unix.SO_SNDTIMEO_NEW, "SO_DETACH_REUSEPORT_BPF": unix.SO_DETACH_REUSEPORT_BPF, "SO_PREFER_BUSY_POLL": unix.SO_PREFER_BUSY_POLL, "SO_BUSY_POLL_BUDGET": unix.SO_BUSY_POLL_BUDGET, "SO_NETNS_COOKIE": unix.SO_NETNS_COOKIE, "SO_BUF_LOCK": unix.SO_BUF_LOCK, "SO_RESERVE_MEM": unix.SO_RESERVE_MEM, "SO_TXREHASH": unix.SO_TXREHASH, "SO_RCVMARK": unix.SO_RCVMARK, "SO_PASSPIDFD": unix.SO_PASSPIDFD, "SO_PEERPIDFD": unix.SO_PEERPIDFD, "SO_DEVMEM_LINEAR": unix.SO_DEVMEM_LINEAR, "SO_DEVMEM_DMABUF": unix.SO_DEVMEM_DMABUF, "SO_DEVMEM_DONTNEED": unix.SO_DEVMEM_DONTNEED, "SCM_TS_OPT_ID": unix.SCM_TS_OPT_ID, "SO_RCVPRIORITY": 82} // SetSockOptOptNameConstantsTCP is the list of available options for setsockopt events when the level is IPPROTO_TCP // generate_constants:SetSockopt Options,SetSockopt Options are the supported options for the setsockopt event when the level is IPPROTO_TCP. SetSockOptOptNameConstantsTCP = map[string]int{ "TCP_NODELAY": syscall.TCP_NODELAY, "TCP_MAXSEG": syscall.TCP_MAXSEG, "TCP_CORK": syscall.TCP_CORK, "TCP_KEEPIDLE": syscall.TCP_KEEPIDLE, "TCP_KEEPINTVL": syscall.TCP_KEEPINTVL, "TCP_KEEPCNT": syscall.TCP_KEEPCNT, "TCP_SYNCNT": syscall.TCP_SYNCNT, "TCP_LINGER2": syscall.TCP_LINGER2, "TCP_DEFER_ACCEPT": syscall.TCP_DEFER_ACCEPT, "TCP_WINDOW_CLAMP": syscall.TCP_WINDOW_CLAMP, "TCP_INFO": syscall.TCP_INFO, "TCP_QUICKACK": syscall.TCP_QUICKACK, "TCP_CONGESTION": syscall.TCP_CONGESTION, "TCP_MD5SIG": syscall.TCP_MD5SIG, "TCP_THIN_LINEAR_TIMEOUTS": unix.TCP_THIN_LINEAR_TIMEOUTS, "TCP_THIN_DUPACK": unix.TCP_THIN_DUPACK, "TCP_USER_TIMEOUT": unix.TCP_USER_TIMEOUT, "TCP_REPAIR": unix.TCP_REPAIR, "TCP_REPAIR_QUEUE": unix.TCP_REPAIR_QUEUE, "TCP_QUEUE_SEQ": unix.TCP_QUEUE_SEQ, "TCP_REPAIR_OPTIONS": unix.TCP_REPAIR_OPTIONS, "TCP_FASTOPEN": unix.TCP_FASTOPEN, "TCP_TIMESTAMP": unix.TCP_TIMESTAMP, "TCP_NOTSENT_LOWAT": unix.TCP_NOTSENT_LOWAT, "TCP_CC_INFO": unix.TCP_CC_INFO, "TCP_SAVE_SYN": unix.TCP_SAVE_SYN, "TCP_SAVED_SYN": unix.TCP_SAVED_SYN, "TCP_REPAIR_WINDOW": unix.TCP_REPAIR_WINDOW, "TCP_FASTOPEN_CONNECT": unix.TCP_FASTOPEN_CONNECT, "TCP_ULP": unix.TCP_ULP, "TCP_MD5SIG_EXT": unix.TCP_MD5SIG_EXT, "TCP_FASTOPEN_KEY": unix.TCP_FASTOPEN_KEY, "TCP_FASTOPEN_NO_COOKIE": unix.TCP_FASTOPEN_NO_COOKIE, "TCP_ZEROCOPY_RECEIVE": unix.TCP_ZEROCOPY_RECEIVE, "TCP_INQ": unix.TCP_INQ, "TCP_TX_DELAY": unix.TCP_TX_DELAY} // SetSockOptOptNameConstantsIPv6 is the list of available options for setsockopt events when the level is IPPROTO_IPV6. // generate_constants:SetSockopt Options,SetSockopt Options are the supported options for the setsockopt event when the level is IPPROTO_IPV6. SetSockOptOptNameConstantsIPv6 = map[string]int{ "IPV6_ADDRFORM": syscall.IPV6_ADDRFORM, "IPV6_2292PKTINFO": syscall.IPV6_2292PKTINFO, "IPV6_2292HOPOPTS": syscall.IPV6_2292HOPOPTS, "IPV6_2292DSTOPTS": syscall.IPV6_2292DSTOPTS, "IPV6_2292RTHDR": syscall.IPV6_2292RTHDR, "IPV6_2292PKTOPTIONS": syscall.IPV6_2292PKTOPTIONS, "IPV6_2292HOPLIMIT": syscall.IPV6_2292HOPLIMIT, "IPV6_FLOWINFO": 11, "IPV6_UNICAST_HOPS": syscall.IPV6_UNICAST_HOPS, "IPV6_MULTICAST_IF": syscall.IPV6_MULTICAST_IF, "IPV6_MULTICAST_HOPS": syscall.IPV6_MULTICAST_HOPS, "IPV6_MULTICAST_LOOP": syscall.IPV6_MULTICAST_LOOP, "IPV6_ADD_MEMBERSHIP": syscall.IPV6_ADD_MEMBERSHIP, "IPV6_DROP_MEMBERSHIP": syscall.IPV6_DROP_MEMBERSHIP, "IPV6_ROUTER_ALERT": syscall.IPV6_ROUTER_ALERT, "IPV6_MTU_DISCOVER": syscall.IPV6_MTU_DISCOVER, "IPV6_MTU": syscall.IPV6_MTU, "IPV6_RECVERR": syscall.IPV6_RECVERR, "IPV6_V6ONLY": syscall.IPV6_V6ONLY, "IPV6_JOIN_ANYCAST": syscall.IPV6_JOIN_ANYCAST, "IPV6_LEAVE_ANYCAST": syscall.IPV6_LEAVE_ANYCAST, "IPV6_MULTICAST_ALL": unix.IPV6_MULTICAST_ALL, "IPV6_ROUTER_ALERT_ISOLATE": unix.IPV6_ROUTER_ALERT_ISOLATE, "IPV6_RECVERR_RFC4884": unix.IPV6_RECVERR_RFC4884, "IPV6_FLOWLABEL_MGR": 32, "IPV6_FLOWINFO_SEND": 33, "IPV6_IPSEC_POLICY": syscall.IPV6_IPSEC_POLICY, "IPV6_XFRM_POLICY": syscall.IPV6_XFRM_POLICY, "IPV6_HDRINCL": unix.IPV6_HDRINCL, "IPV6_RECVPKTINFO": syscall.IPV6_RECVPKTINFO, "IPV6_PKTINFO": syscall.IPV6_PKTINFO, "IPV6_RECVHOPLIMIT": syscall.IPV6_RECVHOPLIMIT, "IPV6_HOPLIMIT": syscall.IPV6_HOPLIMIT, "IPV6_RECVHOPOPTS": syscall.IPV6_RECVHOPOPTS, "IPV6_HOPOPTS": syscall.IPV6_HOPOPTS, "IPV6_RTHDRDSTOPTS": syscall.IPV6_RTHDRDSTOPTS, "IPV6_RECVRTHDR": syscall.IPV6_RECVRTHDR, "IPV6_RTHDR": syscall.IPV6_RTHDR, "IPV6_RECVDSTOPTS": syscall.IPV6_RECVDSTOPTS, "IPV6_DSTOPTS": syscall.IPV6_DSTOPTS, "IPV6_RECVPATHMTU": unix.IPV6_RECVPATHMTU, "IPV6_PATHMTU": unix.IPV6_PATHMTU, "IPV6_DONTFRAG": unix.IPV6_DONTFRAG, "IPV6_RECVTCLASS": syscall.IPV6_RECVTCLASS, "IPV6_TCLASS": syscall.IPV6_TCLASS, "IPV6_AUTOFLOWLABEL": unix.IPV6_AUTOFLOWLABEL, "IPV6_ADDR_PREFERENCES": unix.IPV6_ADDR_PREFERENCES, "IPV6_MINHOPCOUNT": unix.IPV6_MINHOPCOUNT, "IPV6_ORIGDSTADDR": unix.IPV6_ORIGDSTADDR, "IPV6_TRANSPARENT": unix.IPV6_TRANSPARENT, "IPV6_UNICAST_IF": unix.IPV6_UNICAST_IF, "IPV6_RECVFRAGSIZE": unix.IPV6_RECVFRAGSIZE, "IPV6_FREEBIND": unix.IPV6_FREEBIND, } // PrCtlOptionConstants is the list of available options for prctl events // generate_constants:PrCtl Options,PrCtl Options are the supported options for the prctl event PrCtlOptionConstants = map[string]int{ "PR_CAP_AMBIENT": unix.PR_CAP_AMBIENT, "PR_CAPBSET_READ": unix.PR_CAPBSET_READ, "PR_CAPBSET_DROP": unix.PR_CAPBSET_DROP, "PR_SET_CHILD_SUBREAPER": unix.PR_SET_CHILD_SUBREAPER, "PR_GET_CHILD_SUBREAPER": unix.PR_GET_CHILD_SUBREAPER, "PR_SET_DUMPABLE": unix.PR_SET_DUMPABLE, "PR_GET_DUMPABLE": unix.PR_GET_DUMPABLE, "PR_SET_ENDIAN": unix.PR_SET_ENDIAN, "PR_GET_ENDIAN": unix.PR_GET_ENDIAN, "PR_SET_FP_MODE": unix.PR_SET_FP_MODE, "PR_GET_FP_MODE": unix.PR_GET_FP_MODE, "PR_SET_FPEMU": unix.PR_SET_FPEMU, "PR_GET_FPEMU": unix.PR_GET_FPEMU, "PR_SET_FPEXC": unix.PR_SET_FPEXC, "PR_GET_FPEXC": unix.PR_GET_FPEXC, "PR_SET_IO_FLUSHER": unix.PR_SET_IO_FLUSHER, "PR_GET_IO_FLUSHER": unix.PR_GET_IO_FLUSHER, "PR_SET_KEEPCAPS": unix.PR_SET_KEEPCAPS, "PR_GET_KEEPCAPS": unix.PR_GET_KEEPCAPS, "PR_MCE_KILL": unix.PR_MCE_KILL, "PR_MCE_KILL_GET": unix.PR_MCE_KILL_GET, "PR_SET_MM": unix.PR_SET_MM, "PR_SET_VMA": unix.PR_SET_VMA, "PR_MPX_ENABLE_MANAGEMENT": unix.PR_MPX_ENABLE_MANAGEMENT, "PR_MPX_DISABLE_MANAGEMENT": unix.PR_MPX_DISABLE_MANAGEMENT, "PR_SET_NAME": unix.PR_SET_NAME, "PR_GET_NAME": unix.PR_GET_NAME, "PR_SET_NO_NEW_PRIVS": unix.PR_SET_NO_NEW_PRIVS, "PR_GET_NO_NEW_PRIVS": unix.PR_GET_NO_NEW_PRIVS, "PR_PAC_RESET_KEYS": unix.PR_PAC_RESET_KEYS, "PR_PAC_GET_ENABLED_KEYS": unix.PR_PAC_GET_ENABLED_KEYS, "PR_PAC_SET_ENABLED_KEYS": unix.PR_PAC_SET_ENABLED_KEYS, "PR_SET_PDEATHSIG": unix.PR_SET_PDEATHSIG, "PR_GET_PDEATHSIG": unix.PR_GET_PDEATHSIG, "PR_SET_PTRACER": unix.PR_SET_PTRACER, "PR_SET_SECCOMP": unix.PR_SET_SECCOMP, "PR_GET_SECCOMP": unix.PR_GET_SECCOMP, "PR_SET_SECUREBITS": unix.PR_SET_SECUREBITS, "PR_GET_SECUREBITS": unix.PR_GET_SECUREBITS, "PR_SCHED_CORE": unix.PR_SCHED_CORE, "PR_GET_SPECULATION_CTRL": unix.PR_GET_SPECULATION_CTRL, "PR_SET_SPECULATION_CTRL": unix.PR_SET_SPECULATION_CTRL, "PR_SVE_SET_VL": unix.PR_SVE_SET_VL, "PR_SVE_GET_VL": unix.PR_SVE_GET_VL, "PR_SME_SET_VL": unix.PR_SME_SET_VL, "PR_SME_GET_VL": unix.PR_SME_GET_VL, "PR_SET_SYSCALL_USER_DISPATCH": unix.PR_SET_SYSCALL_USER_DISPATCH, "PR_SET_TAGGED_ADDR_CTRL": unix.PR_SET_TAGGED_ADDR_CTRL, "PR_GET_TAGGED_ADDR_CTRL": unix.PR_GET_TAGGED_ADDR_CTRL, "PR_TASK_PERF_EVENTS_DISABLE": unix.PR_TASK_PERF_EVENTS_DISABLE, "PR_TASK_PERF_EVENTS_ENABLE": unix.PR_TASK_PERF_EVENTS_ENABLE, "PR_SET_THP_DISABLE": unix.PR_SET_THP_DISABLE, "PR_GET_THP_DISABLE": unix.PR_GET_THP_DISABLE, "PR_GET_TID_ADDRESS": unix.PR_GET_TID_ADDRESS, "PR_SET_TIMERSLACK": unix.PR_SET_TIMERSLACK, "PR_GET_TIMERSLACK": unix.PR_GET_TIMERSLACK, "PR_SET_TIMING": unix.PR_SET_TIMING, "PR_GET_TIMING": unix.PR_GET_TIMING, "PR_TIMER_CREATE_RESTORE_IDS": unix.PR_TIMER_CREATE_RESTORE_IDS, "PR_SET_TSC": unix.PR_SET_TSC, "PR_GET_TSC": unix.PR_GET_TSC, "PR_SET_UNALIGN": unix.PR_SET_UNALIGN, "PR_GET_UNALIGN": unix.PR_GET_UNALIGN, "PR_GET_AUXV": unix.PR_GET_AUXV, "PR_SET_MDWE": unix.PR_SET_MDWE, "PR_GET_MDWE": unix.PR_GET_MDWE, "PR_SET_MEMORY_MERGE": unix.PR_SET_MEMORY_MERGE, "PR_GET_MEMORY_MERGE": unix.PR_GET_MEMORY_MERGE, "PR_SET_SHADOW_STACK_STATUS": unix.PR_SET_SHADOW_STACK_STATUS, "PR_GET_SHADOW_STACK_STATUS": unix.PR_GET_SHADOW_STACK_STATUS, "PR_LOCK_SHADOW_STACK_STATUS": unix.PR_LOCK_SHADOW_STACK_STATUS, "PR_FUTEX_HASH": unix.PR_FUTEX_HASH, "PR_PPC_GET_DEXCR": unix.PR_PPC_GET_DEXCR, "PR_PPC_SET_DEXCR": unix.PR_PPC_SET_DEXCR, "PR_RISCV_V_GET_CONTROL": unix.PR_RISCV_V_GET_CONTROL, "PR_RISCV_V_SET_CONTROL": unix.PR_RISCV_V_SET_CONTROL, "PR_RISCV_SET_ICACHE_FLUSH_CTX": unix.PR_RISCV_SET_ICACHE_FLUSH_CTX, } )
var ( // ErrDNSNamePointerNotSupported reported because pointer compression is not supported ErrDNSNamePointerNotSupported = errors.New("dns name pointer compression is not supported") // ErrDNSNameOutOfBounds reported because name out of bound ErrDNSNameOutOfBounds = errors.New("dns name out of bound") // ErrDNSNameNonPrintableASCII reported because name non-printable ascii ErrDNSNameNonPrintableASCII = errors.New("dns name non-printable ascii") // ErrDNSNameMalformatted reported because name mal formatted (too short, missing dots, etc) ErrDNSNameMalformatted = errors.New("dns name mal-formatted") )
var ( // ErrNotEnoughData is returned when the buffer is too small to unmarshal the event ErrNotEnoughData = errors.New("not enough data") // ErrNotEnoughSpace is returned when the provided buffer is too small to marshal the event ErrNotEnoughSpace = errors.New("not enough space") // ErrStringArrayOverflow returned when there is a string array overflow ErrStringArrayOverflow = errors.New("string array overflow") // ErrNonPrintable returned when a string contains non printable char ErrNonPrintable = errors.New("non printable") // ErrIncorrectDataSize is returned when the data read size doesn't correspond to the expected one ErrIncorrectDataSize = errors.New("incorrect data size") // ErrNoUsefulData returned when there is no useful data ErrNoUsefulData = errors.New("no useful data") )
var ( // ProcessSymlinkPathname handles symlink for process entries ProcessSymlinkPathname = &eval.OpOverrides{ StringEquals: func(a *eval.StringEvaluator, b *eval.StringEvaluator, state *eval.State) (*eval.BoolEvaluator, error) { path, err := eval.GlobCmp.StringEquals(a, b, state) if err != nil { return nil, err } if a.Field == "exec.file.path" || a.Field == "process.file.path" { se1, err := eval.GlobCmp.StringEquals(symlinkPathnameEvaluators[0](a.Field), b, state) if err != nil { return nil, err } se2, err := eval.GlobCmp.StringEquals(symlinkPathnameEvaluators[1](a.Field), b, state) if err != nil { return nil, err } or, err := eval.Or(se1, se2, state) if err != nil { return nil, err } return eval.Or(path, or, state) } else if b.Field == "exec.file.path" || b.Field == "process.file.path" { se1, err := eval.GlobCmp.StringEquals(symlinkPathnameEvaluators[0](b.Field), a, state) if err != nil { return nil, err } se2, err := eval.GlobCmp.StringEquals(symlinkPathnameEvaluators[1](b.Field), a, state) if err != nil { return nil, err } or, err := eval.Or(se1, se2, state) if err != nil { return nil, err } return eval.Or(path, or, state) } return path, nil }, StringValuesContains: func(a *eval.StringEvaluator, b *eval.StringValuesEvaluator, state *eval.State) (*eval.BoolEvaluator, error) { path, err := eval.GlobCmp.StringValuesContains(a, b, state) if err != nil { return nil, err } if a.Field == "exec.file.path" || a.Field == "process.file.path" { se1, err := eval.GlobCmp.StringValuesContains(symlinkPathnameEvaluators[0](a.Field), b, state) if err != nil { return nil, err } se2, err := eval.GlobCmp.StringValuesContains(symlinkPathnameEvaluators[1](a.Field), b, state) if err != nil { return nil, err } or, err := eval.Or(se1, se2, state) if err != nil { return nil, err } return eval.Or(path, or, state) } return path, nil }, StringArrayContains: func(a *eval.StringEvaluator, b *eval.StringArrayEvaluator, state *eval.State) (*eval.BoolEvaluator, error) { path, err := eval.GlobCmp.StringArrayContains(a, b, state) if err != nil { return nil, err } if a.Field == "exec.file.path" || a.Field == "process.file.path" { se1, err := eval.GlobCmp.StringArrayContains(symlinkPathnameEvaluators[0](a.Field), b, state) if err != nil { return nil, err } se2, err := eval.GlobCmp.StringArrayContains(symlinkPathnameEvaluators[1](a.Field), b, state) if err != nil { return nil, err } or, err := eval.Or(se1, se2, state) if err != nil { return nil, err } return eval.Or(path, or, state) } return path, nil }, StringArrayMatches: func(a *eval.StringArrayEvaluator, b *eval.StringValuesEvaluator, state *eval.State) (*eval.BoolEvaluator, error) { return eval.GlobCmp.StringArrayMatches(a, b, state) }, } // ProcessSymlinkBasename handles symlink for process entries ProcessSymlinkBasename = &eval.OpOverrides{ StringEquals: func(a *eval.StringEvaluator, b *eval.StringEvaluator, state *eval.State) (*eval.BoolEvaluator, error) { path, err := eval.StringEquals(a, b, state) if err != nil { return nil, err } if a.Field == "exec.file.name" || a.Field == "process.file.name" { symlink, err := eval.StringEquals(symlinkBasenameEvaluator(a.Field), b, state) if err != nil { return nil, err } return eval.Or(path, symlink, state) } else if b.Field == "exec.file.name" || b.Field == "process.file.name" { symlink, err := eval.StringEquals(a, symlinkBasenameEvaluator(b.Field), state) if err != nil { return nil, err } return eval.Or(path, symlink, state) } return path, nil }, StringValuesContains: func(a *eval.StringEvaluator, b *eval.StringValuesEvaluator, state *eval.State) (*eval.BoolEvaluator, error) { path, err := eval.StringValuesContains(a, b, state) if err != nil { return nil, err } if a.Field == "exec.file.name" || a.Field == "process.file.name" { symlink, err := eval.StringValuesContains(symlinkBasenameEvaluator(a.Field), b, state) if err != nil { return nil, err } return eval.Or(path, symlink, state) } return path, nil }, StringArrayContains: func(a *eval.StringEvaluator, b *eval.StringArrayEvaluator, state *eval.State) (*eval.BoolEvaluator, error) { path, err := eval.StringArrayContains(a, b, state) if err != nil { return nil, err } if a.Field == "exec.file.name" || a.Field == "process.file.name" { symlink, err := eval.StringArrayContains(symlinkBasenameEvaluator(a.Field), b, state) if err != nil { return nil, err } return eval.Or(path, symlink, state) } return path, nil }, StringArrayMatches: func(a *eval.StringArrayEvaluator, b *eval.StringValuesEvaluator, state *eval.State) (*eval.BoolEvaluator, error) { return eval.StringArrayMatches(a, b, state) }, } )
var AllEventFilteringProfileState = []EventFilteringProfileState{NoProfile, ProfileAtMaxSize, UnstableEventType, StableEventType, AutoLearning, WorkloadWarmup}
AllEventFilteringProfileState is the list of all EventFilteringProfileState
var ErrCycleInProcessLineage = errors.New("cycle detected in process lineage")
ErrCycleInProcessLineage is returned when a cycle is detected in the process lineage
var ErrFailedDNSPacketDecoding = errors.New("dns packet couldn't be decoded")
ErrFailedDNSPacketDecoding defines a dns packet that failed to be decoded
var ErrNoProcessContext = errors.New("process context not resolved")
ErrNoProcessContext defines an error for event without process context
var MountOrigins = [...]string{
"unknown",
"procfs",
"event",
"unshare",
"fsmount",
"open_tree",
"listmount",
"move_mount",
"pivot_root",
}
MountOrigins defines mount origins
var MountSources = [...]string{
"unknown",
"mount_id",
"snapshot",
}
MountSources defines mount sources
var OnDemandNameOverrides = &eval.OpOverrides{ StringEquals: func(a *eval.StringEvaluator, b *eval.StringEvaluator, state *eval.State) (*eval.BoolEvaluator, error) { return eval.StringEquals(a, b, state) }, StringValuesContains: func(_ *eval.StringEvaluator, _ *eval.StringValuesEvaluator, _ *eval.State) (*eval.BoolEvaluator, error) { return nil, errUnsupportedOnDemandOp }, StringArrayContains: func(_ *eval.StringEvaluator, _ *eval.StringArrayEvaluator, _ *eval.State) (*eval.BoolEvaluator, error) { return nil, errUnsupportedOnDemandOp }, StringArrayMatches: func(_ *eval.StringArrayEvaluator, _ *eval.StringValuesEvaluator, _ *eval.State) (*eval.BoolEvaluator, error) { return nil, errUnsupportedOnDemandOp }, }
OnDemandNameOverrides is a set of overrides for on demand name field
var ( // OverlayFSPathname handles path evaluations when the file is accessed through an overlayfs mountpoint OverlayFSPathname = &eval.OpOverrides{ StringEquals: func(a *eval.StringEvaluator, b *eval.StringEvaluator, state *eval.State) (*eval.BoolEvaluator, error) { baseEvaluator, err := eval.GlobCmp.StringEquals(a, b, state) if err != nil { return nil, err } if strings.HasSuffix(a.Field, ".file.path") { overlayFSPathEvaluator, err := eval.GlobCmp.StringEquals(overlayFSEvaluator(a.Field), b, state) if err != nil { return nil, err } return eval.Or(baseEvaluator, overlayFSPathEvaluator, state) } else if strings.HasSuffix(b.Field, ".file.path") { overlayFSPathEvaluator, err := eval.GlobCmp.StringEquals(overlayFSEvaluator(b.Field), a, state) if err != nil { return nil, err } return eval.Or(baseEvaluator, overlayFSPathEvaluator, state) } return baseEvaluator, nil }, StringValuesContains: func(a *eval.StringEvaluator, b *eval.StringValuesEvaluator, state *eval.State) (*eval.BoolEvaluator, error) { baseEvaluator, err := eval.GlobCmp.StringValuesContains(a, b, state) if err != nil { return nil, err } if strings.HasSuffix(a.Field, ".file.path") { overlayFSPathEvaluator, err := eval.GlobCmp.StringValuesContains(overlayFSEvaluator(a.Field), b, state) if err != nil { return nil, err } return eval.Or(baseEvaluator, overlayFSPathEvaluator, state) } return baseEvaluator, nil }, StringArrayContains: func(a *eval.StringEvaluator, b *eval.StringArrayEvaluator, state *eval.State) (*eval.BoolEvaluator, error) { baseEvaluator, err := eval.GlobCmp.StringArrayContains(a, b, state) if err != nil { return nil, err } if strings.HasSuffix(a.Field, ".file.path") { overlayFSPathEvaluator, err := eval.GlobCmp.StringArrayContains(overlayFSEvaluator(a.Field), b, state) if err != nil { return nil, err } return eval.Or(baseEvaluator, overlayFSPathEvaluator, state) } return baseEvaluator, nil }, StringArrayMatches: func(a *eval.StringArrayEvaluator, b *eval.StringValuesEvaluator, state *eval.State) (*eval.BoolEvaluator, error) { return eval.GlobCmp.StringArrayMatches(a, b, state) }, } )
var PacketFilterMatching = &eval.OpOverrides{ StringEquals: func(a *eval.StringEvaluator, b *eval.StringEvaluator, _ *eval.State) (*eval.BoolEvaluator, error) { if a.IsStatic() || b.IsStatic() { return &eval.BoolEvaluator{ Value: false, }, nil } return nil, errorNonStaticPacketFilterField(a, b) }, StringValuesContains: func(a *eval.StringEvaluator, b *eval.StringValuesEvaluator, _ *eval.State) (*eval.BoolEvaluator, error) { return nil, errorNonStaticPacketFilterField(a, b) }, StringArrayContains: func(a *eval.StringEvaluator, b *eval.StringArrayEvaluator, _ *eval.State) (*eval.BoolEvaluator, error) { return nil, errorNonStaticPacketFilterField(a, b) }, StringArrayMatches: func(a *eval.StringArrayEvaluator, b *eval.StringValuesEvaluator, _ *eval.State) (*eval.BoolEvaluator, error) { return nil, errorNonStaticPacketFilterField(a, b) }, }
PacketFilterMatching is a set of overrides for packet filter fields, it only supports matching a single static value
var ProcessSources = [...]string{
"unknown",
"placeholder",
"event",
"map",
"procfs_fallback",
"procfs_snapshot",
"unknown_loader",
}
ProcessSources defines process sources
var SECLLegacyFields = map[eval.Field]eval.Field{
"async": "event.async",
"container.id": "process.container.id",
"container.created_at": "process.container.created_at",
"container.tags": "process.container.tags",
"cgroup.id": "process.cgroup.id",
"cgroup.version": "process.cgroup.version",
"cgroup.file.inode": "process.cgroup.file.inode",
"cgroup.file.mount_id": "process.cgroup.file.mount_id",
"chmod.filename": "chmod.file.path",
"chmod.basename": "chmod.file.name",
"chmod.mode": "chmod.file.destination.mode",
"chown.filename": "chown.file.path",
"chown.basename": "chown.file.name",
"chown.uid": "chown.file.destination.uid",
"chown.user": "chown.file.destination.user",
"chown.gid": "chown.file.destination.gid",
"chown.group": "chown.file.destination.group",
"open.filename": "open.file.path",
"open.basename": "open.file.name",
"open.mode": "open.file.destination.mode",
"mkdir.filename": "mkdir.file.path",
"mkdir.basename": "mkdir.file.name",
"mkdir.mode": "mkdir.file.destination.mode",
"rmdir.filename": "rmdir.file.path",
"rmdir.basename": "rmdir.file.name",
"rename.old.filename": "rename.file.path",
"rename.old.basename": "rename.file.name",
"rename.new.filename": "rename.file.destination.path",
"rename.new.basename": "rename.file.destination.name",
"unlink.filename": "unlink.file.path",
"unlink.basename": "unlink.file.name",
"utimes.filename": "utimes.file.path",
"utimes.basename": "utimes.file.name",
"link.source.filename": "link.file.path",
"link.source.basename": "link.file.name",
"link.target.filename": "link.file.destination.path",
"link.target.basename": "link.file.destination.name",
"setxattr.filename": "setxattr.file.path",
"setxattr.basename": "setxattr.file.name",
"setxattr.namespace": "setxattr.file.destination.namespace",
"setxattr.name": "setxattr.file.destination.name",
"removexattr.filename": "removexattr.file.path",
"removexattr.basename": "removexattr.file.name",
"removexattr.namespace": "removexattr.file.destination.namespace",
"removexattr.name": "removexattr.file.destination.name",
"exec.filename": "exec.file.path",
"exec.overlay_numlower": "exec.file.overlay_numlower",
"exec.basename": "exec.file.name",
"exec.name": "exec.comm",
"process.filename": "process.file.path",
"process.basename": "process.file.name",
"process.name": "process.comm",
"process.ancestors.filename": "process.ancestors.file.path",
"process.ancestors.basename": "process.ancestors.file.name",
"process.ancestors.name": "process.ancestors.comm",
}
SECLLegacyFields contains the list of the legacy attributes we need to support
var ( // SECLVariables set of variables SECLVariables = map[string]eval.SECLVariable{ "process.pid": eval.NewScopedIntVariable(func(ctx *eval.Context, _ bool) (int, bool) { pc := ctx.Event.(*Event).ProcessContext if pc == nil { return 0, false } return int(pc.Process.Pid), true }, nil, eval.VariableOpts{}), "builtins.uuid4": eval.NewScopedStringVariable(func(_ *eval.Context, _ bool) (string, bool) { return uuid.New().String(), true }, nil, eval.VariableOpts{}), } )
var UnknownCategory = EventCategory(-1)
UnknownCategory for everything without a clear category
Functions ¶
func EventTypeDependsOnInterfaceTracking ¶ added in v0.72.0
EventTypeDependsOnInterfaceTracking returns all event types that have a dependency on our internal interface tracking mechanism
func FilterEnvs ¶ added in v0.51.0
FilterEnvs returns an array of environment variable key value pairs matching the desired keys
func GetDefaultLegacyFields ¶ added in v0.73.0
GetDefaultLegacyFields returns the field mapped from a legacy field if it exists
func GetDefaultLegacyFieldsKeys ¶ added in v0.73.0
GetDefaultLegacyFieldsKeys returns all legacy field keys
func GetEventTypePerCategory ¶
func GetEventTypePerCategory(categories ...EventCategory) map[EventCategory][]eval.EventType
GetEventTypePerCategory returns the event types per category
func IsAlphaNumeric ¶
IsAlphaNumeric returns whether a character is either a digit or a letter
func IsFakeInode ¶ added in v0.64.0
IsFakeInode returns whether the given inode is a fake inode
func IsPrintable ¶
IsPrintable returns whether the string does contain only unicode printable
func IsPrintableASCII ¶
IsPrintableASCII returns whether the string does contain only ASCII char
func MarshalBinary ¶ added in v0.36.0
func MarshalBinary(data []byte, binaryMarshalers ...BinaryMarshaler) (int, error)
MarshalBinary calls a series of BinaryMarshaler
func MountFlagsStrings ¶ added in v0.86.0
MountFlagsStrings returns the canonical option names set in the normalized per-mount attribute bitmask.
func MountOriginToString ¶ added in v0.55.0
func MountOriginToString(origin MountOrigin) string
MountOriginToString returns the string corresponding to a mount origin
func MountSourceToString ¶ added in v0.55.0
func MountSourceToString(source MountSource) string
MountSourceToString returns the string corresponding to a mount source
func NewEventZeroer ¶ added in v0.72.0
func NewEventZeroer() func(*Event)
NewEventZeroer returns a function that can be used to zero an Event
func NormalizeMountFlagsFromAttr ¶ added in v0.86.0
NormalizeMountFlagsFromAttr masks a statmount(2) mnt_attr value down to the canonical per-mount attribute bitmask.
func NormalizeMountFlagsFromOptions ¶ added in v0.86.0
NormalizeMountFlagsFromOptions converts a comma-separated procfs mountinfo options string (e.g. "ro,nosuid,nodev") into the canonical per-mount attribute bitmask.
func NormalizeMountFlagsFromVFS ¶ added in v0.86.0
NormalizeMountFlagsFromVFS converts raw vfsmount mnt_flags (as read from the kernel by eBPF) into the canonical per-mount attribute bitmask.
func NullTerminatedBytes ¶ added in v0.77.0
NullTerminatedBytes returns null-terminated []byte
func NullTerminatedString ¶ added in v0.41.0
NullTerminatedString returns null-terminated string
func ProcessSourceToString ¶ added in v0.46.0
ProcessSourceToString returns the string corresponding to a process source
func SECLConstants ¶
func SECLConstants() map[string]interface{}
SECLConstants returns the constants supported in runtime security agent rules, initializing these constants during the first call
func SSHAuthMethodToString ¶ added in v0.74.1
func SSHAuthMethodToString(t usersession.AuthType) string
func SetAncestorFields ¶ added in v0.64.0
func SetAncestorFields(pce *ProcessCacheEntry, subField string, _ interface{}) (bool, error)
SetAncestorFields force the process cache entry to be valid
func SetDefaultLegacyFields ¶ added in v0.73.0
SetDefaultLegacyFields sets the default legacy field mapping used by the accessors
func SetInterpreterFields ¶ added in v0.64.0
func SetInterpreterFields(bprm *LinuxBinprm, subField string, _ interface{}) (bool, error)
SetInterpreterFields set the proper field so that this will be seen as a valid interpreter, see HasInterpreter
func SliceToArray ¶
SliceToArray copy src bytes to dst. Destination should have enough space
func StringifyHelpersList ¶
StringifyHelpersList returns a string list representation of a list of helpers
func UnmarshalBinary ¶
func UnmarshalBinary(data []byte, binaryUnmarshalers ...BinaryUnmarshaler) (int, error)
UnmarshalBinary calls a series of BinaryUnmarshaler
func UnmarshalPrintableString ¶
UnmarshalPrintableString unmarshal printable string
func UnmarshalString ¶
UnmarshalString unmarshal string
func UnmarshalStringArray ¶
UnmarshalStringArray extract array of string for array of byte
func UserSessionTypeToString ¶ added in v0.74.1
func UserSessionTypeToString(t usersession.Type) string
UserSessionTypeToString converts a usersession.Type to its string representation
Types ¶
type AWSIMDSEvent ¶ added in v0.55.0
type AWSIMDSEvent struct {
IsIMDSv2 bool `field:"is_imds_v2"` // SECLDoc[is_imds_v2] Definition:`a boolean which specifies if the IMDS event follows IMDSv1 or IMDSv2 conventions`
SecurityCredentials AWSSecurityCredentials `field:"security_credentials"` // SECLDoc[credentials] Definition:`the security credentials in the IMDS answer`
}
AWSIMDSEvent holds data from an AWS IMDS event
type AWSSecurityCredentials ¶ added in v0.55.0
type AWSSecurityCredentials struct {
Code string `field:"-" json:"Code"`
Type string `field:"type" json:"Type"` // SECLDoc[type] Definition:`The security credentials type`
AccessKeyID string `field:"access_key_id" json:"AccessKeyId"` // SECLDoc[access_key_id] Definition:`The access key ID of the security credentials in the IMDS answer`
LastUpdated string `field:"-" json:"LastUpdated"`
Expiration time.Time `field:"-"`
ExpirationRaw string `field:"-" json:"Expiration"`
}
AWSSecurityCredentials is used to parse the fields that are none to be free of credentials or secrets
func (*AWSSecurityCredentials) UnmarshalBinary ¶ added in v0.55.0
func (creds *AWSSecurityCredentials) UnmarshalBinary(body []byte) error
UnmarshalBinary extract scrubbed data from an AWS IMDS security credentials response body
type AWSSecurityCredentialsIterator ¶ added in v0.84.0
type AWSSecurityCredentialsIterator struct {
Root []AWSSecurityCredentials
// contains filtered or unexported fields
}
AWSSecurityCredentialsIterator defines an iterator of the AWS security credentials of a process
func (*AWSSecurityCredentialsIterator) At ¶ added in v0.84.0
func (it *AWSSecurityCredentialsIterator) At(ctx *eval.Context, regID eval.RegisterID, pos int) *AWSSecurityCredentials
At returns the element at the given position
func (*AWSSecurityCredentialsIterator) Front ¶ added in v0.84.0
func (it *AWSSecurityCredentialsIterator) Front(_ *eval.Context) *AWSSecurityCredentials
Front returns the first element
func (*AWSSecurityCredentialsIterator) Len ¶ added in v0.84.0
func (it *AWSSecurityCredentialsIterator) Len(_ *eval.Context) int
Len returns the len
func (*AWSSecurityCredentialsIterator) Next ¶ added in v0.84.0
func (it *AWSSecurityCredentialsIterator) Next(_ *eval.Context) *AWSSecurityCredentials
Next returns the next element
type AcceptEvent ¶ added in v0.63.0
type AcceptEvent struct {
SyscallEvent
Addr IPPortContext `field:"addr"` // Connection address
Hostnames []string `field:"addr.hostname,handler:ResolveAcceptHostnames,opts:skip_ad|root_domain|length"` // SECLDoc[addr.hostname] Definition:`Address hostname (if available)`
AddrFamily uint16 `field:"addr.family"` // SECLDoc[addr.family] Definition:`Address family`
}
AcceptEvent represents an accept event
func (*AcceptEvent) UnmarshalBinary ¶ added in v0.63.0
func (e *AcceptEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type ActionReport ¶ added in v0.52.0
type ActionReport interface {
DelayabledEvent
ToJSON() ([]byte, error)
IsMatchingRule(ruleID eval.RuleID) bool
}
ActionReport defines an action report
type ActivityDumpLoadConfig ¶ added in v0.40.0
type ActivityDumpLoadConfig struct {
TracedEventTypes []EventType
Timeout time.Duration
WaitListTimestampRaw uint64
StartTimestampRaw uint64
EndTimestampRaw uint64
Rate uint16 // max number of events per sec
Paused uint32
}
ActivityDumpLoadConfig represents the load configuration of an activity dump
func (*ActivityDumpLoadConfig) EventUnmarshalBinary ¶ added in v0.40.0
func (adlc *ActivityDumpLoadConfig) EventUnmarshalBinary(data []byte) (int, error)
EventUnmarshalBinary unmarshals a binary representation of itself
func (*ActivityDumpLoadConfig) MarshalBinary ¶ added in v0.40.0
func (adlc *ActivityDumpLoadConfig) MarshalBinary() ([]byte, error)
MarshalBinary marshals a binary representation of itself
func (*ActivityDumpLoadConfig) SetTimeout ¶ added in v0.40.0
func (adlc *ActivityDumpLoadConfig) SetTimeout(duration time.Duration)
SetTimeout updates the timeout of an activity dump
func (*ActivityDumpLoadConfig) UnmarshalBinary ¶ added in v0.40.0
func (adlc *ActivityDumpLoadConfig) UnmarshalBinary(data []byte) error
UnmarshalBinary unmarshals a binary representation of itself
type AddressFamily ¶ added in v0.37.0
type AddressFamily int
AddressFamily represents a family address (AF_INET, AF_INET6, AF_UNIX etc)
func (AddressFamily) String ¶ added in v0.37.0
func (af AddressFamily) String() string
type Architecture ¶ added in v0.68.0
type Architecture int
Architecture represents the CPU architecture
const ( // UnknownArch when arch is unknown UnknownArch Architecture = iota // X86 arch X86 // X8664 represents X86_64 arch, but with a "nicer" naming to pass CI linters X8664 // ARM arch ARM // ARM64 arch ARM64 )
func (Architecture) String ¶ added in v0.68.0
func (a Architecture) String() string
type ArgsEnvs ¶
type ArgsEnvs struct {
ID uint64
Size uint32
ValuesRaw [sharedconsts.MaxArgEnvSize]byte
}
ArgsEnvs raw value for args and envs
type ArgsEnvsEvent ¶
type ArgsEnvsEvent struct {
ArgsEnvs
}
ArgsEnvsEvent defines a args/envs event
func (*ArgsEnvsEvent) UnmarshalBinary ¶
func (e *ArgsEnvsEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type BPFAttachType ¶
type BPFAttachType uint32
BPFAttachType is used to define attach type constants
const ( // BpfCgroupInetIngress attach type BpfCgroupInetIngress BPFAttachType = iota + 1 // BpfCgroupInetEgress attach type BpfCgroupInetEgress // BpfCgroupInetSockCreate attach type BpfCgroupInetSockCreate // BpfCgroupSockOps attach type BpfCgroupSockOps // BpfSkSkbStreamParser attach type BpfSkSkbStreamParser // BpfSkSkbStreamVerdict attach type BpfSkSkbStreamVerdict // BpfCgroupDevice attach type BpfCgroupDevice // BpfSkMsgVerdict attach type BpfSkMsgVerdict // BpfCgroupInet4Bind attach type BpfCgroupInet4Bind // BpfCgroupInet6Bind attach type BpfCgroupInet6Bind // BpfCgroupInet4Connect attach type BpfCgroupInet4Connect // BpfCgroupInet6Connect attach type BpfCgroupInet6Connect // BpfCgroupInet4PostBind attach type BpfCgroupInet4PostBind // BpfCgroupInet6PostBind attach type BpfCgroupInet6PostBind // BpfCgroupUDP4Sendmsg attach type BpfCgroupUDP4Sendmsg // BpfCgroupUDP6Sendmsg attach type BpfCgroupUDP6Sendmsg // BpfLircMode2 attach type BpfLircMode2 // BpfFlowDissector attach type BpfFlowDissector // BpfCgroupSysctl attach type BpfCgroupSysctl // BpfCgroupUDP4Recvmsg attach type BpfCgroupUDP4Recvmsg // BpfCgroupUDP6Recvmsg attach type BpfCgroupUDP6Recvmsg // BpfCgroupGetsockopt attach type BpfCgroupGetsockopt // BpfCgroupSetsockopt attach type BpfCgroupSetsockopt // BpfTraceRawTp attach type BpfTraceRawTp // BpfTraceFentry attach type BpfTraceFentry // BpfTraceFexit attach type BpfTraceFexit // BpfModifyReturn attach type BpfModifyReturn // BpfLsmMac attach type BpfLsmMac // BpfTraceIter attach type BpfTraceIter // BpfCgroupInet4Getpeername attach type BpfCgroupInet4Getpeername // BpfCgroupInet6Getpeername attach type BpfCgroupInet6Getpeername // BpfCgroupInet4Getsockname attach type BpfCgroupInet4Getsockname // BpfCgroupInet6Getsockname attach type BpfCgroupInet6Getsockname // BpfXdpDevmap attach type BpfXdpDevmap // BpfCgroupInetSockRelease attach type BpfCgroupInetSockRelease // BpfXdpCPUmap attach type BpfXdpCPUmap // BpfSkLookup attach type BpfSkLookup // BpfXdp attach type BpfXdp // BpfSkSkbVerdict attach type BpfSkSkbVerdict )
func (BPFAttachType) String ¶
func (t BPFAttachType) String() string
type BPFCmd ¶
type BPFCmd uint64
BPFCmd represents a BPF command
const ( // BpfMapCreateCmd command BpfMapCreateCmd BPFCmd = iota // BpfMapLookupElemCmd command BpfMapLookupElemCmd // BpfMapUpdateElemCmd command BpfMapUpdateElemCmd // BpfMapDeleteElemCmd command BpfMapDeleteElemCmd // BpfMapGetNextKeyCmd command BpfMapGetNextKeyCmd // BpfProgLoadCmd command BpfProgLoadCmd // BpfObjPinCmd command BpfObjPinCmd // BpfObjGetCmd command BpfObjGetCmd // BpfProgAttachCmd command BpfProgAttachCmd // BpfProgDetachCmd command BpfProgDetachCmd // BpfProgTestRunCmd command BpfProgTestRunCmd // BpfProgGetNextIDCmd command BpfProgGetNextIDCmd // BpfMapGetNextIDCmd command BpfMapGetNextIDCmd // BpfProgGetFdByIDCmd command BpfProgGetFdByIDCmd // BpfMapGetFdByIDCmd command BpfMapGetFdByIDCmd // BpfObjGetInfoByFdCmd command BpfObjGetInfoByFdCmd // BpfProgQueryCmd command BpfProgQueryCmd // BpfRawTracepointOpenCmd command BpfRawTracepointOpenCmd // BpfBtfLoadCmd command BpfBtfLoadCmd // BpfBtfGetFdByIDCmd command BpfBtfGetFdByIDCmd // BpfTaskFdQueryCmd command BpfTaskFdQueryCmd // BpfMapLookupAndDeleteElemCmd command BpfMapLookupAndDeleteElemCmd // BpfMapFreezeCmd command BpfMapFreezeCmd // BpfBtfGetNextIDCmd command BpfBtfGetNextIDCmd // BpfMapLookupBatchCmd command BpfMapLookupBatchCmd // BpfMapLookupAndDeleteBatchCmd command BpfMapLookupAndDeleteBatchCmd // BpfMapUpdateBatchCmd command BpfMapUpdateBatchCmd // BpfMapDeleteBatchCmd command BpfMapDeleteBatchCmd // BpfLinkCreateCmd command BpfLinkCreateCmd // BpfLinkUpdateCmd command BpfLinkUpdateCmd // BpfLinkGetFdByIDCmd command BpfLinkGetFdByIDCmd // BpfLinkGetNextIDCmd command BpfLinkGetNextIDCmd // BpfEnableStatsCmd command BpfEnableStatsCmd // BpfIterCreateCmd command BpfIterCreateCmd // BpfLinkDetachCmd command BpfLinkDetachCmd // BpfProgBindMapCmd command BpfProgBindMapCmd )
type BPFEvent ¶
type BPFEvent struct {
SyscallEvent
Map BPFMap `field:"map"` // eBPF map involved in the BPF command
Program BPFProgram `field:"prog"` // eBPF program involved in the BPF command
Cmd uint32 `field:"cmd"` // SECLDoc[cmd] Definition:`BPF command name` Constants:`BPF commands`
}
BPFEvent represents a BPF event
type BPFHelperFunc ¶
type BPFHelperFunc uint32
BPFHelperFunc represents a BPF helper function
const ( // BpfUnspec helper function BpfUnspec BPFHelperFunc = iota // BpfMapLookupElem helper function BpfMapLookupElem // BpfMapUpdateElem helper function BpfMapUpdateElem // BpfMapDeleteElem helper function BpfMapDeleteElem // BpfProbeRead helper function BpfProbeRead // BpfKtimeGetNs helper function BpfKtimeGetNs // BpfTracePrintk helper function BpfTracePrintk // BpfGetPrandomU32 helper function BpfGetPrandomU32 // BpfGetSmpProcessorID helper function BpfGetSmpProcessorID // BpfSkbStoreBytes helper function BpfSkbStoreBytes // BpfL3CsumReplace helper function BpfL3CsumReplace // BpfL4CsumReplace helper function BpfL4CsumReplace // BpfTailCall helper function BpfTailCall // BpfCloneRedirect helper function BpfCloneRedirect // BpfGetCurrentPidTgid helper function BpfGetCurrentPidTgid // BpfGetCurrentUIDGid helper function BpfGetCurrentUIDGid // BpfGetCurrentComm helper function BpfGetCurrentComm // BpfGetCgroupClassid helper function BpfGetCgroupClassid // BpfSkbVlanPush helper function BpfSkbVlanPush // BpfSkbVlanPop helper function BpfSkbVlanPop // BpfSkbGetTunnelKey helper function BpfSkbGetTunnelKey // BpfSkbSetTunnelKey helper function BpfSkbSetTunnelKey // BpfPerfEventRead helper function BpfPerfEventRead // BpfRedirect helper function BpfRedirect // BpfGetRouteRealm helper function BpfGetRouteRealm // BpfPerfEventOutput helper function BpfPerfEventOutput // BpfSkbLoadBytes helper function BpfSkbLoadBytes // BpfGetStackid helper function BpfGetStackid // BpfCsumDiff helper function BpfCsumDiff // BpfSkbGetTunnelOpt helper function BpfSkbGetTunnelOpt // BpfSkbSetTunnelOpt helper function BpfSkbSetTunnelOpt // BpfSkbChangeProto helper function BpfSkbChangeProto // BpfSkbChangeType helper function BpfSkbChangeType // BpfSkbUnderCgroup helper function BpfSkbUnderCgroup // BpfGetHashRecalc helper function BpfGetHashRecalc // BpfGetCurrentTask helper function BpfGetCurrentTask // BpfProbeWriteUser helper function BpfProbeWriteUser // BpfCurrentTaskUnderCgroup helper function BpfCurrentTaskUnderCgroup // BpfSkbChangeTail helper function BpfSkbChangeTail // BpfSkbPullData helper function BpfSkbPullData // BpfCsumUpdate helper function BpfCsumUpdate // BpfSetHashInvalid helper function BpfSetHashInvalid // BpfGetNumaNodeID helper function BpfGetNumaNodeID // BpfSkbChangeHead helper function BpfSkbChangeHead // BpfXdpAdjustHead helper function BpfXdpAdjustHead // BpfProbeReadStr helper function BpfProbeReadStr // BpfGetSocketCookie helper function BpfGetSocketCookie // BpfGetSocketUID helper function BpfGetSocketUID // BpfSetHash helper function BpfSetHash // BpfSetsockopt helper function BpfSetsockopt // BpfSkbAdjustRoom helper function BpfSkbAdjustRoom // BpfRedirectMap helper function BpfRedirectMap // BpfSkRedirectMap helper function BpfSkRedirectMap // BpfSockMapUpdate helper function BpfSockMapUpdate // BpfXdpAdjustMeta helper function BpfXdpAdjustMeta // BpfPerfEventReadValue helper function BpfPerfEventReadValue // BpfPerfProgReadValue helper function BpfPerfProgReadValue // BpfGetsockopt helper function BpfGetsockopt // BpfOverrideReturn helper function BpfOverrideReturn // BpfSockOpsCbFlagsSet helper function BpfSockOpsCbFlagsSet // BpfMsgRedirectMap helper function BpfMsgRedirectMap // BpfMsgApplyBytes helper function BpfMsgApplyBytes // BpfMsgCorkBytes helper function BpfMsgCorkBytes // BpfMsgPullData helper function BpfMsgPullData // BpfBind helper function BpfBind // BpfXdpAdjustTail helper function BpfXdpAdjustTail // BpfSkbGetXfrmState helper function BpfSkbGetXfrmState // BpfGetStack helper function BpfGetStack // BpfSkbLoadBytesRelative helper function BpfSkbLoadBytesRelative // BpfFibLookup helper function BpfFibLookup // BpfSockHashUpdate helper function BpfSockHashUpdate // BpfMsgRedirectHash helper function BpfMsgRedirectHash // BpfSkRedirectHash helper function BpfSkRedirectHash // BpfLwtPushEncap helper function BpfLwtPushEncap // BpfLwtSeg6StoreBytes helper function BpfLwtSeg6StoreBytes // BpfLwtSeg6AdjustSrh helper function BpfLwtSeg6AdjustSrh // BpfLwtSeg6Action helper function BpfLwtSeg6Action // BpfRcRepeat helper function BpfRcRepeat // BpfRcKeydown helper function BpfRcKeydown // BpfSkbCgroupID helper function BpfSkbCgroupID // BpfGetCurrentCgroupID helper function BpfGetCurrentCgroupID // BpfGetLocalStorage helper function BpfGetLocalStorage // BpfSkSelectReuseport helper function BpfSkSelectReuseport // BpfSkbAncestorCgroupID helper function BpfSkbAncestorCgroupID // BpfSkLookupTCP helper function BpfSkLookupTCP // BpfSkLookupUDP helper function BpfSkLookupUDP // BpfSkRelease helper function BpfSkRelease // BpfMapPushElem helper function BpfMapPushElem // BpfMapPopElem helper function BpfMapPopElem // BpfMapPeekElem helper function BpfMapPeekElem // BpfMsgPushData helper function BpfMsgPushData // BpfMsgPopData helper function BpfMsgPopData // BpfRcPointerRel helper function BpfRcPointerRel // BpfSpinLock helper function BpfSpinLock // BpfSpinUnlock helper function BpfSpinUnlock // BpfSkFullsock helper function BpfSkFullsock // BpfTCPSock helper function BpfTCPSock // BpfSkbEcnSetCe helper function BpfSkbEcnSetCe // BpfGetListenerSock helper function BpfGetListenerSock // BpfSkcLookupTCP helper function BpfSkcLookupTCP BpfTCPCheckSyncookie // BpfSysctlGetName helper function BpfSysctlGetName // BpfSysctlGetCurrentValue helper function BpfSysctlGetCurrentValue // BpfSysctlGetNewValue helper function BpfSysctlGetNewValue // BpfSysctlSetNewValue helper function BpfSysctlSetNewValue // BpfStrtol helper function BpfStrtol // BpfStrtoul helper function BpfStrtoul // BpfSkStorageGet helper function BpfSkStorageGet // BpfSkStorageDelete helper function BpfSkStorageDelete // BpfSendSignal helper function BpfSendSignal BpfTCPGenSyncookie // BpfSkbOutput helper function BpfSkbOutput // BpfProbeReadUser helper function BpfProbeReadUser // BpfProbeReadKernel helper function BpfProbeReadKernel // BpfProbeReadUserStr helper function BpfProbeReadUserStr // BpfProbeReadKernelStr helper function BpfProbeReadKernelStr // BpfTCPSendAck helper function BpfTCPSendAck // BpfSendSignalThread helper function BpfSendSignalThread // BpfJiffies64 helper function BpfJiffies64 // BpfReadBranchRecords helper function BpfReadBranchRecords // BpfGetNsCurrentPidTgid helper function BpfGetNsCurrentPidTgid // BpfXdpOutput helper function BpfXdpOutput // BpfGetNetnsCookie helper function BpfGetNetnsCookie // BpfGetCurrentAncestorCgroupID helper function BpfGetCurrentAncestorCgroupID // BpfSkAssign helper function BpfSkAssign // BpfKtimeGetBootNs helper function BpfKtimeGetBootNs // BpfSeqPrintf helper function BpfSeqPrintf // BpfSeqWrite helper function BpfSeqWrite // BpfSkCgroupID helper function BpfSkCgroupID // BpfSkAncestorCgroupID helper function BpfSkAncestorCgroupID // BpfRingbufOutput helper function BpfRingbufOutput // BpfRingbufReserve helper function BpfRingbufReserve // BpfRingbufSubmit helper function BpfRingbufSubmit // BpfRingbufDiscard helper function BpfRingbufDiscard // BpfRingbufQuery helper function BpfRingbufQuery // BpfCsumLevel helper function BpfCsumLevel // BpfSkcToTCP6Sock helper function BpfSkcToTCP6Sock // BpfSkcToTCPSock helper function BpfSkcToTCPSock // BpfSkcToTCPTimewaitSock helper function BpfSkcToTCPTimewaitSock // BpfSkcToTCPRequestSock helper function BpfSkcToTCPRequestSock // BpfSkcToUDP6Sock helper function BpfSkcToUDP6Sock // BpfGetTaskStack helper function BpfGetTaskStack // BpfLoadHdrOpt helper function BpfLoadHdrOpt // BpfStoreHdrOpt helper function BpfStoreHdrOpt // BpfReserveHdrOpt helper function BpfReserveHdrOpt // BpfInodeStorageGet helper function BpfInodeStorageGet // BpfInodeStorageDelete helper function BpfInodeStorageDelete // BpfDPath helper function BpfDPath // BpfCopyFromUser helper function BpfCopyFromUser // BpfSnprintfBtf helper function BpfSnprintfBtf // BpfSeqPrintfBtf helper function BpfSeqPrintfBtf // BpfSkbCgroupClassid helper function BpfSkbCgroupClassid // BpfRedirectNeigh helper function BpfRedirectNeigh // BpfPerCPUPtr helper function BpfPerCPUPtr // BpfThisCPUPtr helper function BpfThisCPUPtr // BpfRedirectPeer helper function BpfRedirectPeer // BpfTaskStorageGet helper function BpfTaskStorageGet // BpfTaskStorageDelete helper function BpfTaskStorageDelete // BpfGetCurrentTaskBtf helper function BpfGetCurrentTaskBtf // BpfBprmOptsSet helper function BpfBprmOptsSet // BpfKtimeGetCoarseNs helper function BpfKtimeGetCoarseNs // BpfImaInodeHash helper function BpfImaInodeHash // BpfSockFromFile helper function BpfSockFromFile // BpfCheckMtu helper function BpfCheckMtu // BpfForEachMapElem helper function BpfForEachMapElem // BpfSnprintf helper function BpfSnprintf )
func (BPFHelperFunc) String ¶
func (f BPFHelperFunc) String() string
type BPFMap ¶
type BPFMap struct {
ID uint32 `field:"-"` // ID of the eBPF map
Type uint32 `field:"type"` // SECLDoc[type] Definition:`Type of the eBPF map` Constants:`BPF map types`
Name string `field:"name"` // SECLDoc[name] Definition:`Name of the eBPF map (added in 7.35)`
}
BPFMap represents a BPF map
type BPFMapType ¶
type BPFMapType uint32
BPFMapType is used to define map type constants
const ( // BpfMapTypeUnspec map type BpfMapTypeUnspec BPFMapType = iota // BpfMapTypeHash map type BpfMapTypeHash // BpfMapTypeArray map type BpfMapTypeArray // BpfMapTypeProgArray map type BpfMapTypeProgArray // BpfMapTypePerfEventArray map type BpfMapTypePerfEventArray // BpfMapTypePercpuHash map type BpfMapTypePercpuHash // BpfMapTypePercpuArray map type BpfMapTypePercpuArray // BpfMapTypeStackTrace map type BpfMapTypeStackTrace // BpfMapTypeCgroupArray map type BpfMapTypeCgroupArray // BpfMapTypeLruHash map type BpfMapTypeLruHash // BpfMapTypeLruPercpuHash map type BpfMapTypeLruPercpuHash // BpfMapTypeLpmTrie map type BpfMapTypeLpmTrie // BpfMapTypeArrayOfMaps map type BpfMapTypeArrayOfMaps // BpfMapTypeHashOfMaps map type BpfMapTypeHashOfMaps // BpfMapTypeDevmap map type BpfMapTypeDevmap // BpfMapTypeSockmap map type BpfMapTypeSockmap // BpfMapTypeCPUmap map type BpfMapTypeCPUmap // BpfMapTypeXskmap map type BpfMapTypeXskmap // BpfMapTypeSockhash map type BpfMapTypeSockhash // BpfMapTypeCgroupStorage map type BpfMapTypeCgroupStorage // BpfMapTypeReuseportSockarray map type BpfMapTypeReuseportSockarray // BpfMapTypePercpuCgroupStorage map type BpfMapTypePercpuCgroupStorage // BpfMapTypeQueue map type BpfMapTypeQueue // BpfMapTypeStack map type BpfMapTypeStack // BpfMapTypeSkStorage map type BpfMapTypeSkStorage // BpfMapTypeDevmapHash map type BpfMapTypeDevmapHash // BpfMapTypeStructOps map type BpfMapTypeStructOps // BpfMapTypeRingbuf map type BpfMapTypeRingbuf // BpfMapTypeInodeStorage map type BpfMapTypeInodeStorage // BpfMapTypeTaskStorage map type BpfMapTypeTaskStorage )
func (BPFMapType) String ¶
func (t BPFMapType) String() string
type BPFProgram ¶
type BPFProgram struct {
ID uint32 `field:"-"` // ID of the eBPF program
Type uint32 `field:"type"` // SECLDoc[type] Definition:`Type of the eBPF program` Constants:`BPF program types`
AttachType uint32 `field:"attach_type"` // SECLDoc[attach_type] Definition:`Attach type of the eBPF program` Constants:`BPF attach types`
Helpers []uint32 `field:"helpers"` // SECLDoc[helpers] Definition:`eBPF helpers used by the eBPF program (added in 7.35)` Constants:`BPF helper functions`
Name string `field:"name"` // SECLDoc[name] Definition:`Name of the eBPF program (added in 7.35)`
Tag string `field:"tag"` // SECLDoc[tag] Definition:`Hash (sha1) of the eBPF program (added in 7.35)`
}
BPFProgram represents a BPF program
func (*BPFProgram) UnmarshalBinary ¶
func (p *BPFProgram) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type BPFProgramType ¶
type BPFProgramType uint32
BPFProgramType is used to define program type constants
const ( // BpfProgTypeUnspec program type BpfProgTypeUnspec BPFProgramType = iota // BpfProgTypeSocketFilter program type BpfProgTypeSocketFilter // BpfProgTypeKprobe program type BpfProgTypeKprobe // BpfProgTypeSchedCls program type BpfProgTypeSchedCls // BpfProgTypeSchedAct program type BpfProgTypeSchedAct // BpfProgTypeTracepoint program type BpfProgTypeTracepoint // BpfProgTypeXdp program type BpfProgTypeXdp // BpfProgTypePerfEvent program type BpfProgTypePerfEvent // BpfProgTypeCgroupSkb program type BpfProgTypeCgroupSkb // BpfProgTypeCgroupSock program type BpfProgTypeCgroupSock // BpfProgTypeLwtIn program type BpfProgTypeLwtIn // BpfProgTypeLwtOut program type BpfProgTypeLwtOut // BpfProgTypeLwtXmit program type BpfProgTypeLwtXmit // BpfProgTypeSockOps program type BpfProgTypeSockOps // BpfProgTypeSkSkb program type BpfProgTypeSkSkb // BpfProgTypeCgroupDevice program type BpfProgTypeCgroupDevice // BpfProgTypeSkMsg program type BpfProgTypeSkMsg // BpfProgTypeRawTracepoint program type BpfProgTypeRawTracepoint // BpfProgTypeCgroupSockAddr program type BpfProgTypeCgroupSockAddr // BpfProgTypeLwtSeg6local program type BpfProgTypeLwtSeg6local // BpfProgTypeLircMode2 program type BpfProgTypeLircMode2 // BpfProgTypeSkReuseport program type BpfProgTypeSkReuseport // BpfProgTypeFlowDissector program type BpfProgTypeFlowDissector // BpfProgTypeCgroupSysctl program type BpfProgTypeCgroupSysctl // BpfProgTypeRawTracepointWritable program type BpfProgTypeRawTracepointWritable // BpfProgTypeCgroupSockopt program type BpfProgTypeCgroupSockopt // BpfProgTypeTracing program type BpfProgTypeTracing // BpfProgTypeStructOps program type BpfProgTypeStructOps // BpfProgTypeExt program type BpfProgTypeExt // BpfProgTypeLsm program type BpfProgTypeLsm // BpfProgTypeSkLookup program type BpfProgTypeSkLookup )
func (BPFProgramType) String ¶
func (t BPFProgramType) String() string
type BaseEvent ¶ added in v0.48.0
type BaseEvent struct {
ID string `field:"-"`
Type uint32 `field:"-"`
Flags uint32 `field:"-"`
TimestampRaw uint64 `field:"event.timestamp,handler:ResolveEventTimestamp"` // SECLDoc[event.timestamp] Definition:`Timestamp of the event`
Timestamp time.Time `field:"timestamp,opts:getters_only|gen_getters,handler:ResolveEventTime"`
Rules []*MatchedRule `field:"-"`
RuleContext RuleContext `field:"-"`
ActionReports []ActionReport `field:"-"`
Os string `field:"event.os"` // SECLDoc[event.os] Definition:`Operating system of the event`
Origin string `field:"event.origin"` // SECLDoc[event.origin] Definition:`Origin of the event`
Service string `field:"event.service,handler:ResolveService,opts:skip_ad|gen_getters"` // SECLDoc[event.service] Definition:`Service associated with the event`
Hostname string `field:"event.hostname,handler:ResolveHostname"` // SECLDoc[event.hostname] Definition:`Hostname associated with the event`
RuleTags []string `field:"event.rule.tags"` // SECLDoc[event.rule.tags] Definition:`Tags associated with the rule that's used to evaluate the event`
Source string `field:"event.source,handler:ResolveSource"` // SECLDoc[event.source] Definition:`[Experimental] Source of the event. Can be either 'runtime' or 'snapshot'.`
// context shared with all event types
ProcessContext *ProcessContext `field:"process"`
SecurityProfileContext SecurityProfileContext `field:"-"`
// internal usage
PIDContext PIDContext `field:"-"`
ProcessCacheEntry *ProcessCacheEntry `field:"-"`
// mark event with having error
Error error `field:"-"`
// field resolution
FieldHandlers FieldHandlers `field:"-"`
}
BaseEvent represents an event sent from the kernel
type BaseExtraFieldHandlers ¶ added in v0.50.0
type BaseExtraFieldHandlers interface {
ResolveProcessCacheEntry(ev *Event, newEntryCb func(*ProcessCacheEntry, error)) (*ProcessCacheEntry, bool)
ResolveProcessCacheEntryFromPID(pid uint32) *ProcessCacheEntry
}
BaseExtraFieldHandlers handlers not hold by any field
type BinaryMarshaler ¶ added in v0.36.0
BinaryMarshaler interface implemented by every event type
type BinaryUnmarshaler ¶
BinaryUnmarshaler interface implemented by every event type
type BindEvent ¶ added in v0.37.0
type BindEvent struct {
SyscallEvent
Addr IPPortContext `field:"addr"` // Bound address
AddrFamily uint16 `field:"addr.family"` // SECLDoc[addr.family] Definition:`Address family`
Protocol uint16 `field:"protocol"` // SECLDoc[protocol] Definition:`Socket Protocol`
SampleCookie uint64 `field:"-"`
}
BindEvent represents a bind event
type CGroupContext ¶ added in v0.57.0
type CGroupContext struct {
*Releasable
CGroupID containerutils.CGroupID `field:"id"` // SECLDoc[id] Definition:`ID of the cgroup`
CGroupPathKey PathKey `field:"file"`
CGroupVersion int `field:"version,handler:ResolveCGroupVersion"` // SECLDoc[version] Definition:`[Experimental] Version of the cgroup API`
CGroupSource CGroupSource `field:"-"`
CreatedAt uint64 `field:"created_at,opts:gen_getters"` // SECLDoc[created_at] Definition:`Timestamp of the creation of the cgroup`
}
CGroupContext holds the cgroup context of an event
func (*CGroupContext) Equals ¶ added in v0.76.0
func (cg *CGroupContext) Equals(cg2 *CGroupContext) bool
Equals returns true if the two cgroup contexts are equal
func (*CGroupContext) Hash ¶ added in v0.65.0
func (cg *CGroupContext) Hash() eval.ScopeHashKey
Hash returns a unique key for the entity
func (*CGroupContext) IsNull ¶ added in v0.76.0
func (cg *CGroupContext) IsNull() bool
IsNull returns true if the cgroup context is null
func (*CGroupContext) IsResolved ¶ added in v0.76.0
func (cg *CGroupContext) IsResolved() bool
IsResolved returns true if the cgroup context is resolved & not null
func (*CGroupContext) ParentScope ¶ added in v0.68.0
func (cg *CGroupContext) ParentScope() (eval.VariableScope, bool)
ParentScope returns the parent entity scope
func (*CGroupContext) UnixCreatedAt ¶ added in v0.79.0
func (cg *CGroupContext) UnixCreatedAt() time.Time
UnixCreatedAt returns the creation time of the cgroup
func (*CGroupContext) UnmarshalBinary ¶ added in v0.57.0
func (e *CGroupContext) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type CGroupSource ¶ added in v0.79.0
type CGroupSource uint64
CGroupSource indicates the origin of a cgroup entry
const ( // CGroupSourceUnknown defines a cgroup entry from an unknown source CGroupSourceUnknown CGroupSource = iota // CGroupSourceEvent defines a cgroup entry populated from a kernel event CGroupSourceEvent // CGroupSourceProcFS defines a cgroup entry populated from the procfs fallback CGroupSourceProcFS )
func (CGroupSource) String ¶ added in v0.79.0
func (s CGroupSource) String() string
String returns a string representation of the cgroup source
type CapabilitiesEvent ¶ added in v0.71.0
type CapabilitiesEvent struct {
Attempted uint64 `field:"attempted,handler:ResolveCapabilitiesAttempted"` // SECLDoc[attempted] Definition:`Bitmask of the capabilities that the process attempted to use since it started running` Constants:`Kernel Capability constants`
Used uint64 `field:"used,handler:ResolveCapabilitiesUsed"` // SECLDoc[used] Definition:`Bitmask of the capabilities that the process successfully used since it started running` Constants:`Kernel Capability constants`
// A check against the initial user namespace is denied as soon as the process lives in a
// descendant one, so these two subsets are what running in a user namespace would take away.
AttemptedHostUserNS uint64 `field:"attempted_host_userns,handler:ResolveCapabilitiesAttemptedHostUserNS"` // SECLDoc[attempted_host_userns] Definition:`Bitmask of the capabilities that the process attempted to use since it started running, through checks that always target the initial user namespace` Constants:`Kernel Capability constants`
UsedHostUserNS uint64 `field:"used_host_userns,handler:ResolveCapabilitiesUsedHostUserNS"` // SECLDoc[used_host_userns] Definition:`Bitmask of the capabilities that the process successfully used since it started running, through checks that always target the initial user namespace` Constants:`Kernel Capability constants`
// Cookie identifies the program the usage was aggregated for. It is matched against the
// resolved process cache entry, which is the wrong one whenever the exec or fork event
// that introduced that program was missed.
Cookie uint64 `field:"-"`
}
CapabilitiesEvent is used to report capabilities usage
func (*CapabilitiesEvent) UnmarshalBinary ¶ added in v0.71.0
func (e *CapabilitiesEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type CapsetEvent ¶
type CapsetEvent struct {
CapEffective uint64 `field:"cap_effective"` // SECLDoc[cap_effective] Definition:`Effective capability set of the process` Constants:`Kernel Capability constants`
CapPermitted uint64 `field:"cap_permitted"` // SECLDoc[cap_permitted] Definition:`Permitted capability set of the process` Constants:`Kernel Capability constants`
}
CapsetEvent represents a capset event
func (*CapsetEvent) UnmarshalBinary ¶
func (e *CapsetEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type CgroupTracingEvent ¶ added in v0.36.0
type CgroupTracingEvent struct {
ContainerContext ContainerContext
CGroupContext CGroupContext
Config ActivityDumpLoadConfig
Pid uint32
ConfigCookie uint64
}
CgroupTracingEvent is used to signal that a new cgroup should be traced by the activity dump manager
func (*CgroupTracingEvent) UnmarshalBinary ¶ added in v0.36.0
func (e *CgroupTracingEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshals a binary representation of itself
type CgroupWriteEvent ¶ added in v0.57.0
type CgroupWriteEvent struct {
File FileEvent `field:"file"` // File pointing to the cgroup
Pid uint32 `field:"pid"` // SECLDoc[pid] Definition:`PID of the process added to the cgroup`
Retval int32 `field:"-"`
}
CgroupWriteEvent is used to signal that a new cgroup was created
func (*CgroupWriteEvent) UnmarshalBinary ¶ added in v0.57.0
func (e *CgroupWriteEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshals a binary representation of itself
type ChdirEvent ¶ added in v0.51.1
type ChdirEvent struct {
SyscallEvent
SyscallContext
File FileEvent `field:"file"`
// Syscall context aliases
SyscallPath string `field:"syscall.path,ref:chdir.syscall.str1"` // SECLDoc[syscall.path] Definition:`path argument of the syscall`
}
ChdirEvent represents a chdir event
func (*ChdirEvent) UnmarshalBinary ¶ added in v0.51.1
func (e *ChdirEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type ChmodEvent ¶
type ChmodEvent struct {
SyscallEvent
SyscallContext
File FileEvent `field:"file"`
Mode uint32 `field:"file.destination.mode; file.destination.rights"` // SECLDoc[file.destination.mode] Definition:`New mode of the chmod-ed file` Constants:`File mode constants` SECLDoc[file.destination.rights] Definition:`New rights of the chmod-ed file` Constants:`File mode constants`
// Syscall context aliases
SyscallPath string `field:"syscall.path,ref:chmod.syscall.str1"` // SECLDoc[syscall.path] Definition:`path argument of the syscall`
SyscallMode int64 `field:"syscall.mode,ref:chmod.syscall.int2"` // SECLDoc[syscall.mode] Definition:`mode argument of the syscall`
}
ChmodEvent represents a chmod event
func (*ChmodEvent) UnmarshalBinary ¶
func (e *ChmodEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type ChownEvent ¶
type ChownEvent struct {
SyscallEvent
SyscallContext
File FileEvent `field:"file"`
UID int64 `field:"file.destination.uid"` // SECLDoc[file.destination.uid] Definition:`New UID of the chown-ed file's owner`
User string `field:"file.destination.user,handler:ResolveChownUID"` // SECLDoc[file.destination.user] Definition:`New user of the chown-ed file's owner`
GID int64 `field:"file.destination.gid"` // SECLDoc[file.destination.gid] Definition:`New GID of the chown-ed file's owner`
Group string `field:"file.destination.group,handler:ResolveChownGID"` // SECLDoc[file.destination.group] Definition:`New group of the chown-ed file's owner`
// Syscall context aliases
SyscallPath string `field:"syscall.path,ref:chown.syscall.str1"` // SECLDoc[syscall.path] Definition:`Path argument of the syscall`
SyscallUID int64 `field:"syscall.uid,ref:chown.syscall.int2"` // SECLDoc[syscall.uid] Definition:`UID argument of the syscall`
SyscallGID int64 `field:"syscall.gid,ref:chown.syscall.int3"` // SECLDoc[syscall.gid] Definition:`GID argument of the syscall`
}
ChownEvent represents a chown event
func (*ChownEvent) UnmarshalBinary ¶
func (e *ChownEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type CloneFlags ¶ added in v0.84.0
type CloneFlags uint64
CloneFlags represents a clone flags bitmask value, as passed to unshare
func (CloneFlags) String ¶ added in v0.84.0
func (cf CloneFlags) String() string
func (CloneFlags) StringArray ¶ added in v0.84.0
func (cf CloneFlags) StringArray() []string
StringArray returns the clone flags as an array of strings
type CompressionType ¶ added in v0.68.0
type CompressionType int
CompressionType represents the type of compression used
const ( // NoCompression When there is no compression NoCompression CompressionType = iota // GZip compression GZip // Zip compression Zip // Zstd compression Zstd // SevenZip compression SevenZip // BZip2 compression BZip2 // XZ compression XZ )
func (CompressionType) String ¶ added in v0.68.0
func (ct CompressionType) String() string
type ConnectEvent ¶ added in v0.60.0
type ConnectEvent struct {
SyscallEvent
Addr IPPortContext `field:"addr"` // Connection address
Hostnames []string `field:"addr.hostname,handler:ResolveConnectHostnames,opts:skip_ad|root_domain|length"` // SECLDoc[addr.hostname] Definition:`Address hostname (if available)`
AddrFamily uint16 `field:"addr.family"` // SECLDoc[addr.family] Definition:`Address family`
Protocol uint16 `field:"protocol"` // SECLDoc[protocol] Definition:`Socket Protocol`
SampleCookie uint64 `field:"-"`
}
ConnectEvent represents a connect event
func (*ConnectEvent) UnmarshalBinary ¶ added in v0.60.0
func (e *ConnectEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type ContainerContext ¶
type ContainerContext struct {
*Releasable
ContainerID containerutils.ContainerID `field:"id,opts:gen_getters"` // SECLDoc[id] Definition:`ID of the container`
PodUID string `field:"pod_uid,opts:gen_getters"` // SECLDoc[pod_uid] Definition:`Kubernetes pod UID`
ECSTaskID string `field:"ecs_task_id,opts:gen_getters"` // SECLDoc[ecs_task_id] Definition:`ECS task ID`
CreatedAt uint64 `field:"created_at,opts:gen_getters"` // SECLDoc[created_at] Definition:`Timestamp of the creation of the container“
Tags []string `field:"tags,handler:ResolveContainerTags,opts:skip_ad,weight:9999"` // SECLDoc[tags] Definition:`Tags of the container`
ContainerSource ContainerSource `field:"-"`
}
ContainerContext holds the container context of an event
func (*ContainerContext) Hash ¶ added in v0.65.0
func (c *ContainerContext) Hash() eval.ScopeHashKey
Hash returns a unique key for the entity
func (*ContainerContext) IsNull ¶ added in v0.76.0
func (c *ContainerContext) IsNull() bool
IsNull returns true if the container context is null
func (*ContainerContext) ParentScope ¶ added in v0.68.0
func (c *ContainerContext) ParentScope() (eval.VariableScope, bool)
ParentScope returns the parent entity scope
func (*ContainerContext) UnixCreatedAt ¶ added in v0.77.0
func (c *ContainerContext) UnixCreatedAt() time.Time
UnixCreatedAt returns the creation time of the container
type ContainerSource ¶ added in v0.79.0
type ContainerSource uint64
ContainerSource indicates the origin of a container entry
const ( // ContainerSourceUnknown defines a container entry from an unknown source ContainerSourceUnknown ContainerSource = iota // ContainerSourceEvent defines a container entry populated from a kernel event ContainerSourceEvent // ContainerSourceProcFS defines a container entry populated from the procfs fallback ContainerSourceProcFS )
func (ContainerSource) String ¶ added in v0.79.0
func (s ContainerSource) String() string
String returns a string representation of the container source
type CredentialSource ¶ added in v0.85.0
type CredentialSource uint32
CredentialSource identifies the endpoint that served an IMDS event
const ( // CredentialSourceUnknown is used when the credential endpoint could not be resolved CredentialSourceUnknown CredentialSource = iota // CredentialSourceIMDS is the cloud provider instance metadata service CredentialSourceIMDS // CredentialSourceEKSPodIdentity is the EKS Pod Identity Agent CredentialSourceEKSPodIdentity // CredentialSourceECS is the ECS task credential endpoint CredentialSourceECS )
func (CredentialSource) String ¶ added in v0.85.0
func (cs CredentialSource) String() string
String returns the SECL representation of the credential source
type Credentials ¶
type Credentials struct {
UID uint32 `field:"uid"` // SECLDoc[uid] Definition:`UID of the process`
GID uint32 `field:"gid"` // SECLDoc[gid] Definition:`GID of the process`
User string `field:"user"` // SECLDoc[user] Definition:`User of the process` Example:`process.user == "root"` Description:`Constrain an event to be triggered by a process running as the root user.`
Group string `field:"group"` // SECLDoc[group] Definition:`Group of the process`
EUID uint32 `field:"euid"` // SECLDoc[euid] Definition:`Effective UID of the process`
EGID uint32 `field:"egid"` // SECLDoc[egid] Definition:`Effective GID of the process`
EUser string `field:"euser"` // SECLDoc[euser] Definition:`Effective user of the process`
EGroup string `field:"egroup"` // SECLDoc[egroup] Definition:`Effective group of the process`
FSUID uint32 `field:"fsuid"` // SECLDoc[fsuid] Definition:`FileSystem-uid of the process`
FSGID uint32 `field:"fsgid"` // SECLDoc[fsgid] Definition:`FileSystem-gid of the process`
FSUser string `field:"fsuser"` // SECLDoc[fsuser] Definition:`FileSystem-user of the process`
FSGroup string `field:"fsgroup"` // SECLDoc[fsgroup] Definition:`FileSystem-group of the process`
AUID uint32 `field:"auid"` // SECLDoc[auid] Definition:`Login UID of the process`
CapEffective uint64 `field:"cap_effective"` // SECLDoc[cap_effective] Definition:`Effective capability set of the process` Constants:`Kernel Capability constants`
CapPermitted uint64 `field:"cap_permitted"` // SECLDoc[cap_permitted] Definition:`Permitted capability set of the process` Constants:`Kernel Capability constants`
}
Credentials represents the kernel credentials of a process
func (*Credentials) Equals ¶ added in v0.47.0
func (c *Credentials) Equals(o *Credentials) bool
Equals returns if both credentials are equal
func (*Credentials) MarshalBinary ¶ added in v0.36.0
func (e *Credentials) MarshalBinary(data []byte) (int, error)
MarshalBinary marshalls a binary representation of itself
func (*Credentials) UnmarshalBinary ¶
func (e *Credentials) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type DNSEvent ¶ added in v0.36.0
type DNSEvent struct {
ID uint16 `field:"id"` // SECLDoc[id] Definition:`[Experimental] the DNS request ID`
Question DNSQuestion `field:"question"`
Response *DNSResponse `field:"response,check:HasResponse"`
}
DNSEvent represents a DNS request event
func (*DNSEvent) HasResponse ¶ added in v0.67.0
HasResponse returns whether the DNS event has a response
type DNSQuestion ¶ added in v0.67.0
type DNSQuestion struct {
Name string `field:"name,opts:length|root_domain" op_override:"eval.CaseInsensitiveCmp"` // SECLDoc[name] Definition:`the queried domain name`
Type uint16 `field:"type"` // SECLDoc[type] Definition:`a two octet code which specifies the DNS question type` Constants:`DNS qtypes`
Class uint16 `field:"class"` // SECLDoc[class] Definition:`the class looked up by the DNS question` Constants:`DNS qclasses`
Size uint16 `field:"length"` // SECLDoc[length] Definition:`the total DNS request size in bytes`
Count uint16 `field:"count"` // SECLDoc[count] Definition:`the total count of questions in the DNS request`
}
DNSQuestion represents the dns question
type DNSResponse ¶ added in v0.67.0
type DNSResponse struct {
ResponseCode uint8 `field:"code,default:-1"` // SECLDoc[code] Definition:`Response code of the DNS response according to RFC 1035` Constants:`DNS Responses`
IPs []net.IPNet `field:"ips"` // SECLDoc[ips] Definition:`IP addresses resolved by the DNS response`
CNames []string `field:"cnames" op_override:"eval.CaseInsensitiveCmp"` // SECLDoc[cnames] Definition:`CNAME targets returned by the DNS response`
}
DNSResponse represents a DNS response event
type DelayabledEvent ¶ added in v0.77.0
type EnvsEntry ¶
EnvsEntry defines a args cache entry
func (*EnvsEntry) FilterEnvs ¶ added in v0.39.0
FilterEnvs returns an array of envs, only the name of each variable is returned unless the variable name is part of the provided filter
type ErrInvalidKeyPath ¶ added in v0.44.0
ErrInvalidKeyPath is returned when inode or mountid are not valid
func (*ErrInvalidKeyPath) Error ¶ added in v0.44.0
func (e *ErrInvalidKeyPath) Error() string
type ErrProcessBrokenLineage ¶ added in v0.50.0
type ErrProcessBrokenLineage struct {
Err error
}
ErrProcessBrokenLineage returned when a process lineage is broken
func (*ErrProcessBrokenLineage) Error ¶ added in v0.50.0
func (e *ErrProcessBrokenLineage) Error() string
Error implements the error interface
func (*ErrProcessBrokenLineage) Unwrap ¶ added in v0.50.0
func (e *ErrProcessBrokenLineage) Unwrap() error
Unwrap implements the error interface
type ErrProcessIncompleteLineage ¶ added in v0.50.0
ErrProcessIncompleteLineage used when the lineage is incorrect in term of pid/ppid
func (*ErrProcessIncompleteLineage) Error ¶ added in v0.50.0
func (e *ErrProcessIncompleteLineage) Error() string
type ErrProcessMissingParentNode ¶ added in v0.50.0
ErrProcessMissingParentNode used when the lineage is incorrect in term of pid/ppid
func (*ErrProcessMissingParentNode) Error ¶ added in v0.50.0
func (e *ErrProcessMissingParentNode) Error() string
type ErrProcessWrongParentNode ¶ added in v0.50.0
ErrProcessWrongParentNode used when the lineage is correct in term of pid/ppid but an exec parent is missing
func (*ErrProcessWrongParentNode) Error ¶ added in v0.50.0
func (e *ErrProcessWrongParentNode) Error() string
type Event ¶
type Event struct {
BaseEvent
Signature string `field:"event.signature,handler:ResolveSignature,weight:500,opts:skip_ad"` // SECLDoc[event.signature] Definition:`Signature of the process pid and its cgroup with agent secret key`
// globals
Async bool `field:"event.async,handler:ResolveAsync"` // SECLDoc[event.async] Definition:`True if the syscall was asynchronous`
// context
SpanContext SpanContext `field:"-"`
GoLabels GoLabelsContext `field:"-"`
NetworkContext NetworkContext `field:"network" restricted_to:"dns,imds,packet"` // [7.36] [Network] Network context
// fim events
Chmod ChmodEvent `field:"chmod" event:"chmod"` // [7.27] [File] A file's permissions were changed
Chown ChownEvent `field:"chown" event:"chown"` // [7.27] [File] A file's owner was changed
Open OpenEvent `field:"open" event:"open"` // [7.27] [File] A file was opened
Mkdir MkdirEvent `field:"mkdir" event:"mkdir"` // [7.27] [File] A directory was created
Rmdir RmdirEvent `field:"rmdir" event:"rmdir"` // [7.27] [File] A directory was removed
Rename RenameEvent `field:"rename" event:"rename"` // [7.27] [File] A file/directory was renamed
Unlink UnlinkEvent `field:"unlink" event:"unlink"` // [7.27] [File] A file was deleted
Utimes UtimesEvent `field:"utimes" event:"utimes"` // [7.27] [File] Change file access/modification times
Link LinkEvent `field:"link" event:"link"` // [7.27] [File] Create a new name/alias for a file
SetXAttr SetXAttrEvent `field:"setxattr" event:"setxattr"` // [7.27] [File] Set exteneded attributes
RemoveXAttr SetXAttrEvent `field:"removexattr" event:"removexattr"` // [7.27] [File] Remove extended attributes
Splice SpliceEvent `field:"splice" event:"splice"` // [7.36] [File] A splice command was executed
Mount MountEvent `field:"mount" event:"mount"` // [7.42] [File] [Experimental] A filesystem was mounted
Chdir ChdirEvent `field:"chdir" event:"chdir"` // [7.52] [File] [Experimental] A process changed the current directory
// process events
Exec ExecEvent `field:"exec" event:"exec"` // [7.27] [Process] A process was executed (does not trigger on fork syscalls).
SetUID SetuidEvent `field:"setuid" event:"setuid"` // [7.27] [Process] A process changed its effective uid
SetGID SetgidEvent `field:"setgid" event:"setgid"` // [7.27] [Process] A process changed its effective gid
Capset CapsetEvent `field:"capset" event:"capset"` // [7.27] [Process] A process changed its capacity set
Signal SignalEvent `field:"signal" event:"signal"` // [7.35] [Process] A signal was sent
Exit ExitEvent `field:"exit" event:"exit"` // [7.38] [Process] A process was terminated
Setrlimit SetrlimitEvent `field:"setrlimit" event:"setrlimit"` // [7.68] [Process] A setrlimit command was executed
CapabilitiesUsage CapabilitiesEvent `field:"capabilities" event:"capabilities"` // [7.70] [Process] [Experimental] A process used some capabilities
Syscalls SyscallsEvent `field:"-"`
LoginUIDWrite LoginUIDWriteEvent `field:"-"`
PrCtl PrCtlEvent `field:"prctl" event:"prctl"` // [7.71] [Process] A prctl command was executed
// network syscalls
Bind BindEvent `field:"bind" event:"bind"` // [7.37] [Network] A bind was executed
Connect ConnectEvent `field:"connect" event:"connect"` // [7.60] [Network] A connect was executed
Accept AcceptEvent `field:"accept" event:"accept"` // [7.63] [Network] An accept was executed
SetSockOpt SetSockOptEvent `field:"setsockopt" event:"setsockopt"` // [7.68] [Network] A setsockopt was executed
Socket SocketEvent `field:"socket" event:"socket"` // [7.81] [Network] A socket was created
// kernel events
SELinux SELinuxEvent `field:"selinux" event:"selinux"` // [7.30] [Kernel] An SELinux operation was run
BPF BPFEvent `field:"bpf" event:"bpf"` // [7.33] [Kernel] A BPF command was executed
PTrace PTraceEvent `field:"ptrace" event:"ptrace"` // [7.35] [Kernel] A ptrace command was executed
MMap MMapEvent `field:"mmap" event:"mmap"` // [7.35] [Kernel] A mmap command was executed
MProtect MProtectEvent `field:"mprotect" event:"mprotect"` // [7.35] [Kernel] A mprotect command was executed
LoadModule LoadModuleEvent `field:"load_module" event:"load_module"` // [7.35] [Kernel] A new kernel module was loaded
UnloadModule UnloadModuleEvent `field:"unload_module" event:"unload_module"` // [7.35] [Kernel] A kernel module was deleted
SysCtl SysCtlEvent `field:"sysctl" event:"sysctl"` // [7.65] [Kernel] A sysctl parameter was read or modified
CgroupWrite CgroupWriteEvent `field:"cgroup_write" event:"cgroup_write"` // [7.68] [Kernel] A process migrated another process to a cgroup
// network events
DNS DNSEvent `field:"dns" event:"dns"` // [7.36] [Network] A DNS request was sent
IMDS IMDSEvent `field:"imds" event:"imds"` // [7.55] [Network] An IMDS event was captured
RawPacket RawPacketEvent `field:"packet" event:"packet"` // [7.60] [Network] A raw network packet was captured
NetworkFlowMonitor NetworkFlowMonitorEvent `field:"network_flow_monitor" event:"network_flow_monitor"` // [7.63] [Network] A network monitor event was sent
FailedDNS FailedDNSEvent `field:"failed_dns" event:"failed_dns"` // [7.7X] [Network] A DNS packet failed to be decoded
// on-demand events
OnDemand OnDemandEvent `field:"ondemand" event:"ondemand"`
// internal usage
Umount UmountEvent `field:"-"`
InvalidateDentry InvalidateDentryEvent `field:"-"`
ArgsEnvs ArgsEnvsEvent `field:"-"`
MountReleased MountReleasedEvent `field:"-"`
CgroupTracing CgroupTracingEvent `field:"-"`
NetDevice NetDeviceEvent `field:"-"`
VethPair VethPairEvent `field:"-"`
TracerMemfdSeal TracerMemfdSealEvent `field:"-"`
}
Event represents an event sent from the kernel genaccessors gengetter: GetExecCmdargv gengetter: GetExecFilePath gengetter: GetExitCode gengetter: GetMountMountpointPath gengetter: GetMountRootPath gengetter: GetProcessEnvp gengetter: GetProcessExecTime gengetter: GetProcessExitTime gengetter: GetProcessForkTime gengetter: GetProcessGid gengetter: GetProcessGroup gengetter: GetProcessPid gengetter: GetProcessPpid gengetter: GetProcessUid gengetter: GetProcessUser gengetter: GetTimestamp gengetter: GetEventService
func NewFakeEvent ¶ added in v0.52.0
func NewFakeEvent() *Event
NewFakeEvent returns a new event using the default field handlers
func (*Event) AddToFlags ¶ added in v0.45.0
AddToFlags adds a flag to the event
func (*Event) DeepCopy ¶ added in v0.75.0
DeepCopy creates a deep copy of the Event where the copy shares nothing with the original
func (*Event) GetActionReports ¶ added in v0.52.0
func (e *Event) GetActionReports() []ActionReport
GetActionReports returns the triggred action reports
func (*Event) GetContainerID ¶ added in v0.73.0
GetContainerID returns event's process container ID if any
func (*Event) GetEventService ¶ added in v0.52.0
GetEventService returns the value of the field, resolving if necessary
func (*Event) GetEventType ¶
GetEventType returns the event type of the event
func (*Event) GetExecCmdargv ¶ added in v0.55.0
GetExecCmdargv returns the value of the field, resolving if necessary
func (*Event) GetExecFilePath ¶ added in v0.49.0
GetExecFilePath returns the value of the field, resolving if necessary
func (*Event) GetExitCode ¶ added in v0.49.0
GetExitCode returns the value of the field, resolving if necessary
func (*Event) GetFieldMetadata ¶ added in v0.63.0
func (ev *Event) GetFieldMetadata(field eval.Field) (eval.EventType, reflect.Kind, string, bool, error)
GetFieldMetadata returns EventType, reflect.Kind, BasicType, IsArray, error
func (*Event) GetFieldValue ¶
GetFieldValue retrieves the value of a field from the event using the evaluator.
func (*Event) GetFileField ¶ added in v0.70.0
GetFileField returns the FileEvent associated with a field name
func (*Event) GetMountMountpointPath ¶ added in v0.49.0
GetMountMountpointPath returns the value of the field, resolving if necessary
func (*Event) GetMountRootPath ¶ added in v0.51.0
GetMountRootPath returns the value of the field, resolving if necessary
func (*Event) GetProcessEnvp ¶ added in v0.49.0
GetProcessEnvp returns the value of the field, resolving if necessary
func (*Event) GetProcessExecTime ¶ added in v0.49.0
GetProcessExecTime returns the value of the field, resolving if necessary
func (*Event) GetProcessExitTime ¶ added in v0.49.0
GetProcessExitTime returns the value of the field, resolving if necessary
func (*Event) GetProcessForkTime ¶ added in v0.49.0
GetProcessForkTime returns the value of the field, resolving if necessary
func (*Event) GetProcessGid ¶ added in v0.49.0
GetProcessGid returns the value of the field, resolving if necessary
func (*Event) GetProcessGroup ¶ added in v0.49.0
GetProcessGroup returns the value of the field, resolving if necessary
func (*Event) GetProcessPid ¶ added in v0.49.0
GetProcessPid returns the value of the field, resolving if necessary
func (*Event) GetProcessPpid ¶ added in v0.49.0
GetProcessPpid returns the value of the field, resolving if necessary
func (*Event) GetProcessTracerMetadata ¶ added in v0.79.0
func (e *Event) GetProcessTracerMetadata() tracermetadata.TracerMetadata
GetProcessTracerMetadata returns the tracer metadata of the process
func (*Event) GetProcessUid ¶ added in v0.49.0
GetProcessUid returns the value of the field, resolving if necessary
func (*Event) GetProcessUser ¶ added in v0.49.0
GetProcessUser returns the value of the field, resolving if necessary
func (*Event) GetTimestamp ¶ added in v0.49.0
GetTimestamp returns the value of the field, resolving if necessary
func (*Event) GetWorkloadID ¶ added in v0.47.0
GetWorkloadID returns an ID that represents the workload
func (*Event) HasActiveActivityDump ¶ added in v0.53.0
HasActiveActivityDump returns true if the event has an active activity dump associated to it
func (*Event) IsActivityDumpSample ¶ added in v0.40.0
IsActivityDumpSample return whether AD sample
func (*Event) IsAnomalyDetectionEvent ¶ added in v0.47.0
IsAnomalyDetectionEvent returns true if the current event is an anomaly detection event (kernel or user space)
func (*Event) IsEventFromReplay ¶ added in v0.74.0
IsEventFromReplay returns true if the event is generated from a replay
func (*Event) IsEventInternal ¶ added in v0.80.0
IsEventInternal returns true if this is an internal event. Internal events are emitted by the kernel side to keep userspace caches and resources in sync; they don't reflect a user-visible action and rule evaluation can be skipped for them.
func (*Event) IsInProfile ¶ added in v0.45.0
IsInProfile return true if the event was found in the profile
func (*Event) IsSavedByActivityDumps ¶ added in v0.44.0
IsSavedByActivityDumps return whether saved by AD
func (*Event) RemoveFromFlags ¶ added in v0.45.0
RemoveFromFlags remove a flag to the event
func (*Event) ResetAnomalyDetectionEvent ¶ added in v0.61.0
func (e *Event) ResetAnomalyDetectionEvent()
ResetAnomalyDetectionEvent removes the anomaly detection event flag
func (*Event) ResolveEventTime ¶ added in v0.46.0
ResolveEventTime uses the field handler
func (*Event) ResolveFields ¶ added in v0.43.0
func (ev *Event) ResolveFields()
ResolveFields resolves all the fields associate to the event type. Context fields are automatically resolved.
func (*Event) ResolveFieldsForAD ¶ added in v0.44.0
func (ev *Event) ResolveFieldsForAD()
ResolveFieldsForAD resolves all the fields associate to the event type. Context fields are automatically resolved.
func (*Event) ResolveProcessCacheEntry ¶ added in v0.43.0
func (e *Event) ResolveProcessCacheEntry(newEntryCb func(*ProcessCacheEntry, error)) (*ProcessCacheEntry, bool)
ResolveProcessCacheEntry uses the field handler
func (*Event) ResolveService ¶ added in v0.52.0
ResolveService uses the field handler
func (*Event) SetFieldValue ¶
func (*Event) SetPathResolutionError ¶ added in v0.43.0
SetPathResolutionError sets the Event.pathResolutionError
func (*Event) UnmarshalBinary ¶
UnmarshalBinary unmarshalls a binary representation of itself
func (*Event) ValidateFileField ¶ added in v0.70.0
ValidateFileField validates that GetFileField would return a valid FileEvent
type EventCategory ¶
type EventCategory int
EventCategory category type
const ( // FIMCategory FIM events FIMCategory EventCategory = iota // ProcessCategory process events ProcessCategory // KernelCategory Kernel events KernelCategory // NetworkCategory network events NetworkCategory // InternalCategory internal events InternalCategory )
Event categories
func GetAllCategories ¶ added in v0.34.0
func GetAllCategories() []EventCategory
GetAllCategories returns all categories
func GetEventTypeCategory ¶
func GetEventTypeCategory(eventType eval.EventType) EventCategory
GetEventTypeCategory returns the category for the given event type
func (EventCategory) String ¶ added in v0.72.0
func (t EventCategory) String() string
type EventFilteringProfileState ¶ added in v0.55.0
type EventFilteringProfileState uint8
EventFilteringProfileState is used to compute metrics for the event filtering feature
const ( // NoProfile is used to count the events for which we didn't have a profile NoProfile EventFilteringProfileState = iota // ProfileAtMaxSize is used to count the events that didn't make it into a profile because their matching profile // reached the max size threshold ProfileAtMaxSize // UnstableEventType is used to count the events that didn't make it into a profile because their matching profile was // unstable for their event type UnstableEventType // StableEventType is used to count the events linked to a stable profile for their event type StableEventType // AutoLearning is used to count the event during the auto learning phase AutoLearning // WorkloadWarmup is used to count the learned events due to workload warm up time WorkloadWarmup )
func (EventFilteringProfileState) String ¶ added in v0.55.0
func (efr EventFilteringProfileState) String() string
String returns the string representation of the EventFilteringProfileState
func (EventFilteringProfileState) ToTag ¶ added in v0.55.0
func (efr EventFilteringProfileState) ToTag() string
ToTag returns the tag representation of the EventFilteringProfileState
type EventSource ¶ added in v0.74.0
type EventSource = string
EventSource is the source of the event
const ( // EventSourceRuntime is used to report that the event is generated from a runtime EventSourceRuntime EventSource = "runtime" // EventSourceReplay is used to report that the event is generated from a replay EventSourceReplay EventSource = "replay" // EventSourceRelated is used to report that the event is generated from a related event EventSourceRelated EventSource = "related" )
type EventType ¶
type EventType uint32
EventType describes the type of an event sent from the kernel
const ( // UnknownEventType unknown event UnknownEventType EventType = iota // FileOpenEventType File open event FileOpenEventType // FileMkdirEventType Folder creation event FileMkdirEventType // FileLinkEventType Hard link creation event FileLinkEventType // FileRenameEventType File or folder rename event FileRenameEventType // FileUnlinkEventType Unlink event FileUnlinkEventType // FileRmdirEventType Rmdir event FileRmdirEventType // FileChmodEventType Chmod event FileChmodEventType // FileChownEventType Chown event FileChownEventType // FileUtimesEventType Utime event FileUtimesEventType // MMapEventType MMap event MMapEventType // MProtectEventType MProtect event MProtectEventType // SpliceEventType Splice event SpliceEventType // FileSetXAttrEventType Setxattr event FileSetXAttrEventType // FileRemoveXAttrEventType Removexattr event FileRemoveXAttrEventType // FileChdirEventType chdir event FileChdirEventType // BPFEventType bpf event BPFEventType // SysCtlEventType sysctl event SysCtlEventType // ConnectEventType Connect event ConnectEventType // PrCtlEventType is sent when a prctl event is captured PrCtlEventType // SetSockOptEventType is sent when a socket option is set SetSockOptEventType // FileMountEventType Mount event FileMountEventType // FileUmountEventType Umount event FileUmountEventType // ForkEventType Fork event ForkEventType // ExecEventType Exec event ExecEventType // ExitEventType Exit event ExitEventType // InvalidateDentryEventType Dentry invalidated event (DEPRECATED) InvalidateDentryEventType // SetuidEventType setuid event SetuidEventType // SetgidEventType setgid event SetgidEventType // CapsetEventType capset event CapsetEventType // ArgsEnvsEventType args and envs event ArgsEnvsEventType // MountReleasedEventType sent when a mount point is released MountReleasedEventType // SELinuxEventType selinux event SELinuxEventType // PTraceEventType PTrace event PTraceEventType // LoadModuleEventType LoadModule event LoadModuleEventType // UnloadModuleEventType UnloadModule evnt UnloadModuleEventType // SignalEventType Signal event SignalEventType // CgroupTracingEventType is sent when a new cgroup is being traced CgroupTracingEventType // DNSEventType DNS event DNSEventType // ShortDNSResponseEventType DNS Response event ShortDNSResponseEventType // FullDNSResponseEventType DNS Response event FullDNSResponseEventType // NetDeviceEventType is sent for events on net devices NetDeviceEventType // VethPairEventType is sent when a new veth pair is created VethPairEventType // VethPairNsEventType is sent when a veth pair is moved to a new network namespace VethPairNsEventType // AcceptEventType Accept event AcceptEventType // BindEventType Bind event BindEventType UnshareEventType // SyscallsEventType Syscalls event SyscallsEventType // IMDSEventType is sent when an IMDS request or answer is captured IMDSEventType // OnDemandEventType is sent for on-demand events OnDemandEventType // LoginUIDWriteEventType is sent for login_uid write events LoginUIDWriteEventType // CgroupWriteEventType is sent when a new cgroup was created CgroupWriteEventType // RawPacketFilterEventType raw packet filter event RawPacketFilterEventType // NetworkFlowMonitorEventType is sent to monitor network activity NetworkFlowMonitorEventType // StatEventType stat event (used kernel side only) StatEventType // SetrlimitEventType setrlimit event SetrlimitEventType // FileFsmountEventType Mount event FileFsmountEventType // FileOpenTreeEventType Open Tree event FileOpenTreeEventType // RawPacketActionEventType raw packet action event RawPacketActionEventType // CapabilitiesEventType is used to track capabilities usage CapabilitiesEventType // FileMoveMountEventType Move Mount even FileMoveMountEventType // FailedDNSEventType Failed DNS FailedDNSEventType // TracerMemfdCreateEventType memfd_create event (used kernel side only) TracerMemfdCreateEventType // TracerMemfdSealEventType Tracer memfd seal event TracerMemfdSealEventType // PivotRootEventType is sent when pivot_root completes successfully PivotRootEventType // SampleRefreshEventType is sent when a dedup map detects a duplicate and refreshes a cookie timestamp SampleRefreshEventType // SetSidEventType is sent when setsid completes successfully SetSidEventType // NopEventType nop event NopEventType // SocketEventType is sent when a socket is created SocketEventType UnshareMountNsEventType // OTelProcessCtxEventType is sent when a process publishes its OTel process context OTelProcessCtxEventType // MaxKernelEventType is used internally to get the maximum number of kernel events. MaxKernelEventType // FirstEventType is the first valid event type FirstEventType = FileOpenEventType // LastEventType is the last valid event type LastEventType = PivotRootEventType // FirstDiscarderEventType first event that accepts discarders FirstDiscarderEventType = FileOpenEventType // LastDiscarderEventType last event that accepts discarders LastDiscarderEventType = FileChdirEventType // LastApproverEventType is the last event that accepts approvers LastApproverEventType = SocketEventType // CustomEventType represents a custom event type CustomEventType EventType = iota // CreateNewFileEventType event CreateNewFileEventType EventType = iota // DeleteFileEventType event DeleteFileEventType // WriteFileEventType event WriteFileEventType // CreateRegistryKeyEventType event CreateRegistryKeyEventType // OpenRegistryKeyEventType event OpenRegistryKeyEventType // SetRegistryKeyValueEventType event SetRegistryKeyValueEventType // DeleteRegistryKeyEventType event DeleteRegistryKeyEventType // ChangePermissionEventType event ChangePermissionEventType // FirstWindowsEventType is the first Windows event type FirstWindowsEventType = CreateNewFileEventType // LastWindowsEventType is the last Windows event type LastWindowsEventType = ChangePermissionEventType // MaxAllEventType is used internally to get the maximum number of events. MaxAllEventType )
func ParseEvalEventType ¶
ParseEvalEventType convert a eval.EventType (string) to its uint64 representation the current algorithm is not efficient but allows us to reduce the number of conversion functions
type ExecEvent ¶
type ExecEvent struct {
SyscallContext
*Process
FileMetadata FileMetadata `field:"file.metadata"`
// Syscall context aliases
SyscallPath string `field:"syscall.path,ref:exec.syscall.str1"` // SECLDoc[syscall.path] Definition:`path argument of the syscall`
}
ExecEvent represents a exec event
type ExitEvent ¶ added in v0.38.0
type ExitEvent struct {
*Process
Cause uint32 `field:"cause"` // SECLDoc[cause] Definition:`Cause of the process termination (one of EXITED, SIGNALED, COREDUMPED)`
Code uint32 `field:"code,opts:gen_getters"` // SECLDoc[code] Definition:`Exit code of the process or number of the signal that caused the process to terminate`
}
ExitEvent represents a process exit event
type ExtraFieldHandlers ¶ added in v0.43.0
type ExtraFieldHandlers interface {
BaseExtraFieldHandlers
ResolveHashes(eventType EventType, process *Process, file *FileEvent) []string
ResolveK8SUserSessionContext(event *Event, evtCtx *K8SSessionContext)
ResolveAWSSecurityCredentials(event *Event, process *Process) []AWSSecurityCredentials
ResolveSyscallCtxArgs(ev *Event, e *SyscallContext)
ResolveSpanContext(ev *Event) *SpanContext
}
ExtraFieldHandlers handlers not hold by any field
type FailedDNSEvent ¶ added in v0.73.0
type FailedDNSEvent struct {
Payload []byte `field:"-"`
}
FailedDNSEvent represents a DNS packet that was failed to be decoded (inbound or outbound)
type FakeFieldHandlers ¶ added in v0.52.0
type FakeFieldHandlers struct {
PCEs map[uint32]*ProcessCacheEntry
}
func (*FakeFieldHandlers) ResolveAWSSecurityCredentials ¶ added in v0.55.0
func (dfh *FakeFieldHandlers) ResolveAWSSecurityCredentials(_ *Event, _ *Process) []AWSSecurityCredentials
ResolveAWSSecurityCredentials resolves and updates the AWS security credentials of the input process entry
func (*FakeFieldHandlers) ResolveAcceptHostnames ¶ added in v0.68.0
func (dfh *FakeFieldHandlers) ResolveAcceptHostnames(ev *Event, e *AcceptEvent) []string
func (*FakeFieldHandlers) ResolveAsync ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveAsync(ev *Event) bool
func (*FakeFieldHandlers) ResolveCGroupVersion ¶ added in v0.62.0
func (dfh *FakeFieldHandlers) ResolveCGroupVersion(ev *Event, e *CGroupContext) int
func (*FakeFieldHandlers) ResolveCapabilitiesAttempted ¶ added in v0.71.0
func (dfh *FakeFieldHandlers) ResolveCapabilitiesAttempted(ev *Event, e *CapabilitiesEvent) int
func (*FakeFieldHandlers) ResolveCapabilitiesAttemptedHostUserNS ¶ added in v0.85.0
func (dfh *FakeFieldHandlers) ResolveCapabilitiesAttemptedHostUserNS(ev *Event, e *CapabilitiesEvent) int
func (*FakeFieldHandlers) ResolveCapabilitiesUsed ¶ added in v0.71.0
func (dfh *FakeFieldHandlers) ResolveCapabilitiesUsed(ev *Event, e *CapabilitiesEvent) int
func (*FakeFieldHandlers) ResolveCapabilitiesUsedHostUserNS ¶ added in v0.85.0
func (dfh *FakeFieldHandlers) ResolveCapabilitiesUsedHostUserNS(ev *Event, e *CapabilitiesEvent) int
func (*FakeFieldHandlers) ResolveChownGID ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveChownGID(ev *Event, e *ChownEvent) string
func (*FakeFieldHandlers) ResolveChownUID ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveChownUID(ev *Event, e *ChownEvent) string
func (*FakeFieldHandlers) ResolveConnectHostnames ¶ added in v0.68.0
func (dfh *FakeFieldHandlers) ResolveConnectHostnames(ev *Event, e *ConnectEvent) []string
func (*FakeFieldHandlers) ResolveContainerTags ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveContainerTags(ev *Event, e *ContainerContext) []string
func (*FakeFieldHandlers) ResolveEventTime ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveEventTime(ev *Event, e *BaseEvent) time.Time
func (*FakeFieldHandlers) ResolveEventTimestamp ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveEventTimestamp(ev *Event, e *BaseEvent) int
func (*FakeFieldHandlers) ResolveFileBasename ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveFileBasename(ev *Event, e *FileEvent) string
func (*FakeFieldHandlers) ResolveFileExtension ¶ added in v0.70.0
func (dfh *FakeFieldHandlers) ResolveFileExtension(ev *Event, e *FileEvent) string
func (*FakeFieldHandlers) ResolveFileFieldsGroup ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveFileFieldsGroup(ev *Event, e *FileFields) string
func (*FakeFieldHandlers) ResolveFileFieldsInUpperLayer ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveFileFieldsInUpperLayer(ev *Event, e *FileFields) bool
func (*FakeFieldHandlers) ResolveFileFieldsUser ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveFileFieldsUser(ev *Event, e *FileFields) string
func (*FakeFieldHandlers) ResolveFileFilesystem ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveFileFilesystem(ev *Event, e *FileEvent) string
func (*FakeFieldHandlers) ResolveFileMetadataABI ¶ added in v0.68.0
func (dfh *FakeFieldHandlers) ResolveFileMetadataABI(ev *Event, e *FileMetadata) int
func (*FakeFieldHandlers) ResolveFileMetadataArchitecture ¶ added in v0.68.0
func (dfh *FakeFieldHandlers) ResolveFileMetadataArchitecture(ev *Event, e *FileMetadata) int
func (*FakeFieldHandlers) ResolveFileMetadataCompression ¶ added in v0.68.0
func (dfh *FakeFieldHandlers) ResolveFileMetadataCompression(ev *Event, e *FileMetadata) int
func (*FakeFieldHandlers) ResolveFileMetadataIsExecutable ¶ added in v0.68.0
func (dfh *FakeFieldHandlers) ResolveFileMetadataIsExecutable(ev *Event, e *FileMetadata) bool
func (*FakeFieldHandlers) ResolveFileMetadataIsGarbleObfuscated ¶ added in v0.68.0
func (dfh *FakeFieldHandlers) ResolveFileMetadataIsGarbleObfuscated(ev *Event, e *FileMetadata) bool
func (*FakeFieldHandlers) ResolveFileMetadataIsUPXPacked ¶ added in v0.68.0
func (dfh *FakeFieldHandlers) ResolveFileMetadataIsUPXPacked(ev *Event, e *FileMetadata) bool
func (*FakeFieldHandlers) ResolveFileMetadataSize ¶ added in v0.68.0
func (dfh *FakeFieldHandlers) ResolveFileMetadataSize(ev *Event, e *FileMetadata) int
func (*FakeFieldHandlers) ResolveFileMetadataType ¶ added in v0.68.0
func (dfh *FakeFieldHandlers) ResolveFileMetadataType(ev *Event, e *FileMetadata) int
func (*FakeFieldHandlers) ResolveFilePath ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveFilePath(ev *Event, e *FileEvent) string
func (*FakeFieldHandlers) ResolveHashes ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveHashes(_ EventType, _ *Process, _ *FileEvent) []string
ResolveHashes resolves the hash of the provided file
func (*FakeFieldHandlers) ResolveHashesFromEvent ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveHashesFromEvent(ev *Event, e *FileEvent) []string
func (*FakeFieldHandlers) ResolveHostname ¶ added in v0.56.0
func (dfh *FakeFieldHandlers) ResolveHostname(ev *Event, e *BaseEvent) string
func (*FakeFieldHandlers) ResolveIsIPPublic ¶ added in v0.61.0
func (dfh *FakeFieldHandlers) ResolveIsIPPublic(ev *Event, e *IPPortContext) bool
func (*FakeFieldHandlers) ResolveK8SGroups ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveK8SGroups(ev *Event, e *K8SSessionContext) []string
func (*FakeFieldHandlers) ResolveK8SUID ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveK8SUID(ev *Event, e *K8SSessionContext) string
func (*FakeFieldHandlers) ResolveK8SUserSessionContext ¶ added in v0.74.0
func (dfh *FakeFieldHandlers) ResolveK8SUserSessionContext(_ *Event, _ *K8SSessionContext)
ResolveK8SUserSessionContext resolves and updates the provided user session context
func (*FakeFieldHandlers) ResolveK8SUsername ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveK8SUsername(ev *Event, e *K8SSessionContext) string
func (*FakeFieldHandlers) ResolveModuleArgs ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveModuleArgs(ev *Event, e *LoadModuleEvent) string
func (*FakeFieldHandlers) ResolveModuleArgv ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveModuleArgv(ev *Event, e *LoadModuleEvent) []string
func (*FakeFieldHandlers) ResolveMountPointPath ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveMountPointPath(ev *Event, e *MountEvent) string
func (*FakeFieldHandlers) ResolveMountRootPath ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveMountRootPath(ev *Event, e *MountEvent) string
func (*FakeFieldHandlers) ResolveMountSourcePath ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveMountSourcePath(ev *Event, e *MountEvent) string
func (*FakeFieldHandlers) ResolveNetworkDeviceIfName ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveNetworkDeviceIfName(ev *Event, e *NetworkDeviceContext) string
func (*FakeFieldHandlers) ResolveOnDemandArg1Str ¶ added in v0.56.0
func (dfh *FakeFieldHandlers) ResolveOnDemandArg1Str(ev *Event, e *OnDemandEvent) string
func (*FakeFieldHandlers) ResolveOnDemandArg1Uint ¶ added in v0.56.0
func (dfh *FakeFieldHandlers) ResolveOnDemandArg1Uint(ev *Event, e *OnDemandEvent) int
func (*FakeFieldHandlers) ResolveOnDemandArg2Str ¶ added in v0.56.0
func (dfh *FakeFieldHandlers) ResolveOnDemandArg2Str(ev *Event, e *OnDemandEvent) string
func (*FakeFieldHandlers) ResolveOnDemandArg2Uint ¶ added in v0.56.0
func (dfh *FakeFieldHandlers) ResolveOnDemandArg2Uint(ev *Event, e *OnDemandEvent) int
func (*FakeFieldHandlers) ResolveOnDemandArg3Str ¶ added in v0.56.0
func (dfh *FakeFieldHandlers) ResolveOnDemandArg3Str(ev *Event, e *OnDemandEvent) string
func (*FakeFieldHandlers) ResolveOnDemandArg3Uint ¶ added in v0.56.0
func (dfh *FakeFieldHandlers) ResolveOnDemandArg3Uint(ev *Event, e *OnDemandEvent) int
func (*FakeFieldHandlers) ResolveOnDemandArg4Str ¶ added in v0.56.0
func (dfh *FakeFieldHandlers) ResolveOnDemandArg4Str(ev *Event, e *OnDemandEvent) string
func (*FakeFieldHandlers) ResolveOnDemandArg4Uint ¶ added in v0.56.0
func (dfh *FakeFieldHandlers) ResolveOnDemandArg4Uint(ev *Event, e *OnDemandEvent) int
func (*FakeFieldHandlers) ResolveOnDemandArg5Str ¶ added in v0.68.0
func (dfh *FakeFieldHandlers) ResolveOnDemandArg5Str(ev *Event, e *OnDemandEvent) string
func (*FakeFieldHandlers) ResolveOnDemandArg5Uint ¶ added in v0.68.0
func (dfh *FakeFieldHandlers) ResolveOnDemandArg5Uint(ev *Event, e *OnDemandEvent) int
func (*FakeFieldHandlers) ResolveOnDemandArg6Str ¶ added in v0.68.0
func (dfh *FakeFieldHandlers) ResolveOnDemandArg6Str(ev *Event, e *OnDemandEvent) string
func (*FakeFieldHandlers) ResolveOnDemandArg6Uint ¶ added in v0.68.0
func (dfh *FakeFieldHandlers) ResolveOnDemandArg6Uint(ev *Event, e *OnDemandEvent) int
func (*FakeFieldHandlers) ResolveOnDemandName ¶ added in v0.56.0
func (dfh *FakeFieldHandlers) ResolveOnDemandName(ev *Event, e *OnDemandEvent) string
func (*FakeFieldHandlers) ResolvePackageEpoch ¶ added in v0.72.0
func (dfh *FakeFieldHandlers) ResolvePackageEpoch(ev *Event, e *FileEvent) int
func (*FakeFieldHandlers) ResolvePackageName ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolvePackageName(ev *Event, e *FileEvent) string
func (*FakeFieldHandlers) ResolvePackageRelease ¶ added in v0.72.0
func (dfh *FakeFieldHandlers) ResolvePackageRelease(ev *Event, e *FileEvent) string
func (*FakeFieldHandlers) ResolvePackageSourceEpoch ¶ added in v0.72.0
func (dfh *FakeFieldHandlers) ResolvePackageSourceEpoch(ev *Event, e *FileEvent) int
func (*FakeFieldHandlers) ResolvePackageSourceRelease ¶ added in v0.72.0
func (dfh *FakeFieldHandlers) ResolvePackageSourceRelease(ev *Event, e *FileEvent) string
func (*FakeFieldHandlers) ResolvePackageSourceVersion ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolvePackageSourceVersion(ev *Event, e *FileEvent) string
func (*FakeFieldHandlers) ResolvePackageVersion ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolvePackageVersion(ev *Event, e *FileEvent) string
func (*FakeFieldHandlers) ResolveProcessArgs ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveProcessArgs(ev *Event, e *Process) string
func (*FakeFieldHandlers) ResolveProcessArgsFlags ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveProcessArgsFlags(ev *Event, e *Process) []string
func (*FakeFieldHandlers) ResolveProcessArgsOptions ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveProcessArgsOptions(ev *Event, e *Process) []string
func (*FakeFieldHandlers) ResolveProcessArgsScrubbed ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveProcessArgsScrubbed(ev *Event, e *Process) string
func (*FakeFieldHandlers) ResolveProcessArgsTruncated ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveProcessArgsTruncated(ev *Event, e *Process) bool
func (*FakeFieldHandlers) ResolveProcessArgv ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveProcessArgv(ev *Event, e *Process) []string
func (*FakeFieldHandlers) ResolveProcessArgv0 ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveProcessArgv0(ev *Event, e *Process) string
func (*FakeFieldHandlers) ResolveProcessArgvScrubbed ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveProcessArgvScrubbed(ev *Event, e *Process) []string
func (*FakeFieldHandlers) ResolveProcessCacheEntry ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveProcessCacheEntry(ev *Event, _ func(*ProcessCacheEntry, error)) (*ProcessCacheEntry, bool)
ResolveProcessCacheEntry stub implementation
func (*FakeFieldHandlers) ResolveProcessCacheEntryFromPID ¶ added in v0.68.0
func (fh *FakeFieldHandlers) ResolveProcessCacheEntryFromPID(pid uint32) *ProcessCacheEntry
ResolveProcessCacheEntryFromPID stub implementation
func (*FakeFieldHandlers) ResolveProcessCmdArgv ¶ added in v0.55.0
func (dfh *FakeFieldHandlers) ResolveProcessCmdArgv(ev *Event, e *Process) []string
func (*FakeFieldHandlers) ResolveProcessCreatedAt ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveProcessCreatedAt(ev *Event, e *Process) int
func (*FakeFieldHandlers) ResolveProcessEnvp ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveProcessEnvp(ev *Event, e *Process) []string
func (*FakeFieldHandlers) ResolveProcessEnvs ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveProcessEnvs(ev *Event, e *Process) []string
func (*FakeFieldHandlers) ResolveProcessEnvsTruncated ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveProcessEnvsTruncated(ev *Event, e *Process) bool
func (*FakeFieldHandlers) ResolveProcessIsThread ¶ added in v0.60.0
func (dfh *FakeFieldHandlers) ResolveProcessIsThread(ev *Event, e *Process) bool
func (*FakeFieldHandlers) ResolveRights ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveRights(ev *Event, e *FileFields) int
func (*FakeFieldHandlers) ResolveSELinuxBoolName ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveSELinuxBoolName(ev *Event, e *SELinuxEvent) string
func (*FakeFieldHandlers) ResolveService ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveService(ev *Event, e *BaseEvent) string
func (*FakeFieldHandlers) ResolveSessionID ¶ added in v0.74.0
func (dfh *FakeFieldHandlers) ResolveSessionID(ev *Event, e *UserSessionContext) string
func (*FakeFieldHandlers) ResolveSessionIdentity ¶ added in v0.74.0
func (dfh *FakeFieldHandlers) ResolveSessionIdentity(ev *Event, e *UserSessionContext) string
func (*FakeFieldHandlers) ResolveSessionType ¶ added in v0.74.0
func (dfh *FakeFieldHandlers) ResolveSessionType(ev *Event, e *UserSessionContext) int
func (*FakeFieldHandlers) ResolveSetSockOptFilterHash ¶ added in v0.69.0
func (dfh *FakeFieldHandlers) ResolveSetSockOptFilterHash(ev *Event, e *SetSockOptEvent) string
func (*FakeFieldHandlers) ResolveSetSockOptFilterInstructions ¶ added in v0.69.0
func (dfh *FakeFieldHandlers) ResolveSetSockOptFilterInstructions(ev *Event, e *SetSockOptEvent) string
func (*FakeFieldHandlers) ResolveSetSockOptUsedImmediates ¶ added in v0.70.0
func (dfh *FakeFieldHandlers) ResolveSetSockOptUsedImmediates(ev *Event, e *SetSockOptEvent) []int
func (*FakeFieldHandlers) ResolveSetgidEGroup ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveSetgidEGroup(ev *Event, e *SetgidEvent) string
func (*FakeFieldHandlers) ResolveSetgidFSGroup ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveSetgidFSGroup(ev *Event, e *SetgidEvent) string
func (*FakeFieldHandlers) ResolveSetgidGroup ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveSetgidGroup(ev *Event, e *SetgidEvent) string
func (*FakeFieldHandlers) ResolveSetuidEUser ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveSetuidEUser(ev *Event, e *SetuidEvent) string
func (*FakeFieldHandlers) ResolveSetuidFSUser ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveSetuidFSUser(ev *Event, e *SetuidEvent) string
func (*FakeFieldHandlers) ResolveSetuidUser ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveSetuidUser(ev *Event, e *SetuidEvent) string
func (*FakeFieldHandlers) ResolveSignature ¶ added in v0.75.0
func (dfh *FakeFieldHandlers) ResolveSignature(ev *Event) string
func (*FakeFieldHandlers) ResolveSource ¶ added in v0.71.0
func (dfh *FakeFieldHandlers) ResolveSource(ev *Event, e *BaseEvent) string
func (*FakeFieldHandlers) ResolveSpanContext ¶ added in v0.84.0
func (dfh *FakeFieldHandlers) ResolveSpanContext(ev *Event) *SpanContext
ResolveSpanContext resolves the span context of the event
func (*FakeFieldHandlers) ResolveSyscallCtxArgs ¶ added in v0.55.0
func (dfh *FakeFieldHandlers) ResolveSyscallCtxArgs(_ *Event, _ *SyscallContext)
ResolveSyscallCtxArgs resolves syscall context
func (*FakeFieldHandlers) ResolveSyscallCtxArgsInt1 ¶ added in v0.55.0
func (dfh *FakeFieldHandlers) ResolveSyscallCtxArgsInt1(ev *Event, e *SyscallContext) int
func (*FakeFieldHandlers) ResolveSyscallCtxArgsInt2 ¶ added in v0.55.0
func (dfh *FakeFieldHandlers) ResolveSyscallCtxArgsInt2(ev *Event, e *SyscallContext) int
func (*FakeFieldHandlers) ResolveSyscallCtxArgsInt3 ¶ added in v0.55.0
func (dfh *FakeFieldHandlers) ResolveSyscallCtxArgsInt3(ev *Event, e *SyscallContext) int
func (*FakeFieldHandlers) ResolveSyscallCtxArgsStr1 ¶ added in v0.55.0
func (dfh *FakeFieldHandlers) ResolveSyscallCtxArgsStr1(ev *Event, e *SyscallContext) string
func (*FakeFieldHandlers) ResolveSyscallCtxArgsStr2 ¶ added in v0.55.0
func (dfh *FakeFieldHandlers) ResolveSyscallCtxArgsStr2(ev *Event, e *SyscallContext) string
func (*FakeFieldHandlers) ResolveSyscallCtxArgsStr3 ¶ added in v0.55.0
func (dfh *FakeFieldHandlers) ResolveSyscallCtxArgsStr3(ev *Event, e *SyscallContext) string
func (*FakeFieldHandlers) ResolveXAttrName ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveXAttrName(ev *Event, e *SetXAttrEvent) string
func (*FakeFieldHandlers) ResolveXAttrNamespace ¶ added in v0.52.0
func (dfh *FakeFieldHandlers) ResolveXAttrNamespace(ev *Event, e *SetXAttrEvent) string
type FieldHandlers ¶ added in v0.43.0
type FieldHandlers interface {
ResolveAcceptHostnames(ev *Event, e *AcceptEvent) []string
ResolveAsync(ev *Event) bool
ResolveCGroupVersion(ev *Event, e *CGroupContext) int
ResolveCapabilitiesAttempted(ev *Event, e *CapabilitiesEvent) int
ResolveCapabilitiesAttemptedHostUserNS(ev *Event, e *CapabilitiesEvent) int
ResolveCapabilitiesUsed(ev *Event, e *CapabilitiesEvent) int
ResolveCapabilitiesUsedHostUserNS(ev *Event, e *CapabilitiesEvent) int
ResolveChownGID(ev *Event, e *ChownEvent) string
ResolveChownUID(ev *Event, e *ChownEvent) string
ResolveConnectHostnames(ev *Event, e *ConnectEvent) []string
ResolveContainerTags(ev *Event, e *ContainerContext) []string
ResolveEventTime(ev *Event, e *BaseEvent) time.Time
ResolveEventTimestamp(ev *Event, e *BaseEvent) int
ResolveFileBasename(ev *Event, e *FileEvent) string
ResolveFileExtension(ev *Event, e *FileEvent) string
ResolveFileFieldsGroup(ev *Event, e *FileFields) string
ResolveFileFieldsInUpperLayer(ev *Event, e *FileFields) bool
ResolveFileFieldsUser(ev *Event, e *FileFields) string
ResolveFileFilesystem(ev *Event, e *FileEvent) string
ResolveFileMetadataABI(ev *Event, e *FileMetadata) int
ResolveFileMetadataArchitecture(ev *Event, e *FileMetadata) int
ResolveFileMetadataCompression(ev *Event, e *FileMetadata) int
ResolveFileMetadataIsExecutable(ev *Event, e *FileMetadata) bool
ResolveFileMetadataIsGarbleObfuscated(ev *Event, e *FileMetadata) bool
ResolveFileMetadataIsUPXPacked(ev *Event, e *FileMetadata) bool
ResolveFileMetadataSize(ev *Event, e *FileMetadata) int
ResolveFileMetadataType(ev *Event, e *FileMetadata) int
ResolveFilePath(ev *Event, e *FileEvent) string
ResolveHashesFromEvent(ev *Event, e *FileEvent) []string
ResolveHostname(ev *Event, e *BaseEvent) string
ResolveIsIPPublic(ev *Event, e *IPPortContext) bool
ResolveK8SGroups(ev *Event, e *K8SSessionContext) []string
ResolveK8SUID(ev *Event, e *K8SSessionContext) string
ResolveK8SUsername(ev *Event, e *K8SSessionContext) string
ResolveModuleArgs(ev *Event, e *LoadModuleEvent) string
ResolveModuleArgv(ev *Event, e *LoadModuleEvent) []string
ResolveMountPointPath(ev *Event, e *MountEvent) string
ResolveMountRootPath(ev *Event, e *MountEvent) string
ResolveMountSourcePath(ev *Event, e *MountEvent) string
ResolveNetworkDeviceIfName(ev *Event, e *NetworkDeviceContext) string
ResolveOnDemandArg1Str(ev *Event, e *OnDemandEvent) string
ResolveOnDemandArg1Uint(ev *Event, e *OnDemandEvent) int
ResolveOnDemandArg2Str(ev *Event, e *OnDemandEvent) string
ResolveOnDemandArg2Uint(ev *Event, e *OnDemandEvent) int
ResolveOnDemandArg3Str(ev *Event, e *OnDemandEvent) string
ResolveOnDemandArg3Uint(ev *Event, e *OnDemandEvent) int
ResolveOnDemandArg4Str(ev *Event, e *OnDemandEvent) string
ResolveOnDemandArg4Uint(ev *Event, e *OnDemandEvent) int
ResolveOnDemandArg5Str(ev *Event, e *OnDemandEvent) string
ResolveOnDemandArg5Uint(ev *Event, e *OnDemandEvent) int
ResolveOnDemandArg6Str(ev *Event, e *OnDemandEvent) string
ResolveOnDemandArg6Uint(ev *Event, e *OnDemandEvent) int
ResolveOnDemandName(ev *Event, e *OnDemandEvent) string
ResolvePackageEpoch(ev *Event, e *FileEvent) int
ResolvePackageName(ev *Event, e *FileEvent) string
ResolvePackageRelease(ev *Event, e *FileEvent) string
ResolvePackageSourceEpoch(ev *Event, e *FileEvent) int
ResolvePackageSourceRelease(ev *Event, e *FileEvent) string
ResolvePackageSourceVersion(ev *Event, e *FileEvent) string
ResolvePackageVersion(ev *Event, e *FileEvent) string
ResolveProcessArgs(ev *Event, e *Process) string
ResolveProcessArgsFlags(ev *Event, e *Process) []string
ResolveProcessArgsOptions(ev *Event, e *Process) []string
ResolveProcessArgsScrubbed(ev *Event, e *Process) string
ResolveProcessArgsTruncated(ev *Event, e *Process) bool
ResolveProcessArgv(ev *Event, e *Process) []string
ResolveProcessArgv0(ev *Event, e *Process) string
ResolveProcessArgvScrubbed(ev *Event, e *Process) []string
ResolveProcessCmdArgv(ev *Event, e *Process) []string
ResolveProcessCreatedAt(ev *Event, e *Process) int
ResolveProcessEnvp(ev *Event, e *Process) []string
ResolveProcessEnvs(ev *Event, e *Process) []string
ResolveProcessEnvsTruncated(ev *Event, e *Process) bool
ResolveProcessIsThread(ev *Event, e *Process) bool
ResolveRights(ev *Event, e *FileFields) int
ResolveSELinuxBoolName(ev *Event, e *SELinuxEvent) string
ResolveService(ev *Event, e *BaseEvent) string
ResolveSessionID(ev *Event, e *UserSessionContext) string
ResolveSessionIdentity(ev *Event, e *UserSessionContext) string
ResolveSessionType(ev *Event, e *UserSessionContext) int
ResolveSetSockOptFilterHash(ev *Event, e *SetSockOptEvent) string
ResolveSetSockOptFilterInstructions(ev *Event, e *SetSockOptEvent) string
ResolveSetSockOptUsedImmediates(ev *Event, e *SetSockOptEvent) []int
ResolveSetgidEGroup(ev *Event, e *SetgidEvent) string
ResolveSetgidFSGroup(ev *Event, e *SetgidEvent) string
ResolveSetgidGroup(ev *Event, e *SetgidEvent) string
ResolveSetuidEUser(ev *Event, e *SetuidEvent) string
ResolveSetuidFSUser(ev *Event, e *SetuidEvent) string
ResolveSetuidUser(ev *Event, e *SetuidEvent) string
ResolveSignature(ev *Event) string
ResolveSource(ev *Event, e *BaseEvent) string
ResolveSyscallCtxArgsInt1(ev *Event, e *SyscallContext) int
ResolveSyscallCtxArgsInt2(ev *Event, e *SyscallContext) int
ResolveSyscallCtxArgsInt3(ev *Event, e *SyscallContext) int
ResolveSyscallCtxArgsStr1(ev *Event, e *SyscallContext) string
ResolveSyscallCtxArgsStr2(ev *Event, e *SyscallContext) string
ResolveSyscallCtxArgsStr3(ev *Event, e *SyscallContext) string
ResolveXAttrName(ev *Event, e *SetXAttrEvent) string
ResolveXAttrNamespace(ev *Event, e *SetXAttrEvent) string
// custom handlers not tied to any fields
ExtraFieldHandlers
}
type FileEvent ¶
type FileEvent struct {
FileFields
PathnameStr string `field:"path,handler:ResolveFilePath,opts:length" op_override:"ProcessSymlinkPathname,OverlayFSPathname"` // SECLDoc[path] Definition:`File's path` Example:`exec.file.path == "/usr/bin/apt"` Description:`Matches the execution of the file located at /usr/bin/apt` Example:`open.file.path == "/etc/passwd"` Description:`Matches any process opening the /etc/passwd file.`
BasenameStr string `field:"name,handler:ResolveFileBasename,opts:length" op_override:"ProcessSymlinkBasename"` // SECLDoc[name] Definition:`File's basename` Example:`exec.file.name == "apt"` Description:`Matches the execution of any file named apt.`
Filesystem string `field:"filesystem,handler:ResolveFileFilesystem"` // SECLDoc[filesystem] Definition:`File's filesystem`
Extension string `field:"extension,handler:ResolveFileExtension" op_override:"eval.ExtensionCmp"` // SECLDoc[extension] Definition:`File's extension`
MountPath string `field:"-"`
MountSource uint32 `field:"-"`
MountOrigin uint32 `field:"-"`
MountVisible bool `field:"mount_visible"` // SECLDoc[mount_visible] Definition:`Indicates whether the file's mount is visible in the VFS`
MountDetached bool `field:"mount_detached"` // SECLDoc[mount_detached] Definition:`Indicates whether the file's mount is detached from the VFS`
MountVisibilityResolved bool `field:"-"`
PathResolutionError error `field:"-"`
PkgName string `field:"package.name,handler:ResolvePackageName"` // SECLDoc[package.name] Definition:`[Experimental] Name of the package that provided this file`
PkgVersion string `field:"package.version,handler:ResolvePackageVersion"` // SECLDoc[package.version] Definition:`[Experimental] Full version of the package that provided this file`
PkgEpoch int `field:"package.epoch,handler:ResolvePackageEpoch"` // SECLDoc[package.epoch] Definition:`[Experimental] Epoch of the package that provided this file`
PkgRelease string `field:"package.release,handler:ResolvePackageRelease"` // SECLDoc[package.release] Definition:`[Experimental] Release of the package that provided this file`
PkgSrcVersion string `field:"package.source_version,handler:ResolvePackageSourceVersion"` // SECLDoc[package.source_version] Definition:`[Experimental] Full version of the source package of the package that provided this file`
PkgSrcEpoch int `field:"package.source_epoch,handler:ResolvePackageSourceEpoch"` // SECLDoc[package.source_epoch] Definition:`[Experimental] Epoch of the source package of the package that provided this file`
PkgSrcRelease string `field:"package.source_release,handler:ResolvePackageSourceRelease"` // SECLDoc[package.source_release] Definition:`[Experimental] Release of the source package of the package that provided this file`
HashState HashState `field:"-"`
Hashes []string `field:"hashes,handler:ResolveHashesFromEvent,opts:skip_ad,weight:999"` // SECLDoc[hashes] Definition:`[Experimental] List of cryptographic hashes computed for this file`
// used to mark as already resolved, can be used in case of empty path
IsPathnameStrResolved bool `field:"-"`
IsBasenameStrResolved bool `field:"-"`
}
FileEvent is the common file event type
func (*FileEvent) GetPathResolutionError ¶
GetPathResolutionError returns the path resolution error as a string if there is one
func (*FileEvent) SetBasenameStr ¶ added in v0.36.0
SetBasenameStr set and mark as resolved
func (*FileEvent) SetPathnameStr ¶ added in v0.36.0
SetPathnameStr set and mark as resolved
type FileFields ¶
type FileFields struct {
UID uint32 `field:"uid"` // SECLDoc[uid] Definition:`UID of the file's owner`
User string `field:"user,handler:ResolveFileFieldsUser"` // SECLDoc[user] Definition:`User of the file's owner`
GID uint32 `field:"gid"` // SECLDoc[gid] Definition:`GID of the file's owner`
Group string `field:"group,handler:ResolveFileFieldsGroup"` // SECLDoc[group] Definition:`Group of the file's owner`
Mode uint16 `field:"mode;rights,handler:ResolveRights,opts:helper"` // SECLDoc[mode] Definition:`Mode of the file` Constants:`Inode mode constants` SECLDoc[rights] Definition:`Rights of the file` Constants:`File mode constants`
CTime uint64 `field:"change_time"` // SECLDoc[change_time] Definition:`Change time (ctime) of the file`
MTime uint64 `field:"modification_time"` // SECLDoc[modification_time] Definition:`Modification time (mtime) of the file`
PathKey
Device uint32 `field:"-"`
InUpperLayer bool `field:"in_upper_layer,handler:ResolveFileFieldsInUpperLayer"` // SECLDoc[in_upper_layer] Definition:`Indicator of the file layer, for example, in an OverlayFS`
NLink uint32 `field:"-"`
Flags int32 `field:"-"`
}
FileFields holds the information required to identify a file
func (*FileFields) Equals ¶ added in v0.47.0
func (f *FileFields) Equals(o *FileFields) bool
Equals compares two FileFields
func (*FileFields) HasHardLinks ¶
func (f *FileFields) HasHardLinks() bool
HasHardLinks returns whether the file has hardlink
func (*FileFields) IsDir ¶ added in v0.77.2
func (f *FileFields) IsDir() bool
IsDir reports whether the file mode represents a directory.
func (*FileFields) IsFileless ¶ added in v0.42.0
func (f *FileFields) IsFileless() bool
IsFileless return whether it is a file less access
func (*FileFields) IsInLowerLayer ¶ added in v0.63.0
func (f *FileFields) IsInLowerLayer() bool
IsInLowerLayer returns whether a file is in a lower layer
func (*FileFields) IsInUpperLayer ¶ added in v0.63.0
func (f *FileFields) IsInUpperLayer() bool
IsInUpperLayer returns whether a file is in the upper layer
func (*FileFields) MarshalBinary ¶ added in v0.36.0
func (e *FileFields) MarshalBinary(data []byte) (int, error)
MarshalBinary marshals a binary representation of itself
func (*FileFields) UnmarshalBinary ¶
func (e *FileFields) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type FileMetadata ¶ added in v0.68.0
type FileMetadata struct {
Size int64 `field:"size,handler:ResolveFileMetadataSize,opts:skip_ad,weight:999"` // SECLDoc[size] Definition:`[Experimental] Size of the file`
Type int `field:"type,handler:ResolveFileMetadataType,opts:skip_ad,weight:999"` // SECLDoc[type] Definition:`[Experimental] Type of the file` Constants:`FileType`
IsExecutable bool `field:"is_executable,handler:ResolveFileMetadataIsExecutable,opts:skip_ad,weight:999"` // SECLDoc[is_executable] Definition:`[Experimental] Tells if the file is executable or not`
Architecture int `field:"architecture,handler:ResolveFileMetadataArchitecture,opts:skip_ad,weight:999"` // SECLDoc[architecture] Definition:`[Experimental] Architecture of the file (only for executable files)` Constants:`Architecture`
ABI int `field:"abi,handler:ResolveFileMetadataABI,opts:skip_ad,weight:999"` // SECLDoc[abi] Definition:`[Experimental] ABI of the file (only for executable files)` Constants:`ABI`
IsUPXPacked bool `field:"is_upx_packed,handler:ResolveFileMetadataIsUPXPacked,opts:skip_ad,weight:999"` // SECLDoc[is_upx_packed] Definition:`[Experimental] Tells if the binary has been packed using UPX`
Compression int `field:"compression,handler:ResolveFileMetadataCompression,opts:skip_ad,weight:999"` // SECLDoc[compression] Definition:`[Experimental] Compression type of the file (only for compressed files)` Constants:`CompressionType`
IsGarbleObfuscated bool `field:"is_garble_obfuscated,handler:ResolveFileMetadataIsGarbleObfuscated,opts:skip_ad,weight:999"` // SECLDoc[is_garble_obfuscated] Definition:`[Experimental] Tells if the binary has been obfuscated using garble`
Linkage int `field:"-"`
Resolved bool `field:"-"`
}
FileMetadata represents file metadata
type FileType ¶ added in v0.68.0
type FileType int
FileType represents the type of the analyzed file
const ( // Empty file Empty FileType = iota // ShellScript file ShellScript // Text file Text // Compressed file Compressed // Encrypted file Encrypted // Binary file Binary // ELFExecutable file ELFExecutable // PEExecutable file PEExecutable // MachOExecutable file MachOExecutable // FileLess file FileLess )
type Flow ¶ added in v0.63.0
type Flow struct {
Source IPPortContext `field:"source"` // source of the network packet
Destination IPPortContext `field:"destination"` // destination of the network packet
L3Protocol uint16 `field:"l3_protocol"` // SECLDoc[l3_protocol] Definition:`L3 protocol of the network packet` Constants:`L3 protocols`
L4Protocol uint16 `field:"l4_protocol"` // SECLDoc[l4_protocol] Definition:`L4 protocol of the network packet` Constants:`L4 protocols`
Ingress NetworkStats `field:"ingress"` // SECLDoc[ingress] Definition:`Network statistics about ingress traffic`
Egress NetworkStats `field:"egress"` // SECLDoc[egress] Definition:`Network statistics about egress traffic`
}
Flow is used to represent a network 5-tuple with statistics
func (*Flow) GetFiveTuple ¶ added in v0.63.0
GetFiveTuple returns the five tuple identifying the flow
type FlowsIterator ¶ added in v0.63.0
type FlowsIterator struct {
Root interface{} // not used, direct access from the event
// contains filtered or unexported fields
}
FlowsIterator defines an iterator of flows
func (*FlowsIterator) At ¶ added in v0.63.0
func (it *FlowsIterator) At(ctx *eval.Context, regID eval.RegisterID, pos int) *Flow
At returns the element at the given position
func (*FlowsIterator) Front ¶ added in v0.63.0
func (it *FlowsIterator) Front(ctx *eval.Context) *Flow
Front returns the first element
type GoLabelsContext ¶ added in v0.84.0
GoLabelsContext is a handle to a set of Go pprof labels captured at syscall entry and stored in the go_labels_ctx ring. The raw labels are parsed in user space to resolve span/trace ids (see the golabelsctx resolver).
func (*GoLabelsContext) UnmarshalBinary ¶ added in v0.84.0
func (e *GoLabelsContext) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type HashAlgorithm ¶ added in v0.47.0
type HashAlgorithm int
HashAlgorithm is used to configure the hash algorithms of the hash resolver
const ( // SHA1 is used to identify a SHA1 hash SHA1 HashAlgorithm = iota // SHA256 is used to identify a SHA256 hash SHA256 // MD5 is used to identify a MD5 hash MD5 // SSDEEP is used to identify a SSDEEP hash SSDEEP // MaxHashAlgorithm is used for initializations MaxHashAlgorithm )
func (HashAlgorithm) String ¶ added in v0.47.0
func (ha HashAlgorithm) String() string
type HashState ¶ added in v0.47.0
type HashState int
HashState is used to prevent the hash resolver from retrying to hash a file
const ( // NoHash means that computing a hash hasn't been attempted NoHash HashState = iota // Done means that the hashes were already computed Done // FileNotFound means that the underlying file is not longer available to compute the hash FileNotFound // PathnameResolutionError means that the underlying file wasn't properly resolved PathnameResolutionError // FileTooBig means that the underlying file is larger than the hash resolver file size limit FileTooBig // FileEmpty means that the underlying file is empty FileEmpty // FileOpenError is a generic hash state to say that we couldn't open the file FileOpenError // EventTypeNotConfigured means that the event type prevents a hash from being computed EventTypeNotConfigured // HashWasRateLimited means that the hash will be tried again later, it was rate limited HashWasRateLimited // HashFailed means that the hashing failed HashFailed // MaxHashState is used for initializations MaxHashState )
type IMDSEvent ¶ added in v0.55.0
type IMDSEvent struct {
Type string `field:"type"` // SECLDoc[type] Definition:`the type of IMDS event`
CloudProvider string `field:"cloud_provider"` // SECLDoc[cloud_provider] Definition:`the intended cloud provider of the IMDS event`
URL string `field:"url"` // SECLDoc[url] Definition:`the queried IMDS URL`
Host string `field:"host"` // SECLDoc[host] Definition:`the host of the HTTP protocol`
UserAgent string `field:"user_agent"` // SECLDoc[user_agent] Definition:`the user agent of the HTTP client`
Server string `field:"server"` // SECLDoc[server] Definition:`the server header of a response`
CredentialSource uint32 `field:"credential_source"` // SECLDoc[credential_source] Definition:`the credential endpoint that served the IMDS event` Constants:`Credential sources`
// The fields below are optional and cloud specific fields
AWS AWSIMDSEvent `field:"aws"` // SECLDoc[aws] Definition:`the AWS specific data parsed from the IMDS event`
}
IMDSEvent represents an IMDS event
type IPPortContext ¶ added in v0.36.0
type IPPortContext struct {
IPNet net.IPNet `field:"ip"` // SECLDoc[ip] Definition:`IP address`
Port uint16 `field:"port"` // SECLDoc[port] Definition:`Port number`
IsPublic bool `field:"is_public,handler:ResolveIsIPPublic,opts:skip_ad"` // SECLDoc[is_public] Definition:`Whether the IP address belongs to a public network`
IsPublicResolved bool `field:"-"`
}
IPPortContext is used to hold an IP and Port
func (*IPPortContext) GetComparable ¶ added in v0.63.0
func (ipc *IPPortContext) GetComparable() netip.AddrPort
GetComparable returns a comparable version of IPPortContext
type InodeMode ¶ added in v0.46.0
type InodeMode int
InodeMode represents an inode mode bitmask value
type InvalidateDentryEvent ¶
InvalidateDentryEvent defines a invalidate dentry event
func (*InvalidateDentryEvent) UnmarshalBinary ¶
func (e *InvalidateDentryEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type Iterator ¶ added in v0.64.0
type Iterator[T any] interface { Front(ctx *eval.Context) T Next(ctx *eval.Context) T At(ctx *eval.Context, regID eval.RegisterID, pos int) T Len(ctx *eval.Context) int }
Iterator is a generic interface that iterators must implement
type K8SSessionContext ¶ added in v0.74.0
type K8SSessionContext struct {
K8SSessionID uint64 `field:"k8s_session_id" json:"k8s_session_id,omitempty"` // SECLDoc[k8s_session_id] Definition:`Unique identifier of the kubernetes session`
K8SUsername string `field:"k8s_username,handler:ResolveK8SUsername" json:"username,omitempty"` // SECLDoc[k8s_username] Definition:`Kubernetes username of the user that executed the process`
K8SUID string `field:"k8s_uid,handler:ResolveK8SUID" json:"uid,omitempty"` // SECLDoc[k8s_uid] Definition:`Kubernetes UID of the user that executed the process`
K8SGroups []string `field:"k8s_groups,handler:ResolveK8SGroups" json:"groups,omitempty"` // SECLDoc[k8s_groups] Definition:`Kubernetes groups of the user that executed the process`
K8SExtra map[string][]string `json:"extra,omitempty"`
K8SResolved bool `field:"-"`
}
K8SSessionContext describes the kubernetes session context Disclaimer: the `json` tags are used to parse K8s credentials from cws-instrumentation
type KernelCapability ¶
type KernelCapability uint64
KernelCapability represents a kernel capability bitmask value
func (KernelCapability) String ¶
func (kc KernelCapability) String() string
func (KernelCapability) StringArray ¶
func (kc KernelCapability) StringArray() []string
StringArray returns the kernel capabilities as an array of strings
type L3Protocol ¶ added in v0.36.0
type L3Protocol uint16
L3Protocol Network protocols
const ( // EthPLOOP Ethernet Loopback packet EthPLOOP L3Protocol = 0x0060 // EthPPUP Xerox PUP packet EthPPUP L3Protocol = 0x0200 // EthPPUPAT Xerox PUP Addr Trans packet EthPPUPAT L3Protocol = 0x0201 // EthPTSN TSN (IEEE 1722) packet EthPTSN L3Protocol = 0x22F0 // EthPIP Internet Protocol packet EthPIP L3Protocol = 0x0800 // EthPX25 CCITT X.25 EthPX25 L3Protocol = 0x0805 // EthPARP Address Resolution packet EthPARP L3Protocol = 0x0806 // EthPBPQ G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] EthPBPQ L3Protocol = 0x08FF // EthPIEEEPUP Xerox IEEE802.3 PUP packet EthPIEEEPUP L3Protocol = 0x0a00 // EthPIEEEPUPAT Xerox IEEE802.3 PUP Addr Trans packet EthPIEEEPUPAT L3Protocol = 0x0a01 // EthPBATMAN B.A.T.M.A.N.-Advanced packet [ NOT AN OFFICIALLY REGISTERED ID ] EthPBATMAN L3Protocol = 0x4305 // EthPDEC DEC Assigned proto EthPDEC L3Protocol = 0x6000 // EthPDNADL DEC DNA Dump/Load EthPDNADL L3Protocol = 0x6001 // EthPDNARC DEC DNA Remote Console EthPDNARC L3Protocol = 0x6002 // EthPDNART DEC DNA Routing EthPDNART L3Protocol = 0x6003 // EthPLAT DEC LAT EthPLAT L3Protocol = 0x6004 // EthPDIAG DEC Diagnostics EthPDIAG L3Protocol = 0x6005 // EthPCUST DEC Customer use EthPCUST L3Protocol = 0x6006 // EthPSCA DEC Systems Comms Arch EthPSCA L3Protocol = 0x6007 // EthPTEB Trans Ether Bridging EthPTEB L3Protocol = 0x6558 // EthPRARP Reverse Addr Res packet EthPRARP L3Protocol = 0x8035 // EthPATALK Appletalk DDP EthPATALK L3Protocol = 0x809B // EthPAARP Appletalk AARP EthPAARP L3Protocol = 0x80F3 // EthP8021Q 802.1Q VLAN Extended Header EthP8021Q L3Protocol = 0x8100 // EthPERSPAN ERSPAN type II EthPERSPAN L3Protocol = 0x88BE // EthPIPX IPX over DIX EthPIPX L3Protocol = 0x8137 // EthPIPV6 IPv6 over bluebook EthPIPV6 L3Protocol = 0x86DD // EthPPAUSE IEEE Pause frames. See 802.3 31B EthPPAUSE L3Protocol = 0x8808 // EthPSLOW Slow Protocol. See 802.3ad 43B EthPSLOW L3Protocol = 0x8809 // EthPWCCP Web-cache coordination protocol defined in draft-wilson-wrec-wccp-v2-00.txt EthPWCCP L3Protocol = 0x883E // EthPMPLSUC MPLS Unicast traffic EthPMPLSUC L3Protocol = 0x8847 // EthPMPLSMC MPLS Multicast traffic EthPMPLSMC L3Protocol = 0x8848 // EthPATMMPOA MultiProtocol Over ATM EthPATMMPOA L3Protocol = 0x884c // EthPPPPDISC PPPoE discovery messages EthPPPPDISC L3Protocol = 0x8863 // EthPPPPSES PPPoE session messages EthPPPPSES L3Protocol = 0x8864 // EthPLinkCTL HPNA, wlan link local tunnel EthPLinkCTL L3Protocol = 0x886c // EthPATMFATE Frame-based ATM Transport over Ethernet EthPATMFATE L3Protocol = 0x8884 // EthPPAE Port Access Entity (IEEE 802.1X) EthPPAE L3Protocol = 0x888E // EthPAOE ATA over Ethernet EthPAOE L3Protocol = 0x88A2 // EthP8021AD 802.1ad Service VLAN EthP8021AD L3Protocol = 0x88A8 // EthP802EX1 802.1 Local Experimental 1. EthP802EX1 L3Protocol = 0x88B5 // EthPTIPC TIPC EthPTIPC L3Protocol = 0x88CA // EthPMACSEC 802.1ae MACsec EthPMACSEC L3Protocol = 0x88E5 // EthP8021AH 802.1ah Backbone Service Tag EthP8021AH L3Protocol = 0x88E7 // EthPMVRP 802.1Q MVRP EthPMVRP L3Protocol = 0x88F5 // EthP1588 IEEE 1588 Timesync EthP1588 L3Protocol = 0x88F7 // EthPNCSI NCSI protocol EthPNCSI L3Protocol = 0x88F8 // EthPPRP IEC 62439-3 PRP/HSRv0 EthPPRP L3Protocol = 0x88FB // EthPFCOE Fibre Channel over Ethernet EthPFCOE L3Protocol = 0x8906 // EthPIBOE Infiniband over Ethernet EthPIBOE L3Protocol = 0x8915 // EthPTDLS TDLS EthPTDLS L3Protocol = 0x890D // EthPFIP FCoE Initialization Protocol EthPFIP L3Protocol = 0x8914 // EthP80221 IEEE 802.21 Media Independent Handover Protocol EthP80221 L3Protocol = 0x8917 // EthPHSR IEC 62439-3 HSRv1 EthPHSR L3Protocol = 0x892F // EthPNSH Network Service Header EthPNSH L3Protocol = 0x894F // EthPLOOPBACK Ethernet loopback packet, per IEEE 802.3 EthPLOOPBACK L3Protocol = 0x9000 // EthPQINQ1 deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] EthPQINQ1 L3Protocol = 0x9100 // EthPQINQ2 deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] EthPQINQ2 L3Protocol = 0x9200 // EthPQINQ3 deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] EthPQINQ3 L3Protocol = 0x9300 // EthPEDSA Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] EthPEDSA L3Protocol = 0xDADA // EthPIFE ForCES inter-FE LFB type EthPIFE L3Protocol = 0xED3E // EthPAFIUCV IBM afiucv [ NOT AN OFFICIALLY REGISTERED ID ] EthPAFIUCV L3Protocol = 0xFBFB // EthP8023MIN If the value in the ethernet type is less than this value then the frame is Ethernet II. Else it is 802.3 EthP8023MIN L3Protocol = 0x0600 // EthPIPV6HopByHop IPv6 Hop by hop option EthPIPV6HopByHop L3Protocol = 0x000 // EthP8023 Dummy type for 802.3 frames EthP8023 L3Protocol = 0x0001 // EthPAX25 Dummy protocol id for AX.25 EthPAX25 L3Protocol = 0x0002 // EthPALL Every packet (be careful!!!) EthPALL L3Protocol = 0x0003 // EthP8022 802.2 frames EthP8022 L3Protocol = 0x0004 // EthPSNAP Internal only EthPSNAP L3Protocol = 0x0005 // EthPDDCMP DEC DDCMP: Internal only EthPDDCMP L3Protocol = 0x0006 // EthPWANPPP Dummy type for WAN PPP frames*/ EthPWANPPP L3Protocol = 0x0007 // EthPPPPMP Dummy type for PPP MP frames EthPPPPMP L3Protocol = 0x0008 // EthPLOCALTALK Localtalk pseudo type EthPLOCALTALK L3Protocol = 0x0009 // EthPCAN CAN: Controller Area Network EthPCAN L3Protocol = 0x000C // EthPCANFD CANFD: CAN flexible data rate*/ EthPCANFD L3Protocol = 0x000D // EthPPPPTALK Dummy type for Atalk over PPP*/ EthPPPPTALK L3Protocol = 0x0010 // EthPTR8022 802.2 frames EthPTR8022 L3Protocol = 0x0011 // EthPMOBITEX Mobitex (kaz@cafe.net) EthPMOBITEX L3Protocol = 0x0015 // EthPCONTROL Card specific control frames EthPCONTROL L3Protocol = 0x0016 // EthPIRDA Linux-IrDA EthPIRDA L3Protocol = 0x0017 // EthPECONET Acorn Econet EthPECONET L3Protocol = 0x0018 // EthPHDLC HDLC frames EthPHDLC L3Protocol = 0x0019 // EthPARCNET 1A for ArcNet :-) EthPARCNET L3Protocol = 0x001A // EthPDSA Distributed Switch Arch. EthPDSA L3Protocol = 0x001B // EthPTRAILER Trailer switch tagging EthPTRAILER L3Protocol = 0x001C // EthPPHONET Nokia Phonet frames EthPPHONET L3Protocol = 0x00F5 // EthPIEEE802154 IEEE802.15.4 frame EthPIEEE802154 L3Protocol = 0x00F6 // EthPCAIF ST-Ericsson CAIF protocol EthPCAIF L3Protocol = 0x00F7 // EthPXDSA Multiplexed DSA protocol EthPXDSA L3Protocol = 0x00F8 // EthPMAP Qualcomm multiplexing and aggregation protocol EthPMAP L3Protocol = 0x00F9 )
func (L3Protocol) String ¶ added in v0.36.0
func (proto L3Protocol) String() string
type L4Protocol ¶ added in v0.36.0
type L4Protocol uint16
L4Protocol transport protocols
const ( // IPProtoIP Dummy protocol for TCP IPProtoIP L4Protocol = 0 // IPProtoICMP Internet Control Message Protocol (IPv4) IPProtoICMP L4Protocol = 1 // IPProtoIGMP Internet Group Management Protocol IPProtoIGMP L4Protocol = 2 // IPProtoIPIP IPIP tunnels (older KA9Q tunnels use 94) IPProtoIPIP L4Protocol = 4 // IPProtoTCP Transmission Control Protocol IPProtoTCP L4Protocol = 6 // IPProtoEGP Exterior Gateway Protocol IPProtoEGP L4Protocol = 8 // IPProtoIGP Interior Gateway Protocol (any private interior gateway (used by Cisco for their IGRP)) IPProtoIGP L4Protocol = 9 // IPProtoPUP PUP protocol IPProtoPUP L4Protocol = 12 // IPProtoUDP User Datagram Protocol IPProtoUDP L4Protocol = 17 // IPProtoIDP XNS IDP protocol IPProtoIDP L4Protocol = 22 // IPProtoTP SO Transport Protocol Class 4 IPProtoTP L4Protocol = 29 // IPProtoDCCP Datagram Congestion Control Protocol IPProtoDCCP L4Protocol = 33 // IPProtoIPV6 IPv6-in-IPv4 tunnelling IPProtoIPV6 L4Protocol = 41 // IPProtoRSVP RSVP Protocol IPProtoRSVP L4Protocol = 46 // IPProtoGRE Cisco GRE tunnels (rfc 1701,1702) IPProtoGRE L4Protocol = 47 // IPProtoESP Encapsulation Security Payload protocol IPProtoESP L4Protocol = 50 // IPProtoAH Authentication Header protocol IPProtoAH L4Protocol = 51 // IPProtoICMPV6 Internet Control Message Protocol (IPv6) IPProtoICMPV6 L4Protocol = 58 // IPProtoMTP Multicast Transport Protocol IPProtoMTP L4Protocol = 92 // IPProtoBEETPH IP option pseudo header for BEET IPProtoBEETPH L4Protocol = 94 // IPProtoENCAP Encapsulation Header IPProtoENCAP L4Protocol = 98 // IPProtoPIM Protocol Independent Multicast IPProtoPIM L4Protocol = 103 // IPProtoCOMP Compression Header Protocol IPProtoCOMP L4Protocol = 108 // IPProtoSCTP Stream Control Transport Protocol IPProtoSCTP L4Protocol = 132 // IPProtoUDPLITE UDP-Lite (RFC 3828) IPProtoUDPLITE L4Protocol = 136 // IPProtoMPLS MPLS in IP (RFC 4023) IPProtoMPLS L4Protocol = 137 // IPProtoRAW Raw IP packets IPProtoRAW L4Protocol = 255 )
func (L4Protocol) String ¶ added in v0.36.0
func (proto L4Protocol) String() string
type LinkEvent ¶
type LinkEvent struct {
SyscallEvent
SyscallContext
Source FileEvent `field:"file"`
Target FileEvent `field:"file.destination"`
// Syscall context aliases
SyscallPath string `field:"syscall.path,ref:link.syscall.str1"` // SECLDoc[syscall.path] Definition:`Path argument of the syscall`
SyscallDestinationPath string `field:"syscall.destination.path,ref:link.syscall.str2"` // SECLDoc[syscall.destination.path] Definition:`Destination path argument of the syscall`
}
LinkEvent represents a link event
type LinkageType ¶ added in v0.68.0
type LinkageType int
LinkageType represents the type of linkage used in the binary
const ( // None when unknown or for non-binary files None LinkageType = iota // Static linked executables Static // Dynamic linked executables Dynamic )
func (LinkageType) String ¶ added in v0.68.0
func (l LinkageType) String() string
type LinuxBinprm ¶ added in v0.40.0
type LinuxBinprm struct {
FileEvent FileEvent `field:"file"`
}
LinuxBinprm contains content from the linux_binprm struct, which holds the arguments used for loading binaries
type LoadModuleEvent ¶ added in v0.35.0
type LoadModuleEvent struct {
SyscallEvent
File FileEvent `field:"file"` // Path to the kernel module file
LoadedFromMemory bool `field:"loaded_from_memory"` // SECLDoc[loaded_from_memory] Definition:`Indicates if the kernel module was loaded from memory`
Name string `field:"name"` // SECLDoc[name] Definition:`Name of the new kernel module`
Args string `field:"args,handler:ResolveModuleArgs"` // SECLDoc[args] Definition:`Parameters (as a string) of the new kernel module`
Argv []string `field:"argv,handler:ResolveModuleArgv"` // SECLDoc[argv] Definition:`Parameters (as an array) of the new kernel module`
ArgsTruncated bool `field:"args_truncated"` // SECLDoc[args_truncated] Definition:`Indicates if the arguments were truncated or not`
}
LoadModuleEvent represents a load_module event
func (*LoadModuleEvent) UnmarshalBinary ¶ added in v0.35.0
func (e *LoadModuleEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshals a binary representation of itself
type LoginUIDWriteEvent ¶ added in v0.57.0
type LoginUIDWriteEvent struct {
AUID uint32 `field:"-"`
}
LoginUIDWriteEvent is used to propagate login UID updates to user space
func (*LoginUIDWriteEvent) UnmarshalBinary ¶ added in v0.57.0
func (e *LoginUIDWriteEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type MMapEvent ¶ added in v0.34.0
type MMapEvent struct {
SyscallEvent
File FileEvent `field:"file"`
Addr uint64 `field:"-"`
Offset uint64 `field:"-"`
Len uint64 `field:"-"`
Protection uint64 `field:"protection"` // SECLDoc[protection] Definition:`memory segment protection` Constants:`Protection constants`
Flags uint64 `field:"flags"` // SECLDoc[flags] Definition:`memory segment flags` Constants:`MMap flags`
}
MMapEvent represents a mmap event
type MProtectEvent ¶ added in v0.34.0
type MProtectEvent struct {
SyscallEvent
VMStart uint64 `field:"-"`
VMEnd uint64 `field:"-"`
VMProtection int `field:"vm_protection"` // SECLDoc[vm_protection] Definition:`initial memory segment protection` Constants:`Virtual Memory flags`
ReqProtection int `field:"req_protection"` // SECLDoc[req_protection] Definition:`new memory segment protection` Constants:`Virtual Memory flags`
}
MProtectEvent represents a mprotect event
func (*MProtectEvent) UnmarshalBinary ¶ added in v0.34.0
func (e *MProtectEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshals a binary representation of itself
type MatchedRule ¶ added in v0.44.0
type MatchedRule struct {
RuleID string
RuleVersion string
RuleTags map[string]string
PolicyName string
PolicyVersion string
}
MatchedRule contains the identification of one rule that has match
func AppendMatchedRule ¶ added in v0.44.0
func AppendMatchedRule(list []*MatchedRule, toAdd []*MatchedRule) []*MatchedRule
AppendMatchedRule appends two lists, but avoiding duplicates
func NewMatchedRule ¶ added in v0.44.0
func NewMatchedRule(ruleID, ruleVersion string, ruleTags map[string]string, policyName, policyVersion string) *MatchedRule
NewMatchedRule return a new MatchedRule instance
func (*MatchedRule) Match ¶ added in v0.44.0
func (mr *MatchedRule) Match(mr2 *MatchedRule) bool
Match returns true if the rules are equal
type MkdirEvent ¶
type MkdirEvent struct {
SyscallEvent
SyscallContext
File FileEvent `field:"file"`
Mode uint32 `field:"file.destination.mode; file.destination.rights"` // SECLDoc[file.destination.mode] Definition:`Mode of the new directory` Constants:`File mode constants` SECLDoc[file.destination.rights] Definition:`Rights of the new directory` Constants:`File mode constants`
// Syscall context aliases
SyscallPath string `field:"syscall.path,ref:mkdir.syscall.str1"` // SECLDoc[syscall.path] Definition:`Path argument of the syscall`
SyscallMode uint32 `field:"syscall.mode,ref:mkdir.syscall.int2"` // SECLDoc[syscall.mode] Definition:`Mode of the new directory`
}
MkdirEvent represents a mkdir event
func (*MkdirEvent) UnmarshalBinary ¶
func (e *MkdirEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type Model ¶
type Model struct {
ExtraValidateFieldFnc func(field eval.Field, fieldValue eval.FieldValue) error
ExtraValidateRule func(rule *eval.Rule) error
// contains filtered or unexported fields
}
Model describes the data model for the runtime security agent events
func (*Model) GetEvaluator ¶
func (*Model) GetEventTypes ¶
func (*Model) GetFieldRestrictions ¶ added in v0.57.0
func (*Model) SetLegacyFields ¶ added in v0.73.0
SetLegacyFields sets the legacy field mapping for backwards compatibility
func (*Model) ValidateField ¶
ValidateField validates the value of a field
type Mount ¶ added in v0.42.0
type Mount struct {
MountID uint32 `field:"-"`
MountIDUnique uint64 `field:"-"`
Device uint32 `field:"-"`
ParentPathKey PathKey `field:"-"`
Children []uint32 `field:"-"`
RootPathKey PathKey `field:"-"`
BindSrcMountID uint32 `field:"-"`
BindSrcMountIDUnique uint64 `field:"-"`
ParentMountIDUnique uint64 `field:"-"`
FSType string `field:"fs_type"` // SECLDoc[fs_type] Definition:`Type of the mounted file system`
MountPointStr string `field:"-"`
RootStr string `field:"-"`
Path string `field:"-"`
Origin uint32 `field:"-"`
Detached bool `field:"detached"` // SECLDoc[detached] Definition:`Mount is detached from the VFS`
Visible bool `field:"visible"` // SECLDoc[visible] Definition:`Mount is visible in the VFS`
NamespaceInode uint32 `field:"-"`
MountFlags uint32 `field:"flags"` // SECLDoc[flags] Definition:`Per-mount attributes represented as a bitmask using the canonical MOUNT_ATTR_* layout`
}
Mount represents a mountpoint (used by MountEvent, FsmountEvent and UnshareMountNSEvent)
type MountEvent ¶
type MountEvent struct {
SyscallEvent
SyscallContext
Mount
MountPointPath string `field:"mountpoint.path,handler:ResolveMountPointPath"` // SECLDoc[mountpoint.path] Definition:`Path of the mount point`
MountSourcePath string `field:"source.path,handler:ResolveMountSourcePath"` // SECLDoc[source.path] Definition:`Source path of a bind mount`
MountRootPath string `field:"root.path,handler:ResolveMountRootPath"` // SECLDoc[root.path] Definition:`Root path of the mount`
MountPointPathResolutionError error `field:"-"`
MountSourcePathResolutionError error `field:"-"`
MountRootPathResolutionError error `field:"-"`
// Syscall context aliases
SyscallSourcePath string `field:"syscall.source.path,ref:mount.syscall.str1"` // SECLDoc[syscall.source.path] Definition:`Source path argument of the syscall`
SyscallMountpointPath string `field:"syscall.mountpoint.path,ref:mount.syscall.str2"` // SECLDoc[syscall.mountpoint.path] Definition:`Mount point path argument of the syscall`
SyscallFSType string `field:"syscall.fs_type,ref:mount.syscall.str3"` // SECLDoc[syscall.fs_type] Definition:`File system type argument of the syscall`
}
MountEvent represents a mount event
func (*MountEvent) UnmarshalBinary ¶
func (e *MountEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type MountEventSource ¶ added in v0.70.0
type MountEventSource = uint32
MountEventSource source syscall of the mount event
const ( MountEventSourceInvalid MountEventSource = iota // MountEventSourceInvalid the source of the mount event is invalid MountEventSourceMountSyscall // MountEventSourceMountSyscall the source of the mount event is the `mount` syscall MountEventSourceFsmountSyscall // MountEventSourceFsmountSyscall the source of the mount event is the `fsmount` syscall MountEventSourceOpenTreeSyscall // MountEventSourceOpenTreeSyscall the source of the mount event is the `open_tree` syscall MountEventSourceMoveMountSyscall // MountEventSourceMoveMountSyscall the source of the mount event is the `move_mount` syscall MountEventSourcePivotRootSyscall // MountEventSourcePivotRootSyscall the source of the mount event is the `pivot_root` syscall )
type MountOrigin ¶ added in v0.55.0
type MountOrigin = uint32
MountOrigin origin of the mount
const ( MountOriginUnknown MountOrigin = iota // MountOriginUnknown unknown mount origin MountOriginProcfs // MountOriginProcfs mount point info from procfs MountOriginEvent // MountOriginEvent mount point info from an event MountOriginFsmount // MountOriginFsmount mount point info from the fsmount syscall MountOriginOpenTree // MountOriginOpenTree mount point created from the open_tree syscall MountOriginListmount // MountOriginListmount mount point obtained by calling `listmount` MountOriginMoveMount MountOriginPivotRoot // MountOriginPivotRoot mount point info from the pivot_root syscall )
type MountReleasedEvent ¶
MountReleasedEvent defines a mount released event
func (*MountReleasedEvent) UnmarshalBinary ¶
func (e *MountReleasedEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type MountSource ¶ added in v0.55.0
type MountSource = uint32
MountSource source of the mount
const ( MountSourceUnknown MountSource = iota // MountSourceUnknown mount resolved from unknown source MountSourceMountID // MountSourceMountID mount resolved with the mount id MountSourceSnapshot // MountSourceSnapshot mount resolved from the snapshot )
type NetDevice ¶ added in v0.36.0
type NetDevice struct {
Name string
NetNS uint32
IfIndex uint32
PeerNetNS uint32
PeerIfIndex uint32
}
NetDevice represents a network device
type NetDeviceEvent ¶ added in v0.36.0
type NetDeviceEvent struct {
SyscallEvent
Device NetDevice
}
NetDeviceEvent represents a network device event
func (*NetDeviceEvent) UnmarshalBinary ¶ added in v0.36.0
func (e *NetDeviceEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type NetworkContext ¶ added in v0.36.0
type NetworkContext struct {
Device NetworkDeviceContext `field:"device"` // network device on which the network packet was captured
L3Protocol uint16 `field:"l3_protocol"` // SECLDoc[l3_protocol] Definition:`L3 protocol of the network packet` Constants:`L3 protocols`
L4Protocol uint16 `field:"l4_protocol"` // SECLDoc[l4_protocol] Definition:`L4 protocol of the network packet` Constants:`L4 protocols`
Source IPPortContext `field:"source"` // source of the network packet
Destination IPPortContext `field:"destination"` // destination of the network packet
NetworkDirection uint32 `field:"network_direction"` // SECLDoc[network_direction] Definition:`Network direction of the network packet` Constants:`Network directions`
Size uint32 `field:"size"` // SECLDoc[size] Definition:`Size in bytes of the network packet`
Type uint32 `field:"type"` // SECLDoc[type] Definition:`Type of the network packet` Constants:`Network Protocol Types`
}
NetworkContext represents the network context of the event
func (*NetworkContext) IsZero ¶ added in v0.59.0
func (nc *NetworkContext) IsZero() bool
IsZero returns if there is a network context
func (*NetworkContext) UnmarshalBinary ¶ added in v0.36.0
func (e *NetworkContext) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type NetworkDeviceContext ¶ added in v0.36.0
type NetworkDeviceContext struct {
NetNS uint32 `field:"netns"` // SECLDoc[netns] Definition:`Interface NetNS ID`
IfIndex uint32 `field:"-"`
IfName string `field:"ifname,handler:ResolveNetworkDeviceIfName"` // SECLDoc[ifname] Definition:`Interface ifname`
}
NetworkDeviceContext represents the network device context of a network event
func (*NetworkDeviceContext) UnmarshalBinary ¶ added in v0.36.0
func (e *NetworkDeviceContext) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type NetworkDirection ¶ added in v0.63.0
type NetworkDirection uint32
NetworkDirection is used to identify the network direction of a flow
const ( // Egress is used to identify egress traffic Egress NetworkDirection = iota + 1 // Ingress is used to identify ingress traffic Ingress )
func (NetworkDirection) String ¶ added in v0.63.0
func (direction NetworkDirection) String() string
type NetworkFlowMonitorEvent ¶ added in v0.63.0
type NetworkFlowMonitorEvent struct {
Device NetworkDeviceContext `field:"device"` // network device on which the network flows were captured
FlowsCount uint64 `field:"-"`
Flows []Flow `field:"flows,iterator:FlowsIterator"` // list of captured flows
}
NetworkFlowMonitorEvent represents a network flow monitor event
func (*NetworkFlowMonitorEvent) UnmarshalBinary ¶ added in v0.63.0
func (e *NetworkFlowMonitorEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshals a binary representation of itself
type NetworkProtocolType ¶ added in v0.71.0
type NetworkProtocolType uint16
NetworkProtocolType is the type of the protocol of the network event
const ( // UnspecType is the default type UnspecType NetworkProtocolType = math.MaxUint16 // ICMPTypeEchoRequest is the type for ICMP echo requests ICMPTypeEchoRequest NetworkProtocolType = 8 // ICMPTypeEchoReply is the type for ICMP echo replies ICMPTypeEchoReply NetworkProtocolType = 0 // ICMPTypeRouterSolicitation is the type for ICMP router solicitation ICMPTypeRouterSolicitation NetworkProtocolType = 9 // ICMPTypeRouterAdvertisement is the type for ICMP router advertisement ICMPTypeRouterAdvertisement NetworkProtocolType = 10 // ICMPTypeNeighborSolicitation is the type for ICMP neighbor solicitation ICMPTypeNeighborSolicitation NetworkProtocolType = 135 // ICMPTypeNeighborAdvertisement is the type for ICMP neighbor advertisement ICMPTypeNeighborAdvertisement NetworkProtocolType = 136 // ICMPv6TypeEchoRequest is the type for ICMPv6 echo requests ICMPv6TypeEchoRequest NetworkProtocolType = 128 // ICMPv6TypeEchoReply is the type for ICMPv6 echo replies ICMPv6TypeEchoReply NetworkProtocolType = 129 // ICMPv6TypeRouterSolicitation is the type for ICMPv6 router solicitation ICMPv6TypeRouterSolicitation NetworkProtocolType = 133 // ICMPv6TypeRouterAdvertisement is the type for ICMPv6 router advertisement ICMPv6TypeRouterAdvertisement NetworkProtocolType = 134 // ICMPv6TypeNeighborSolicitation is the type for ICMPv6 neighbor solicitation ICMPv6TypeNeighborSolicitation NetworkProtocolType = 137 // ICMPv6TypeNeighborAdvertisement is the type for ICMPv6 neighbor advertisement ICMPv6TypeNeighborAdvertisement NetworkProtocolType = 138 )
func (NetworkProtocolType) String ¶ added in v0.71.0
func (proto NetworkProtocolType) String() string
type NetworkStats ¶ added in v0.63.0
type NetworkStats struct {
DataSize uint64 `field:"data_size"` // SECLDoc[data_size] Definition:`Amount of data transmitted or received`
PacketCount uint64 `field:"packet_count"` // SECLDoc[packet_count] Definition:`Count of network packets transmitted or received`
}
NetworkStats is used to record network statistics
func (*NetworkStats) Add ¶ added in v0.63.0
func (ns *NetworkStats) Add(input NetworkStats)
Add the input stats to the current stats
func (*NetworkStats) UnmarshalBinary ¶ added in v0.63.0
func (e *NetworkStats) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshals a binary representation of itself
type OTelProcessCtxEvent ¶ added in v0.84.0
type OTelProcessCtxEvent struct {
Pid uint32
}
OTelProcessCtxEvent is an internal event sent when a process publishes its OTel process context.
func (*OTelProcessCtxEvent) UnmarshalBinary ¶ added in v0.84.0
func (e *OTelProcessCtxEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type OnDemandEvent ¶ added in v0.56.0
type OnDemandEvent struct {
ID uint32 `field:"-"`
Name string `field:"name,handler:ResolveOnDemandName" op_override:"OnDemandNameOverrides"`
Data [OnDemandParsedArgsCount * OnDemandPerArgSize]byte `field:"-"`
Arg1Str string `field:"arg1.str,handler:ResolveOnDemandArg1Str"`
Arg1Uint uint64 `field:"arg1.uint,handler:ResolveOnDemandArg1Uint"`
Arg2Str string `field:"arg2.str,handler:ResolveOnDemandArg2Str"`
Arg2Uint uint64 `field:"arg2.uint,handler:ResolveOnDemandArg2Uint"`
Arg3Str string `field:"arg3.str,handler:ResolveOnDemandArg3Str"`
Arg3Uint uint64 `field:"arg3.uint,handler:ResolveOnDemandArg3Uint"`
Arg4Str string `field:"arg4.str,handler:ResolveOnDemandArg4Str"`
Arg4Uint uint64 `field:"arg4.uint,handler:ResolveOnDemandArg4Uint"`
Arg5Str string `field:"arg5.str,handler:ResolveOnDemandArg5Str"`
Arg5Uint uint64 `field:"arg5.uint,handler:ResolveOnDemandArg5Uint"`
Arg6Str string `field:"arg6.str,handler:ResolveOnDemandArg6Str"`
Arg6Uint uint64 `field:"arg6.uint,handler:ResolveOnDemandArg6Uint"`
}
OnDemandEvent identifies an on-demand event generated from on-demand probes
func (*OnDemandEvent) UnmarshalBinary ¶ added in v0.56.0
func (e *OnDemandEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type OpenEvent ¶
type OpenEvent struct {
SyscallEvent
SyscallContext
File FileEvent `field:"file"`
Flags uint32 `field:"flags"` // SECLDoc[flags] Definition:`Flags used when opening the file` Constants:`Open flags`
Mode uint32 `field:"file.destination.mode"` // SECLDoc[file.destination.mode] Definition:`Mode of the created file` Constants:`File mode constants`
SampleCookie uint64 `field:"-"`
// Syscall context aliases
SyscallPath string `field:"syscall.path,ref:open.syscall.str1"` // SECLDoc[syscall.path] Definition:`Path argument of the syscall`
SyscallFlags uint32 `field:"syscall.flags,ref:open.syscall.int2"` // SECLDoc[syscall.flags] Definition:`Flags argument of the syscall`
SyscallMode uint32 `field:"syscall.mode,ref:open.syscall.int3"` // SECLDoc[syscall.mode] Definition:`Mode argument of the syscall`
}
OpenEvent represents an open event
type OpenFlags ¶
type OpenFlags int
OpenFlags represents an open flags bitmask value
func (OpenFlags) StringArray ¶
StringArray returns the open flags as an array of strings
type PIDContext ¶ added in v0.37.0
type PIDContext struct {
Pid uint32 `field:"pid"` // SECLDoc[pid] Definition:`Process ID of the process (also called thread group ID)`
Tid uint32 `field:"tid"` // SECLDoc[tid] Definition:`Thread ID of the thread`
NetNS uint32 `field:"netns"` // SECLDoc[netns] Definition:`NetNS ID of the process`
MntNS uint32 `field:"mntns"` // SECLDoc[mntns] Definition:`MNTNS ID of the process`
IsKworker bool `field:"is_kworker"` // SECLDoc[is_kworker] Definition:`Indicates whether the process is a kworker/kthread`
PPid uint32 `field:"ppid"` // SECLDoc[ppid] Definition:`Parent process ID`
SID uint32 `field:"sid"` // SECLDoc[sid] Definition:`Session ID of the process`
ExecInode uint64 `field:"-"` // used to track exec and event loss
UserSessionID uint64 `field:"-"` // used to track user sessions from kernel space
// used for ebpfless
NSID uint64 `field:"-"`
}
PIDContext holds the process context of a kernel event
func (*PIDContext) UnmarshalBinary ¶ added in v0.37.0
func (p *PIDContext) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself, process_context_t kernel side
type PTraceEvent ¶ added in v0.34.0
type PTraceEvent struct {
SyscallEvent
Request uint32 `field:"request"` // SECLDoc[request] Definition:`ptrace request` Constants:`Ptrace constants`
PID uint32 `field:"-"`
NSPID uint32 `field:"-"`
Address uint64 `field:"-"`
Tracee *ProcessContext `field:"tracee"` // process context of the tracee
}
PTraceEvent represents a ptrace event
func (*PTraceEvent) UnmarshalBinary ¶ added in v0.34.0
func (e *PTraceEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type PTraceRequest ¶ added in v0.34.0
type PTraceRequest uint32
PTraceRequest represents a ptrace request value
func (PTraceRequest) String ¶ added in v0.34.0
func (f PTraceRequest) String() string
type PathKey ¶ added in v0.44.0
type PathKey struct {
Inode uint64 `field:"inode"` // SECLDoc[inode] Definition:`Inode of the file`
MountID uint32 `field:"mount_id"` // SECLDoc[mount_id] Definition:`Mount ID of the file`
PathID uint32 `field:"-"`
}
PathKey identifies an entry in the dentry cache
func (*PathKey) MarshalBinary ¶ added in v0.44.0
MarshalBinary returns the binary representation of a path key
func (*PathKey) UnmarshalBinary ¶ added in v0.44.0
UnmarshalBinary unmarshals the given content
type PathLeaf ¶ added in v0.45.0
type PathLeaf struct {
Parent PathKey
Name [MaxSegmentLength + 1]byte
Len uint16
Padding [6]uint8
}
PathLeaf is the go representation of the eBPF path_leaf_t structure
func (*PathLeaf) MarshalBinary ¶ added in v0.45.0
MarshalBinary returns the binary representation of a path key
type PipeBufFlag ¶ added in v0.35.0
type PipeBufFlag int
PipeBufFlag represents a pipe buffer flag
const ( // PipeBufFlagLRU pipe buffer flag PipeBufFlagLRU PipeBufFlag = 0x1 /* page is on the LRU */ // PipeBufFlagAtomic pipe buffer flag PipeBufFlagAtomic PipeBufFlag = 0x2 /* was atomically mapped */ // PipeBufFlagGift pipe buffer flag PipeBufFlagGift PipeBufFlag = 0x4 /* page is a gift */ // PipeBufFlagPacket pipe buffer flag PipeBufFlagPacket PipeBufFlag = 0x8 /* read() as a packet */ // PipeBufFlagCanMerge pipe buffer flag PipeBufFlagCanMerge PipeBufFlag = 0x10 /* can merge buffers */ // PipeBufFlagWhole pipe buffer flag PipeBufFlagWhole PipeBufFlag = 0x20 /* read() must return entire buffer or error */ // PipeBufFlagLoss pipe buffer flag PipeBufFlagLoss PipeBufFlag = 0x40 /* Message loss happened after this buffer */ )
func (PipeBufFlag) String ¶ added in v0.35.0
func (pbf PipeBufFlag) String() string
type PrCtlEvent ¶ added in v0.71.0
type PrCtlEvent struct {
SyscallEvent
Option int `field:"option"` // SECLDoc[option] Definition:`prctl option`
NewName string `field:"new_name"` // SECLDoc[new_name] Definition:`New name of the process`
IsNameTruncated bool `field:"is_name_truncated"` // SECLDoc[is_name_truncated] Definition:`Indicates that the name field is truncated`
}
PrCtlEvent represents a prctl event
func (*PrCtlEvent) UnmarshalBinary ¶ added in v0.71.0
func (e *PrCtlEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshals a binary representation of itself
type PrCtlOption ¶ added in v0.71.0
type PrCtlOption int
PrCtlOption is used to define the option of a process control in prctl
func (PrCtlOption) String ¶ added in v0.71.0
func (p PrCtlOption) String() string
type Process ¶
type Process struct {
PIDContext
FileEvent FileEvent `field:"file,check:IsNotKworker"`
CGroup CGroupContext `field:"cgroup"` // SECLDoc[cgroup] Definition:`CGroup`
ContainerContext ContainerContext `field:"container"` // SECLDoc[container] Definition:`Container`
TTYName string `field:"tty_name"` // SECLDoc[tty_name] Definition:`Name of the TTY associated with the process`
Comm string `field:"comm"` // SECLDoc[comm] Definition:`Comm attribute of the process`
LinuxBinprm LinuxBinprm `field:"interpreter,check:HasInterpreter,set_handler:SetInterpreterFields"` // Script interpreter as identified by the shebang
// pid_cache_t
ForkTime time.Time `field:"fork_time,opts:getters_only"`
ExecTime time.Time `field:"exec_time,opts:getters_only"`
// ExitTime is set only when the process exits (do_exit).
ExitTime time.Time `field:"exit_time,opts:getters_only"`
// StopExecutionTime is set when this process cache entry stops being the
// currently executing image, either because it was replaced by a later exec
// or because the process exited. Unlike ExitTime, it is intentionally not
// exposed as a SECL field and must not be used as proof of a final process exit.
StopExecutionTime time.Time `field:"-"`
ForkFlags uint64 `field:"-"`
// TODO: merge with ExecTime
CreatedAt uint64 `field:"created_at,handler:ResolveProcessCreatedAt"` // SECLDoc[created_at] Definition:`Timestamp of the creation of the process`
Cookie uint64 `field:"-"`
// credentials_t section of pid_cache_t
Credentials
CapsAttempted uint64 `field:"caps_attempted"` // SECLDoc[caps_attempted] Definition:`Bitmask of the capabilities that the process attempted to use` Constants:`Kernel Capability constants`
CapsUsed uint64 `field:"caps_used"` // SECLDoc[caps_used] Definition:`Bitmask of the capabilities that the process successfully used` Constants:`Kernel Capability constants`
CapsAttemptedHostUserNS uint64 `field:"caps_attempted_host_userns"` // SECLDoc[caps_attempted_host_userns] Definition:`Bitmask of the capabilities that the process attempted to use through checks that always target the initial user namespace` Constants:`Kernel Capability constants`
CapsUsedHostUserNS uint64 `field:"caps_used_host_userns"` // SECLDoc[caps_used_host_userns] Definition:`Bitmask of the capabilities that the process successfully used through checks that always target the initial user namespace` Constants:`Kernel Capability constants`
UserSession UserSessionContext `field:"user_session"` // SECLDoc[user_session] Definition:`User Session context of this process`
AWSSecurityCredentials []AWSSecurityCredentials `field:"aws_security_credentials,iterator:AWSSecurityCredentialsIterator,opts:exposed_at_event_root_only"` // AWS security credentials this process resolved from IMDS; only exposed at the root of a process context, the accessors generator keeps a single iterator per field so it cannot be nested under the ancestors one
Tracer Tracer `field:"-"`
ArgsID uint64 `field:"-"`
EnvsID uint64 `field:"-"`
ArgsEntry *ArgsEntry `field:"-"`
EnvsEntry *EnvsEntry `field:"-"`
// defined to generate accessors, ArgsTruncated and EnvsTruncated are used during by unmarshaller
Argv0 string `field:"argv0,handler:ResolveProcessArgv0,weight:100"` // SECLDoc[argv0] Definition:`First argument of the process`
Args string `field:"args,handler:ResolveProcessArgs,weight:500,opts:skip_ad"` // SECLDoc[args] Definition:`Arguments of the process (as a string, excluding argv0)` Example:`exec.args == "-sV -p 22,53,110,143,4564 198.116.0-255.1-127"` Description:`Matches any process with these exact arguments.` Example:`exec.args =~ "* -F * http*"` Description:`Matches any process that has the "-F" argument anywhere before an argument starting with "http".`
Argv []string `` // SECLDoc[argv] Definition:`Arguments of the process (as an array, excluding argv0)` Example:`exec.argv in ["127.0.0.1"]` Description:`Matches any process that has this IP address as one of its arguments.` SECLDoc[args_flags] Definition:`Flags in the process arguments` Example:`exec.args_flags in ["s"] && exec.args_flags in ["V"]` Description:`Matches any process with both "-s" and "-V" flags in its arguments. Also matches "-sV".` SECLDoc[args_options] Definition:`Argument of the process as options` Example:`exec.args_options in ["p=0-1024"]` Description:`Matches any process that has either "-p 0-1024" or "--p=0-1024" in its arguments.`
/* 223-byte string literal not displayed */
ArgsTruncated bool `field:"args_truncated,handler:ResolveProcessArgsTruncated"` // SECLDoc[args_truncated] Definition:`Indicator of arguments truncation`
Envs []string `field:"envs,handler:ResolveProcessEnvs,weight:100"` // SECLDoc[envs] Definition:`Environment variable names of the process`
Envp []string `field:"envp,handler:ResolveProcessEnvp,weight:100"` // SECLDoc[envp] Definition:`Environment variables of the process`
EnvsTruncated bool `field:"envs_truncated,handler:ResolveProcessEnvsTruncated"` // SECLDoc[envs_truncated] Definition:`Indicator of environment variables truncation`
ArgsScrubbed string `field:"args_scrubbed,handler:ResolveProcessArgsScrubbed,opts:getters_only"`
ArgvScrubbed []string `field:"argv_scrubbed,handler:ResolveProcessArgvScrubbed,opts:getters_only"`
// symlink to the process binary
SymlinkPathnameStr [MaxSymlinks]string `field:"-"`
SymlinkBasenameStr string `field:"-"`
// IsThread is the negation of IsExec and should be manipulated directly
IsThread bool `field:"is_thread,handler:ResolveProcessIsThread"` // SECLDoc[is_thread] Definition:`Indicates whether the process is considered a thread (that is, a child process that hasn't executed another program)`
IsExec bool `field:"is_exec"` // SECLDoc[is_exec] Definition:`Indicates whether the process entry is from a new binary execution`
IsExecExec bool `field:"-"` // Indicates whether the process is an exec following another exec
IsParentMissing bool `field:"-"` // Indicates the direct parent is missing
Source uint64 `field:"-"`
IsThroughSymLink bool `field:"-"` // Indicates whether the process is through a symlink
}
Process represents a process
func (*Process) GetPathResolutionError ¶
GetPathResolutionError returns the path resolution error as a string if there is one
func (*Process) GetProcessArgv ¶ added in v0.51.0
GetProcessArgv returns the unscrubbed args of the event as an array. Use with caution.
func (*Process) GetProcessArgv0 ¶ added in v0.51.0
GetProcessArgv0 returns the first arg of the event and whether the process arguments are truncated
func (*Process) HasInterpreter ¶ added in v0.40.0
HasInterpreter returns whether the process uses an interpreter
func (*Process) IsNotKworker ¶ added in v0.42.0
IsNotKworker returns true if the process isn't a kworker
func (*Process) MarshalPidCache ¶ added in v0.36.0
MarshalPidCache marshals a binary representation of itself
func (*Process) MarshalProcCache ¶ added in v0.36.0
MarshalProcCache marshals a binary representation of itself
func (*Process) SetSpanContext ¶ added in v0.83.0
func (p *Process) SetSpanContext(sc SpanContext)
SetSpanContext attaches the captured APM correlation span context to the process. Used by ResolveSpanContext to persist the span a fork or an exec captured onto the process it created. Carries SpanID, TraceID, ExtraAttrsID and any extra Attributes.
func (*Process) SetSpanContextAttributes ¶ added in v0.83.0
SetSpanContextAttributes updates only the Attributes field of the process's SpanContext: the OTel attributes are resolved after the fork or the exec that stamped the rest of it.
func (*Process) UnmarshalBinary ¶
UnmarshalBinary unmarshalls a binary representation of itself
func (*Process) UnmarshalPidCacheBinary ¶ added in v0.39.0
UnmarshalPidCacheBinary unmarshalls Unmarshal pid_cache_t
type ProcessAncestorsIterator ¶
type ProcessAncestorsIterator struct {
Root *ProcessCacheEntry
// contains filtered or unexported fields
}
ProcessAncestorsIterator defines an iterator of ancestors
func (*ProcessAncestorsIterator) At ¶ added in v0.60.0
func (it *ProcessAncestorsIterator) At(ctx *eval.Context, regID eval.RegisterID, pos int) *ProcessCacheEntry
At returns the element at the given position
func (*ProcessAncestorsIterator) Front ¶
func (it *ProcessAncestorsIterator) Front(_ *eval.Context) *ProcessCacheEntry
Front returns the first element
func (*ProcessAncestorsIterator) Len ¶ added in v0.60.0
func (it *ProcessAncestorsIterator) Len(ctx *eval.Context) int
Len returns the len
func (*ProcessAncestorsIterator) Next ¶
func (it *ProcessAncestorsIterator) Next(_ *eval.Context) *ProcessCacheEntry
Next returns the next element
type ProcessCacheEntry ¶
type ProcessCacheEntry struct {
ProcessContext
}
ProcessCacheEntry this struct holds process context kept in the process tree
func GetPlaceholderProcessCacheEntry ¶ added in v0.49.0
func GetPlaceholderProcessCacheEntry(pidContext PIDContext) *ProcessCacheEntry
GetPlaceholderProcessCacheEntry returns an empty process cache entry for failed process resolutions
func NewPlaceholderProcessCacheEntry ¶ added in v0.49.0
func NewPlaceholderProcessCacheEntry(pid uint32, tid uint32, isKworker bool) *ProcessCacheEntry
NewPlaceholderProcessCacheEntry returns a new empty process cache entry for failed process resolutions
func NewProcessCacheEntry ¶
func NewProcessCacheEntry() *ProcessCacheEntry
NewProcessCacheEntry returns a new process cache entry
func (*ProcessCacheEntry) AppendReleaseCallback ¶ added in v0.56.0
func (pc *ProcessCacheEntry) AppendReleaseCallback(callback func())
AppendReleaseCallback set the callback called when the entry is released
func (*ProcessCacheEntry) ApplyExecTimeOf ¶ added in v0.47.0
func (pc *ProcessCacheEntry) ApplyExecTimeOf(entry *ProcessCacheEntry)
ApplyExecTimeOf replace previous entry values by the given one
func (*ProcessCacheEntry) Equals ¶ added in v0.36.0
func (pc *ProcessCacheEntry) Equals(entry *ProcessCacheEntry) bool
Equals returns whether process cache entries share the same values for file and args/envs
func (*ProcessCacheEntry) Exec ¶
func (pc *ProcessCacheEntry) Exec(entry *ProcessCacheEntry)
Exec replace a process
func (*ProcessCacheEntry) Exit ¶
func (pc *ProcessCacheEntry) Exit(exitTime time.Time)
Exit marks a process final exit. If this entry had already stopped executing because it was replaced by a later exec, keep that StopExecutionTime and only record the final process ExitTime.
func (*ProcessCacheEntry) Fork ¶
func (pc *ProcessCacheEntry) Fork(child *ProcessCacheEntry)
Fork returns a copy of the current ProcessCacheEntry
func (*ProcessCacheEntry) GetAncestorsPIDs ¶ added in v0.68.0
func (pc *ProcessCacheEntry) GetAncestorsPIDs() []uint32
GetAncestorsPIDs return the ancestors list PIDs
func (*ProcessCacheEntry) GetContainerPIDs ¶ added in v0.51.0
func (pc *ProcessCacheEntry) GetContainerPIDs() ([]uint32, []string)
GetContainerPIDs return the pids
func (*ProcessCacheEntry) HasValidLineage ¶ added in v0.49.0
func (pc *ProcessCacheEntry) HasValidLineage() (bool, error)
HasValidLineage returns false if, from the entry, we cannot ascend the ancestors list to PID 1 or if a node has a missing parent
func (*ProcessCacheEntry) Hash ¶ added in v0.65.0
func (pc *ProcessCacheEntry) Hash() eval.ScopeHashKey
Hash returns a unique key for the entity
func (*ProcessCacheEntry) IsContainerRoot ¶ added in v0.44.0
func (pc *ProcessCacheEntry) IsContainerRoot() bool
IsContainerRoot returns whether this is a top level process in the container ID
func (*ProcessCacheEntry) ParentScope ¶ added in v0.68.0
func (pc *ProcessCacheEntry) ParentScope() (eval.VariableScope, bool)
ParentScope returns the parent entity scope
func (*ProcessCacheEntry) Reparent ¶ added in v0.84.0
func (pc *ProcessCacheEntry) Reparent(newParent *ProcessCacheEntry)
Reparent updates the parent of the process cache entry to reflect reparenting by the kernel. This handles the subreaper mechanism where children are reparented when their parent exits.
func (*ProcessCacheEntry) SetAsExec ¶ added in v0.61.0
func (pc *ProcessCacheEntry) SetAsExec()
SetAsExec set the entry as an Exec
func (*ProcessCacheEntry) SetExecParent ¶ added in v0.60.0
func (pc *ProcessCacheEntry) SetExecParent(parent *ProcessCacheEntry)
SetExecParent set the parent of the exec entry
func (*ProcessCacheEntry) SetForkParent ¶ added in v0.60.0
func (pc *ProcessCacheEntry) SetForkParent(parent *ProcessCacheEntry)
SetForkParent set the parent of the fork entry
func (*ProcessCacheEntry) StopExecution ¶ added in v0.84.0
func (pc *ProcessCacheEntry) StopExecution(stopTime time.Time)
StopExecution marks this process cache entry as no longer being the current executing image. This happens both on exec replacement and on final exit.
type ProcessContext ¶
type ProcessContext struct {
Process
Parent *Process `field:"parent,opts:exposed_at_event_root_only,check:HasParent"`
Ancestor *ProcessCacheEntry `field:"ancestors,iterator:ProcessAncestorsIterator,check:IsNotKworker"`
}
ProcessContext holds the process context of an event
func (*ProcessContext) HasParent ¶ added in v0.42.0
func (p *ProcessContext) HasParent() bool
HasParent returns whether the process has a parent
type Protection ¶ added in v0.34.0
type Protection uint64
Protection represents a virtual memory protection bitmask value
func (Protection) String ¶ added in v0.34.0
func (p Protection) String() string
type QClass ¶ added in v0.36.0
type QClass uint32
QClass is used to declare the qclass field of a DNS request
type QType ¶ added in v0.36.0
type QType uint32
QType is used to declare the qtype field of a DNS request
type RawPacketEvent ¶ added in v0.60.0
type RawPacketEvent struct {
NetworkContext
TLSContext TLSContext `field:"tls"` // SECLDoc[tls] Definition:`TLS context`
Filter string `field:"filter" op_override:"PacketFilterMatching"` // SECLDoc[filter] Definition:`pcap filter expression`
CaptureInfo gopacket.CaptureInfo `field:"-"`
Data []byte `field:"-"`
}
RawPacketEvent represents a packet event
type Releasable ¶ added in v0.46.0
type Releasable struct {
// contains filtered or unexported fields
}
Releasable represents an object than can be released
func (*Releasable) AppendReleaseCallback ¶ added in v0.56.0
func (r *Releasable) AppendReleaseCallback(callback func())
AppendReleaseCallback sets a callback to be called when the cache entry is released
func (*Releasable) CallReleaseCallback ¶ added in v0.46.0
func (r *Releasable) CallReleaseCallback()
CallReleaseCallback calls the on-release callback
type RenameEvent ¶
type RenameEvent struct {
SyscallEvent
SyscallContext
Old FileEvent `field:"file"`
New FileEvent `field:"file.destination"`
// Syscall context aliases
SyscallPath string `field:"syscall.path,ref:rename.syscall.str1"` // SECLDoc[syscall.path] Definition:`Path argument of the syscall`
SyscallDestinationPath string `field:"syscall.destination.path,ref:rename.syscall.str2"` // SECLDoc[syscall.destination.path] Definition:`Destination path argument of the syscall`
}
RenameEvent represents a rename event
func (*RenameEvent) UnmarshalBinary ¶
func (e *RenameEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type RetValError ¶
type RetValError int
RetValError represents a syscall return error value
func (RetValError) String ¶
func (f RetValError) String() string
type RlimitResource ¶ added in v0.75.0
type RlimitResource int
RlimitResource is used to define the resource type in rlimit calls
func (RlimitResource) String ¶ added in v0.75.0
func (r RlimitResource) String() string
type RmdirEvent ¶
type RmdirEvent struct {
SyscallEvent
SyscallContext
File FileEvent `field:"file"`
// Syscall context aliases
SyscallPath string `field:"syscall.path,ref:rmdir.syscall.str1"` // SECLDoc[syscall.path] Definition:`Path argument of the syscall`
}
RmdirEvent represents a rmdir event
func (*RmdirEvent) UnmarshalBinary ¶
func (e *RmdirEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type RuleContext ¶ added in v0.66.0
type RuleContext struct {
Expression string `field:"-"`
MatchingSubExprs eval.MatchingSubExprs `field:"-"`
}
RuleContext defines a rule context
type SELinuxEvent ¶
type SELinuxEvent struct {
File FileEvent `field:"-"`
EventKind SELinuxEventKind `field:"-"`
BoolName string `field:"bool.name,handler:ResolveSELinuxBoolName"` // SECLDoc[bool.name] Definition:`SELinux boolean name`
BoolChangeValue string `field:"bool.state"` // SECLDoc[bool.state] Definition:`SELinux boolean new value`
BoolCommitValue bool `field:"bool_commit.state"` // SECLDoc[bool_commit.state] Definition:`Indicator of a SELinux boolean commit operation`
EnforceStatus string `field:"enforce.status"` // SECLDoc[enforce.status] Definition:`SELinux enforcement status (one of "enforcing", "permissive", "disabled")`
}
SELinuxEvent represents a selinux event
func (*SELinuxEvent) UnmarshalBinary ¶
func (e *SELinuxEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type SELinuxEventKind ¶
type SELinuxEventKind uint32
SELinuxEventKind represents the event kind for SELinux events
const ( // SELinuxBoolChangeEventKind represents SELinux boolean change events SELinuxBoolChangeEventKind SELinuxEventKind = iota // SELinuxStatusChangeEventKind represents SELinux status change events SELinuxStatusChangeEventKind // SELinuxBoolCommitEventKind represents SELinux boolean commit events SELinuxBoolCommitEventKind )
type SSHSessionContext ¶ added in v0.74.0
type SSHSessionContext struct {
SSHSessionID uint64 `field:"ssh_session_id" json:"ssh_session_id,omitempty"` // SECLDoc[ssh_session_id] Definition:`Unique identifier of the SSH user session on the host`
SSHClientPort int `field:"ssh_client_port" json:"client_port,omitempty"` // SECLDoc[ssh_client_port] Definition:`SSH client port of the user that executed the process`
SSHClientIP net.IPNet `field:"ssh_client_ip" json:"client_ip,omitempty"` // SECLDoc[ssh_client_ip] Definition:`SSH client IP of the user that executed the process`
SSHAuthMethod int `field:"ssh_auth_method" json:"auth_method,omitempty"` // SECLDoc[ssh_auth_method] Definition:`SSH authentication method used by the user` Constants:`SSHAuthMethod`
SSHPublicKey string `field:"ssh_public_key" json:"public_key,omitempty"` // SECLDoc[ssh_public_key] Definition:`SSH public key used for authentication (if applicable)`
SSHDPid uint32 `field:"-" json:"-"` // Internal field
}
SSHSessionContext describes the SSH session context
type SampleRefreshEvent ¶ added in v0.82.0
type SampleRefreshEvent struct {
Cookie uint64
}
SampleRefreshEvent is a lightweight internal event sent when a dedup map detects a duplicate and wants to refresh the cookie timestamp in userspace.
func (*SampleRefreshEvent) UnmarshalBinary ¶ added in v0.82.0
func (e *SampleRefreshEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type SecurityProfileContext ¶ added in v0.45.0
type SecurityProfileContext struct {
Name string `field:"name"` // SECLDoc[name] Definition:`Name of the security profile`
Version string `field:"version"` // SECLDoc[version] Definition:`Version of the security profile`
Tags []string `field:"tags"` // SECLDoc[tags] Definition:`Tags of the security profile`
EventTypes []EventType `field:"event_types"` // SECLDoc[event_types] Definition:`Event types enabled for the security profile`
EventTypeState EventFilteringProfileState `field:"-"` // State of the event type in this profile
// ProfileAlreadySent is true when the profile had already been persisted to the backend at the time this event was emitted
ProfileAlreadySent bool `field:"-"`
}
SecurityProfileContext holds the security context of the profile
type SetSockOptEvent ¶ added in v0.68.0
type SetSockOptEvent struct {
SyscallEvent
SocketType uint16 `field:"socket_type"` // SECLDoc[socket_type] Definition:`Socket type`
SocketFamily uint16 `field:"socket_family"` // SECLDoc[socket_family] Definition:`Socket family`
FilterLen uint16 `field:"filter_len"` // SECLDoc[filter_len] Definition:`Length of the currently attached filter. Only available if the optname is \`SO_ATTACH_FILTER\“
SocketProtocol uint16 `field:"socket_protocol"` // SECLDoc[socket_protocol] Definition:`Socket protocol`
Level uint32 `field:"level"` // SECLDoc[level] Definition:`Socket level`
OptName uint32 `field:"optname"` // SECLDoc[optname] Definition:`Socket option name`
SizeToRead uint32 `field:"-"` // Internal field, not exposed to users
IsFilterTruncated bool `field:"is_filter_truncated"` // SECLDoc[is_filter_truncated] Definition:`Indicates that the currently attached filter is truncated. Only available if the optname is \`SO_ATTACH_FILTER\“
RawFilter []byte `field:"-"` // Internal field, not exposed to users
FilterInstructions string `field:"filter_instructions,handler:ResolveSetSockOptFilterInstructions"` // SECLDoc[filter_instructions] Definition:`Instructions of the currently attached filter. Only available if the optname is \`SO_ATTACH_FILTER\“
FilterHash string `field:"filter_hash,handler:ResolveSetSockOptFilterHash:"` // SECLDoc[filter_hash] Definition:`Hash of the currently attached filter using sha256. Only available if the optname is \`SO_ATTACH_FILTER\“
UsedImmediates []int `field:"used_immediates,handler:ResolveSetSockOptUsedImmediates, weight:999"` // SECLDoc[used_immediates] Definition:`List of immediate values used in the currently attached filter. Only available if the optname is \`SO_ATTACH_FILTER\“
}
SetSockOptEvent represents a set socket option event
func (*SetSockOptEvent) UnmarshalBinary ¶ added in v0.68.0
func (e *SetSockOptEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshals a binary representation of itself
type SetSockOptLevel ¶ added in v0.69.0
type SetSockOptLevel int
SetSockOptLevel is used to define the level of a socket in setsockopt
func (SetSockOptLevel) String ¶ added in v0.69.0
func (s SetSockOptLevel) String() string
type SetSockOptOptNameIP ¶ added in v0.69.0
type SetSockOptOptNameIP int
SetSockOptOptNameIP is used to define the optname for setsockopt when the level is IP
func (SetSockOptOptNameIP) String ¶ added in v0.69.0
func (s SetSockOptOptNameIP) String() string
type SetSockOptOptNameIPv6 ¶ added in v0.69.0
type SetSockOptOptNameIPv6 int
SetSockOptOptNameIPv6 is used to define the optname for setsockopt when the level is IPV6
func (SetSockOptOptNameIPv6) String ¶ added in v0.69.0
func (s SetSockOptOptNameIPv6) String() string
type SetSockOptOptNameSolSocket ¶ added in v0.69.0
type SetSockOptOptNameSolSocket int
SetSockOptOptNameSolSocket is used to define the optname for setsockopt when the level is SOL_SOCKET
func (SetSockOptOptNameSolSocket) String ¶ added in v0.69.0
func (s SetSockOptOptNameSolSocket) String() string
type SetSockOptOptNameTCP ¶ added in v0.69.0
type SetSockOptOptNameTCP int
SetSockOptOptNameTCP is used to define the optname for setsockopt when the level is TCP
func (SetSockOptOptNameTCP) String ¶ added in v0.69.0
func (s SetSockOptOptNameTCP) String() string
type SetXAttrEvent ¶
type SetXAttrEvent struct {
SyscallEvent
File FileEvent `field:"file"`
Namespace string `field:"file.destination.namespace,handler:ResolveXAttrNamespace"` // SECLDoc[file.destination.namespace] Definition:`Namespace of the extended attribute`
Name string `field:"file.destination.name,handler:ResolveXAttrName"` // SECLDoc[file.destination.name] Definition:`Name of the extended attribute`
NameRaw [200]byte `field:"-"`
}
SetXAttrEvent represents an extended attributes event
func (*SetXAttrEvent) UnmarshalBinary ¶
func (e *SetXAttrEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type SetgidEvent ¶
type SetgidEvent struct {
GID uint32 `field:"gid"` // SECLDoc[gid] Definition:`New GID of the process`
Group string `field:"group,handler:ResolveSetgidGroup"` // SECLDoc[group] Definition:`New group of the process`
EGID uint32 `field:"egid"` // SECLDoc[egid] Definition:`New effective GID of the process`
EGroup string `field:"egroup,handler:ResolveSetgidEGroup"` // SECLDoc[egroup] Definition:`New effective group of the process`
FSGID uint32 `field:"fsgid"` // SECLDoc[fsgid] Definition:`New FileSystem GID of the process`
FSGroup string `field:"fsgroup,handler:ResolveSetgidFSGroup"` // SECLDoc[fsgroup] Definition:`New FileSystem group of the process`
}
SetgidEvent represents a setgid event
func (*SetgidEvent) UnmarshalBinary ¶
func (e *SetgidEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type SetrlimitEvent ¶ added in v0.69.0
type SetrlimitEvent struct {
SyscallEvent
Resource int `field:"resource"` // SECLDoc[resource] Definition:`Resource type being limited` Constants:`Resource limit types`
RlimCur uint64 `field:"rlim_cur"` // SECLDoc[rlim_cur] Definition:`Current (soft) limit value`
RlimMax uint64 `field:"rlim_max"` // SECLDoc[rlim_max] Definition:`Maximum (hard) limit value`
TargetPid uint32 `field:"-"` // Internal field, not exposed to users
Target *ProcessContext `field:"target"` // SECLDoc[target] Definition:`Process context of the target process`
}
SetrlimitEvent represents a setrlimit event
func (*SetrlimitEvent) UnmarshalBinary ¶ added in v0.69.0
func (e *SetrlimitEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type SetuidEvent ¶
type SetuidEvent struct {
UID uint32 `field:"uid"` // SECLDoc[uid] Definition:`New UID of the process`
User string `field:"user,handler:ResolveSetuidUser"` // SECLDoc[user] Definition:`New user of the process`
EUID uint32 `field:"euid"` // SECLDoc[euid] Definition:`New effective UID of the process`
EUser string `field:"euser,handler:ResolveSetuidEUser"` // SECLDoc[euser] Definition:`New effective user of the process`
FSUID uint32 `field:"fsuid"` // SECLDoc[fsuid] Definition:`New FileSystem UID of the process`
FSUser string `field:"fsuser,handler:ResolveSetuidFSUser"` // SECLDoc[fsuser] Definition:`New FileSystem user of the process`
}
SetuidEvent represents a setuid event
func (*SetuidEvent) UnmarshalBinary ¶
func (e *SetuidEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type Signal ¶ added in v0.35.0
type Signal int
Signal represents a type of unix signal (ie, SIGKILL, SIGSTOP etc)
type SignalEvent ¶ added in v0.35.0
type SignalEvent struct {
SyscallEvent
Type uint32 `field:"type"` // SECLDoc[type] Definition:`Signal type (ex: SIGHUP, SIGINT, SIGQUIT, etc)` Constants:`Signal constants`
PID uint32 `field:"pid"` // SECLDoc[pid] Definition:`Target PID`
Target *ProcessContext `field:"target"` // Target process context
}
SignalEvent represents a signal event
func (*SignalEvent) UnmarshalBinary ¶ added in v0.35.0
func (e *SignalEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshals a binary representation of itself
type SnapshottedBoundSocket ¶ added in v0.64.0
SnapshottedBoundSocket represents a snapshotted bound socket
type SocketDomain ¶ added in v0.81.0
type SocketDomain int
SocketDomain is used to define the domain of a socket
func (SocketDomain) String ¶ added in v0.81.0
func (s SocketDomain) String() string
type SocketEvent ¶ added in v0.81.0
type SocketEvent struct {
SyscallEvent
Domain uint16 `field:"domain"` // SECLDoc[domain] Definition:`Socket domain`
Type uint16 `field:"type"` // SECLDoc[type] Definition:`Socket type`
Protocol uint16 `field:"protocol"` // SECLDoc[protocol] Definition:`Socket protocol`
}
SocketEvent represents a socket event
func (*SocketEvent) UnmarshalBinary ¶ added in v0.81.0
func (e *SocketEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type SocketFamily ¶ added in v0.69.0
type SocketFamily int
SocketFamily is used to define the family of a socket in setsockopt
func (SocketFamily) String ¶ added in v0.69.0
func (s SocketFamily) String() string
type SocketProtocol ¶ added in v0.69.0
type SocketProtocol int
SocketProtocol is used to define the protocol of a socket in setsockopt
func (SocketProtocol) String ¶ added in v0.69.0
func (s SocketProtocol) String() string
type SocketType ¶ added in v0.69.0
type SocketType int
SocketType is used to define the type of a socket in setsockopt
func (SocketType) String ¶ added in v0.69.0
func (s SocketType) String() string
type SpanContext ¶
type SpanContext struct {
SpanID uint64 `field:"-"`
TraceID utils.TraceID `field:"-"`
HasExtraAttrs bool `field:"-"`
ExtraAttrsID uint64 `field:"-"`
Attributes map[string]string `field:"-"`
}
SpanContext describes a span context
func (*SpanContext) UnmarshalBinary ¶
func (s *SpanContext) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type SpliceEvent ¶ added in v0.35.0
type SpliceEvent struct {
SyscallEvent
File FileEvent `field:"file"` // File modified by the splice syscall
PipeEntryFlag uint32 `field:"pipe_entry_flag"` // SECLDoc[pipe_entry_flag] Definition:`Entry flag of the "fd_out" pipe passed to the splice syscall` Constants:`Pipe buffer flags`
PipeExitFlag uint32 `field:"pipe_exit_flag"` // SECLDoc[pipe_exit_flag] Definition:`Exit flag of the "fd_out" pipe passed to the splice syscall` Constants:`Pipe buffer flags`
}
SpliceEvent represents a splice event
func (*SpliceEvent) UnmarshalBinary ¶ added in v0.35.0
func (e *SpliceEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshals a binary representation of itself
type SysCtlAction ¶ added in v0.65.0
type SysCtlAction uint32
SysCtlAction is used to define the action of a sysctl event
const ( // SysCtlUnknownAction sysctl action type SysCtlUnknownAction SysCtlAction = iota // SysCtlReadAction sysctl action type SysCtlReadAction // SysCtlWriteAction sysctl action type SysCtlWriteAction )
func (SysCtlAction) String ¶ added in v0.65.0
func (t SysCtlAction) String() string
type SysCtlEvent ¶ added in v0.65.0
type SysCtlEvent struct {
Action uint32 `field:"action"` // SECLDoc[action] Definition:`Action performed on the system control parameter` Constants:`SysCtl Actions`
FilePosition uint32 `field:"file_position"` // SECLDoc[file_position] Definition:`Position in the sysctl control parameter file at which the action occurred`
Name string `field:"name"` // SECLDoc[name] Definition:`Name of the system control parameter`
NameTruncated bool `field:"name_truncated"` // SECLDoc[name_truncated] Definition:`Indicates that the name field is truncated`
OldValue string `field:"old_value"` // SECLDoc[old_value] Definition:`Old value of the system control parameter`
OldValueTruncated bool `field:"old_value_truncated"` // SECLDoc[old_value_truncated] Definition:`Indicates that the old value field is truncated`
Value string `field:"value"` // SECLDoc[value] Definition:`New and/or current value for the system control parameter depending on the action type`
ValueTruncated bool `field:"value_truncated"` // SECLDoc[value_truncated] Definition:`Indicates that the value field is truncated`
}
SysCtlEvent is used to represent a system control parameter event
func (*SysCtlEvent) UnmarshalBinary ¶ added in v0.65.0
func (e *SysCtlEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshals a binary representation of itself
type Syscall ¶ added in v0.39.0
type Syscall int
Syscall represents a syscall identifier
const ( SysRead Syscall = 0 SysWrite Syscall = 1 SysOpen Syscall = 2 SysClose Syscall = 3 SysStat Syscall = 4 SysFstat Syscall = 5 SysLstat Syscall = 6 SysPoll Syscall = 7 SysLseek Syscall = 8 SysMmap Syscall = 9 SysMprotect Syscall = 10 SysMunmap Syscall = 11 SysBrk Syscall = 12 SysRtSigaction Syscall = 13 SysRtSigprocmask Syscall = 14 SysRtSigreturn Syscall = 15 SysIoctl Syscall = 16 SysPread64 Syscall = 17 SysPwrite64 Syscall = 18 SysReadv Syscall = 19 SysWritev Syscall = 20 SysAccess Syscall = 21 SysPipe Syscall = 22 SysSelect Syscall = 23 SysSchedYield Syscall = 24 SysMremap Syscall = 25 SysMsync Syscall = 26 SysMincore Syscall = 27 SysMadvise Syscall = 28 SysShmget Syscall = 29 SysShmat Syscall = 30 SysShmctl Syscall = 31 SysDup Syscall = 32 SysDup2 Syscall = 33 SysPause Syscall = 34 SysNanosleep Syscall = 35 SysGetitimer Syscall = 36 SysAlarm Syscall = 37 SysSetitimer Syscall = 38 SysGetpid Syscall = 39 SysSendfile Syscall = 40 SysSocket Syscall = 41 SysConnect Syscall = 42 SysAccept Syscall = 43 SysSendto Syscall = 44 SysRecvfrom Syscall = 45 SysSendmsg Syscall = 46 SysRecvmsg Syscall = 47 SysShutdown Syscall = 48 SysBind Syscall = 49 SysListen Syscall = 50 SysGetsockname Syscall = 51 SysGetpeername Syscall = 52 SysSocketpair Syscall = 53 SysSetsockopt Syscall = 54 SysGetsockopt Syscall = 55 SysClone Syscall = 56 SysFork Syscall = 57 SysVfork Syscall = 58 SysExecve Syscall = 59 SysExit Syscall = 60 SysWait4 Syscall = 61 SysKill Syscall = 62 SysUname Syscall = 63 SysSemget Syscall = 64 SysSemop Syscall = 65 SysSemctl Syscall = 66 SysShmdt Syscall = 67 SysMsgget Syscall = 68 SysMsgsnd Syscall = 69 SysMsgrcv Syscall = 70 SysMsgctl Syscall = 71 SysFcntl Syscall = 72 SysFlock Syscall = 73 SysFsync Syscall = 74 SysFdatasync Syscall = 75 SysTruncate Syscall = 76 SysFtruncate Syscall = 77 SysGetdents Syscall = 78 SysGetcwd Syscall = 79 SysChdir Syscall = 80 SysFchdir Syscall = 81 SysRename Syscall = 82 SysMkdir Syscall = 83 SysRmdir Syscall = 84 SysCreat Syscall = 85 SysLink Syscall = 86 SysUnlink Syscall = 87 SysSymlink Syscall = 88 SysReadlink Syscall = 89 SysChmod Syscall = 90 SysFchmod Syscall = 91 SysChown Syscall = 92 SysFchown Syscall = 93 SysLchown Syscall = 94 SysUmask Syscall = 95 SysGettimeofday Syscall = 96 SysGetrlimit Syscall = 97 SysGetrusage Syscall = 98 SysSysinfo Syscall = 99 SysTimes Syscall = 100 SysPtrace Syscall = 101 SysGetuid Syscall = 102 SysSyslog Syscall = 103 SysGetgid Syscall = 104 SysSetuid Syscall = 105 SysSetgid Syscall = 106 SysGeteuid Syscall = 107 SysGetegid Syscall = 108 SysSetpgid Syscall = 109 SysGetppid Syscall = 110 SysGetpgrp Syscall = 111 SysSetsid Syscall = 112 SysSetreuid Syscall = 113 SysSetregid Syscall = 114 SysGetgroups Syscall = 115 SysSetgroups Syscall = 116 SysSetresuid Syscall = 117 SysGetresuid Syscall = 118 SysSetresgid Syscall = 119 SysGetresgid Syscall = 120 SysGetpgid Syscall = 121 SysSetfsuid Syscall = 122 SysSetfsgid Syscall = 123 SysGetsid Syscall = 124 SysCapget Syscall = 125 SysCapset Syscall = 126 SysRtSigpending Syscall = 127 SysRtSigtimedwait Syscall = 128 SysRtSigqueueinfo Syscall = 129 SysRtSigsuspend Syscall = 130 SysSigaltstack Syscall = 131 SysUtime Syscall = 132 SysMknod Syscall = 133 SysUselib Syscall = 134 SysPersonality Syscall = 135 SysUstat Syscall = 136 SysStatfs Syscall = 137 SysFstatfs Syscall = 138 SysSysfs Syscall = 139 SysGetpriority Syscall = 140 SysSetpriority Syscall = 141 SysSchedSetparam Syscall = 142 SysSchedGetparam Syscall = 143 SysSchedSetscheduler Syscall = 144 SysSchedGetscheduler Syscall = 145 SysSchedGetPriorityMax Syscall = 146 SysSchedGetPriorityMin Syscall = 147 SysSchedRrGetInterval Syscall = 148 SysMlock Syscall = 149 SysMunlock Syscall = 150 SysMlockall Syscall = 151 SysMunlockall Syscall = 152 SysVhangup Syscall = 153 SysModifyLdt Syscall = 154 SysPivotRoot Syscall = 155 SysSysctl Syscall = 156 SysPrctl Syscall = 157 SysArchPrctl Syscall = 158 SysAdjtimex Syscall = 159 SysSetrlimit Syscall = 160 SysChroot Syscall = 161 SysSync Syscall = 162 SysAcct Syscall = 163 SysSettimeofday Syscall = 164 SysMount Syscall = 165 SysUmount2 Syscall = 166 SysSwapon Syscall = 167 SysSwapoff Syscall = 168 SysReboot Syscall = 169 SysSethostname Syscall = 170 SysSetdomainname Syscall = 171 SysIopl Syscall = 172 SysIoperm Syscall = 173 SysCreateModule Syscall = 174 SysInitModule Syscall = 175 SysDeleteModule Syscall = 176 SysGetKernelSyms Syscall = 177 SysQueryModule Syscall = 178 SysQuotactl Syscall = 179 SysNfsservctl Syscall = 180 SysGetpmsg Syscall = 181 SysPutpmsg Syscall = 182 SysAfsSyscall Syscall = 183 SysTuxcall Syscall = 184 SysSecurity Syscall = 185 SysGettid Syscall = 186 SysReadahead Syscall = 187 SysSetxattr Syscall = 188 SysLsetxattr Syscall = 189 SysFsetxattr Syscall = 190 SysGetxattr Syscall = 191 SysLgetxattr Syscall = 192 SysFgetxattr Syscall = 193 SysListxattr Syscall = 194 SysLlistxattr Syscall = 195 SysFlistxattr Syscall = 196 SysRemovexattr Syscall = 197 SysLremovexattr Syscall = 198 SysFremovexattr Syscall = 199 SysTkill Syscall = 200 SysTime Syscall = 201 SysFutex Syscall = 202 SysSchedSetaffinity Syscall = 203 SysSchedGetaffinity Syscall = 204 SysSetThreadArea Syscall = 205 SysIoSetup Syscall = 206 SysIoDestroy Syscall = 207 SysIoGetevents Syscall = 208 SysIoSubmit Syscall = 209 SysIoCancel Syscall = 210 SysGetThreadArea Syscall = 211 SysEpollCreate Syscall = 213 SysEpollCtlOld Syscall = 214 SysEpollWaitOld Syscall = 215 SysRemapFilePages Syscall = 216 SysGetdents64 Syscall = 217 SysSetTidAddress Syscall = 218 SysRestartSyscall Syscall = 219 SysSemtimedop Syscall = 220 SysFadvise64 Syscall = 221 SysTimerCreate Syscall = 222 SysTimerSettime Syscall = 223 SysTimerGettime Syscall = 224 SysTimerGetoverrun Syscall = 225 SysTimerDelete Syscall = 226 SysClockSettime Syscall = 227 SysClockGettime Syscall = 228 SysClockGetres Syscall = 229 SysClockNanosleep Syscall = 230 SysExitGroup Syscall = 231 SysEpollWait Syscall = 232 SysEpollCtl Syscall = 233 SysTgkill Syscall = 234 SysUtimes Syscall = 235 SysVserver Syscall = 236 SysMbind Syscall = 237 SysSetMempolicy Syscall = 238 SysGetMempolicy Syscall = 239 SysMqOpen Syscall = 240 SysMqUnlink Syscall = 241 SysMqTimedsend Syscall = 242 SysMqTimedreceive Syscall = 243 SysMqNotify Syscall = 244 SysMqGetsetattr Syscall = 245 SysKexecLoad Syscall = 246 SysWaitid Syscall = 247 SysAddKey Syscall = 248 SysRequestKey Syscall = 249 SysKeyctl Syscall = 250 SysIoprioSet Syscall = 251 SysIoprioGet Syscall = 252 SysInotifyInit Syscall = 253 SysInotifyAddWatch Syscall = 254 SysInotifyRmWatch Syscall = 255 SysMigratePages Syscall = 256 SysOpenat Syscall = 257 SysMkdirat Syscall = 258 SysMknodat Syscall = 259 SysFchownat Syscall = 260 SysFutimesat Syscall = 261 SysNewfstatat Syscall = 262 SysUnlinkat Syscall = 263 SysRenameat Syscall = 264 SysLinkat Syscall = 265 SysSymlinkat Syscall = 266 SysReadlinkat Syscall = 267 SysFchmodat Syscall = 268 SysFaccessat Syscall = 269 SysPselect6 Syscall = 270 SysPpoll Syscall = 271 SysSetRobustList Syscall = 273 SysGetRobustList Syscall = 274 SysSplice Syscall = 275 SysTee Syscall = 276 SysSyncFileRange Syscall = 277 SysVmsplice Syscall = 278 SysMovePages Syscall = 279 SysUtimensat Syscall = 280 SysEpollPwait Syscall = 281 SysSignalfd Syscall = 282 SysTimerfdCreate Syscall = 283 SysEventfd Syscall = 284 SysFallocate Syscall = 285 SysTimerfdSettime Syscall = 286 SysTimerfdGettime Syscall = 287 SysAccept4 Syscall = 288 SysSignalfd4 Syscall = 289 SysEventfd2 Syscall = 290 SysEpollCreate1 Syscall = 291 SysDup3 Syscall = 292 SysPipe2 Syscall = 293 SysInotifyInit1 Syscall = 294 SysPreadv Syscall = 295 SysPwritev Syscall = 296 SysRtTgsigqueueinfo Syscall = 297 SysPerfEventOpen Syscall = 298 SysRecvmmsg Syscall = 299 SysFanotifyInit Syscall = 300 SysFanotifyMark Syscall = 301 SysPrlimit64 Syscall = 302 SysNameToHandleAt Syscall = 303 SysOpenByHandleAt Syscall = 304 SysClockAdjtime Syscall = 305 SysSyncfs Syscall = 306 SysSendmmsg Syscall = 307 SysSetns Syscall = 308 SysGetcpu Syscall = 309 SysProcessVmReadv Syscall = 310 SysProcessVmWritev Syscall = 311 SysKcmp Syscall = 312 SysFinitModule Syscall = 313 SysSchedSetattr Syscall = 314 SysSchedGetattr Syscall = 315 SysRenameat2 Syscall = 316 SysSeccomp Syscall = 317 SysGetrandom Syscall = 318 SysMemfdCreate Syscall = 319 SysKexecFileLoad Syscall = 320 SysBpf Syscall = 321 SysExecveat Syscall = 322 SysUserfaultfd Syscall = 323 SysMembarrier Syscall = 324 SysMlock2 Syscall = 325 SysCopyFileRange Syscall = 326 SysPreadv2 Syscall = 327 SysPwritev2 Syscall = 328 SysPkeyMprotect Syscall = 329 SysPkeyAlloc Syscall = 330 SysPkeyFree Syscall = 331 SysStatx Syscall = 332 SysIoPgetevents Syscall = 333 SysRseq Syscall = 334 SysUretprobe Syscall = 335 SysPidfdSendSignal Syscall = 424 SysIoUringSetup Syscall = 425 SysIoUringEnter Syscall = 426 SysIoUringRegister Syscall = 427 SysOpenTree Syscall = 428 SysMoveMount Syscall = 429 SysFsopen Syscall = 430 SysFsconfig Syscall = 431 SysFsmount Syscall = 432 SysFspick Syscall = 433 SysPidfdOpen Syscall = 434 SysClone3 Syscall = 435 SysCloseRange Syscall = 436 SysOpenat2 Syscall = 437 SysPidfdGetfd Syscall = 438 SysFaccessat2 Syscall = 439 SysProcessMadvise Syscall = 440 SysEpollPwait2 Syscall = 441 SysMountSetattr Syscall = 442 SysQuotactlFd Syscall = 443 SysLandlockCreateRuleset Syscall = 444 SysLandlockAddRule Syscall = 445 SysLandlockRestrictSelf Syscall = 446 SysMemfdSecret Syscall = 447 SysProcessMrelease Syscall = 448 SysFutexWaitv Syscall = 449 SysSetMempolicyHomeNode Syscall = 450 SysCachestat Syscall = 451 SysFchmodat2 Syscall = 452 SysMapShadowStack Syscall = 453 SysFutexWake Syscall = 454 SysFutexWait Syscall = 455 SysFutexRequeue Syscall = 456 SysStatmount Syscall = 457 SysListmount Syscall = 458 SysLsmGetSelfAttr Syscall = 459 SysLsmSetSelfAttr Syscall = 460 SysLsmListModules Syscall = 461 SysMseal Syscall = 462 SysSetxattrat Syscall = 463 SysGetxattrat Syscall = 464 SysListxattrat Syscall = 465 SysRemovexattrat Syscall = 466 )
Linux syscall identifiers
func (Syscall) MarshalText ¶ added in v0.39.0
MarshalText maps the syscall identifier to UTF-8-encoded text and returns the result
type SyscallContext ¶ added in v0.55.0
type SyscallContext struct {
ID uint32 `field:"-"`
StrArg1 string `field:"syscall.str1,handler:ResolveSyscallCtxArgsStr1,weight:900,opts:getters_only|skip_ad"`
StrArg2 string `field:"syscall.str2,handler:ResolveSyscallCtxArgsStr2,weight:900,opts:getters_only|skip_ad"`
StrArg3 string `field:"syscall.str3,handler:ResolveSyscallCtxArgsStr3,weight:900,opts:getters_only|skip_ad"`
IntArg1 int64 `field:"syscall.int1,handler:ResolveSyscallCtxArgsInt1,weight:900,opts:getters_only|skip_ad"`
IntArg2 int64 `field:"syscall.int2,handler:ResolveSyscallCtxArgsInt2,weight:900,opts:getters_only|skip_ad"`
IntArg3 int64 `field:"syscall.int3,handler:ResolveSyscallCtxArgsInt3,weight:900,opts:getters_only|skip_ad"`
Resolved bool `field:"-"`
}
SyscallContext contains syscall context
func (*SyscallContext) UnmarshalBinary ¶ added in v0.55.0
func (e *SyscallContext) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type SyscallDriftEventReason ¶ added in v0.57.0
type SyscallDriftEventReason uint64
SyscallDriftEventReason describes why a syscall drift event was sent
const ( // SyscallMonitorPeriodReason means that the event was sent because the syscall cache entry was dirty for longer than syscall_monitor.period SyscallMonitorPeriodReason SyscallDriftEventReason = iota + 1 // ExitReason means that the event was sent because a pid that was about to exit had a dirty cache entry ExitReason // ExecveReason means that the event was sent because an execve syscall was detected on a pid with a dirty cache entry ExecveReason )
mirrors the SYSCALL_MONITOR_REASON_* constants of the eBPF side
func (SyscallDriftEventReason) String ¶ added in v0.57.0
func (r SyscallDriftEventReason) String() string
type SyscallEvent ¶
type SyscallEvent struct {
Retval int64 `field:"retval"` // SECLDoc[retval] Definition:`Return value of the syscall` Constants:`Error constants`
}
SyscallEvent contains common fields for all the event
func (*SyscallEvent) UnmarshalBinary ¶
func (e *SyscallEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type SyscallsEvent ¶ added in v0.39.0
type SyscallsEvent struct {
EventReason SyscallDriftEventReason
Syscalls []Syscall // 64 * 8 = 512 > 450, bytes should be enough to hold all 450 syscalls
}
SyscallsEvent represents a syscalls event
func (*SyscallsEvent) UnmarshalBinary ¶ added in v0.39.0
func (e *SyscallsEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself.
type TLSContext ¶ added in v0.60.0
type TLSContext struct {
Version uint16 `field:"version"` // SECLDoc[version] Definition:`TLS version`
}
TLSContext represents a tls context
type TLSVersion ¶ added in v0.60.0
type TLSVersion uint16
TLSVersion tls version
func (TLSVersion) String ¶ added in v0.60.0
func (tls TLSVersion) String() string
type Tracer ¶ added in v0.83.0
type Tracer struct {
Metadata tracermetadata.TracerMetadata
MetadataSource TracerMetadataSource
Trace SpanContext
// ThreadlocalAttributeKeys is the ordered list of attribute key names the
// process published in its OTel process context (OTEP 4947). The key indices
// of a thread context record index into it to resolve the full attribute
// name.
ThreadlocalAttributeKeys []string
}
Tracer bundles the per-process APM tracer state: static metadata captured from the tracer-info memfd, plus the most recent span context observed for this process. Cross-platform so the model.go-level accessors compile on both Linux and Windows builds.
type TracerMemfdSealEvent ¶ added in v0.73.0
type TracerMemfdSealEvent struct {
SyscallEvent
Fd uint32
}
TracerMemfdSealEvent represents a tracer memfd seal event
func (*TracerMemfdSealEvent) UnmarshalBinary ¶ added in v0.73.0
func (e *TracerMemfdSealEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshals a binary representation of itself
type TracerMetadataSource ¶ added in v0.86.0
type TracerMetadataSource uint8
TracerMetadataSource is where the tracer metadata of a process came from
const ( // TracerMetadataSourceNone means no tracer metadata was found TracerMetadataSourceNone TracerMetadataSource = iota // TracerMetadataSourceMemfd is the Datadog tracer-info memfd, which takes precedence TracerMetadataSourceMemfd // TracerMetadataSourceOTelProcessContext is the OTel process context (OTEP 4719) TracerMetadataSourceOTelProcessContext )
type UmountEvent ¶
type UmountEvent struct {
SyscallEvent
MountID uint32
}
UmountEvent represents an umount event
func (*UmountEvent) UnmarshalBinary ¶
func (e *UmountEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type UnlinkEvent ¶
type UnlinkEvent struct {
SyscallEvent
SyscallContext
File FileEvent `field:"file"`
Flags uint32 `field:"flags"` // SECLDoc[flags] Definition:`Flags of the unlink syscall` Constants:`Unlink flags`
// Syscall context aliases
SyscallDirFd uint64 `field:"syscall.dirfd,ref:unlink.syscall.int1"` // SECLDoc[syscall.dirfd] Definition:`Directory file descriptor argument of the syscall`
SyscallPath string `field:"syscall.path,ref:unlink.syscall.str2"` // SECLDoc[syscall.path] Definition:`Path argument of the syscall`
SyscallFlags uint64 `field:"syscall.flags,ref:unlink.syscall.int3"` // SECLDoc[syscall.flags] Definition:`Flags argument of the syscall`
}
UnlinkEvent represents an unlink event
func (*UnlinkEvent) UnmarshalBinary ¶
func (e *UnlinkEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type UnlinkFlags ¶
type UnlinkFlags int
UnlinkFlags represents an unlink flags bitmask value
func (UnlinkFlags) String ¶
func (f UnlinkFlags) String() string
func (UnlinkFlags) StringArray ¶
func (f UnlinkFlags) StringArray() []string
StringArray returns the unlink flags as an array of strings
type UnloadModuleEvent ¶ added in v0.35.0
type UnloadModuleEvent struct {
SyscallEvent
Name string `field:"name"` // SECLDoc[name] Definition:`Name of the kernel module that was deleted`
}
UnloadModuleEvent represents an unload_module event
func (*UnloadModuleEvent) UnmarshalBinary ¶ added in v0.35.0
func (e *UnloadModuleEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshals a binary representation of itself
type UnshareEvent ¶ added in v0.84.0
type UnshareEvent struct {
}
UnshareEvent represents a namespace creation via the unshare syscall
func (*UnshareEvent) UnmarshalBinary ¶ added in v0.84.0
func (e *UnshareEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type UnshareMountNSEvent ¶ added in v0.42.0
type UnshareMountNSEvent struct {
}
UnshareMountNSEvent represents a mount cloned from a newly created mount namespace
func (*UnshareMountNSEvent) UnmarshalBinary ¶ added in v0.42.0
func (e *UnshareMountNSEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type UserSessionContext ¶ added in v0.50.0
type UserSessionContext struct {
SessionType int `field:"session_type,handler:ResolveSessionType" json:"session_type,omitempty"` // SECLDoc[session_type] Definition:`Type of the user session`
ID string `field:"id,handler:ResolveSessionID" json:"id,omitempty"` // SECLDoc[id] Definition:`Unique identifier of the user session, alias for either ssh_session_id or k8s_session_id, depending on the session type`
Identity string `field:"identity,handler:ResolveSessionIdentity" json:"identity,omitempty"` // SECLDoc[identity] Definition:`User identity of the user session, alias for either ssh_client_ip and ssh_client_port or k8s_username, depending on the session type`
K8SSessionContext
SSHSessionContext
}
UserSessionContext describes the user session context
type UtimesEvent ¶
type UtimesEvent struct {
SyscallEvent
SyscallContext
File FileEvent `field:"file"`
Atime time.Time `field:"-"`
Mtime time.Time `field:"-"`
// Syscall context aliases
SyscallPath string `field:"syscall.path,ref:utimes.syscall.str1"` // SECLDoc[syscall.path] Definition:`Path argument of the syscall`
}
UtimesEvent represents a utime event
func (*UtimesEvent) UnmarshalBinary ¶
func (e *UtimesEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
type VethPairEvent ¶ added in v0.36.0
type VethPairEvent struct {
SyscallEvent
HostDevice NetDevice
PeerDevice NetDevice
}
VethPairEvent represents a veth pair event
func (*VethPairEvent) UnmarshalBinary ¶ added in v0.36.0
func (e *VethPairEvent) UnmarshalBinary(data []byte) (int, error)
UnmarshalBinary unmarshalls a binary representation of itself
Source Files
¶
- accessors_helpers.go
- accessors_unix.go
- args_envs.go
- category.go
- consts_common.go
- consts_linux.go
- consts_linux_amd64.go
- consts_map_names_linux.go
- dns_helpers_linux.go
- errors.go
- event_deep_copy_unix.go
- events.go
- field_accessors_unix.go
- field_handlers_unix.go
- iterator.go
- legacy_secl.go
- marshallers_linux.go
- model.go
- model_helpers_unix.go
- model_string.go
- model_unix.go
- mount_flags.go
- oo_ondemand.go
- oo_overlayfs_unix.go
- oo_packet_filter_common.go
- oo_packet_filter_unsupported.go
- oo_symlink_unix.go
- process_cache_entry_unix.go
- security_profile.go
- strings.go
- syscalls.go
- syscalls_linux_amd64.go
- syscalls_string_linux_amd64.go
- unmarshallers_linux.go
- utils.go
- variables.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package main holds main related files
|
Package main holds main related files |
|
Package sharedconsts holds model related shared constants
|
Package sharedconsts holds model related shared constants |
|
Package usersession holds model related to the user session context
|
Package usersession holds model related to the user session context |
|
Package utils holds utility related to the model
|
Package utils holds utility related to the model |