Documentation
¶
Overview ¶
Package service implements service fingerprinting functionality for discovering running services.
Index ¶
- func RunServiceFingerprint(ctx context.Context, config discoverfern.DiscoverServiceConfig) (*discoverfern.DiscoverServiceReport, error)
- func RunStealthServiceFingerprint(ctx context.Context, config discoverfern.DiscoverServiceConfig, ips []net.IP) (*discoverfern.DiscoverServiceReport, error)
- type Fingerprinter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunServiceFingerprint ¶
func RunServiceFingerprint(ctx context.Context, config discoverfern.DiscoverServiceConfig) (*discoverfern.DiscoverServiceReport, error)
RunServiceFingerprint fingerprints the service at target:port.
- If UDP mode is enabled, scan common UDP ports on the target host.
- If stealth mode is enabled, use targeted fingerprinting for the specified service type.
- Otherwise, for TCP (port-priority system): Phase 1: Run custom fingerprinters ONLY if port matches their default ports Phase 2: Run fingerprintx (which has its own port priority) Phase 3: If nothing found, run custom fingerprinters on all ports (comprehensive fallback)
func RunStealthServiceFingerprint ¶
func RunStealthServiceFingerprint(ctx context.Context, config discoverfern.DiscoverServiceConfig, ips []net.IP) (*discoverfern.DiscoverServiceReport, error)
RunStealthServiceFingerprint performs targeted service fingerprinting for a specific service type
Types ¶
type Fingerprinter ¶
type Fingerprinter interface {
Name() string
Detect(ctx context.Context, ip net.IP, port int, host string, timeout int) (*discoverfern.ServiceDetails, error)
// DefaultPorts returns the list of default ports for this service
// Empty list means the service can run on any port (no port restrictions)
DefaultPorts() []int
}
Fingerprinter detects **one** specific application protocol (gRPC, MQTT, …). On match: (*ServiceDetails, nil) On "not mine": (nil, nil) On fatal error: (nil, err)
Click to show internal directories.
Click to hide internal directories.