model

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CurrentHost

type CurrentHost interface {
	GetUsers() ([]User, error)
	GetGroups() (map[string][]GroupMember, error)
	GetProcesses() ([]Process, error)
	GetSoftware() ([]Software, error)
	GetNetworkConnections() ([]NetworkConnection, error)
	GetScheduledTasks() ([]ScheduledTask, error)
	GetWindowsFirewallProfiles() ([]WindowsFirewallProfile, error)
	GetWindowsFirewallRules() ([]WindowsFirewallRule, error)
	GetWindowsSettings() ([]WindowsSetting, error)
	Install()
	CopyFiles()
}

type Finding

type Finding struct {
	Value   int64
	Show    bool
	Message string
}

type GroupMember

type GroupMember struct {
	Name        string
	ObjectState ObjectState
}

type Host

type Host struct {
	ID       uint64
	Hostname string
	OS       string
}

type NetworkConnection

type NetworkConnection struct {
	Protocol      string
	PID           int64
	LocalAddress  string
	LocalPort     string
	RemoteAddress string
	RemotePort    string
	State         NetworkConnectionState
	ObjectState   ObjectState
}

type NetworkConnectionState

type NetworkConnectionState string
const (
	NetworkConnectionClosed      NetworkConnectionState = "CLOSED"
	NetworkConnectionCloseWait   NetworkConnectionState = "CLOSE_WAIT"
	NetworkConnectionClosing     NetworkConnectionState = "CLOSING"
	NetworkConnectionDeleteTcb   NetworkConnectionState = "DELETE_TCB"
	NetworkConnectionEstablished NetworkConnectionState = "ESTABLISHED"
	NetworkConnectionFinWait1    NetworkConnectionState = "FIN_WAIT1"
	NetworkConnectionFinWait2    NetworkConnectionState = "FIN_WAIT2"
	NetworkConnectionLastAck     NetworkConnectionState = "LAST_ACK"
	NetworkConnectionListen      NetworkConnectionState = "LISTEN"
	NetworkConnectionSynReceived NetworkConnectionState = "SYN_RECV"
	NetworkConnectionSynSent     NetworkConnectionState = "SYN_SENT"
	NetworkConnectionTimeWait    NetworkConnectionState = "TIME_WAIT"
	NetworkConnectionUnconn      NetworkConnectionState = "UNCONN"
	NetworkConnectionUnknown     NetworkConnectionState = "UNKNOWN"
)

func GetNetworkConnectionState

func GetNetworkConnectionState(stateStr string) NetworkConnectionState

func GetNetworkConnectionStateLinux

func GetNetworkConnectionStateLinux(hex string) NetworkConnectionState

type ObjectState

type ObjectState string
const (
	ObjectStateAdd    ObjectState = "Add"
	ObjectStateKeep   ObjectState = "Keep"
	ObjectStateRemove ObjectState = "Remove"
)

type Process

type Process struct {
	ObjectState ObjectState
	PID         int64
	User        string
	CommandLine string
}

type Report

type Report struct {
	Timestamp int64
	Findings  []Finding
}

type Scenario

type Scenario struct {
	ID            uint64
	Name          string
	Description   string
	Enabled       bool
	HostTemplates map[uint64][]uint64
}

type ScenarioHostScore added in v0.2.0

type ScenarioHostScore struct {
	ScenarioID uint64
	HostToken  string
	Timestamp  int64
	Score      int64
}

type ScenarioHosts

type ScenarioHosts struct {
	ScenarioID   uint64
	ScenarioName string
	Hosts        []Host
}

type ScenarioSummary

type ScenarioSummary struct {
	ID   uint64
	Name string
}

type ScenarioTimeline

type ScenarioTimeline struct {
	Timestamps []int64
	Scores     []int64
}

type ScheduledTask added in v0.6.0

type ScheduledTask struct {
	Name        string
	Path        string
	Enabled     bool
	ObjectState ObjectState
}

type Software

type Software struct {
	Name        string
	Version     string
	ObjectState ObjectState
}

type State

type State struct {
	Timestamp               int64
	OS                      string
	Hostname                string
	Errors                  []string
	Users                   []User
	Groups                  map[string][]GroupMember
	Processes               []Process
	Software                []Software
	NetworkConnections      []NetworkConnection
	ScheduledTasks          []ScheduledTask
	WindowsFirewallProfiles []WindowsFirewallProfile
	WindowsFirewallRules    []WindowsFirewallRule
	WindowsSettings         []WindowsSetting
}

func GetNewStateTemplate

func GetNewStateTemplate() State

type StateSubmission

type StateSubmission struct {
	HostToken  string
	StateBytes []byte
}

type Team

type Team struct {
	ID      uint64
	Name    string
	POC     string
	Email   string
	Enabled bool
	Key     string
}

type TeamScore added in v0.2.0

type TeamScore struct {
	TeamName  string
	Timestamp int64
	Score     int64
}

type TeamSummary

type TeamSummary struct {
	ID   uint64
	Name string
}

type Template

type Template struct {
	ID    uint64
	Name  string
	State State
}

func NewTemplate

func NewTemplate() Template

NewTemplate returns a new Template instance

type TimestampDocumentAndReceived added in v0.4.0

type TimestampDocumentAndReceived struct {
	ID       string
	Document int64
	Received int64
}

type User

type User struct {
	Name            string
	ID              string
	ObjectState     ObjectState
	AccountActive   bool
	AccountExpires  bool
	PasswordLastSet int64
	PasswordExpires bool
}

type WindowsFirewallProfile added in v0.6.0

type WindowsFirewallProfile struct {
	Name                  string
	Enabled               bool
	DefaultInboundAction  string
	DefaultOutboundAction string
}

type WindowsFirewallRule added in v0.6.0

type WindowsFirewallRule struct {
	DisplayName   string
	Enabled       bool
	Protocol      string
	LocalPort     string
	RemoteAddress string
	RemotePort    string
	Direction     string
	Action        string
	ObjectState   ObjectState
}

type WindowsSetting added in v0.6.0

type WindowsSetting struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

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