Persistent Scripts in the Startup Directoryedit

Identifies script engines creating files in the startup folder, or the creation of script files in the startup folder.

Rule type: eql

Rule indices:

  • winlogbeat-*
  • logs-endpoint.events.*
  • logs-windows.*

Severity: medium

Risk score: 47

Runs every: 5 minutes

Searches indices from: now-9m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

Tags:

  • Elastic
  • Host
  • Windows
  • Threat Detection
  • Persistence

Version: 3 (version history)

Added (Elastic Stack release): 7.11.0

Last modified (Elastic Stack release): 7.12.0

Rule authors: Elastic

Rule license: Elastic License v2

Rule queryedit

file where event.type != "deletion" and user.domain != "NT AUTHORITY"
and /* detect shortcuts created by wscript.exe or cscript.exe */
(file.path : "C:\\*\\Programs\\Startup\\*.lnk" and process.name :
("wscript.exe", "cscript.exe")) or /* detect vbs or js files
created by any process */ file.path :
("C:\\*\\Programs\\Startup\\*.vbs",
"C:\\*\\Programs\\Startup\\*.vbe",
"C:\\*\\Programs\\Startup\\*.wsh",
"C:\\*\\Programs\\Startup\\*.wsf",
"C:\\*\\Programs\\Startup\\*.js")

Threat mappingedit

Framework: MITRE ATT&CKTM

Rule version historyedit

Version 3 (7.12.0 release)
  • Formatting only
Version 2 (7.11.2 release)
  • Formatting only