Documentation
¶
Index ¶
Constants ¶
const FlightSimRevision = "3709d1c6905d9527885c62f66f49a955c7b0d191"
const StatsFilename = "NetworkDetection.json"
Variables ¶
This section is empty.
Functions ¶
func BeaconStats ¶
BeaconStats summarizes the intervals between consecutive connection starts. Jitter is the coefficient of variation (standard deviation / mean).
func SyntheticOnlyCase ¶
SyntheticOnlyCase reports qualification cases without a captured FlightSim execution: the benign controls and periodic beacons, which FlightSim at the pinned revision does not generate.
Types ¶
type ApplicationEngine ¶
type ApplicationEngine struct {
Alerts, Overflow uint64
Late uint64
// contains filtered or unexported fields
}
func NewApplication ¶
func NewApplication(c Config) *ApplicationEngine
func (*ApplicationEngine) AggregationStats ¶ added in v0.16.0
func (e *ApplicationEngine) AggregationStats() (matches, capacity uint64)
func (*ApplicationEngine) Checkpoint ¶ added in v0.16.0
func (e *ApplicationEngine) Checkpoint() []*types.Alert
Checkpoint emits partial aggregates without advancing capture time or resetting scan/beacon history. Delayed older records remain explicit Late.
func (*ApplicationEngine) Flush ¶ added in v0.16.0
func (e *ApplicationEngine) Flush() []*types.Alert
func (*ApplicationEngine) Observe ¶
func (e *ApplicationEngine) Observe(o ApplicationObservation) (alerts []*types.Alert)
type ApplicationObservation ¶
type ApplicationObservation struct {
RangeTransfer bool
DecryptedTLS bool
At int64
Scope Scope
Kind, SrcIP, DstIP string
SrcPort, DstPort uint16
Method, Path, Host, CommunityID, Qualification string
Status int
Executable bool
}
func Observation ¶
func Observation(m proto.Message) (ApplicationObservation, bool)
type Config ¶
type Config struct {
WindowNS int64 `json:"windowNS"`
DedupNS int64 `json:"dedupNS"` // Legacy name: aggregation window; 0 emits every match immediately.
MaxKeys int `json:"maxKeys"`
MaxFlows int `json:"maxFlows"`
DNSNames int `json:"dnsNames"`
ScanTargets int `json:"scanTargets"`
SMTPHosts int `json:"smtpHosts"`
ICMPEchoes int `json:"icmpEchoes"`
SSHBytes uint64 `json:"sshBytes"`
ApprovedSources []string `json:"approvedSources"`
Indicators []Indicator `json:"indicators"`
SMTPRelays []string `json:"smtpRelays"` // Source IPs/CIDRs; SMTP-only exemption requires at least one endpoint in InternalNetworks.
InternalNetworks []string `json:"internalNetworks"` // CIDRs defining network roles, never inferred from private addressing.
// Periodic TCP connection starts from one source to one service. Samples
// is the number of connection starts examined (0 disables), Jitter the
// largest accepted coefficient of variation of their intervals.
BeaconSamples int `json:"beaconSamples"`
BeaconJitter float64 `json:"beaconJitter"`
BeaconMinIntervalNS int64 `json:"beaconMinIntervalNS"`
BeaconWindowNS int64 `json:"beaconWindowNS"`
}
func DefaultConfig ¶
func DefaultConfig() Config
func LoadConfig ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) Checkpoint ¶ added in v0.16.0
Checkpoint emits pending live matches without moving the event watermark. Rows across checkpoints retain their AggregateKey and disjoint match counts.
type Event ¶
type Event struct {
Ack uint32 `json:"ack,omitempty"`
At int64 `json:"at"`
Scope Scope `json:"scope"`
Kind string `json:"kind"`
SrcIP string `json:"srcIP"`
DstIP string `json:"dstIP"`
SrcPort uint16 `json:"srcPort,omitempty"`
DstPort uint16 `json:"dstPort,omitempty"`
Name string `json:"name,omitempty"`
QType uint16 `json:"qType,omitempty"`
Seq uint32 `json:"seq,omitempty"`
Payload []byte `json:"payload,omitempty"`
}
Event is capture-derived; fixture scenario labels are never detector inputs.
type Evidence ¶
type Evidence struct {
Schema int `json:"schema"`
Detector string `json:"detector"`
Classification string `json:"classification"`
Scope Scope `json:"scope"`
FirstSeen int64 `json:"firstSeen"`
LastSeen int64 `json:"lastSeen"`
Observed uint64 `json:"observed"`
Threshold uint64 `json:"threshold"`
WindowNS int64 `json:"windowNS"`
Samples []string `json:"samples"`
Limitations []string `json:"limitations"`
Indicator *Indicator `json:"indicator,omitempty"`
}
type Scope ¶
type Stats ¶
type Stats struct {
ConflictingOverlaps uint64 `json:"conflictingOverlaps,omitempty"`
ConflictingOverlapBytes uint64 `json:"conflictingOverlapBytes,omitempty"`
Matches uint64 `json:"matches"`
PendingAggregates int `json:"pendingAggregates"`
CapacityFlushes uint64 `json:"capacityFlushes"`
FTPDataExclusions uint64 `json:"ftpDataExclusions"`
SMTPRelayExclusions uint64 `json:"smtpRelayExclusions"`
AggregationMode string `json:"aggregationMode,omitempty"`
ApplicationMode string `json:"applicationMode,omitempty"`
ApplicationAlerts uint64 `json:"applicationAlerts,omitempty"`
ApplicationQueuedBytes int64 `json:"applicationQueuedBytes,omitempty"`
ApplicationPeakBytes int64 `json:"applicationPeakBytes,omitempty"`
ApplicationQueueLimit int64 `json:"applicationQueueLimit,omitempty"`
ApplicationQueueDrops uint64 `json:"applicationQueueDrops,omitempty"`
ApplicationLate uint64 `json:"applicationLate,omitempty"`
Schema int `json:"schema"`
Events uint64 `json:"events"`
Alerts uint64 `json:"alerts"`
Overflow uint64 `json:"overflow"`
Late uint64 `json:"late"`
StreamGaps uint64 `json:"streamGaps"`
Keys int `json:"keys"`
Flows int `json:"flows"`
Indicators int `json:"indicators"`
Error string `json:"error,omitempty"`
}