Detection rules › Splunk

Common Ransomware Extensions

Status
production
Severity
medium
Group by
CreationUtcTime, computer_name, dest, event_action, file_access_time, file_acl, file_hash, file_modify_time, file_name, file_size, process_guid, process_id, target_filename, user, vendor_product
Author
David Dorsey, Michael Haag, Nasreddine Bencherchali, Splunk, Steven Dick
Source
github.com/splunk/security_content

The following analytic detects modifications to files with extensions commonly associated with ransomware. It leverages the Endpoint.Filesystem data model to identify changes in file extensions that match known ransomware patterns. This activity is significant because it suggests an attacker is attempting to encrypt or alter files, potentially leading to severe data loss and operational disruption. If confirmed malicious, this activity could result in the encryption of critical data, rendering it inaccessible and causing significant damage to the organization's data integrity and availability.

Known false positives

  • It is possible for a legitimate file with these extensions to be created. If this is a true ransomware attack, there will be a large number of files created with these extensions.

MITRE ATT&CK coverage

TacticTechniques
Impact

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 11: FileCreate

Rule body

name: Common Ransomware Extensions
id: a9e5c5db-db11-43ca-86a8-c852d1b2c0ec
version: 22
creation_date: '2019-10-16'
modification_date: '2026-07-02'
author: David Dorsey, Michael Haag, Nasreddine Bencherchali, Splunk, Steven Dick
status: production
type: TTP
description: |-
    The following analytic detects modifications to files with extensions commonly associated with ransomware. It leverages the Endpoint.Filesystem data model to identify changes in file extensions that match known ransomware patterns.
    This activity is significant because it suggests an attacker is attempting to encrypt or alter files, potentially leading to severe data loss and operational disruption.
    If confirmed malicious, this activity could result in the encryption of critical data, rendering it inaccessible and causing significant damage to the organization's data integrity and availability.
data_source:
    - Sysmon EventID 11
search: |
    | tstats `security_content_summariesonly`
      count min(_time) as firstTime
            max(_time) as lastTime
            latest(Filesystem.user) as user
            values(Filesystem.file_path) as file_path
    FROM datamodel=Endpoint.Filesystem WHERE
    
    Filesystem.action IN (
        "created",
        "modified"
    )
    NOT Filesystem.file_name IN (
        "*.7z", "*.aac", "*.appx", "*.appxbundle", "*.asc", "*.asm", "*.avi",
        "*.bak", "*.bat", "*.bin", "*.bmp", "*.bz2", "*.cab", "*.cer",
        "*.cfg", "*.cmd", "*.com", "*.conf", "*.cpp", "*.crt", "*.cs",
        "*.csh", "*.css", "*.csv", "*.cxx", "*.dat", "*.deb", "*.der",
        "*.diff", "*.dll", "*.doc", "*.docm", "*.docx", "*.dot", "*.dotm",
        "*.dotx", "*.drv", "*.eml", "*.eps", "*.exe", "*.flac", "*.gif",
        "*.go", "*.gz", "*.h", "*.hpp", "*.htm", "*.html", "*.ico", "*.ics",
        "*.ini", "*.iso", "*.jar", "*.java", "*.jpeg", "*.jpg", "*.js", "*.json",
        "*.key", "*.ksh", "*.ldf", "*.lib", "*.log", "*.lnk", "*.m4a", "*.m4v",
        "*.md", "*.mdb", "*.mdf", "*.mht", "*.mhtml", "*.mkv", "*.mov", "*.mp3",
        "*.mp4", "*.mpeg", "*.mpg", "*.msi", "*.msix", "*.msixbundle", "*.msg",
        "*.odp", "*.ods", "*.odt", "*.one", "*.ost", "*.otf", "*.pdf", "*.pem",
        "*.pfx", "*.php", "*.pif", "*.pl", "*.png", "*.pot", "*.potm", "*.potx",
        "*.ppam", "*.pps", "*.ppsm", "*.ppsx", "*.ppt", "*.pptm", "*.pptx", "*.ps1",
        "*.ps1xml", "*.psd1", "*.psm1", "*.pst", "*.pub", "*.py", "*.pyc", "*.rar",
        "*.reg", "*.rpm", "*.rss", "*.rtf", "*.scr", "*.sh", "*.sql", "*.svg",
        "*.swift", "*.sys", "*.tar", "*.tgz", "*.tif", "*.tiff", "*.toml", "*.ttf",
        "*.txt", "*.url", "*.vb", "*.vbe", "*.vbs", "*.vcxproj", "*.vhd", "*.vhdx",
        "*.wav", "*.webm", "*.webp", "*.wim", "*.wsf", "*.xlam", "*.xls", "*.xlsb",
        "*.xlsm", "*.xlsx", "*.xlt", "*.xltm", "*.xltx", "*.xml", "*.xps",
        "*.yaml", "*.yml"
    )
    BY Filesystem.action Filesystem.dest
        Filesystem.file_access_time Filesystem.file_create_time
        Filesystem.file_hash Filesystem.file_modify_time
        Filesystem.file_name Filesystem.file_path
        Filesystem.file_acl Filesystem.file_size
        Filesystem.process_guid Filesystem.process_id
        Filesystem.user Filesystem.vendor_product
    | `drop_dm_object_name(Filesystem)`
    | rex field=file_name "(?<file_extension>(\.[^\.]+){1,2})$"
    | lookup update=true ransomware_extensions_lookup Extensions AS file_extension OUTPUT Extensions Name
    | search Name !=False
    | stats min(firstTime) as firstTime
            max(lastTime) as lastTime
            dc(file_path) as path_count
            dc(file_name) as file_count
            values(action) as action
            values(file_access_time) as file_access_time
            values(file_create_time) as file_create_time
            values(file_hash) as file_hash
            values(file_modify_time) as file_modify_time
            values(file_acl) as file_acl
            values(file_size) as file_size
            values(file_path) as file_path
            values(process_guid) as process_guid
            values(process_id) as process_id
            values(user) as user
            values(vendor_product) as vendor_product
            values(file_name) as file_name
            values(file_extension) as file_extension
            values(Name) as Name
      by dest
    | where path_count > 1 OR file_count > 20
    | `common_ransomware_extensions_filter`
