This commit is contained in:
crusader 2018-09-12 13:52:58 +09:00
parent 0ef5ca805c
commit f265cbad85
25 changed files with 375 additions and 0 deletions

View File

@ -181,6 +181,22 @@ func (m *ActiveDirectoryMatcher) Type() string {
return "DIRECTORY" return "DIRECTORY"
} }
func (m *ActiveDirectoryMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "MicroSoft"
}
func (m *ActiveDirectoryMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *ActiveDirectoryMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *ActiveDirectoryMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *ActiveDirectoryMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *ActiveDirectoryMatcher) Name(matchCtx *osm.MatchCtx) string {
return "ActiveDirectory" return "ActiveDirectory"
} }

View File

@ -27,6 +27,22 @@ func (m *CassandraMatcher) Type() string {
return "NOSQL" return "NOSQL"
} }
func (m *CassandraMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "The Apache Software Foundation"
}
func (m *CassandraMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *CassandraMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *CassandraMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *CassandraMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *CassandraMatcher) Name(matchCtx *osm.MatchCtx) string {
return "Cassandra" return "Cassandra"
} }

View File

@ -48,6 +48,21 @@ func (m *DNSMatcher) Key() string {
func (m *DNSMatcher) Type() string { func (m *DNSMatcher) Type() string {
return "NETWORK" return "NETWORK"
} }
func (m *DNSMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *DNSMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *DNSMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *DNSMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *DNSMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *DNSMatcher) Name(matchCtx *osm.MatchCtx) string {
return "DNS" return "DNS"

View File

@ -20,6 +20,21 @@ func (m *ElasticSearchMatcher) Key() string {
func (m *ElasticSearchMatcher) Type() string { func (m *ElasticSearchMatcher) Type() string {
return "SEARCH" return "SEARCH"
} }
func (m *ElasticSearchMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "Elasticsearch"
}
func (m *ElasticSearchMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *ElasticSearchMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *ElasticSearchMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *ElasticSearchMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *ElasticSearchMatcher) Name(matchCtx *osm.MatchCtx) string {
name := "ElasticSearch" name := "ElasticSearch"

View File

@ -36,6 +36,21 @@ func (m *FTPMatcher) Key() string {
func (m *FTPMatcher) Type() string { func (m *FTPMatcher) Type() string {
return "NETWORK" return "NETWORK"
} }
func (m *FTPMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *FTPMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *FTPMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *FTPMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *FTPMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *FTPMatcher) Name(matchCtx *osm.MatchCtx) string {
return "FTP" return "FTP"

View File

@ -18,6 +18,22 @@ func (m *HTTPMatcher) Type() string {
return "WEB" return "WEB"
} }
func (m *HTTPMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *HTTPMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *HTTPMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *HTTPMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *HTTPMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *HTTPMatcher) Name(matchCtx *osm.MatchCtx) string {
name := "HTTP" name := "HTTP"
if v, ok := matchCtx.GetAttribute("server"); ok { if v, ok := matchCtx.GetAttribute("server"); ok {

View File

@ -20,6 +20,21 @@ func (m *IMAPMatcher) Key() string {
func (m *IMAPMatcher) Type() string { func (m *IMAPMatcher) Type() string {
return "MAIL" return "MAIL"
} }
func (m *IMAPMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *IMAPMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *IMAPMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *IMAPMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *IMAPMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *IMAPMatcher) Name(matchCtx *osm.MatchCtx) string {
return "IMAP" return "IMAP"

View File

@ -25,6 +25,21 @@ func (m *LDAPMatcher) Key() string {
func (m *LDAPMatcher) Type() string { func (m *LDAPMatcher) Type() string {
return "DIRECTORY" return "DIRECTORY"
} }
func (m *LDAPMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *LDAPMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *LDAPMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *LDAPMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *LDAPMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *LDAPMatcher) Name(matchCtx *osm.MatchCtx) string {
return "LDAP" return "LDAP"

View File

@ -16,6 +16,22 @@ func (m *LPDMatcher) Type() string {
return "NETWORK" return "NETWORK"
} }
func (m *LPDMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *LPDMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *LPDMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *LPDMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *LPDMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *LPDMatcher) Name(matchCtx *osm.MatchCtx) string {
return "LPD (Printer)" return "LPD (Printer)"
} }

View File

@ -7,6 +7,10 @@ import (
type Matcher interface { type Matcher interface {
Key() string Key() string
Type() string Type() string
Vendor(matchCtx *MatchCtx) string
Version(matchCtx *MatchCtx) string
OsType(matchCtx *MatchCtx) string
OsVersion(matchCtx *MatchCtx) string
Name(matchCtx *MatchCtx) string Name(matchCtx *MatchCtx) string
IsPrePacket() bool IsPrePacket() bool

View File

@ -58,6 +58,22 @@ func (m *MongoDBMatcher) Type() string {
return "NOSQL" return "NOSQL"
} }
func (m *MongoDBMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "MongoDB"
}
func (m *MongoDBMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *MongoDBMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *MongoDBMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *MongoDBMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *MongoDBMatcher) Name(matchCtx *osm.MatchCtx) string {
return "MongoDB" return "MongoDB"
} }

View File

@ -21,6 +21,22 @@ func (m *MySqlMatcher) Type() string {
return "DATABASE" return "DATABASE"
} }
func (m *MySqlMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "Oracle"
}
func (m *MySqlMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *MySqlMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *MySqlMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *MySqlMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *MySqlMatcher) Name(matchCtx *osm.MatchCtx) string {
name := "MySQL" name := "MySQL"
if v, ok := matchCtx.GetAttribute("version"); ok { if v, ok := matchCtx.GetAttribute("version"); ok {

View File

@ -36,6 +36,21 @@ func (m *NBSSMatcher) Key() string {
func (m *NBSSMatcher) Type() string { func (m *NBSSMatcher) Type() string {
return "NETWORK" return "NETWORK"
} }
func (m *NBSSMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *NBSSMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *NBSSMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *NBSSMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *NBSSMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *NBSSMatcher) Name(matchCtx *osm.MatchCtx) string {
return "NBSS" return "NBSS"

View File

@ -18,6 +18,21 @@ func (m *OracleMatcher) Key() string {
func (m *OracleMatcher) Type() string { func (m *OracleMatcher) Type() string {
return "DATABASE" return "DATABASE"
} }
func (m *OracleMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "Oracle"
}
func (m *OracleMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *OracleMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *OracleMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *OracleMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *OracleMatcher) Name(matchCtx *osm.MatchCtx) string {
return "Oracle" return "Oracle"

View File

@ -19,6 +19,21 @@ func (m *POPMatcher) Key() string {
func (m *POPMatcher) Type() string { func (m *POPMatcher) Type() string {
return "MAIL" return "MAIL"
} }
func (m *POPMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *POPMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *POPMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *POPMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *POPMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *POPMatcher) Name(matchCtx *osm.MatchCtx) string {
return "POP3" return "POP3"

View File

@ -48,6 +48,21 @@ func (m *PostgreSQLMatcher) Key() string {
func (m *PostgreSQLMatcher) Type() string { func (m *PostgreSQLMatcher) Type() string {
return "DATABASE" return "DATABASE"
} }
func (m *PostgreSQLMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "PostgreSQL"
}
func (m *PostgreSQLMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *PostgreSQLMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *PostgreSQLMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *PostgreSQLMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *PostgreSQLMatcher) Name(matchCtx *osm.MatchCtx) string {
return "PostgreSQL" return "PostgreSQL"

View File

@ -24,6 +24,22 @@ func (m *RedisMatcher) Type() string {
return "NOSQL" return "NOSQL"
} }
func (m *RedisMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "Redis"
}
func (m *RedisMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *RedisMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *RedisMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *RedisMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *RedisMatcher) Name(matchCtx *osm.MatchCtx) string {
name := "Redis" name := "Redis"

View File

@ -39,6 +39,22 @@ func (m *RMIMatcher) Type() string {
return "NETWORK" return "NETWORK"
} }
func (m *RMIMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *RMIMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *RMIMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *RMIMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *RMIMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *RMIMatcher) Name(matchCtx *osm.MatchCtx) string {
return "RMI" return "RMI"
} }

View File

@ -60,6 +60,22 @@ func (m *SMBMatcher) Type() string {
return "NETWORK" return "NETWORK"
} }
func (m *SMBMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SMBMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SMBMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SMBMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SMBMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *SMBMatcher) Name(matchCtx *osm.MatchCtx) string {
return "SMB" return "SMB"
} }

View File

@ -17,6 +17,21 @@ func (m *SmtpMatcher) Key() string {
func (m *SmtpMatcher) Type() string { func (m *SmtpMatcher) Type() string {
return "MAIL" return "MAIL"
} }
func (m *SmtpMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SmtpMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SmtpMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SmtpMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SmtpMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *SmtpMatcher) Name(matchCtx *osm.MatchCtx) string {
return "SMTP" return "SMTP"

View File

@ -51,6 +51,22 @@ func (m *SNMPMatcher) Type() string {
return "MONITORING" return "MONITORING"
} }
func (m *SNMPMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SNMPMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SNMPMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SNMPMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (s *SNMPMatcher) Name(matchCtx *osm.MatchCtx) string { func (s *SNMPMatcher) Name(matchCtx *osm.MatchCtx) string {
return "SNMP" return "SNMP"
} }

View File

@ -76,6 +76,21 @@ func (m *SQLServerMatcher) Key() string {
func (m *SQLServerMatcher) Type() string { func (m *SQLServerMatcher) Type() string {
return "DATABASE" return "DATABASE"
} }
func (m *SQLServerMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "MicroSoft"
}
func (m *SQLServerMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SQLServerMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SQLServerMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SQLServerMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *SQLServerMatcher) Name(matchCtx *osm.MatchCtx) string {
if m.isSSL { if m.isSSL {

View File

@ -20,6 +20,22 @@ func (m *SSHMatcher) Type() string {
return "NETWORK" return "NETWORK"
} }
func (m *SSHMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SSHMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SSHMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SSHMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *SSHMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *SSHMatcher) Name(matchCtx *osm.MatchCtx) string {
name := "SSH" name := "SSH"
if v, ok := matchCtx.GetAttribute("softwareversion"); ok { if v, ok := matchCtx.GetAttribute("softwareversion"); ok {

View File

@ -23,6 +23,21 @@ func (m *TelnetMatcher) Key() string {
func (m *TelnetMatcher) Type() string { func (m *TelnetMatcher) Type() string {
return "NETWORK" return "NETWORK"
} }
func (m *TelnetMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *TelnetMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *TelnetMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *TelnetMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *TelnetMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *TelnetMatcher) Name(matchCtx *osm.MatchCtx) string {
return "Telnet" return "Telnet"

View File

@ -28,6 +28,21 @@ func (m *WMIMatcher) Key() string {
func (m *WMIMatcher) Type() string { func (m *WMIMatcher) Type() string {
return "MONITORING" return "MONITORING"
} }
func (m *WMIMatcher) Vendor(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *WMIMatcher) Version(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *WMIMatcher) OsType(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *WMIMatcher) OsVersion(matchCtx *osm.MatchCtx) string {
return "UNKNOWN"
}
func (m *WMIMatcher) Name(matchCtx *osm.MatchCtx) string { func (m *WMIMatcher) Name(matchCtx *osm.MatchCtx) string {
return "WMI" return "WMI"