detectors

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Detectors is the list of all available WAF detectors. The checks are performed in the given order.

Functions

This section is empty.

Types

type Check

type Check func(resps *Responses) bool

Check performs some check on the response with a fixed condition.

func And

func And(checks ...Check) Check

And combines the checks with AND logic, so each test must be true to return true.

func CheckContent

func CheckContent(regex string, attack bool) Check

CheckContent match body value with regex. Default value for attack parameter is true.

func CheckCookie

func CheckCookie(regex string, attack bool) Check

CheckCookie match Set-Cookie header values with regex. Default value for attack parameter is false.

func CheckHeader

func CheckHeader(header, regex string, attack bool) Check

CheckHeader match header value with regex. Default value for attack parameter is false.

func CheckReason

func CheckReason(regex string, attack bool) Check

CheckReason match status reason value with regex. Default value for attack parameter is true.

func CheckStatusCode

func CheckStatusCode(status int, attack bool) Check

CheckStatusCode compare response status code with given value. Default value for attack parameter is true.

func Or

func Or(checks ...Check) Check

Or combines the checks with OR logic, so at least one test must be true to return true.

type Detector

type Detector struct {
	WAFName string
	Vendor  string

	Check Check
}

Detector contains names of WAF solution and vendor, and checks to detect that solution by response.

func BigIPApManager

func BigIPApManager() *Detector

func BigIPAppSecManager

func BigIPAppSecManager() *Detector

func BigIPLocalTrafficManager

func BigIPLocalTrafficManager() *Detector

func FirePass

func FirePass() *Detector

func Incapsula

func Incapsula() *Detector

func KonaSiteDefender

func KonaSiteDefender() *Detector

func ModSecurity

func ModSecurity() *Detector

func SecureSphere

func SecureSphere() *Detector

func Trafficshield

func Trafficshield() *Detector

func (*Detector) GetVendor

func (d *Detector) GetVendor() string

func (*Detector) GetWAFName

func (d *Detector) GetWAFName() string

func (*Detector) IsWAF

func (d *Detector) IsWAF(resps *Responses) bool

type Responses

type Responses struct {
	Resp         types.Response
	RespToAttack types.Response
}

Jump to

Keyboard shortcuts

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