Windows File Events: JavaScript File Creation in DriverStore\FileRepository

Alerts on creation of .js files under DriverStore\FileRepository based on the target path in Windows file events.

FreeUnreviewedSigmamediumv1
title: "Windows File Events: JavaScript File Creation in DriverStore\\FileRepository"
id: edc9c660-0a68-42d2-ae92-d10efd94c565
status: test
description: This rule matches file creation events where the target path starts under Windows DriverStore\FileRepository and ends with a .js extension. Creating JavaScript in this system-managed directory is a stealthy way for attackers to stage executable content in a trusted location. The detection relies on Windows file event telemetry that records the full target filename/path and file extension.
references:
  - https://www.microsoft.com/en-us/security/blog/2024/04/22/analyzing-forest-blizzards-custom-post-compromise-tool-for-exploiting-cve-2022-38028-to-obtain-credentials/
  - https://github.com/SigmaHQ/sigma/blob/master/rules-emerging-threats/2024/TA/Forest-Blizzard/file_event_win_apt_forest_blizzard_constrained_js.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2024-04-23
tags:
  - attack.defense-impairment
  - attack.t1685.001
  - detection.emerging-threats
logsource:
  category: file_event
  product: windows
detection:
  selection:
    TargetFilename|startswith: C:\Windows\System32\DriverStore\FileRepository\
    TargetFilename|endswith: \.js
  condition: selection
falsepositives:
  - Unlikely
level: medium
license: DRL-1.1
related:
  - id: ec7c4e9b-9bc9-47c7-a32f-b53b598da642
    type: derived

What it detects

This rule matches file creation events where the target path starts under Windows DriverStore\FileRepository and ends with a .js extension. Creating JavaScript in this system-managed directory is a stealthy way for attackers to stage executable content in a trusted location. The detection relies on Windows file event telemetry that records the full target filename/path and file extension.

Known false positives

  • Unlikely

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.