fix: 六引擎误报根因修复 — 解包递归、YARA 恒真规则、签名分级、real_type 溢出
检测范围与证据链修复,不改裁决口径(口径改动在下一条提交)。 - extractor:zip/tar 成员在超限分支外漏加回扫描队列,解包后内容永远不参与检测; zip 目录条目被当成内嵌对象;tar 超限成员先落盘不删。递归真正生效后深扫耗时可测。 - clamav:_HIGH/_MEDIUM/_UNWANTED 关键词是小写,而签名名是 "Win.Trojan..." 大小写混排, 分级判定恒不命中全走默认档;改统一大写匹配。超过 clamd MaxFileSize 的裸奔区间 (1G~1.5G) 新增 ClamAVSkippedSizeLimit(30) — 按"不可扫描不放行"进复核。 - yara:pe.yar C1 系列改用导入表判定,不再靠裸子串命中字符串表; linux.yar C7 多条规则条件恒真(裸 nc/fetch 之类)已收紧;C8/C3 相应收窄。 - structure:DangerousExecutableExtension 是载体信号而非恶意行为,critical 权重 45→35, 不再作为把中低置信度信号一起顶过 block_score 的底座。 - scanner/documents:real_type 拼进 libmagic 对 MSI/OLE 的元数据串实测 334+ 字符, 超列宽导致整条 scan_tasks INSERT 连 findings 一起丢(被拒文件不留痕)→ 列宽 256→512,migrate.sql 补 ALTER。
This commit is contained in:
@@ -108,6 +108,9 @@ class StructureEngine(Engine):
|
||||
)
|
||||
|
||||
# 3) 危险可执行扩展名(顶层文件)
|
||||
# 这是「载体」信号而不是恶意行为:单独命中应当进人工复核(≥review_score),
|
||||
# 但不能成为把后续中/低置信度检测一起顶过 block_score 的底座,
|
||||
# 否则正常签名的 exe/dll 会被判恶意。
|
||||
if ext in DANGEROUS_EXTS and not target.is_extracted:
|
||||
severity = Severity.CRITICAL.value if ext in {".exe", ".scr", ".dll", ".com", ".pif"} else Severity.HIGH.value
|
||||
findings.append(
|
||||
@@ -117,7 +120,7 @@ class StructureEngine(Engine):
|
||||
severity=severity,
|
||||
rule="DangerousExecutableExtension",
|
||||
detail=f"文件类型为可执行/脚本格式:{ext}",
|
||||
weight=45.0 if severity == Severity.CRITICAL.value else 30.0,
|
||||
weight=35.0 if severity == Severity.CRITICAL.value else 30.0,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user