增加威胁域名审计
This commit is contained in:
+9
-7
@@ -58,13 +58,15 @@ func (e *ThreatEngine) checkThreatDatabase(sourceIP, domain string) *ThreatAlert
|
||||
|
||||
logger.Info("检测到威胁域名", "domain", domain, "type", threatInfo.Type, "name", threatInfo.Name, "riskLevel", threatInfo.RiskLevel)
|
||||
|
||||
// 根据风险等级确定告警级别
|
||||
// 根据风险等级确定告警级别(数据库:1=高,2=中,3=低)
|
||||
var alertLevel string
|
||||
switch threatInfo.RiskLevel {
|
||||
case 3:
|
||||
alertLevel = AlertLevelHigh
|
||||
case 1:
|
||||
alertLevel = AlertLevelHigh // 高风险
|
||||
case 2:
|
||||
alertLevel = AlertLevelMedium
|
||||
alertLevel = AlertLevelMedium // 中风险
|
||||
case 3:
|
||||
alertLevel = AlertLevelLow // 低风险
|
||||
default:
|
||||
alertLevel = AlertLevelLow
|
||||
}
|
||||
@@ -73,9 +75,9 @@ func (e *ThreatEngine) checkThreatDatabase(sourceIP, domain string) *ThreatAlert
|
||||
ID: generateAlertID(),
|
||||
Timestamp: time.Now(),
|
||||
Level: alertLevel,
|
||||
Type: AlertTypeSuspiciousDomain,
|
||||
Description: "威胁域名数据库匹配",
|
||||
Details: "威胁类型: " + threatInfo.Type + ", 威胁名称: " + threatInfo.Name,
|
||||
Type: threatInfo.Type, // 使用数据库中的 type 列(如:钓鱼网站、仿冒网站)
|
||||
Description: threatInfo.Name, // 使用数据库中的 name 列(如:Silver fox 团伙)
|
||||
Details: "威胁类型:" + threatInfo.Type + ", 威胁名称:" + threatInfo.Name + ", 风险等级:" + string(rune('0'+threatInfo.RiskLevel)),
|
||||
SourceIP: sourceIP,
|
||||
Domain: domain,
|
||||
QueryType: "",
|
||||
|
||||
Reference in New Issue
Block a user