processor

package
v0.0.0-...-2e804f1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: BSD-2-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupProcessors

func SetupProcessors(s state.State, k *koanf.Koanf, inputPubSub *input.PubSub, alarmPubSub *alarm.PubSub)

Types

type Base64

type Base64 struct {
	// contains filtered or unexported fields
}

func (Base64) ProvideAlarms

func (p Base64) ProvideAlarms() chan alarm.Alarm

func (Base64) Run

func (p Base64) Run(events chan dnszilla.DNSResult)

type BeaconingDetector

type BeaconingDetector struct {
	// contains filtered or unexported fields
}

func (BeaconingDetector) ProvideAlarms

func (p BeaconingDetector) ProvideAlarms() chan alarm.Alarm

func (BeaconingDetector) Run

func (p BeaconingDetector) Run(events chan dnszilla.DNSResult)

type CSVFQDN

type CSVFQDN struct {
	// contains filtered or unexported fields
}

func (CSVFQDN) ProvideAlarms

func (c CSVFQDN) ProvideAlarms() chan alarm.Alarm

func (CSVFQDN) Run

func (c CSVFQDN) Run(events chan dnszilla.DNSResult)

type CSVFQDNRow

type CSVFQDNRow struct {
	Kind uint8  // converted by the consts below
	Msg  string // templated alarm message for each hit
}

type CSVIP

type CSVIP struct {
	// contains filtered or unexported fields
}

func (CSVIP) ProvideAlarms

func (c CSVIP) ProvideAlarms() chan alarm.Alarm

func (CSVIP) Run

func (c CSVIP) Run(events chan dnszilla.DNSResult)

type MISPWarningCIDR

type MISPWarningCIDR struct {
	// contains filtered or unexported fields
}

func NewMISPWarningCIDR

func NewMISPWarningCIDR(s state.State, path string, name string, alarmMsgTmpl string) (MISPWarningCIDR, error)

creates a new MISP warning processor. each hit of FQDN will generate an alarm unlike CSV, MISP's default JSON format is not edited/created by dnszilla's user so it also accepts an alarm template in `gotemplate` format.

func (MISPWarningCIDR) ProvideAlarms

func (m MISPWarningCIDR) ProvideAlarms() chan alarm.Alarm

func (MISPWarningCIDR) Run

func (m MISPWarningCIDR) Run(events chan dnszilla.DNSResult)

type MISPWarningFQDN

type MISPWarningFQDN struct {
	// contains filtered or unexported fields
}

func NewMISPWarningFQDN

func NewMISPWarningFQDN(s state.State, path string, name string, alarmMsgTmpl string) (MISPWarningFQDN, error)

creates a new MISP warning processor. each hit of FQDN will generate an alarm unlike CSV, MISP's default JSON format is not edited/created by dnszilla's user so it also accepts an alarm template in `gotemplate` format.

func (MISPWarningFQDN) ProvideAlarms

func (m MISPWarningFQDN) ProvideAlarms() chan alarm.Alarm

func (MISPWarningFQDN) Run

func (m MISPWarningFQDN) Run(events chan dnszilla.DNSResult)

type MixedCase

type MixedCase struct {
	// contains filtered or unexported fields
}

func (MixedCase) ProvideAlarms

func (p MixedCase) ProvideAlarms() chan alarm.Alarm

func (MixedCase) Run

func (p MixedCase) Run(events chan dnszilla.DNSResult)

type MultiQ

type MultiQ struct {
	// contains filtered or unexported fields
}

MultiQ is used to detect DNS packets that have more than one question

func (MultiQ) ProvideAlarms

func (m MultiQ) ProvideAlarms() chan alarm.Alarm

func (MultiQ) Run

func (m MultiQ) Run(events chan dnszilla.DNSResult)

type Processor

type Processor interface {
	// Run starts the processor
	Run(events chan dnszilla.DNSResult)
	// ProvideAlarms returns a channel that the processor will send alarms to
	ProvideAlarms() chan alarm.Alarm
}

func NewBase64Decetor

func NewBase64Decetor(s state.State, name string) (Processor, error)

func NewBeaconingDetector

func NewBeaconingDetector(s state.State, name string) (Processor, error)

func NewCSVCIDR

func NewCSVCIDR(s state.State, path string, name string) (Processor, error)

NewCSVCIDR creates a new CSV processor for a list of CIDRs/IPs. each row can optionally have a different alarm message. example:

1.1.1.1,{{ range $q := .DNS.Question}}{{$q.Name}}{{end}}
192.168.1.0/24,{{ range $q := .DNS.Question}}{{$q.Name}}{{end}}

above csv row will match any DNS query that ends with google.com, and will emit an alarm with the DNS question please note that the CSV does not have a header row, and the order of the columns is important.

func NewCSVFQDN

func NewCSVFQDN(s state.State, path string, name string) (Processor, error)

NewCSVFQDN creates a new CSV processor for a list of (partial)FQDNs. each row can optionally have a different alarm message. example:

google.com.,suffix,{{ range $q := .DNS.Question}}{{$q.Name}}{{end}}

above csv row will match any DNS query that ends with google.com, and will emit an alarm with the DNS question please note that the CSV does not have a header row, and the order of the columns is important.

func NewDummyProcessor

func NewDummyProcessor(s state.State) Processor

func NewMixedCaseDecetor

func NewMixedCaseDecetor(s state.State, name string) (Processor, error)

func NewMultiQ

func NewMultiQ(s state.State) (Processor, error)

NewMultiQ provides a new instance of MultiQ

func NewRateDetector

func NewRateDetector(s state.State, name string, window time.Duration, qtype []int, rcodes []int, excludeNets []net.IPNet, ip4mask int, threshold int) (Processor, error)

NewRateDetector provides a new rate detector based on the configuration properties

func NewRebindingDetector

func NewRebindingDetector(s state.State, name string) (Processor, error)

detect DNS rebinding attacks by cechking DNS response IPs against RFC1918

type RateDetector

type RateDetector struct {
	// contains filtered or unexported fields
}

RateDetector is design to alarm based on number of particular DNS events per a period of time from a source IP

func (RateDetector) ProvideAlarms

func (r RateDetector) ProvideAlarms() chan alarm.Alarm

func (RateDetector) Run

func (r RateDetector) Run(events chan dnszilla.DNSResult)

type RebindingDetector

type RebindingDetector struct {
	// contains filtered or unexported fields
}

func (RebindingDetector) ProvideAlarms

func (r RebindingDetector) ProvideAlarms() chan alarm.Alarm

func (RebindingDetector) Run

func (r RebindingDetector) Run(events chan dnszilla.DNSResult)

Jump to

Keyboard shortcuts

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