unmarshal

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFile

func ReadFile(filename string) (*idmef.Message, error)

Types

type Action added in v0.2.0

type Action struct {
	Action   string `xml:",chardata"`
	Category string `xml:"category,attr,omitempty"`
}

func (Action) Common added in v0.2.0

func (a Action) Common() idmef.Action

type AdditionalData added in v0.2.0

type AdditionalData struct {
	Type     string    `xml:"type,attr,omitempty"`
	Meaning  string    `xml:"meaning,attr,omitempty"`
	DateTime time.Time `xml:"http://iana.org/idmef date-time,omitempty"`
	Real     *float64  `xml:"http://iana.org/idmef real,omitempty"`
}

func (AdditionalData) Common added in v0.2.0

func (a AdditionalData) Common() idmef.AdditionalData

type Address

type Address struct {
	Ident    string `xml:"ident,attr,omitempty"`
	Category string `xml:"category,attr,omitempty"`
	Address  string `xml:"http://iana.org/idmef address,omitempty"`
	Netmask  string `xml:"http://iana.org/idmef netmask,omitempty"`
}

func (*Address) Common

func (a *Address) Common() *idmef.Address

type Alert

type Alert struct {
	MessageID        string            `xml:"messageid,attr,omitempty"`
	Analyzer         Analyzer          `xml:"http://iana.org/idmef Analyzer"`
	CreateTime       Time              `xml:"http://iana.org/idmef CreateTime"`
	DetectTime       *Time             `xml:"http://iana.org/idmef DetectTime"`
	AnalyzerTime     *Time             `xml:"http://iana.org/idmef AnalyzerTime"`
	Source           []Source          `xml:"http://iana.org/idmef Source"`
	Target           []Target          `xml:"http://iana.org/idmef Target"`
	Classification   Classification    `xml:"http://iana.org/idmef Classification"`
	Assessment       *Assessment       `xml:"http://iana.org/idmef Assessment"`
	CorrelationAlert *CorrelationAlert `xml:"http://iana.org/idmef CorrelationAlert"`
	AdditionalData   []AdditionalData  `xml:"http://iana.org/idmef AdditionalData"`
}

func (*Alert) Common

func (a *Alert) Common() *idmef.Alert

type AlertIdent added in v0.3.0

type AlertIdent struct {
	AlertIdent string `xml:",chardata"`
	AnalyzerID string `xml:"analyzerid,attr,omitempty"`
}

func (*AlertIdent) Common added in v0.3.0

func (a *AlertIdent) Common() idmef.AlertIdent

type Analyzer

type Analyzer struct {
	AnalyzerID   string   `xml:"analyzerid,attr,omitempty"`
	Name         string   `xml:"name,attr,omitempty"`
	Manufacturer string   `xml:"manufacturer,attr,omitempty"`
	Model        string   `xml:"model,attr,omitempty"`
	Version      string   `xml:"version,attr,omitempty"`
	Class        string   `xml:"class,attr,omitempty"`
	OSType       string   `xml:"ostype,attr,omitempty"`
	OSVersion    string   `xml:"osversion,attr,omitempty"`
	Node         *Node    `xml:"http://iana.org/idmef Node,omitempty"`
	Process      *Process `xml:"http://iana.org/idmef Process,omitempty"`
}

Analyzer class identifies the analyzer from which the Alert or Heartbeat message originates. Only one analyzer may be encoded for each alert or heartbeat, and that MUST be the analyzer at which the alert or heartbeat originated. Although the IDMEF data model does not prevent the use of hierarchical intrusion detection systems (where alerts get relayed up the tree), it does not provide any way to record the identity of the "relay" analyzers along the path from the originating analyzer to the manager that ultimately receives the alert. (from RFC 4765)

func (*Analyzer) Common

func (a *Analyzer) Common() idmef.Analyzer

type Assessment added in v0.2.0

type Assessment struct {
	Impact     *Impact     `xml:"http://iana.org/idmef Impact,omitempty"`
	Action     []Action    `xml:"http://iana.org/idmef Action,omitempty"`
	Confidence *Confidence `xml:"http://iana.org/idmef Confidence,omitempty"`
}