how_to_implement: You must be ingesting data that records the filesystem activity from your hosts to populate the Endpoint Filesystem data model node. To see the additional metadata, add the following fields, if not already present, please review the detailed documentation on how to create a new field within Mission Control Queue
known_false_positives: It is possible for a legitimate file with these extensions to be created. If this is a true ransomware attack, there will be a large number of files created with these extensions.
references:
    - https://github.com/splunk/security_content/issues/2448
finding:
    title: The device $dest$ wrote $file_count$ files to $path_count$ path(s) with the $file_extension$ extension. This extension and behavior may indicate a $Name$ ransomware attack.
    entity:
        field: user
        type: user
        score: 50
intermediate_findings:
    entities:
        - field: dest
          type: system
          score: 50
          message: The device $dest$ wrote $file_count$ files to $path_count$ path(s) with the $file_extension$ extension. This extension and behavior may indicate a $Name$ ransomware attack.
analytic_story:
    - Rhysida Ransomware
    - Prestige Ransomware
    - Ransomware
    - LockBit Ransomware
    - Medusa Ransomware
    - SamSam Ransomware
    - Clop Ransomware
    - Ryuk Ransomware
    - Black Basta Ransomware
    - Termite Ransomware
    - Interlock Ransomware
    - NailaoLocker Ransomware
asset_type: Endpoint
mitre_attack_id:
    - T1485
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint

Stages and Predicates

Stage 1: tstats

| tstats `security_content_summariesonly`
  count min(_time) as firstTime
        max(_time) as lastTime
        latest(Filesystem.user) as user
        values(Filesystem.file_path) as file_path
FROM datamodel=Endpoint.Filesystem WHERE

Filesystem.action IN (
    "created",
    "modified"
)
NOT Filesystem.file_name IN (
    "*.7z", "*.aac", "*.appx", "*.appxbundle", "*.asc", "*.asm", "*.avi",
    "*.bak", "*.bat", "*.bin", "*.bmp", "*.bz2", "*.cab", "*.cer",
    "*.cfg", "*.cmd", "*.com", "*.conf", "*.cpp", "*.crt", "*.cs",
    "*.csh", "*.css", "*.csv", "*.cxx", "*.dat", "*.deb", "*.der",
    "*.diff", "*.dll", "*.doc", "*.docm", "*.docx", "*.dot", "*.dotm",
    "*.dotx", "*.drv", "*.eml", "*.eps", "*.exe", "*.flac", "*.gif",
    "*.go", "*.gz", "*.h", "*.hpp", "*.htm", "*.html", "*.ico", "*.ics",
    "*.ini", "*.iso", "*.jar", "*.java", "*.jpeg", "*.jpg", "*.js", "*.json",
    "*.key", "*.ksh", "*.ldf", "*.lib", "*.log", "*.lnk", "*.m4a", "*.m4v",
    "*.md", "*.mdb", "*.mdf", "*.mht", "*.mhtml", "*.mkv", "*.mov", "*.mp3",
    "*.mp4", "*.mpeg", "*.mpg", "*.msi", "*.msix", "*.msixbundle", "*.msg",
    "*.odp", "*.ods", "*.odt", "*.one", "*.ost", "*.otf", "*.pdf", "*.pem",
    "*.pfx", "*.php", "*.pif", "*.pl", "*.png", "*.pot", "*.potm", "*.potx",
    "*.ppam", "*.pps", "*.ppsm", "*.ppsx", "*.ppt", "*.pptm", "*.pptx", "*.ps1",
    "*.ps1xml", "*.psd1", "*.psm1", "*.pst", "*.pub", "*.py", "*.pyc", "*.rar",
    "*.reg", "*.rpm", "*.rss", "*.rtf", "*.scr", "*.sh", "*.sql", "*.svg",
    "*.swift", "*.sys", "*.tar", "*.tgz", "*.tif", "*.tiff", "*.toml", "*.ttf",
    "*.txt", "*.url", "*.vb", "*.vbe", "*.vbs", "*.vcxproj", "*.vhd", "*.vhdx",
    "*.wav", "*.webm", "*.webp", "*.wim", "*.wsf", "*.xlam", "*.xls", "*.xlsb",
    "*.xlsm", "*.xlsx", "*.xlt", "*.xltm", "*.xltx", "*.xml", "*.xps",
    "*.yaml", "*.yml"
)
BY Filesystem.action Filesystem.dest
    Filesystem.file_access_time Filesystem.file_create_time
    Filesystem.file_hash Filesystem.file_modify_time
    Filesystem.file_name Filesystem.file_path
    Filesystem.file_acl Filesystem.file_size
    Filesystem.process_guid Filesystem.process_id
    Filesystem.user Filesystem.vendor_product

