可疑的 HTML 文件创建

编辑

识别浏览器进程执行以打开具有高熵和大小的 HTML 文件。攻击者可能会通过将恶意负载隐藏在看似良性的 HTML 文件中,从而将数据和文件偷偷地绕过内容过滤器。

规则类型: eql

规则索引:

  • logs-endpoint.events.process-*
  • logs-endpoint.events.file-*

严重性: 中

风险评分: 47

运行频率: 5m

搜索索引起始时间: now-9m (日期数学格式,另请参阅 额外回溯时间)

每次执行的最大警报数: 100

参考: 无

标签:

  • 域:端点
  • 操作系统:Windows
  • 用例:威胁检测
  • 战术:初始访问
  • 数据源:Elastic Defend

版本: 108

规则作者:

  • Elastic

规则许可证: Elastic License v2

调查指南

编辑

此规则由于可能匹配每个 EQL 序列的各种文件路径,因此可能具有低到中等的性能影响。

设置

编辑

设置

如果在非 elastic-agent 索引(例如 beats)上启用 EQL 规则,且版本 <8.2,则事件将不定义 event.ingested,并且直到 8.2 版本才添加 EQL 规则的默认回退。因此,为了使此规则有效工作,用户将需要添加自定义的摄取管道来将 event.ingested 填充为 @timestamp。 有关添加自定义摄取管道的更多详细信息,请参考 - https://elastic.ac.cn/guide/en/fleet/current/data-streams-pipeline-tutorial.html

规则查询

编辑
sequence by user.id with maxspan=2m

 [file where host.os.type == "windows" and event.action in ("creation", "rename") and

  /* Check for HTML files with high entropy and size */
  file.extension : ("htm", "html") and ((file.Ext.entropy >= 5 and file.size >= 150000) or file.size >= 1000000) and

  /* Check for file paths in common download and temporary directories */
  file.path : (
    "?:\\Users\\*\\Downloads\\*",
    "?:\\Users\\*\\Content.Outlook\\*",
    "?:\\Users\\*\\AppData\\Local\\Temp\\Temp?_*",
    "?:\\Users\\*\\AppData\\Local\\Temp\\7z*",
    "?:\\Users\\*\\AppData\\Local\\Temp\\Rar$*")]
 [process where host.os.type == "windows" and event.action == "start" and
  (
   /* Check for browser processes opening HTML files with single argument */
   (process.name in ("chrome.exe", "msedge.exe", "brave.exe", "whale.exe", "browser.exe", "dragon.exe", "vivaldi.exe", "opera.exe")
    and process.args == "--single-argument") or

   /* Optionally, check for browser processes opening HTML files with two arguments */
   (process.name == "iexplore.exe" and process.args_count == 2) or

   /* Optionally, check for browser processes opening HTML files with URL argument */
   (process.name in ("firefox.exe", "waterfox.exe") and process.args == "-url")
  )
  /* Check for file paths in common download and temporary directories targeted in the process arguments */
  and process.args : ("?:\\Users\\*\\Downloads\\*.htm*",
                      "?:\\Users\\*\\Content.Outlook\\*.htm*",
                      "?:\\Users\\*\\AppData\\Local\\Temp\\Temp?_*.htm*",
                      "?:\\Users\\*\\AppData\\Local\\Temp\\7z*.htm*",
                      "?:\\Users\\*\\AppData\\Local\\Temp\\Rar$*.htm*")]

框架: MITRE ATT&CKTM