func (Assessment) Common added in v0.2.0

func (a Assessment) Common() *idmef.Assessment

type Classification

type Classification struct {
	Ident     string      `xml:"ident,attr,omitempty"`
	Text      string      `xml:"text,attr"`
	Reference []Reference `xml:"http://iana.org/idmef Reference"`
}

func (*Classification) Common

func (cl *Classification) Common() idmef.Classification

type Confidence added in v0.2.0

type Confidence struct {
	Rating string `xml:"rating,attr,omitempty"`
}

func (Confidence) Common added in v0.2.0

func (c Confidence) Common() *idmef.Confidence

type CorrelationAlert added in v0.3.0

type CorrelationAlert struct {
	Name       string       `xml:"http://iana.org/idmef name,omitempty"`
	AlertIdent []AlertIdent `xml:"http://iana.org/idmef alertident,omitempty"`
}

func (CorrelationAlert) Common added in v0.3.0

func (c CorrelationAlert) Common() *idmef.CorrelationAlert

type File added in v0.2.0

type File struct {
	Category   string       `xml:"category,attr,omitempty"`
	FSType     string       `xml:"fstype,attr,omitempty"`
	Name       string       `xml:"http://iana.org/idmef name,omitempty"`
	Path       string       `xml:"http://iana.org/idmef path,omitempty"`
	FileAccess []FileAccess `xml:"http://iana.org/idmef FileAccess,omitempty"`
	Linkage    *Linkage     `xml:"http://iana.org/idmef Linkage,omitempty"`
}

func (*File) Common added in v0.2.0

func (f *File) Common() *idmef.File

type FileAccess added in v0.2.0

type FileAccess struct {
	UserID     *UserID      `xml:"http://iana.org/idmef UserId,omitempty"`
	Permission []Permission `xml:"http://iana.org/idmef permission,omitempty"`
}

func (FileAccess) Common added in v0.2.0

func (f FileAccess) Common() idmef.FileAccess

type Heartbeat added in v0.3.0

type Heartbeat struct {
	MessageID      string           `xml:"messageid,attr,omitempty"`
	Analyzer       Analyzer         `xml:"http://iana.org/idmef Analyzer"`
	CreateTime     Time             `xml:"http://iana.org/idmef CreateTime"`
	AdditionalData []AdditionalData `xml:"http://iana.org/idmef AdditionalData"`
}

func (*Heartbeat) Common added in v0.3.0

func (h *Heartbeat) Common() *idmef.Heartbeat

type Impact added in v0.2.0

type Impact struct {
	Severity   string `xml:"severity,attr,omitempty"`
	Completion string `xml:"completion,attr,omitempty"`
	Type       string `xml:"type,attr,omitempty"`
}

func (Impact) Common added in v0.2.0

func (i Impact) Common() *idmef.Impact

type Linkage added in v0.2.0

type Linkage struct {
	Category string `xml:"category,attr,omitempty"`
	Name     string `xml:"http://iana.org/idmef name,omitempty"`
	Path     string `xml:"http://iana.org/idmef path,omitempty"`
}

func (*Linkage) Common added in v0.2.0

func (l *Linkage) Common() *idmef.Linkage

type Message

type Message struct {
	XMLName    xml.Name   `xml:"http://iana.org/idmef IDMEF-Message"`
	XMLNSIDMEF string     `xml:"xmlns:idmef,attr"`
	Version    string     `xml:"version,attr"`
	Alert      *Alert     `xml:"http://iana.org/idmef Alert"`
	Heartbeat  *Heartbeat `xml:"http://iana.org/idmef Heartbeat"`
}

func (*Message) Bytes

func (m *Message) Bytes(prefix, indent string) ([]byte, error)

func (*Message) Common

func (m *Message) Common() *idmef.Message

type Node

type Node struct {
	Ident    string   `xml:"ident,attr,omitempty"`
	Category string   `xml:"category,attr,omitempty"`
	Name     string   `xml:"http://iana.org/idmef name,omitempty"`
	Address  *Address `xml:"http://iana.org/idmef Address,omitempty"`
	Location string   `xml:"http://iana.org/idmef location,omitempty"`
}

func (*Node) Common