Stage 2: search

| `drop_dm_object_name(Filesystem)`

Stage 3: rex

| rex field=file_name "(?<file_extension>(\.[^\.]+){1,2})$"

Stage 4: lookup

| lookup update=true ransomware_extensions_lookup Extensions AS file_extension OUTPUT Extensions Name
Lookup table
ransomware_extensions_lookup
Key field
Extensions as file_extension
Output columns
['Extensions', 'Extensions'], ['Name', 'Name']

Stage 5: search

| search Name !=False

Stage 6: stats

| stats min(firstTime) as firstTime
        max(lastTime) as lastTime
        dc(file_path) as path_count
        dc(file_name) as file_count
        values(action) as action
        values(file_access_time) as file_access_time
        values(file_create_time) as file_create_time
        values(file_hash) as file_hash
        values(file_modify_time) as file_modify_time
        values(file_acl) as file_acl
        values(file_size) as file_size
        values(file_path) as file_path
        values(process_guid) as process_guid
        values(process_id) as process_id
        values(user) as user
        values(vendor_product) as vendor_product
        values(file_name) as file_name
        values(file_extension) as file_extension
        values(Name) as Name
  by dest

Stage 7: where

| where path_count > 1 OR file_count > 20

Stage 8: search

| `common_ransomware_extensions_filter`

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
Filesystem.file_namein"*.7z", "*.aac", "*.appx", "*.appxbundle", "*.asc", "*.asm", "*.avi", "*.bak", "*.bat", "*.bin", "*.bmp", "*.bz2", "*.cab", "*.cer", "*.cfg", "*.cmd", "*.com", "*.conf", "*.cpp", "*.crt", "*.cs", "*.csh", "*.css", "*.csv", "*.cxx", "*.dat", "*.deb", "*.der", "*.diff", "*.dll", "*.doc", "*.docm", "*.docx", "*.dot", "*.dotm", "*.dotx", "*.drv", "*.eml", "*.eps", "*.exe", "*.flac", "*.gif", "*.go", "*.gz", "*.h", "*.hpp", "*.htm", "*.html", "*.ico", "*.ics", "*.ini", "*.iso", "*.jar", "*.java", "*.jpeg", "*.jpg", "*.js", "*.json", "*.key", "*.ksh", "*.ldf", "*.lib", "*.lnk", "*.log", "*.m4a", "*.m4v", "*.md", "*.mdb", "*.mdf", "*.mht", "*.mhtml", "*.mkv", "*.mov", "*.mp3", "*.mp4", "*.mpeg", "*.mpg", "*.msg", "*.msi", "*.msix", "*.msixbundle", "*.odp", "*.ods", "*.odt", "*.one", "*.ost", "*.otf", "*.pdf", "*.pem", "*.pfx", "*.php", "*.pif", "*.pl", "*.png", "*.pot", "*.potm", "*.potx", "*.ppam", "*.pps", "*.ppsm", "*.ppsx", "*.ppt", "*.pptm", "*.pptx", "*.ps1", "*.ps1xml", "*.psd1", "*.psm1", "*.pst", "*.pub", "*.py", "*.pyc", "*.rar", "*.reg", "*.rpm", "*.rss", "*.rtf", "*.scr", "*.sh", "*.sql", "*.svg", "*.swift", "*.sys", "*.tar", "*.tgz", "*.tif", "*.tiff", "*.toml", "*.ttf", "*.txt", "*.url", "*.vb", "*.vbe", "*.vbs", "*.vcxproj", "*.vhd", "*.vhdx", "*.wav", "*.webm", "*.webp", "*.wim", "*.wsf", "*.xlam", "*.xls", "*.xlsb", "*.xlsm", "*.xlsx", "*.xlt", "*.xltm", "*.xltx", "*.xml", "*.xps", "*.yaml", "*.yml"excludes:Filesystem.file_name

Indicators

These rows show field, operator, and value matches.