﻿---
title: Potential PrintNightmare File Modification
description: Detects the creation or modification of a print driver with an unusual file name. This may indicate attempts to exploit privilege escalation vulnerabilities...
url: https://www.elastic.co/docs/reference/security/prebuilt-rules/rules/_deprecated/privilege_escalation_printspooler_malicious_driver_file_changes
products:
  - Elastic Security
---

# Potential PrintNightmare File Modification
<warning>
  This rule has been deprecated as of 2022/03/16.
</warning>

Detects the creation or modification of a print driver with an unusual file name. This may indicate attempts to exploit
privilege escalation vulnerabilities related to the Print Spooler service. For more information refer to CVE-2021-34527
and verify that the impacted system is investigated.
**Rule type**: eql
**Rule indices**:
- winlogbeat-*
- logs-endpoint.events.*
- logs-windows.*

**Rule Severity**: high
**Risk Score**: 73
**Runs every**: 
**Searches indices from**: `now-9m`
**Maximum alerts per execution**: 100
**References**:
- [[https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-34527](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-34527)](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-34527)
- [[https://github.com/afwu/PrintNightmare](https://github.com/afwu/PrintNightmare)](https://github.com/afwu/PrintNightmare)

**Tags**:
- Elastic
- Host
- Windows
- Threat Detection
- Privilege Escalation

**Version**: 100
**Rule authors**:
- Elastic

**Rule license**: Elastic License v2

## Rule Query

```eql
/* This rule is compatible with both Sysmon and Elastic Endpoint */

file where process.name : "spoolsv.exe" and 
 file.name : ("kernelbase.dll", "ntdll.dll", "kernel32.dll", "winhttp.dll", "user32.dll") and
 file.path : "?:\\Windows\\System32\\spool\\drivers\\x64\\3\\*"
```

**Framework:** MITRE ATT&CK
- Tactic:
  - Name: Privilege Escalation
  - Id: TA0004
  - Reference URL: [[https://attack.mitre.org/tactics/TA0004/](https://attack.mitre.org/tactics/TA0004/)](https://attack.mitre.org/tactics/TA0004/)
- Technique:
  - Name: Exploitation for Privilege Escalation
  - Id: T1068
  - Reference URL: [[https://attack.mitre.org/techniques/T1068/](https://attack.mitre.org/techniques/T1068/)](https://attack.mitre.org/techniques/T1068/)