Defender-DeviceFileEvents

5 ActionTypes

ActionTypeTitle
anyFile activity (any)
FileCreatedFile created
FileModifiedFile modified
FileDeletedFile deleted
FileRenamedFile renamed

any: File activity (any)

#
Table
DeviceFileEvents

Description

File activity (any)

Fields #

NameDescription
DeviceId
Timestamp
ActionType
FileName
FolderPath
SHA256
FileSize
InitiatingProcessFileName
InitiatingProcessCommandLine
InitiatingProcessAccountName

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
CommandLinecontains.bat1 ruleelastic, kusto, sigma
CommandLinecontainsaccepteula1 rulekusto, sigma, splunk
SourceSeverityeqHigh1 rulekusto
file_nameends_with.exe1 rulekusto

Detection Rules #

View all rules referencing this event →

Kusto #

Show 1 more (4 total)
  • Spearphishing Attachment: ISO Images (Microsoft Defender for Endpoint) source: ISO images are often meant to be used offline and they are often used by IT Admins and/or used on Servers.
    Installation from an iso file don't require network connection most of the time. Activities deviating from these situations can be considered as highly suspicious. Below queries detects opening a mounted image, process creation under a mounted image, and network connection from a process created under a mounted image.
    All detections can be used seperately or combined together to generate a higher fidelity alert. Detect opening of a mounted image:

References #

FileCreated: File created

#
Table
DeviceFileEvents

Description

File created

Fields #

NameDescriptionRules
DeviceId
Timestamp
FileName
FolderPath1 detection rule
SHA256
InitiatingProcessFileName

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
EventTypeeqFileCreated4 ruleskusto
EventTypeeqProcessCreated2 ruleskusto
EventTypeinFileCreated1 rulekusto
EventTypeinFileModified1 rulekusto
EventTypeinFileRenamed1 rulekusto
file_namecontains.bat1 rulekusto
file_namecontains.cmd1 rulekusto
file_namecontains.com1 rulekusto
file_namecontains.cpl1 rulekusto
file_namecontains.dll1 rulekusto
file_namecontains.exe1 rulekusto
file_namecontains.vbs1 rulekusto
file_nameends_with.dll1 rulekusto, splunk
file_nameends_with.exe1 rulekusto
parent_process_nameeqcustomscripthandler.exe1 rulekusto

Detection Rules #

View all rules referencing this event →

Kusto #

Show 4 more (7 total)
  • Suspicious office child process created source: This query obtains a list of downloaded Office documents (doc, xls, etc.) by looking at files written by commonly used web browsers. It then searches for invocations of an Office program by double-clicking on these files. If these processes spawn an uncommon child process this is reported as suspicious.
  • Suspicious MSC File Launched source: The query searches for suspicious MSC files that are launched on the system. The following types of suspicious files are detected: MSC files downloaded by web browsers, MSC files in the Downloads folder, MSC files extracted from ZIP files, and MSC files with Mark Of The Web (MOTW).↳ also matches FileRenamed: File renamed
  • WinRM Plugin Lateral Movement source: This query detects loading of malicious WinRM plugins. These plugins can be used for lateral movement. This tradecraft has been researched and published by Arnau Ortega at FalconForce. Refer to the references for the blog post describing the full attack chain. This detection looks at low-prevalence DLLs being loaded into the WinRM host process. To minimize false-positives, the detection looks for files that are written to disk in the last 30 days, prior to being loaded into the WinRM host process as DLL. Such DLLs are likely WinRM plugins that are being loaded. Since the use of WinRM plugins is extremely scarce in real environments, we assume that any such DLL is malicious and warrants an investigation.↳ also matches FileModified: File modified, FileRenamed: File renamed
  • Detect executable drops via Azure custom script extension source: This detection rule flags when the Custom Script extension service on a machine is dropping executable files. This might indicate that an actor is trying to drop malware or beacons via a compromised cloud admin account. In the most legitimate cases administrators are pushing only PowerShell or Shell scripts, although these can also contain malicious content. Be aware of this gap in the below detection rule.

References #

FileModified: File modified

#
Table
DeviceFileEvents

Description

File modified. Sysmon-2 fires on FileCreateTime change specifically; Defender's FileModified is broader. Approximate bridge.

Fields #

NameDescription
DeviceId
Timestamp
FileName
FolderPath
SHA256
InitiatingProcessFileName

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
EventTypeinFileCreated1 rulekusto
EventTypeinFileModified1 rulekusto
EventTypeinFileRenamed1 rulekusto
parent_process_nameeqwsmprovhost.exe1 ruleelastic, kusto, splunk

Detection Rules #

View all rules referencing this event →

Kusto #

  • WinRM Plugin Lateral Movement source: This query detects loading of malicious WinRM plugins. These plugins can be used for lateral movement. This tradecraft has been researched and published by Arnau Ortega at FalconForce. Refer to the references for the blog post describing the full attack chain. This detection looks at low-prevalence DLLs being loaded into the WinRM host process. To minimize false-positives, the detection looks for files that are written to disk in the last 30 days, prior to being loaded into the WinRM host process as DLL. Such DLLs are likely WinRM plugins that are being loaded. Since the use of WinRM plugins is extremely scarce in real environments, we assume that any such DLL is malicious and warrants an investigation.↳ also matches FileCreated: File created, FileRenamed: File renamed

References #

FileDeleted: File deleted

#
Table
DeviceFileEvents

Description

File deleted

Fields #

NameDescription
DeviceId
Timestamp
FileName
FolderPath
InitiatingProcessFileName

References #

FileRenamed: File renamed

#
Table
DeviceFileEvents

Description

File renamed. No clean Windows-native equivalent.

Fields #

NameDescription
DeviceId
Timestamp
FileName
FolderPath
PreviousFileName
InitiatingProcessFileName

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
EventTypeinFileCreated1 rulekusto
EventTypeinFileModified1 rulekusto
EventTypeinFileRenamed1 rulekusto
parent_process_nameeqwsmprovhost.exe1 ruleelastic, kusto, splunk
parent_process_nameinexcel.exe1 rulekusto, splunk
parent_process_nameinoutlook.exe1 rulekusto, splunk
parent_process_nameinpowerpnt.exe1 rulekusto, splunk
parent_process_nameinwinword.exe1 rulekusto, splunk

Detection Rules #

View all rules referencing this event →

Kusto #

  • ASR Bypassing Writing Executable Content source medium: The query checks for any file which has been created/written by an Office application and shortly after renamed to one of the deny-listed "executable extensions" which are text files. (e.g. ps1, .js, .vbs).
  • Suspicious MSC File Launched source: The query searches for suspicious MSC files that are launched on the system. The following types of suspicious files are detected: MSC files downloaded by web browsers, MSC files in the Downloads folder, MSC files extracted from ZIP files, and MSC files with Mark Of The Web (MOTW).↳ also matches FileCreated: File created
  • WinRM Plugin Lateral Movement source: This query detects loading of malicious WinRM plugins. These plugins can be used for lateral movement. This tradecraft has been researched and published by Arnau Ortega at FalconForce. Refer to the references for the blog post describing the full attack chain. This detection looks at low-prevalence DLLs being loaded into the WinRM host process. To minimize false-positives, the detection looks for files that are written to disk in the last 30 days, prior to being loaded into the WinRM host process as DLL. Such DLLs are likely WinRM plugins that are being loaded. Since the use of WinRM plugins is extremely scarce in real environments, we assume that any such DLL is malicious and warrants an investigation.↳ also matches FileCreated: File created, FileModified: File modified

References #