Documentation
¶
Index ¶
- func ApplyVarsToDetectionMethods(methods []DetectionMethod, vars map[string]string) error
- func ApplyVarsToTemplates(data *PayloadGenerator, vars map[string]string) error
- func ApplyVarsToText(text string, vars map[string]string) (string, error)
- func GenerateVars(variables []PayloadVariable, ...) (map[string]string, integrations.InteractionDomain, error)
- type BrowserEventsDetectionMethod
- type DetectionMethod
- type InsertionMode
- type LaunchCondition
- type LaunchConditionType
- type LaunchConditions
- type OOBInteractionDetectionMethod
- type Operator
- type Payload
- type PayloadGenerator
- type PayloadVariable
- type ReflectionDetectionMethod
- type ResponseCheckDetectionMethod
- type ResponseConditionCheck
- type ResponseConditionDetectionMethod
- type ResponseConditionLaunchCondition
- type ResponseContainsPart
- type TemplateRenderer
- type TimeBasedDetectionMethod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyVarsToDetectionMethods ¶
func ApplyVarsToDetectionMethods(methods []DetectionMethod, vars map[string]string) error
func ApplyVarsToTemplates ¶
func ApplyVarsToTemplates(data *PayloadGenerator, vars map[string]string) error
func GenerateVars ¶
func GenerateVars(variables []PayloadVariable, interactionsManager integrations.InteractionsManager) (map[string]string, integrations.InteractionDomain, error)
Types ¶
type DetectionMethod ¶
type DetectionMethod struct { OOBInteraction *OOBInteractionDetectionMethod `yaml:"oob_interaction,omitempty"` ResponseCondition *ResponseConditionDetectionMethod `yaml:"response_condition,omitempty"` Reflection *ReflectionDetectionMethod `yaml:"reflection,omitempty"` BrowserEvents *BrowserEventsDetectionMethod `yaml:"browser_events,omitempty"` TimeBased *TimeBasedDetectionMethod `yaml:"time_based,omitempty"` ResponseCheck *ResponseCheckDetectionMethod `yaml:"response_check,omitempty"` }
func (*DetectionMethod) GetMethod ¶
func (dm *DetectionMethod) GetMethod() interface{}
type InsertionMode ¶
type InsertionMode string
const ( Append InsertionMode = "append" Prepend InsertionMode = "prepend" Replace InsertionMode = "replace" )
type LaunchCondition ¶
type LaunchCondition struct { Type LaunchConditionType `yaml:"type"` Value string `yaml:"value,omitempty"` ResponseCondition *ResponseConditionLaunchCondition `yaml:"response_condition,omitempty"` ParameterNames []string `yaml:"parameter_names,omitempty"` }
type LaunchConditionType ¶
type LaunchConditionType string
const ( Platform LaunchConditionType = "platform" ScanMode LaunchConditionType = "scan_mode" ParameterValueDataType LaunchConditionType = "parameter_value_data_type" ParameterName LaunchConditionType = "insertion_point_name" ResponseCondition LaunchConditionType = "response_condition" )
type LaunchConditions ¶
type LaunchConditions struct { Operator Operator `yaml:"operator"` Conditions []LaunchCondition `yaml:"conditions"` }
type Payload ¶
type Payload struct { IssueCode string `yaml:"issue_code"` Value string `yaml:"value"` Vars []PayloadVariable `yaml:"vars,omitempty"` DetectionCondition Operator `yaml:"detection_condition"` DetectionMethods []DetectionMethod `yaml:"detection_methods"` Categories []string `yaml:"categories"` InteractionDomain integrations.InteractionDomain }
type PayloadGenerator ¶
type PayloadGenerator struct { ID string `yaml:"id,omitempty"` // Since it's not used yet, allow it to be empty IssueCode string `yaml:"issue_code"` DetectionCondition Operator `yaml:"detection_condition"` DetectionMethods []DetectionMethod `yaml:"detection_methods"` Launch LaunchConditions `yaml:"launch,omitempty"` Vars []PayloadVariable `yaml:"vars,omitempty"` Templates []string `yaml:"templates"` Categories []string `yaml:"categories"` Platforms []string `yaml:"platforms"` }
func LoadGenerators ¶
func LoadGenerators(dir string) ([]*PayloadGenerator, error)
LoadGenerators loads all generators from the local and user directories
func LoadLocalGenerators ¶
func LoadLocalGenerators() ([]*PayloadGenerator, error)
LoadLocalGenerators loads all generators from the local directory
func LoadUserGenerators ¶
func LoadUserGenerators(dir string) ([]*PayloadGenerator, error)
LoadUserGenerators loads all generators from the user specified directory
func (*PayloadGenerator) BuildPayloads ¶
func (generator *PayloadGenerator) BuildPayloads(interactionsManager integrations.InteractionsManager) ([]Payload, error)
type PayloadVariable ¶
type ResponseCheckDetectionMethod ¶
type ResponseCheckDetectionMethod struct { Check ResponseConditionCheck `yaml:"check"` Confidence int `yaml:"confidence,omitempty"` }
type ResponseConditionCheck ¶
type ResponseConditionCheck string
var ( DatabaseErrorCondition ResponseConditionCheck = "database_error" XPathErrorCondition ResponseConditionCheck = "xpath_error" )
type ResponseConditionDetectionMethod ¶
type ResponseConditionDetectionMethod struct { Contains string `yaml:"contains,omitempty"` Part ResponseContainsPart `yaml:"part,omitempty"` StatusCode int `yaml:"status_code,omitempty"` Confidence int `yaml:"confidence,omitempty"` // TODO: Add support for the issue override IssueOverride db.IssueCode `yaml:"issue_override,omitempty"` }
type ResponseConditionLaunchCondition ¶
type ResponseConditionLaunchCondition struct { Contains string `yaml:"contains,omitempty"` Part ResponseContainsPart `yaml:"part,omitempty"` StatusCode int `yaml:"status_code,omitempty"` }
func (*ResponseConditionLaunchCondition) Check ¶
func (rc *ResponseConditionLaunchCondition) Check(history *db.History) bool
Check if the condition is met against a history item
func (*ResponseConditionLaunchCondition) CheckWebsocketMessage ¶
func (rc *ResponseConditionLaunchCondition) CheckWebsocketMessage(message *db.WebSocketMessage) bool
type ResponseContainsPart ¶
type ResponseContainsPart string
const ( Body ResponseContainsPart = "body" Headers ResponseContainsPart = "headers" Raw ResponseContainsPart = "raw" )
type TemplateRenderer ¶
type TemplateRenderer struct {
// contains filtered or unexported fields
}
type TimeBasedDetectionMethod ¶
type TimeBasedDetectionMethod struct { Sleep string `yaml:"sleep"` Confidence int `yaml:"confidence,omitempty"` }
func (*TimeBasedDetectionMethod) CheckIfResultDurationIsHigher ¶
func (t *TimeBasedDetectionMethod) CheckIfResultDurationIsHigher(resultDuration time.Duration) bool
func (*TimeBasedDetectionMethod) ParseSleepDuration ¶
func (t *TimeBasedDetectionMethod) ParseSleepDuration(sleep string) time.Duration
Click to show internal directories.
Click to hide internal directories.