Documentation
¶
Index ¶
- func FileDifference(fileName string, fileContent string) (int, error)
- func FileHash(fileName string) (string, error)
- func GetFile(fileName string) (string, error)
- func StringHash(fileContent string) (string, error)
- type Custom
- type Dns
- type DnsRecord
- type Ftp
- type FtpFile
- type Imap
- type Ldap
- type Ping
- type Pop3
- type Rdp
- type Result
- type Runner
- type Service
- func (service *Service) Configure(ip string, points int, timeout int, slapenalty int, slathreshold int) error
- func (service *Service) GetAttempts() int
- func (service *Service) GetCredlists() []string
- func (service *Service) GetName() string
- func (service *Service) GetType() string
- func (service *Service) Run(teamID uint, teamIdentifier string, roundID uint, resultsChan chan Result, ...)
- func (service *Service) Runnable() bool
- func (service *Service) SetCredlists(lists []string)
- func (service *Service) SetTaskCredentials(creds []TaskCredential)
- type Smb
- type Smtp
- type Sql
- type Ssh
- type TaskCredential
- type Tcp
- type Vnc
- type Web
- type WinRM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileDifference ¶
FileDifference returns the percentage difference between the contents of the filename passed and the contents of the file passed.
func StringHash ¶
StringHash returns the sha256sum of the string
Types ¶
type Result ¶
type Result struct {
ServiceName string `json:"name,omitempty"`
Target string `json:"target,omitempty"`
TeamID uint `json:"team_id,omitempty"`
Status bool `json:"status,omitempty"`
Debug string `json:"debug,omitempty"`
Error string `json:"error,omitempty"`
Points int `json:"points,omitempty"`
ServiceType string `json:"service_type,omitempty"`
RoundID uint `json:"round_id"`
// Added for runner visualization
RunnerID string `json:"runner_id,omitempty"`
StartTime string `json:"start_time,omitempty"`
EndTime string `json:"end_time,omitempty"`
StatusText string `json:"status_text,omitempty"` // "running", "success", or "failed"
}
type Runner ¶
type Runner interface {
Run(teamID uint, identifier string, roundID uint, resultsChan chan Result)
Runnable() bool
Verify(box string, ip string, points int, timeout int, slapenalty int, slathreshold int) error
GetType() string
GetName() string
GetAttempts() int
GetCredlists() []string
SetTaskCredentials(creds []TaskCredential)
}
checks for each service
type Service ¶
type Service struct {
Name string `toml:"-"` // Name is the box name plus the service (ex. lunar-dns)
Display string `toml:",omitempty"` // Display is the name of the service (ex. dns)
CredLists []string `toml:",omitempty"`
Port int `toml:",omitzero"` // omitzero because custom checks might not specify port, and shouldn't be assigned 0
Points int `toml:",omitempty"`
Timeout int `toml:",omitempty"`
SlaPenalty int `toml:",omitempty"`
SlaThreshold int `toml:",omitempty"`
LaunchTime time.Time `toml:",omitempty"`
StopTime time.Time `toml:",omitempty"`
Disabled bool `toml:",omitempty"`
Target string `toml:",omitempty"` // Target is the IP address or hostname for the box
ServiceType string `toml:",omitempty"` // ServiceType is the name of the Runner that checks the service
Attempts int `toml:",omitempty"` // Attempts is the number of times the service has been checked
TaskCredentials []TaskCredential `toml:"-"` // Credentials from task payload (set per-task, not from config)
}
services will inherit Service so that config.Config can be read from file, but will not be used after initial read
func (*Service) GetAttempts ¶
func (*Service) GetCredlists ¶
func (*Service) SetCredlists ¶
func (*Service) SetTaskCredentials ¶
func (service *Service) SetTaskCredentials(creds []TaskCredential)
SetTaskCredentials sets credentials from the task payload (thread-safe per-instance)
type Ssh ¶
type Ssh struct {
Service
PrivKey string `toml:",omitempty"`
BadAttempts int `toml:",omitzero"`
Command []commandData
}
type TaskCredential ¶
TaskCredential represents a credential from the task payload
Click to show internal directories.
Click to hide internal directories.