config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2018 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExactVersion = "undefined"

ExactVersion is filled at compile time with the git version of RITA ExactVersion is filled by "git describe --always --long --dirty --tags"

View Source
var Version = "undefined"

Version is filled at compile time with the git version of RITA Version is filled by "git describe --abbrev=0 --tags"

Functions

This section is empty.

Types

type BeaconStaticCfg

type BeaconStaticCfg struct {
	DefaultConnectionThresh int `yaml:"DefaultConnectionThresh"`
}

BeaconStaticCfg is used to control the beaconing analysis module

type BeaconTableCfg

type BeaconTableCfg struct {
	BeaconTable string
}

BeaconTableCfg is used to control the beaconing analysis module

type BlacklistedStaticCfg

type BlacklistedStaticCfg struct {
	UseIPms            bool                  `yaml:"myIP.ms"`
	UseDNSBH           bool                  `yaml:"MalwareDomains.com"`
	UseMDL             bool                  `yaml:"MalwareDomainList.com"`
	SafeBrowsing       SafeBrowsingStaticCfg `yaml:"SafeBrowsing"`
	IPBlacklists       []string              `yaml:"CustomIPBlacklists"`
	HostnameBlacklists []string              `yaml:"CustomHostnameBlacklists"`
	URLBlacklists      []string              `yaml:"CustomURLBlacklists"`
}

BlacklistedStaticCfg is used to control the blacklisted analysis module

type BlacklistedTableCfg

type BlacklistedTableCfg struct {
	BlacklistDatabase string
	SourceIPsTable    string
	DestIPsTable      string
	HostnamesTable    string
	UrlsTable         string
}

BlacklistedTableCfg is used to control the blacklisted analysis module

type BroStaticCfg

type BroStaticCfg struct {
	ImportDirectory string `yaml:"ImportDirectory"`
	DBRoot          string `yaml:"DBRoot"`
	MetaDB          string `yaml:"MetaDB"`
	ImportBuffer    int    `yaml:"ImportBuffer"`
}

BroStaticCfg controls the file parser

type Config

type Config struct {
	R RunningCfg
	S StaticCfg
	T TableCfg
}

Config holds the configuration for the running system

func LoadConfig added in v1.0.2

func LoadConfig(userConfig string) (*Config, error)

LoadConfig attempts to parse a config file

func LoadTestingConfig added in v1.0.2

func LoadTestingConfig(mongoURI string) (*Config, error)

LoadTestingConfig loads the hard coded testing config

type CrossrefStaticCfg

type CrossrefStaticCfg struct {
	BeaconThreshold float64 `yaml:"BeaconThreshold"`
}

CrossrefStaticCfg is used to control the crossref analysis module

type CrossrefTableCfg

type CrossrefTableCfg struct {
	SourceTable string
	DestTable   string
}

CrossrefTableCfg is used to control the crossref analysis module

type DNSTableCfg

type DNSTableCfg struct {
	ExplodedDNSTable string
	HostnamesTable   string
}

DNSTableCfg is used to control the dns analysis module

type LogStaticCfg

type LogStaticCfg struct {
	LogLevel    int    `yaml:"LogLevel"`
	RitaLogPath string `yaml:"RitaLogPath"`
	LogToFile   bool   `yaml:"LogToFile"`
	LogToDB     bool   `yaml:"LogToDB"`
}

LogStaticCfg contains the configuration for logging

type LogTableCfg

type LogTableCfg struct {
	RitaLogTable string
}

LogTableCfg contains the configuration for logging

type MetaTableCfg

type MetaTableCfg struct {
	FilesTable     string
	DatabasesTable string
}

MetaTableCfg contains the meta db collection names

type MongoDBRunningCfg

type MongoDBRunningCfg struct {
	AuthMechanismParsed mgosec.AuthMechanism
	TLS                 struct {
		TLSConfig *tls.Config
	}
}

MongoDBRunningCfg holds parsed information for connecting to MongoDB

type MongoDBStaticCfg

type MongoDBStaticCfg struct {
	ConnectionString string        `yaml:"ConnectionString"`
	AuthMechanism    string        `yaml:"AuthenticationMechanism"`
	SocketTimeout    time.Duration `yaml:"SocketTimeout"`
	TLS              TLSStaticCfg  `yaml:"TLS"`
}

MongoDBStaticCfg contains the means for connecting to MongoDB

type RunningCfg

type RunningCfg struct {
	MongoDB MongoDBRunningCfg
	Version semver.Version
}

RunningCfg holds configuration options that are parsed at run time

type SafeBrowsingStaticCfg

type SafeBrowsingStaticCfg struct {
	APIKey   string `yaml:"APIKey"`
	Database string `yaml:"Database"`
}

SafeBrowsingStaticCfg contains the details for contacting Google's safebrowsing api

type ScanningStaticCfg

type ScanningStaticCfg struct {
	ScanThreshold int `yaml:"ScanThreshold"`
}

ScanningStaticCfg is used to control the scanning analysis module

type ScanningTableCfg

type ScanningTableCfg struct {
	ScanTable string
}

ScanningTableCfg is used to control the scanning analysis module

type StaticCfg

type StaticCfg struct {
	UserConfig   UserCfgStaticCfg     `yaml:"UserConfig"`
	MongoDB      MongoDBStaticCfg     `yaml:"MongoDB"`
	Log          LogStaticCfg         `yaml:"LogConfig"`
	Blacklisted  BlacklistedStaticCfg `yaml:"BlackListed"`
	Crossref     CrossrefStaticCfg    `yaml:"Crossref"`
	Scanning     ScanningStaticCfg    `yaml:"Scanning"`
	Beacon       BeaconStaticCfg      `yaml:"Beacon"`
	Bro          BroStaticCfg         `yaml:"Bro"`
	Version      string
	ExactVersion string
}

StaticCfg is the container for other static config sections

type StructureTableCfg

type StructureTableCfg struct {
	ConnTable       string
	HTTPTable       string
	DNSTable        string
	UniqueConnTable string
	HostTable       string
	IPv4Table       string
	IPv6Table       string
}

StructureTableCfg contains the names of the base level collections

type TLSStaticCfg

type TLSStaticCfg struct {
	Enabled           bool   `yaml:"Enable"`
	VerifyCertificate bool   `yaml:"VerifyCertificate"`
	CAFile            string `yaml:"CAFile"`
}

TLSStaticCfg contains the means for connecting to MongoDB over TLS

type TableCfg

type TableCfg struct {
	Log         LogTableCfg
	Blacklisted BlacklistedTableCfg
	DNS         DNSTableCfg
	Crossref    CrossrefTableCfg
	Scanning    ScanningTableCfg
	Structure   StructureTableCfg
	Beacon      BeaconTableCfg
	Urls        UrlsTableCfg
	UserAgent   UserAgentTableCfg
	Meta        MetaTableCfg
}

TableCfg is the container for other table config sections

type UrlsTableCfg

type UrlsTableCfg struct {
	UrlsTable string
}

UrlsTableCfg is used to control the urls analysis module

type UserAgentTableCfg

type UserAgentTableCfg struct {
	UserAgentTable string
}

UserAgentTableCfg is used to control the urls analysis module

type UserCfgStaticCfg added in v1.1.1

type UserCfgStaticCfg struct {
	UpdateCheckFrequency *int `yaml:"UpdateCheckFrequency,omitempty"`
}

UserCfgStaticCfg contains

Jump to

Keyboard shortcuts

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