smart_behavior_detection

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleID    = "smart-behavior-detection"
	ModuleName  = "Smart Behavior Detection"
	ModuleShort = "Diff-based injection detection via behavioral analysis"
)

Variables

View Source
var (
	ModuleDesc = `` /* 662-byte string literal not displayed */

	ModuleConfirmation = "" /* 148-byte string literal not displayed */
	// ModuleSeverity is Info: diff-based behavioral injection detection is an
	// inherently noisy, low-confidence triage heuristic (per-request response
	// volatility, reflection echoes), so every finding is surfaced as an
	// informational lead for a human to confirm rather than an actionable issue.
	// See ScanPerInsertionPoint.
	ModuleSeverity   = severity.Info
	ModuleConfidence = severity.Tentative
	ModuleTags       = []string{"behavior-analysis", "injection", "heavy"}
)

Functions

This section is empty.

Types

type Module

type Module struct {
	modkit.BaseActiveModule
	// contains filtered or unexported fields
}

Module implements Smart Behavior Detection for injection vulnerabilities.

func New

func New() *Module

New creates a new Smart Behavior Detection module.

func (*Module) ScanPerInsertionPoint

func (m *Module) ScanPerInsertionPoint(
	ctx *httpmsg.HttpRequestResponse,
	ip httpmsg.InsertionPoint,
	httpClient *http.Requester,
	scanCtx *modkit.ScanContext,
) ([]*output.ResultEvent, error)

ScanPerInsertionPoint performs smart behavior detection scanning.

func (*Module) TimeoutHint

func (m *Module) TimeoutHint() time.Duration

TimeoutHint raises the per-call active-module timeout above the executor default. Behavioral diffing sends many true/false probe pairs (escape sets × soft concatenators) with HTTP round-trips per insertion point and is the slowest active module observed in practice, so it legitimately needs longer than the default — while still being bounded so it can't hold a worker for the whole phase.

type Options

type Options struct {
	EnableStringDelimiterDetection bool
	EnableNumericContextDetection  bool
	EnableConcatenationTesting     bool
	EnableOrderByInjection         bool

	// SoftConcatenators are operators used in concatenation testing
	SoftConcatenators []string

	// DiffScanOptions configures the differential analysis engine
	DiffScanOptions *diffscan.Option
}

Options configures the Smart Behavior Detection module.

func DefaultOptions

func DefaultOptions() *Options

DefaultOptions returns the default configuration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL