plugins

package
v0.0.53 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtoRMI        = "rmi"
	ProtoDNS        = "dns"
	ProtoDHCP       = "dhcp"
	ProtoEcho       = "echo"
	ProtoEPMD       = "epmd"
	ProtoDameware   = "damewaremr"
	ProtoFTP        = "ftp"
	ProtoHTTP       = "http"
	ProtoHTTPS      = "https"
	ProtoHTTP2      = "http2"
	ProtoIMAP       = "imap"
	ProtoIMAPS      = "imaps"
	ProtoIPMI       = "ipmi"
	ProtoIPSEC      = "ipsec"
	ProtoJDWP       = "jdwp"
	ProtoKafka      = "kafka"
	ProtoLDAP       = "ldap"
	ProtoLDAPS      = "ldaps"
	ProtoModbus     = "modbus"
	ProtoMQ         = "activemq" // Generic MQ protocol for ActiveMQ, RabbitMQ, etc.
	ProtoAMQP       = "amqp"
	ProtoMQTT       = "mqtt"
	ProtoMSSQL      = "mssql"
	ProtoMSRPC      = "msrpc"
	ProtoMySQL      = "mysql"
	ProtoNetbios    = "netbios"
	ProtoNTP        = "ntp"
	ProtoOracle     = "oracle"
	ProtoOpenVPN    = "openvpn"
	ProtoPOP3       = "pop3"
	ProtoPOP3S      = "pop3s"
	ProtoPostgreSQL = "postgresql"
	ProtoRDP        = "rdp"
	ProtoRPC        = "rpc"
	ProtoRedis      = "redis"
	ProtoRedisTLS   = "redis"
	ProtoRsync      = "rsync"
	ProtoRtsp       = "rtsp"
	ProtoSMB        = "smb"
	ProtoSMTP       = "smtp"
	ProtoSMTPS      = "smtps"
	ProtoSNMP       = "snmp"
	ProtoSSH        = "ssh"
	ProtoStun       = "stun"
	ProtoTelnet     = "telnet"
	ProtoVNC        = "vnc"
	ProtoNFS        = "nfs"
	ProtoUnknown    = "unknown"

	// ADDED
	ProtoFGFMSD      = "fgfmsd"
	ProtoRADIUS      = "radius"
	ProtoZabbixAgent = "zabbix"
	ProtoSIP         = "sip"
	ProtoL2TP        = "l2tp"
	ProtoPPTP        = "pptp"
	ProtoWINBOX      = "winbox"
	ProtoMONGO       = "mongodb"
	ProtoWINRM       = "winrm"
)
View Source
const TypeService string = "service"

Variables

View Source
var Plugins = make(map[Protocol][]Plugin)

Functions

func RegisterPlugin

func RegisterPlugin(p Plugin)

This function must not be run concurrently. This function should only be run once per plugin.

Types

type Metadata

type Metadata interface {
	Type() string
}

type Plugin

type Plugin interface {
	Run(net.Conn, time.Duration, Target) (*Service, error)
	PortPriority(uint16) bool
	Name() string
	Type() Protocol
	Priority() int
}

type PluginID

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

Used as a key for maps to plugins. i.e.: map[Service] Plugin

func CreatePluginID

func CreatePluginID(p Plugin) PluginID

func (PluginID) String

func (p PluginID) String() string

type Protocol

type Protocol uint64

type SupportedIPVersion uint64

const (
	IP Protocol = iota + 1
	UDP
	TCP
	TCPTLS
)

func (Protocol) String

func (p Protocol) String() (s string)

type RPCB

type RPCB struct {
	Program  int    `json:"program"`
	Version  int    `json:"version"`
	Protocol string `json:"protocol"`
	Address  string `json:"address"`
	Owner    string `json:"owner"`
}

type Service

type Service struct {
	Host      string          `json:"host,omitempty"`
	IP        string          `json:"ip"`
	Port      int             `json:"port"`
	Protocol  string          `json:"protocol"`
	TLS       bool            `json:"tls"`
	Transport string          `json:"transport"`
	Version   string          `json:"version,omitempty"`
	Raw       json.RawMessage `json:"metadata"`
}

func CreateServiceFrom

func CreateServiceFrom(target Target, m Metadata, tls bool, version string, transport Protocol) *Service

func (Service) Metadata

func (e Service) Metadata() Metadata

func (Service) Type

func (e Service) Type() string

type ServiceAMQP

type ServiceAMQP struct {
	Provider string            `json:"provider,omitempty"` // Detected MQ provider, e.g., "ActiveMQ", "RabbitMQ", "IBM MQ"
	Version  string            `json:"version,omitempty"`  // Detected protocol or service version
	Metadata map[string]string `json:"metadata,omitempty"`
}

func (ServiceAMQP) Type

func (e ServiceAMQP) Type() string

type ServiceDHCP

type ServiceDHCP struct {
	Option string `json:"option"`
}

func (ServiceDHCP) Type

func (e ServiceDHCP) Type() string

type ServiceDNS

type ServiceDNS struct {
	Banner string `json:"banner,omitempty"`
}

func (ServiceDNS) Type

func (e ServiceDNS) Type() string

type ServiceDameware

type ServiceDameware struct {
	Banner string `json:"banner"`
}

func (ServiceDameware) Type

func (e ServiceDameware) Type() string

type ServiceEPMD

type ServiceEPMD struct {
	Provider string `json:"provider,omitempty"`
}

func (ServiceEPMD) Type

func (e ServiceEPMD) Type() string

type ServiceEcho

type ServiceEcho struct{}

func (ServiceEcho) Type

func (e ServiceEcho) Type() string

type ServiceFGFMSD

type ServiceFGFMSD struct {
	// Vendor information
	VendorName        string `json:"vendorName,omitempty"`
	VendorProduct     string `json:"vendorProduct,omitempty"`
	VendorVersion     string `json:"vendorVersion,omitempty"`
	VendorConfidence  int    `json:"vendorConfidence,omitempty"`
	VendorMethod      string `json:"vendorMethod,omitempty"`
	VendorDescription string `json:"vendorDescription,omitempty"`
	Vulnerable        bool   `json:"vulnerable,omitempty"`

	// Certificate information
	CertificateInfo map[string]interface{} `json:"certificateInfo,omitempty"`
	TLSVersion      string                 `json:"tlsVersion,omitempty"`
	CipherSuite     string                 `json:"cipherSuite,omitempty"`
	ServerName      string                 `json:"serverName,omitempty"`
	ResponseTime    time.Duration          `json:"responseTime,omitempty"`

	// Protocol and service information
	ProtocolSupport    []string `json:"protocolSupport,omitempty"`
	AuthenticationMode string   `json:"authenticationMode,omitempty"`
	ServiceVersion     string   `json:"serviceVersion,omitempty"`
	DeviceModel        string   `json:"deviceModel,omitempty"`

	// FGFMSD-specific features
	ManagementFeatures []string               `json:"managementFeatures,omitempty"`
	SecurityInfo       map[string]interface{} `json:"securityInfo,omitempty"`

	// Detection metadata
	DetectionLevel string `json:"detectionLevel,omitempty"` // "basic" or "enhanced"
}

func (ServiceFGFMSD) Type

func (e ServiceFGFMSD) Type() string

type ServiceFTP

type ServiceFTP struct {
	Banner string `json:"banner"`
}

func (ServiceFTP) Type

func (e ServiceFTP) Type() string

type ServiceHTTP

type ServiceHTTP struct {
	Status          string      `json:"status"`     // e.g. "200 OK"
	StatusCode      int         `json:"statusCode"` // e.g. 200
	ResponseHeaders http.Header `json:"responseHeaders"`
	Technologies    []string    `json:"technologies,omitempty"`
}

func (ServiceHTTP) Type

func (e ServiceHTTP) Type() string

type ServiceHTTPS

type ServiceHTTPS struct {
	Status          string      `json:"status"`     // e.g. "200 OK"
	StatusCode      int         `json:"statusCode"` // e.g. 200
	ResponseHeaders http.Header `json:"responseHeaders"`
	Technologies    []string    `json:"technologies,omitempty"`
}

func (ServiceHTTPS) Type

func (e ServiceHTTPS) Type() string

type ServiceIMAP

type ServiceIMAP struct {
	Banner string `json:"banner"`
}

func (ServiceIMAP) Type

func (e ServiceIMAP) Type() string

type ServiceIMAPS

type ServiceIMAPS struct {
	Banner string `json:"banner"`
}

func (ServiceIMAPS) Type

func (e ServiceIMAPS) Type() string

type ServiceIPMI

type ServiceIPMI struct{}

func (ServiceIPMI) Type

func (e ServiceIPMI) Type() string

type ServiceIPSEC

type ServiceIPSEC struct {
	// IKE version information
	IKEVersionMajor int `json:"ikeVersionMajor,omitempty"`
	IKEVersionMinor int `json:"ikeVersionMinor,omitempty"`
	IKEVersionRaw   int `json:"ikeVersionRaw,omitempty"`

	// Vendor information
	VendorName        string `json:"vendorName,omitempty"`
	VendorProduct     string `json:"vendorProduct,omitempty"`
	VendorVersion     string `json:"vendorVersion,omitempty"`
	VendorDescription string `json:"vendorDescription,omitempty"`
	VendorPriority    int    `json:"vendorPriority,omitempty"`

	// Vendor ID information
	VendorIDs      []string `json:"vendorIDs,omitempty"`
	VendorIDsCount int      `json:"vendorIDsCount,omitempty"`

	// Response analysis
	ResponseLength int  `json:"responseLength,omitempty"`
	HasVendorIDs   bool `json:"hasVendorIDs,omitempty"`
}

func (ServiceIPSEC) Type

func (e ServiceIPSEC) Type() string

type ServiceJDWP

type ServiceJDWP struct {
	Description string `json:"description"`
	JdwpMajor   int32  `json:"jdwpMajor"`
	JdwpMinor   int32  `json:"jdwpMinor"`
	VMVersion   string `json:"VMVersion"`
	VMName      string `json:"VMName"`
}

func (ServiceJDWP) Type

func (e ServiceJDWP) Type() string

type ServiceKafka

type ServiceKafka struct{}

func (ServiceKafka) Type

func (e ServiceKafka) Type() string

type ServiceL2TP

type ServiceL2TP struct {
	Info    string `json:"info"`
	Product string `json:"product"`
}

func (ServiceL2TP) Type

func (e ServiceL2TP) Type() string

type ServiceLDAP

type ServiceLDAP struct{}

func (ServiceLDAP) Type

func (e ServiceLDAP) Type() string

type ServiceLDAPS

type ServiceLDAPS struct{}

func (ServiceLDAPS) Type

func (e ServiceLDAPS) Type() string

type ServiceMQ

type ServiceMQ struct {
	Provider string `json:"provider,omitempty"` // Detected MQ provider, e.g., "ActiveMQ", "RabbitMQ", "IBM MQ"
	Version  string `json:"version,omitempty"`  // Detected protocol or service version
	Details  string `json:"details,omitempty"`  // Additional human-readable details (e.g., OS, architecture, platform info)
	Os       string `json:"os,omitempty"`       // Additional human-readable details (e.g., OS, architecture, platform info)
	Jvm      string `json:"jvm,omitempty"`      // Additional human-readable details (e.g., OS, architecture, platform info)
}

func (ServiceMQ) Type

func (e ServiceMQ) Type() string

type ServiceMQTT

type ServiceMQTT struct{}

func (ServiceMQTT) Type

func (e ServiceMQTT) Type() string

type ServiceMSSQL

type ServiceMSSQL struct{}

func (ServiceMSSQL) Type

func (e ServiceMSSQL) Type() string

type ServiceModbus

type ServiceModbus struct{}

func (ServiceModbus) Type

func (e ServiceModbus) Type() string

type ServiceMongoDB

type ServiceMongoDB struct {
	// Basic Information
	Version    string `json:"version,omitempty"`
	GitVersion string `json:"gitVersion,omitempty"`
	Product    string `json:"product"`

	// Server Information
	ServerType       string `json:"serverType,omitempty"`
	ServerRole       string `json:"serverRole,omitempty"`
	ArchitectureBits int    `json:"architectureBits,omitempty"`

	// Runtime Information
	Allocator        string `json:"allocator,omitempty"`
	JavaScriptEngine string `json:"javascriptEngine,omitempty"`
	MaxBSONSize      int    `json:"maxBsonObjectSize,omitempty"`

	// Storage
	StorageEngines []string `json:"storageEngines,omitempty"`

	// Build Environment
	BuildArch    string `json:"buildArch,omitempty"`
	BuildOS      string `json:"buildOS,omitempty"`
	BuildDistmod string `json:"buildDistmod,omitempty"`
	GCCVersion   string `json:"gccVersion,omitempty"`
	CXXFlags     string `json:"cxxFlags,omitempty"`
	LinkFlags    string `json:"linkFlags,omitempty"`
	CCFlags      string `json:"ccFlags,omitempty"`

	// Security
	Authentication string   `json:"authentication,omitempty"`
	Vulnerable     bool     `json:"vulnerable"` // Removed omitempty to always show
	Databases      []string `json:"databases,omitempty"`

	// SSL/TLS
	OpenSSLCompiled string `json:"opensslCompiled,omitempty"`
	OpenSSLRunning  string `json:"opensslRunning,omitempty"`

	// Cluster Information
	ClusterTime   string `json:"clusterTime,omitempty"`
	OperationTime string `json:"operationTime,omitempty"`

	// Additional Information
	Modules      []string `json:"modules,omitempty"`
	VersionArray []int    `json:"versionArray,omitempty"`
	DebugBuild   bool     `json:"debugBuild,omitempty"`
}

func (ServiceMongoDB) Type

func (e ServiceMongoDB) Type() string

type ServiceMySQL

type ServiceMySQL struct {
	PacketType   string `json:"packetType"` // the type of packet returned by the server (i.e. handshake or error)
	ErrorMessage string `json:"errorMsg"`   // error message if the server returns an error packet
	ErrorCode    int    `json:"errorCode"`  // error code returned if the server returns an error packet
	Version      string `json:"version"`    // version based on some differential analysis (aproximated)
}

func (ServiceMySQL) Type

func (e ServiceMySQL) Type() string

type ServiceNFS

type ServiceNFS struct {
	VersionDetails string   `json:"versionDetails"`
	SharedContent  []string `json:"sharedContent"`
}

func (ServiceNFS) Type

func (e ServiceNFS) Type() string

type ServiceNTP

type ServiceNTP struct{}

func (ServiceNTP) Type

func (e ServiceNTP) Type() string

type ServiceNetbios

type ServiceNetbios struct {
	NetBIOSName string `json:"netBIOSName"`
}

func (ServiceNetbios) Type

func (e ServiceNetbios) Type() string

type ServiceOpenVPN

type ServiceOpenVPN struct {
	// Vendor information
	VendorName        string `json:"vendorName,omitempty"`
	VendorProduct     string `json:"vendorProduct,omitempty"`
	VendorVersion     string `json:"vendorVersion,omitempty"`
	VendorConfidence  int    `json:"vendorConfidence,omitempty"`
	VendorMethod      string `json:"vendorMethod,omitempty"`
	VendorDescription string `json:"vendorDescription,omitempty"`

	// UDP fingerprint data
	ResponseTimeMs    int64   `json:"responseTimeMs,omitempty"`
	ResponseSize      int     `json:"responseSize,omitempty"`
	TimingConsistency float64 `json:"timingConsistency,omitempty"`
	HandshakePattern  string  `json:"handshakePattern,omitempty"`
	ResetBehavior     string  `json:"resetBehavior,omitempty"`
	PacketStructure   string  `json:"packetStructure,omitempty"`
	SupportsAuth      bool    `json:"supportsAuth,omitempty"`
	OpcodeSequence    []uint8 `json:"opcodeSequence,omitempty"`

	// Protocol information
	StandardPort   int      `json:"standardPort,omitempty"`
	Transport      string   `json:"transport,omitempty"`
	Encryption     string   `json:"encryption,omitempty"`
	Authentication []string `json:"authentication,omitempty"`
	Compression    []string `json:"compression,omitempty"`
	SessionID      string   `json:"sessionID,omitempty"`
}

func (ServiceOpenVPN) Type

func (e ServiceOpenVPN) Type() string

type ServiceOracle

type ServiceOracle struct {
	Info    string `json:"info"`
	Product string `json:"product"`
}

func (ServiceOracle) Type

func (e ServiceOracle) Type() string

type ServicePOP3

type ServicePOP3 struct {
	Banner string `json:"banner"`
}

func (ServicePOP3) Type

func (e ServicePOP3) Type() string

type ServicePOP3S

type ServicePOP3S struct {
	Banner string `json:"banner"`
}

func (ServicePOP3S) Type

func (e ServicePOP3S) Type() string

type ServicePPTP

type ServicePPTP struct {
	Info    string `json:"info"`
	Product string `json:"product"`
}

func (ServicePPTP) Type

func (e ServicePPTP) Type() string

type ServicePostgreSQL

type ServicePostgreSQL struct {
	AuthRequired bool `json:"authRequired"`
}

func (ServicePostgreSQL) Type

func (e ServicePostgreSQL) Type() string

type ServiceRADIUS

type ServiceRADIUS struct {
	// Vendor information
	VendorName        string `json:"vendorName,omitempty"`
	VendorProduct     string `json:"vendorProduct,omitempty"`
	VendorVersion     string `json:"vendorVersion,omitempty"`
	VendorID          uint32 `json:"vendorID,omitempty"`
	VendorConfidence  int    `json:"vendorConfidence,omitempty"`
	VendorMethod      string `json:"vendorMethod,omitempty"`
	VendorDescription string `json:"vendorDescription,omitempty"`

	// Attribute analysis
	AttributeCount int     `json:"attributeCount,omitempty"`
	AttributeTypes []uint8 `json:"attributeTypes,omitempty"`

	// Vendor-Specific Attributes (VSAs)
	VendorSpecificAttributes []VSAInfo `json:"vendorSpecificAttributes,omitempty"`

	// Protocol information
	StandardPorts []int  `json:"standardPorts,omitempty"`
	LegacyPorts   []int  `json:"legacyPorts,omitempty"`
	Transport     string `json:"transport,omitempty"`
}

func (ServiceRADIUS) Type

func (e ServiceRADIUS) Type() string

type ServiceRDP

type ServiceRDP struct {
	OSFingerprint       string `json:"fingerprint,omitempty"` // e.g. Windows Server 2016 or 2019
	OSVersion           string `json:"osVersion,omitempty"`
	TargetName          string `json:"targetName,omitempty"`
	NetBIOSComputerName string `json:"netBIOSComputerName,omitempty"`
	NetBIOSDomainName   string `json:"netBIOSDomainName,omitempty"`
	DNSComputerName     string `json:"dnsComputerName,omitempty"`
	DNSDomainName       string `json:"dnsDomainName,omitempty"`
	ForestName          string `json:"forestName,omitempty"`
}

func (ServiceRDP) Type

func (e ServiceRDP) Type() string

type ServiceRMI

type ServiceRMI struct {
	Provider string `json:"provider"`
}

func (ServiceRMI) Type

func (e ServiceRMI) Type() string

type ServiceRPC

type ServiceRPC struct {
	Entries []RPCB `json:"entries"`
}

func (ServiceRPC) Type

func (e ServiceRPC) Type() string

type ServiceRedis

type ServiceRedis struct {
	ProtectedMode   bool   `json:"protectedMode"`
	AuthRequired    bool   `json:"authRequired"`
	Version         string `json:"version"`
	OperatingSystem string `json:"OperatingSystem"`
}

func (ServiceRedis) Type

func (e ServiceRedis) Type() string

type ServiceRsync

type ServiceRsync struct{}

func (ServiceRsync) Type

func (e ServiceRsync) Type() string

type ServiceRtsp

type ServiceRtsp struct {
	ServerInfo string `json:"serverInfo"`
}

func (ServiceRtsp) Type

func (e ServiceRtsp) Type() string

type ServiceSIP

type ServiceSIP struct {
	// Vendor information
	VendorName        string `json:"vendorName,omitempty"`
	VendorProduct     string `json:"vendorProduct,omitempty"`
	VendorVersion     string `json:"vendorVersion,omitempty"`
	VendorConfidence  int    `json:"vendorConfidence,omitempty"`
	VendorMethod      string `json:"vendorMethod,omitempty"`
	VendorDescription string `json:"vendorDescription,omitempty"`

	// SIP response information
	StatusCode   int    `json:"statusCode,omitempty"`
	ReasonPhrase string `json:"reasonPhrase,omitempty"`
	HeadersCount int    `json:"headersCount,omitempty"`

	// Important SIP headers
	UserAgent string `json:"userAgent,omitempty"`
	Server    string `json:"server,omitempty"`
	Allow     string `json:"allow,omitempty"`
	Supported string `json:"supported,omitempty"`
	Contact   string `json:"contact,omitempty"`

	// Protocol information
	StandardPort int      `json:"standardPort,omitempty"`
	SecurePort   int      `json:"securePort,omitempty"`
	Transport    []string `json:"transport,omitempty"`
	Methods      []string `json:"methods,omitempty"`

	// Detection metadata
	DetectionMethod string `json:"detectionMethod,omitempty"`
	ResponseTime    int64  `json:"responseTime,omitempty"` // in milliseconds

	// Security features (passive detection)
	AuthenticationRequired bool     `json:"authenticationRequired,omitempty"`
	AuthenticationMethods  []string `json:"authenticationMethods,omitempty"`
	TLSSupported           bool     `json:"tlsSupported,omitempty"`
	SecurityHeaders        []string `json:"securityHeaders,omitempty"`
	EncryptionSupported    []string `json:"encryptionSupported,omitempty"`

	// Device fingerprinting
	DeviceType      string   `json:"deviceType,omitempty"`
	DeviceModel     string   `json:"deviceModel,omitempty"`
	FirmwareVersion string   `json:"firmwareVersion,omitempty"`
	SupportedCodecs []string `json:"supportedCodecs,omitempty"`
	HeaderOrder     []string `json:"headerOrder,omitempty"`

	// Configuration analysis
	AllowedMethods      []string `json:"allowedMethods,omitempty"`
	SupportedExtensions []string `json:"supportedExtensions,omitempty"`
	SecurityPolicies    []string `json:"securityPolicies,omitempty"`
	TransportSecurity   []string `json:"transportSecurity,omitempty"`
}

Enhanced ServiceSIP struct for types.go

func (ServiceSIP) Type

func (e ServiceSIP) Type() string

type ServiceSMB

type ServiceSMB struct {
	SigningEnabled      bool   `json:"signingEnabled"`  // e.g. Is SMB Signing Enabled?
	SigningRequired     bool   `json:"signingRequired"` // e.g. Is SMB Signing Required?
	OSVersion           string `json:"osVersion"`
	NetBIOSComputerName string `json:"netBIOSComputerName,omitempty"`
	NetBIOSDomainName   string `json:"netBIOSDomainName,omitempty"`
	DNSComputerName     string `json:"dnsComputerName,omitempty"`
	DNSDomainName       string `json:"dnsDomainName,omitempty"`
	ForestName          string `json:"forestName,omitempty"`
}

func (ServiceSMB) Type

func (e ServiceSMB) Type() string

type ServiceSMTP

type ServiceSMTP struct {
	Banner      string   `json:"banner"`
	AuthMethods []string `json:"auth_methods"`
}

func (ServiceSMTP) Type

func (e ServiceSMTP) Type() string

type ServiceSMTPS

type ServiceSMTPS struct {
	Banner      string   `json:"banner"`
	AuthMethods []string `json:"auth_methods"`
}

func (ServiceSMTPS) Type

func (e ServiceSMTPS) Type() string

type ServiceSNMP

type ServiceSNMP struct{}

func (ServiceSNMP) Type

func (e ServiceSNMP) Type() string

type ServiceSSH

type ServiceSSH struct {
	Banner              string `json:"banner"`
	PasswordAuthEnabled bool   `json:"passwordAuthEnabled"`
	Algo                string `json:"algo"`
	HostKey             string `json:"hostKey,omitempty"`
	HostKeyType         string `json:"hostKeyType,omitempty"`
	HostKeyFingerprint  string `json:"hostKeyFingerprint,omitempty"`
}

func (ServiceSSH) Type

func (e ServiceSSH) Type() string

type ServiceStun

type ServiceStun struct {
	Info string `json:"info"`
}

func (ServiceStun) Type

func (e ServiceStun) Type() string

type ServiceTelnet

type ServiceTelnet struct {
	ServerData string `json:"serverData"`
}

func (ServiceTelnet) Type

func (e ServiceTelnet) Type() string

type ServiceUnknown

type ServiceUnknown map[string]any

func (ServiceUnknown) Map

func (e ServiceUnknown) Map() map[string]any

func (ServiceUnknown) Type

func (e ServiceUnknown) Type() string

type ServiceVNC

type ServiceVNC struct{}

func (ServiceVNC) Type

func (e ServiceVNC) Type() string

type ServiceWinRM

type ServiceWinRM struct {
	// Basic Information
	Version  string `json:"version,omitempty"`
	Product  string `json:"product"`
	Protocol string `json:"protocol,omitempty"`

	// Server Information
	ServerType       string `json:"serverType,omitempty"`
	ArchitectureBits int    `json:"architectureBits,omitempty"`

	// OS Information
	OSVersion string `json:"osVersion,omitempty"`
	OSBuild   string `json:"osBuild,omitempty"`
	OSRelease string `json:"osRelease,omitempty"`

	// System Information
	ComputerName  string `json:"computerName,omitempty"`
	Domain        string `json:"domain,omitempty"`
	NetBIOSName   string `json:"netbiosName,omitempty"`
	NetBIOSDomain string `json:"netbiosDomain,omitempty"`
	DNSName       string `json:"dnsName,omitempty"`
	DNSDomain     string `json:"dnsDomain,omitempty"`
	TreeName      string `json:"treeName,omitempty"`
	FQDN          string `json:"fqdn,omitempty"`
	Architecture  string `json:"architecture,omitempty"`

	// Product Information (from SOAP responses)
	ProductVendor   string `json:"productVendor,omitempty"`
	ProductVersion  string `json:"productVersion,omitempty"`
	ProtocolVersion string `json:"protocolVersion,omitempty"`

	// Authentication
	AuthMethods []string `json:"authMethods,omitempty"`
	Anonymous   bool     `json:"anonymous"`
	Vulnerable  bool     `json:"vulnerable"`

	// Security
	Encryption string `json:"encryption,omitempty"`

	// Timing
	ServerTime string `json:"serverTime,omitempty"`
}

func (ServiceWinRM) Type

func (e ServiceWinRM) Type() string

type ServiceWinbox

type ServiceWinbox struct {
	Info    string `json:"info"`
	Product string `json:"product"`
}

func (ServiceWinbox) Type

func (e ServiceWinbox) Type() string

type ServiceZabbixAgent

type ServiceZabbixAgent struct {
	// Vendor information
	VendorName        string `json:"vendorName,omitempty"`
	VendorProduct     string `json:"vendorProduct,omitempty"`
	VendorVersion     string `json:"vendorVersion,omitempty"`
	VendorConfidence  int    `json:"vendorConfidence,omitempty"`
	VendorMethod      string `json:"vendorMethod,omitempty"`
	VendorDescription string `json:"vendorDescription,omitempty"`

	// Agent information
	AgentVersion string `json:"agentVersion,omitempty"`
	AgentVariant int    `json:"agentVariant,omitempty"` // 1 = Zabbix agent, 2 = Zabbix agent 2
	Hostname     string `json:"hostname,omitempty"`
	ResponseTime int64  `json:"responseTimeMs,omitempty"`

	// Protocol information
	ProtocolVersion string   `json:"protocolVersion,omitempty"`
	SupportedChecks []string `json:"supportedChecks,omitempty"`
	ActiveChecks    bool     `json:"activeChecks,omitempty"`
	PassiveChecks   bool     `json:"passiveChecks,omitempty"`
	ConfigRevision  int      `json:"configRevision,omitempty"`
	SessionID       string   `json:"sessionID,omitempty"`

	// Capabilities
	HostMetadata   string   `json:"hostMetadata,omitempty"`
	HostInterface  string   `json:"hostInterface,omitempty"`
	ListenIP       string   `json:"listenIP,omitempty"`
	ListenPort     int      `json:"listenPort,omitempty"`
	SupportedItems []string `json:"supportedItems,omitempty"`
	RemoteCommands bool     `json:"remoteCommands,omitempty"`

	// Security features
	TLSSupport        bool   `json:"tlsSupport,omitempty"`
	TLSVersion        string `json:"tlsVersion,omitempty"`
	EncryptionEnabled bool   `json:"encryptionEnabled,omitempty"`
	PSKSupport        bool   `json:"pskSupport,omitempty"`
	CertificateAuth   bool   `json:"certificateAuth,omitempty"`

	// System information (if available)
	OperatingSystem string `json:"operatingSystem,omitempty"`
	Architecture    string `json:"architecture,omitempty"`
	KernelVersion   string `json:"kernelVersion,omitempty"`

	// Detection metadata
	DetectionLevel string `json:"detectionLevel,omitempty"` // "basic" or "enhanced"
}

func (ServiceZabbixAgent) Type

func (e ServiceZabbixAgent) Type() string

type Target

type Target struct {
	Address netip.AddrPort
	Host    string
}

type VSAInfo

type VSAInfo struct {
	VendorID   uint32 `json:"vendorID,omitempty"`
	VendorName string `json:"vendorName,omitempty"`
	VendorType uint8  `json:"vendorType,omitempty"`
	DataLength int    `json:"dataLength,omitempty"`
}

VSAInfo represents Vendor-Specific Attribute information

Jump to

Keyboard shortcuts

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