Detection rules › Elastic

Sensitive File Access - Unattended Panther

Time window
1m
Sequence by
process.entity_id
Source
github.com/elastic/protections-artifacts

Identifies an unusual process accessing Windows Panther Installation files. Adversaries may search local file systems and remote file shares for files containing insecurely stored credentials.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies an unusual process accessing Windows Panther Installation files. Adversaries may search local file systems
and remote file shares for files containing insecurely stored credentials.
"""
id = "52e4ad92-e09b-4331-b827-cd0f2cbaf576"
license = "Elastic License v2"
name = "Sensitive File Access - Unattended Panther"
os_list = ["windows"]
reference = [
    "https://steflan-security.com/windows-privilege-escalation-credential-harvesting/",
    "https://github.com/pha5matis/Pentesting-Guide/blob/master/privilege_escalation_windows.md",
]
version = "1.0.30"

query = '''
sequence by process.entity_id with maxspan=1m
   [process where event.action == "start" and
    user.id : ("S-1-5-21*", "S-1-12-*") and process.executable != null and
    process.hash.sha256 != "3e5bf6e2ac8ee4c7ccc60f51e5c4038ccf95b99f43f793b33b471681816a1d6b" and
    not process.executable :
          (
            /* third party programs common install path - requires local admin */
            "?:\\Program Files\\*",
            "?:\\Program Files (x86)\\*",

            /*
              dllhost.exe (IFileOperation like view/changing security permission of a file/folder).
              explorer.exe for directory and file discovery.
              SearchProtocolHost.exe is for file searches and indexing.
             */
            "?:\\Windows\\explorer.exe",
            "?:\\Windows\\System32\\dllhost.exe",
            "?:\\Windows\\System32\\SearchProtocolHost.exe",

            /* Windows Defender */
            "?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*.exe",
            "?:\\Program Files\\Microsoft Monitoring Agent\\Agent\\*.exe",
            "?:\\Program Files\\Windows Defender Advanced Threat Protection\\*.exe",

            "?:\\Windows\\System32\\notepad.exe",
            "?:\\Windows\\System32\\Robocopy.exe",
            "?:\\Windows\\System32\\cmd.exe",
            "?:\\Windows\\System32\\xcopy.exe",
            "?:\\Windows\\System32\\SystemSettingsAdminFlows.exe",
            "?:\\Windows\\System32\\smartscreen.exe",
            "?:\\Windows\\System32\\Sysprep\\sysprep.exe",
            "?:\\WINDOWS\\OEM\\FieryLocaleSetup.exe",
            "?:\\Windows\\System32\\pnputil.exe",
            "?:\\Windows\\System32\\ResetEngine.exe")]
   [file where event.type == "access" and
    /* non system accounts */
    user.id : ("S-1-5-21*", "S-1-12-*") and
    file.path : ("?:\\Windows\\Panther\\Unattend.xml",
                 "?:\\Windows\\Panther\\Unattended.xml",
                 "?:\\Windows\\Panther\\Unattend\\Unattended.xml",
                 "?:\\Windows\\Panther\\Unattend\\Unattend.xml",
                 "?:\\Windows\\System32\\Sysprep\\unattend.xml",
                 "?:\\Windows\\System32\\Sysprep\\Panther\\unattend.xml")]
'''

min_endpoint_version = "7.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1552"
name = "Unsecured Credentials"
reference = "https://attack.mitre.org/techniques/T1552/"
[[threat.technique.subtechnique]]
id = "T1552.001"
name = "Credentials In Files"
reference = "https://attack.mitre.org/techniques/T1552/001/"



[threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"

[internal]
min_endpoint_version = "7.15.0"

Stages and Predicates

Ordered sequence: each step below must occur in order within 1m, correlated by process.entity_id.

Stage 1: process

[process where event.action == "start" and
    user.id : ("S-1-5-21*", "S-1-12-*") and process.executable != null and
    process.hash.sha256 != "3e5bf6e2ac8ee4c7ccc60f51e5c4038ccf95b99f43f793b33b471681816a1d6b" and
    not process.executable :
          (
            "?:\\Program Files\\*",
            "?:\\Program Files (x86)\\*",
            /*
              dllhost.exe (IFileOperation like view/changing security permission of a file/folder).
              explorer.exe for directory and file discovery.
              SearchProtocolHost.exe is for file searches and indexing.
             */
            "?:\\Windows\\explorer.exe",
            "?:\\Windows\\System32\\dllhost.exe",
            "?:\\Windows\\System32\\SearchProtocolHost.exe",
            "?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*.exe",
            "?:\\Program Files\\Microsoft Monitoring Agent\\Agent\\*.exe",
            "?:\\Program Files\\Windows Defender Advanced Threat Protection\\*.exe",
            "?:\\Windows\\System32\\notepad.exe",
            "?:\\Windows\\System32\\Robocopy.exe",
            "?:\\Windows\\System32\\cmd.exe",
            "?:\\Windows\\System32\\xcopy.exe",
            "?:\\Windows\\System32\\SystemSettingsAdminFlows.exe",
            "?:\\Windows\\System32\\smartscreen.exe",
            "?:\\Windows\\System32\\Sysprep\\sysprep.exe",
            "?:\\WINDOWS\\OEM\\FieryLocaleSetup.exe",
            "?:\\Windows\\System32\\pnputil.exe",
            "?:\\Windows\\System32\\ResetEngine.exe")]

Stage 2: file

[file where event.type == "access" and
    user.id : ("S-1-5-21*", "S-1-12-*") and
    file.path : ("?:\\Windows\\Panther\\Unattend.xml",
                 "?:\\Windows\\Panther\\Unattended.xml",
                 "?:\\Windows\\Panther\\Unattend\\Unattended.xml",
                 "?:\\Windows\\Panther\\Unattend\\Unattend.xml",
                 "?:\\Windows\\System32\\Sysprep\\unattend.xml",
                 "?:\\Windows\\System32\\Sysprep\\Panther\\unattend.xml")]

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.executablewildcard?:\Program Files\*, ?:\Program Files (x86)\*, ?:\Windows\explorer.exe, ?:\Windows\System32\dllhost.exe, ?:\Windows\System32\SearchProtocolHost.exe, ?:\ProgramData\Microsoft\Windows Defender\Platform\*.exe, ?:\Program Files\Microsoft Monitoring Agent\Agent\*.exe, ?:\Program Files\Windows Defender Advanced Threat Protection\*.exe, ?:\Windows\System32\notepad.exe, ?:\Windows\System32\Robocopy.exe, ?:\Windows\System32\cmd.exe, ?:\Windows\System32\xcopy.exe, ?:\Windows\System32\SystemSettingsAdminFlows.exe, ?:\Windows\System32\smartscreen.exe, ?:\Windows\System32\Sysprep\sysprep.exe, ?:\WINDOWS\OEM\FieryLocaleSetup.exe, ?:\Windows\System32\pnputil.exe, ?:\Windows\System32\ResetEngine.exeexcludes:process.executable

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
event.typeeq
  • access corpus 10 (elastic 10)
field:"event.type" kind:eq value:"access"
file.pathwildcard
  • ?:\Windows\Panther\Unattend.xml
  • ?:\Windows\Panther\Unattend\Unattend.xml
  • ?:\Windows\Panther\Unattend\Unattended.xml
  • ?:\Windows\Panther\Unattended.xml
  • ?:\Windows\System32\Sysprep\Panther\unattend.xml
  • ?:\Windows\System32\Sysprep\unattend.xml
field:"TargetFilename" kind:wildcard
process.executableis_not_null
  • (no value, null check)
field:"Image" kind:is_not_null
process.hash.sha256ne
  • 3e5bf6e2ac8ee4c7ccc60f51e5c4038ccf95b99f43f793b33b471681816a1d6b
field:"Hashes" kind:ne value:"3e5bf6e2ac8ee4c7ccc60f51e5c4038ccf95b99f43f793b33b471681816a1d6b"
user.idwildcard
  • S-1-12-* corpus 46 (elastic 46)
  • S-1-5-21* corpus 47 (elastic 47)
field:"user.id" kind:wildcard