func (n *Node) Common() *idmef.Node

type Permission added in v0.2.0

type Permission struct {
	Perms string `xml:"perms,attr,omitempty"`
}

func (Permission) Common added in v0.2.0

func (p Permission) Common() idmef.Permission

type Process added in v0.2.0

type Process struct {
	Ident string   `xml:"ident,attr,omitempty"`
	Name  string   `xml:"http://iana.org/idmef name,omitempty"`
	PID   int32    `xml:"http://iana.org/idmef pid,omitempty"`
	Path  string   `xml:"http://iana.org/idmef path,omitempty"`
	Arg   []string `xml:"http://iana.org/idmef arg,omitempty"`
}

func (*Process) Common added in v0.2.0

func (p *Process) Common() *idmef.Process

type Reference

type Reference struct {
	Origin  string `xml:"origin,attr,omitempty"`
	Meaning string `xml:"meaning,attr,omitempty"`
	Name    string `xml:"http://iana.org/idmef name,omitempty"`
	URL     string `xml:"http://iana.org/idmef url,omitempty"`
}

func (*Reference) Common

func (ref *Reference) Common() idmef.Reference

type Service added in v0.2.0

type Service struct {
	Ident      string      `xml:"ident,attr,omitempty"`
	Name       string      `xml:"http://iana.org/idmef name,omitempty"`
	Port       int         `xml:"http://iana.org/idmef port,omitempty"`
	Portlist   string      `xml:"http://iana.org/idmef portlist,omitempty"`
	WebService *WebService `xml:"http://iana.org/idmef WebService"`
}

func (*Service) Common added in v0.2.0

func (s *Service) Common() *idmef.Service

type Source

type Source struct {
	Ident   string   `xml:"ident,attr"`
	Spoofed string   `xml:"spoofed,attr,omitempty"` // Source
	Node    *Node    `xml:"http://iana.org/idmef Node"`
	User    *User    `xml:"http://iana.org/idmef User"`
	Process *Process `xml:"http://iana.org/idmef Process"`
	Service *Service `xml:"http://iana.org/idmef Service"`
}

func (*Source) Common

func (s *Source) Common() idmef.Source

type Target added in v0.2.0

type Target struct {
	Ident   string   `xml:"ident,attr"`
	Decoy   string   `xml:"decoy,attr,omitempty"` // Target
	Node    *Node    `xml:"http://iana.org/idmef Node"`
	User    *User    `xml:"http://iana.org/idmef User"`
	Process *Process `xml:"http://iana.org/idmef Process"`
	Service *Service `xml:"http://iana.org/idmef Service"`
	File    *File    `xml:"http://iana.org/idmef File,omitempty"`
}

func (*Target) Common added in v0.2.0

func (t *Target) Common() idmef.Target

type Time

type Time struct {
	Time     time.Time `xml:",chardata"`
	NtpStamp string    `xml:"ntpstamp,attr"`
}

func (*Time) Common

func (t *Time) Common() idmef.Time

type User added in v0.2.0

type User struct {
	Ident    string   `xml:"ident,attr,omitempty"`
	Category string   `xml:"category,attr,omitempty"`
	UserID   []UserID `xml:"http://iana.org/idmef UserId,omitempty"`
}

func (*User) Common added in v0.2.0

func (u *User) Common() *idmef.User

type UserID added in v0.4.0

type UserID struct {
	Ident  string `xml:"ident,attr,omitempty"`
	Type   string `xml:"type,attr,omitempty"`
	Name   string `xml:"http://iana.org/idmef name,omitempty"`
	Number string `xml:"http://iana.org/idmef number,omitempty"`
}

func (*UserID) Common added in v0.4.0

func (u *UserID) Common() idmef.UserID

type WebService added in v0.3.0

type WebService struct {
	URL        string `xml:"http://iana.org/idmef url,omitempty"`
	CGI        string `xml:"http://iana.org/idmef cgi,omitempty"`
	HTTPMethod string `xml:"http://iana.org/idmef http-method,omitempty"`
}

func (WebService) Common added in v0.3.0

func (w WebService) Common() *idmef.WebService

Jump to

Keyboard shortcuts

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