Documentation ¶
Index ¶
- func InitGlobalScanner(configPath, pluginsDir string, enableGeo, enableCensys bool, ...) error
- func MergeCensysData(node *Node, censysData *CensysHostResult)
- func PrintResults(nodes []Node) error
- func ScanTCPPort(ip string, port int) bool
- func ScanUDPPort(ip string, port int) bool
- type CensysCertificate
- type CensysClient
- type CensysHostResult
- type CensysLocation
- type CensysService
- type ClientConfig
- type Config
- type ExprContext
- type Fingerprint
- type IPDetails
- type IPInfo
- type Node
- type POC
- type POCContext
- type POCExecutor
- type POCResult
- type PortFingerprint
- type RawFingerprint
- type Rule
- type Scanner
- type ServiceAnalyzer
- type ServiceDetector
- type ServiceInfo
- type TLSInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitGlobalScanner ¶
func MergeCensysData ¶
func MergeCensysData(node *Node, censysData *CensysHostResult)
MergeCensysData merges Censys data into the existing Node
func PrintResults ¶
func ScanTCPPort ¶
func ScanUDPPort ¶
Types ¶
type CensysCertificate ¶
type CensysClient ¶
type CensysClient struct { APIKey string APISecret string // contains filtered or unexported fields }
func NewCensysClient ¶
func NewCensysClient(apiKey, apiSecret string) *CensysClient
NewCensysClient initializes a new Censys API client
func (*CensysClient) GetHostInfo ¶
func (c *CensysClient) GetHostInfo(ip string) (*CensysHostResult, error)
GetHostInfo retrieves host information from Censys API
type CensysHostResult ¶
type CensysHostResult struct { IP string `json:"ip"` LastSeen time.Time `json:"last_seen"` Services []CensysService `json:"services"` Location CensysLocation `json:"location"` }
type CensysLocation ¶
type CensysService ¶
type CensysService struct { Port int `json:"port"` ServiceName string `json:"service_name"` Transport string `json:"transport_protocol"` Certificate *CensysCertificate `json:"tls,omitempty"` Banner string `json:"banner,omitempty"` }
type ClientConfig ¶
type Fingerprint ¶
type Fingerprint struct { Headers []string `json:"headers"` Body []string `json:"body"` IconMD5 []string `json:"icon_md5"` URL []string `json:"url"` Type string `json:"type,omitempty"` Manufacturer string `json:"manufacturer,omitempty"` Ports []int `json:"ports,omitempty"` }
Fingerprint represents a service fingerprint
type IPDetails ¶
type IPDetails struct { Continent string `json:"continent,omitempty"` ContinentCode string `json:"continent_code,omitempty"` Country string `json:"country,omitempty"` CountryCode string `json:"country_code,omitempty"` Region string `json:"region,omitempty"` RegionCode string `json:"region_code,omitempty"` City string `json:"city,omitempty"` PostalCode string `json:"postal_code,omitempty"` Latitude float64 `json:"latitude,omitempty"` Longitude float64 `json:"longitude,omitempty"` TimeZone string `json:"timezone,omitempty"` ASN uint `json:"asn,omitempty"` ASNOrg string `json:"asn_org,omitempty"` ISP string `json:"isp,omitempty"` Domain string `json:"domain,omitempty"` NetworkType string `json:"network_type,omitempty"` IsAnonymous bool `json:"is_anonymous,omitempty"` IsAnonymousVPN bool `json:"is_anonymous_vpn,omitempty"` IsHosting bool `json:"is_hosting,omitempty"` IsProxy bool `json:"is_proxy,omitempty"` IsTorExitNode bool `json:"is_tor_exit_node,omitempty"` AccuracyRadius uint16 `json:"accuracy_radius,omitempty"` }
type Node ¶
type Node struct { IP string `json:"ip"` Domain string `json:"domain,omitempty"` MAC string `json:"mac,omitempty"` Hostname string `json:"hostname,omitempty"` Tags []string `json:"tags,omitempty"` OS string `json:"os,omitempty"` Ports []*ServiceInfo `json:"ports,omitempty"` PortsHistory []*ServiceInfo `json:"ports_history,omitempty"` PortsHistoryDesc []string `json:"ports_history_desc,omitempty"` Manufacturer string `json:"manufacturer,omitempty"` Devicetype string `json:"devicetype,omitempty"` Model string `json:"model,omitempty"` SensitiveInfo []string `json:"sensitive_info,omitempty"` Vulnerabilities []POCResult `json:"vulnerabilities,omitempty"` // Geographic Information Continent string `json:"continent,omitempty"` ContinentCode string `json:"continent_code,omitempty"` Country string `json:"country,omitempty"` CountryCode string `json:"country_code,omitempty"` Region string `json:"region,omitempty"` RegionCode string `json:"region_code,omitempty"` City string `json:"city,omitempty"` PostalCode string `json:"postal_code,omitempty"` Latitude float64 `json:"latitude,omitempty"` Longitude float64 `json:"longitude,omitempty"` TimeZone string `json:"timezone,omitempty"` // Network Information ASN uint `json:"asn,omitempty"` ASNOrg string `json:"asn_org,omitempty"` ISP string `json:"isp,omitempty"` NetworkType string `json:"network_type,omitempty"` // Security Information IsAnonymous bool `json:"is_anonymous,omitempty"` IsAnonymousVPN bool `json:"is_anonymous_vpn,omitempty"` IsHosting bool `json:"is_hosting,omitempty"` IsProxy bool `json:"is_proxy,omitempty"` IsTorExitNode bool `json:"is_tor_exit_node,omitempty"` AccuracyRadius uint16 `json:"accuracy_radius,omitempty"` AccuracyDesc string `json:"accuracy_description,omitempty"` }
Node represents a scanned host with all its information
type POCExecutor ¶
type POCExecutor struct {
// contains filtered or unexported fields
}
func NewPOCExecutor ¶
func NewPOCExecutor(client *http.Client) *POCExecutor
func (*POCExecutor) ExecutePOC ¶
func (pe *POCExecutor) ExecutePOC(poc *POC, target string) POCResult
type PortFingerprint ¶
type PortFingerprint struct { Devicetype string `json:"devicetype"` Type string `json:"type,omitempty"` Manufacturer string `json:"manufacturer,omitempty"` OS string `json:"os,omitempty"` }
PortFingerprint represents port-specific fingerprint information
type RawFingerprint ¶
type RawFingerprint struct { Type string `json:"type,omitempty"` Manufacturer string `json:"manufacturer,omitempty"` Devicetype string `json:"devicetype,omitempty"` Patterns []string `json:"patterns"` }
RawFingerprint represents a raw service fingerprint
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func GetGlobalScanner ¶
func GetGlobalScanner() *Scanner
func NewScanner ¶
type ServiceAnalyzer ¶
type ServiceAnalyzer interface {
Analyze(info ServiceInfo) ServiceInfo
}
ServiceAnalyzer interface for service analysis
type ServiceDetector ¶
type ServiceDetector struct { Fingerprints map[string]Fingerprint RawFingerprints map[string]RawFingerprint // 改为新的类型 PortFingerprints map[int]PortFingerprint // contains filtered or unexported fields }
ServiceDetector struct and methods remain unchanged
func NewServiceDetector ¶
func NewServiceDetector(templatesDir string) *ServiceDetector
func (*ServiceDetector) DetectService ¶
func (sd *ServiceDetector) DetectService(ip string, port int, protocol string) []ServiceInfo
type ServiceInfo ¶
type ServiceInfo struct { Port int `json:"port"` Protocol string `json:"protocol"` Types []string `json:"types,omitempty"` Title string `json:"title,omitempty"` Version string `json:"version,omitempty"` Banner string `json:"banner,omitempty"` Headers map[string]string `json:"headers,omitempty"` OS string `json:"os,omitempty"` Manufacturer string `json:"manufacturer,omitempty"` Devicetype string `json:"devicetype,omitempty"` Extra map[string]string `json:"extra,omitempty"` SensitiveInfo []string `json:"sensitive_info,omitempty"` TLS *TLSInfo `json:"tls,omitempty"` Vulnerabilities []POCResult `json:"vulnerabilities,omitempty"` }
ServiceInfo represents service detection information
Click to show internal directories.
Click to hide internal directories.