Detection rules › Elastic

Suspicious Vault Client Image Load

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

Identifies when the Credential Vault Client library is loaded by an unusual process. Adversaries may acquire credentials from Vault files.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies when the Credential Vault Client library is loaded by an unusual process. Adversaries may acquire credentials
from Vault files.
"""
id = "048737fe-80d6-4462-aa80-ffeed853103e"
license = "Elastic License v2"
name = "Suspicious Vault Client Image Load"
os_list = ["windows"]
reference = [
    "https://docs.microsoft.com/en-us/uwp/api/windows.security.credentials.passwordvault.retrieve?view=winrt-22000",
]
version = "1.0.35"

query = '''
sequence by process.entity_id with maxspan=1m
 [process where event.action == "start" and
  (
   (process.executable : "?:\\Windows\\Microsoft.NET\\*.exe" and
    not process.executable : "?:\\Windows\\Microsoft.NET\\Framework64\\*\\dfsvc.exe") or

   (process.name : ("mshta.exe", "notepad.exe", "msbuild.exe", "regasm.exe", "notepad.exe") and
    not process.args : ("?:\\Program Files\\*", "?:\\Program Files (x86)\\*", "\\\\*")) or

   (process.name : "rundll32.exe" and process.args : "?:\\Users\\*\\AppData\\*" and
    not process.args : ("url.dll,FileProtocolHandler", "cryptext.dll,CryptExtOpen*",
                        "?:\\WINDOWS\\system32\\mshtml.dll,PrintHTML", "shdocvw.dll,OpenURL")) or

   (process.name : "rundll32.exe" and process.args_count == 1) or

   (process.name : "powershell.exe" and process.args : ("-enc", "-ec", "-e", "*downloadstring*", "*Reflection.Assembly*")) or

   (process.Ext.device.product_id : ("Virtual DVD-ROM", "Virtual Disk") and not process.executable : "C:\\*" and
    not (process.name : "setup*.exe" and process.code_signature.trusted == true)) or

   process.command_line : "\"{path}\""
   ) and 

   not (process.name : "powershell.exe" and
        process.parent.executable :
               ("?:\\Program Files (x86)\\Dell\\UpdateService\\ServiceShell.exe",
                "?:\\Windows\\System32\\wsl.exe",
                "?:\\Windows\\Explorer.exe")) and
   not (process.name : "ngen.exe" and process.parent.name : "NGenTask.exe") and 
   not (process.name : "notepad.exe" and process.parent.name : "explorer.exe") and 
   not (process.name : "calc.exe" and process.parent.executable : "?:\\Windows\\Explorer.exe") and
   not process.parent.executable : ("?:\\Program Files (x86)\\Lenovo\\LeAppStore\\LeASPac.exe",
                                    "?:\\Program Files\\Dell\\DellOptimizer\\DellOptimizer.exe",
                                    "?:\\Program Files\\WindowsApps\\Microsoft.*.exe",
                                    "?:\\Program Files (x86)\\LabTech Client\\LTClient.exe",
                                    "?:\\Users\\*\\AppData\\Local\\StarlimsBridge\\StarlimsBridge.exe",
                                    "?:\\ProgramData\\LogiShrd\\LogiOptions\\Software\\Current\\LogiOptionsMgr.exe",
                                    "?:\\Program Files\\LogiOptionsPlus\\logioptionsplus_agent.exe",
                                    "?:\\Program Files (x86)\\LogiOptionsPlus\\logioptionsplus_agent.exe",
                                    "?:\\Windows\\System32\\DriverStore\\FileRepository\\*.exe", 
                                    "?:\\Windows\\Microsoft.NET\\Framework*\\NGenTask.exe",
                                    "C:\\Program Files\\Microsoft OneDrive\\OneDrive.exe",
                                    "C:\\Program Files\\Autodesk\\Desktop Connector\\DesktopConnector.Applications.Tray.exe") and
   not (process.executable : "?:\\Windows\\system32\\notepad.exe" and
        process.parent.executable :
                    ("C:\\Program Files*\\Google\\Chrome\\Application\\chrome.exe",
                     "C:\\Program Files*\\Microsoft\\Edge\\Application\\msedge.exe",
                     "C:\\Program Files*\\Microsoft Office\\root\\Office??\\OUTLOOK.EXE")) and
   not (process.name : ("powershell.exe", "mshta.exe", "cvtres.exe") and 
        process.working_directory : ("?:\\Program Files\\*", "?:\\Program Files (x86)\\*",  
                                     "?:\\ProgramData\\Microsoft\\Windows Defender Advanced Threat Protection\\Downloads\\")) and
   not process.executable :
              ("?:\\Program Files\\WindowsApps\\Microsoft.WindowsNotepad_*\\Notepad\\Notepad.exe",
               "?:\\Windows\\Microsoft.NET\\Framework*\\dw20.exe") and
   not (process.name : ("rundll32.exe", "regsvr32.exe") and 
       process.args : ("?:\\Program Files (x86)\\*", "?:\\Program Files\\*", 
                       "C:\\Windows\\System32\\FirewallControlPanel.dll,ShowNotificationDialog",
                       "C:\\Windows\\System32\\rundll32.exe  C:\\Windows\\System32\\LogiLDA.dll,LogiFetch",
                       "C:\\Windows\\System32\\rundll32.exe  shell32.dll, ShellExec_RunDLL *",
                       "C:\\WINDOWS\\system32\\rundll32.exe  printui.dll,PrintUIEntryDPIAware*",
                       "cryptext.dll,CryptExtAddPFX")) and
   not (process.name : "rundll32.exe" and
        process.command_line :
                ("*MSI*.tmp*zzzzInvokeManagedCustomActionOutOfProc*",
                 "*\\AppData\\Local\\WebEx\\WebEx\\*\\atasctrl.dll,StartHostLauncher*",
                 "?:\\WINDOWS\\System32\\FirewallControlPanel.dll,ShowNotificationDialog")) and 
   not process.hash.sha256 : 
                 ("50d1713ef6353996d0fcb5548733e960b33bc220c2eccd3e4e1bff710c002610", 
                  "bea033e778048748eb1c87bf57597f7f5449b6a15bac55ddc08263c57f7a1ca8", 
                  "ced3768b028225aaf35bf7aa6efd5876751918c226a608b71494f521fbb242a9") and 
   not (process.executable : "?:\\Windows\\Microsoft.NET\\Framework*\\csc.exe" and process.parent.name : "powershell.exe" and 
        process.parent.command_line : "*\\ProgramData\\Microsoft\\Windows Defender Advanced Threat Protection\\DataCollection*") and

   not (process.executable : "?:\\Windows\\Microsoft.NET\\Framework64\\*\\mscorsvw.exe" and
        process.parent.executable : "?:\\Windows\\Microsoft.NET\\Framework64\\*\\ngen.exe") and
   not (process.parent.executable : ("C:\\Windows\\System32\\sihost.exe", "C:\\Windows\\System32\\OpenWith.exe") and
        process.executable : "C:\\Windows\\System32\\notepad.exe" and process.args_count >= 2)
  ]
 [library where dll.name : "vaultcli.dll"]
'''

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

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1555"
name = "Credentials from Password Stores"
reference = "https://attack.mitre.org/techniques/T1555/"
[[threat.technique.subtechnique]]
id = "T1555.004"
name = "Windows Credential Manager"
reference = "https://attack.mitre.org/techniques/T1555/004/"



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

[internal]
min_endpoint_version = "8.4.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
  (
   (process.executable : "?:\\Windows\\Microsoft.NET\\*.exe" and
    not process.executable : "?:\\Windows\\Microsoft.NET\\Framework64\\*\\dfsvc.exe") or

   (process.name : ("mshta.exe", "notepad.exe", "msbuild.exe", "regasm.exe", "notepad.exe") and
    not process.args : ("?:\\Program Files\\*", "?:\\Program Files (x86)\\*", "\\\\*")) or

   (process.name : "rundll32.exe" and process.args : "?:\\Users\\*\\AppData\\*" and
    not process.args : ("url.dll,FileProtocolHandler", "cryptext.dll,CryptExtOpen*",
                        "?:\\WINDOWS\\system32\\mshtml.dll,PrintHTML", "shdocvw.dll,OpenURL")) or

   (process.name : "rundll32.exe" and process.args_count == 1) or

   (process.name : "powershell.exe" and process.args : ("-enc", "-ec", "-e", "*downloadstring*", "*Reflection.Assembly*")) or

   (process.Ext.device.product_id : ("Virtual DVD-ROM", "Virtual Disk") and not process.executable : "C:\\*" and
    not (process.name : "setup*.exe" and process.code_signature.trusted == true)) or

   process.command_line : "\"{path}\""
   ) and 

   not (process.name : "powershell.exe" and
        process.parent.executable :
               ("?:\\Program Files (x86)\\Dell\\UpdateService\\ServiceShell.exe",
                "?:\\Windows\\System32\\wsl.exe",
                "?:\\Windows\\Explorer.exe")) and
   not (process.name : "ngen.exe" and process.parent.name : "NGenTask.exe") and 
   not (process.name : "notepad.exe" and process.parent.name : "explorer.exe") and 
   not (process.name : "calc.exe" and process.parent.executable : "?:\\Windows\\Explorer.exe") and
   not process.parent.executable : ("?:\\Program Files (x86)\\Lenovo\\LeAppStore\\LeASPac.exe",
                                    "?:\\Program Files\\Dell\\DellOptimizer\\DellOptimizer.exe",
                                    "?:\\Program Files\\WindowsApps\\Microsoft.*.exe",
                                    "?:\\Program Files (x86)\\LabTech Client\\LTClient.exe",
                                    "?:\\Users\\*\\AppData\\Local\\StarlimsBridge\\StarlimsBridge.exe",
                                    "?:\\ProgramData\\LogiShrd\\LogiOptions\\Software\\Current\\LogiOptionsMgr.exe",
                                    "?:\\Program Files\\LogiOptionsPlus\\logioptionsplus_agent.exe",
                                    "?:\\Program Files (x86)\\LogiOptionsPlus\\logioptionsplus_agent.exe",
                                    "?:\\Windows\\System32\\DriverStore\\FileRepository\\*.exe", 
                                    "?:\\Windows\\Microsoft.NET\\Framework*\\NGenTask.exe",
                                    "C:\\Program Files\\Microsoft OneDrive\\OneDrive.exe",
                                    "C:\\Program Files\\Autodesk\\Desktop Connector\\DesktopConnector.Applications.Tray.exe") and
   not (process.executable : "?:\\Windows\\system32\\notepad.exe" and
        process.parent.executable :
                    ("C:\\Program Files*\\Google\\Chrome\\Application\\chrome.exe",
                     "C:\\Program Files*\\Microsoft\\Edge\\Application\\msedge.exe",
                     "C:\\Program Files*\\Microsoft Office\\root\\Office??\\OUTLOOK.EXE")) and
   not (process.name : ("powershell.exe", "mshta.exe", "cvtres.exe") and 
        process.working_directory : ("?:\\Program Files\\*", "?:\\Program Files (x86)\\*",  
                                     "?:\\ProgramData\\Microsoft\\Windows Defender Advanced Threat Protection\\Downloads\\")) and
   not process.executable :
              ("?:\\Program Files\\WindowsApps\\Microsoft.WindowsNotepad_*\\Notepad\\Notepad.exe",
               "?:\\Windows\\Microsoft.NET\\Framework*\\dw20.exe") and
   not (process.name : ("rundll32.exe", "regsvr32.exe") and 
       process.args : ("?:\\Program Files (x86)\\*", "?:\\Program Files\\*", 
                       "C:\\Windows\\System32\\FirewallControlPanel.dll,ShowNotificationDialog",
                       "C:\\Windows\\System32\\rundll32.exe  C:\\Windows\\System32\\LogiLDA.dll,LogiFetch",
                       "C:\\Windows\\System32\\rundll32.exe  shell32.dll, ShellExec_RunDLL *",
                       "C:\\WINDOWS\\system32\\rundll32.exe  printui.dll,PrintUIEntryDPIAware*",
                       "cryptext.dll,CryptExtAddPFX")) and
   not (process.name : "rundll32.exe" and
        process.command_line :
                ("*MSI*.tmp*zzzzInvokeManagedCustomActionOutOfProc*",
                 "*\\AppData\\Local\\WebEx\\WebEx\\*\\atasctrl.dll,StartHostLauncher*",
                 "?:\\WINDOWS\\System32\\FirewallControlPanel.dll,ShowNotificationDialog")) and 
   not process.hash.sha256 : 
                 ("50d1713ef6353996d0fcb5548733e960b33bc220c2eccd3e4e1bff710c002610", 
                  "bea033e778048748eb1c87bf57597f7f5449b6a15bac55ddc08263c57f7a1ca8", 
                  "ced3768b028225aaf35bf7aa6efd5876751918c226a608b71494f521fbb242a9") and 
   not (process.executable : "?:\\Windows\\Microsoft.NET\\Framework*\\csc.exe" and process.parent.name : "powershell.exe" and 
        process.parent.command_line : "*\\ProgramData\\Microsoft\\Windows Defender Advanced Threat Protection\\DataCollection*") and

   not (process.executable : "?:\\Windows\\Microsoft.NET\\Framework64\\*\\mscorsvw.exe" and
        process.parent.executable : "?:\\Windows\\Microsoft.NET\\Framework64\\*\\ngen.exe") and
   not (process.parent.executable : ("C:\\Windows\\System32\\sihost.exe", "C:\\Windows\\System32\\OpenWith.exe") and
        process.executable : "C:\\Windows\\System32\\notepad.exe" and process.args_count >= 2)
  ]

Stage 2: library

[library where dll.name : "vaultcli.dll"]

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argswildcard?:\Program Files (x86)\*, ?:\Program Files\*, C:\Windows\System32\FirewallControlPanel.dll,ShowNotificationDialog, C:\Windows\System32\rundll32.exe C:\Windows\System32\LogiLDA.dll,LogiFetch, C:\Windows\System32\rundll32.exe shell32.dll, ShellExec_RunDLL *, C:\WINDOWS\system32\rundll32.exe printui.dll,PrintUIEntryDPIAware*, cryptext.dll,CryptExtAddPFXexcludes:process.args
process.nameeqrundll32.exe, regsvr32.exeexcludes:process.name field:"process.name" value:"rundll32.exe" field:"process.name" value:"regsvr32.exe"
process.args_countge2excludes:process.args_count field:"process.args_count" value:"2"
process.executableeqC:\Windows\System32\notepad.exeexcludes:process.executable field:"process.executable" value:"C:\Windows\System32\notepad.exe"
process.parent.executableeqC:\Windows\System32\sihost.exe, C:\Windows\System32\OpenWith.exeexcludes:process.parent.executable field:"process.parent.executable" value:"C:\Windows\System32\sihost.exe" field:"process.parent.executable" value:"C:\Windows\System32\OpenWith.exe"
process.command_linewildcard*MSI*.tmp*zzzzInvokeManagedCustomActionOutOfProc*, *\AppData\Local\WebEx\WebEx\*\atasctrl.dll,StartHostLauncher*, ?:\WINDOWS\System32\FirewallControlPanel.dll,ShowNotificationDialogexcludes:process.command_line field:"process.command_line" value:"*MSI*.tmp*zzzzInvokeManagedCustomActionOutOfProc*" field:"process.command_line" value:"*\AppData\Local\WebEx\WebEx\*\atasctrl.dll,StartHostLauncher*" field:"process.command_line" value:"?:\WINDOWS\System32\FirewallControlPanel.dll,ShowNotificationDialog"
process.nameeqrundll32.exeexcludes:process.name field:"process.name" value:"rundll32.exe"
process.executableeq?:\Windows\system32\notepad.exeexcludes:process.executable field:"process.executable" value:"?:\Windows\system32\notepad.exe"
process.parent.executablewildcardC:\Program Files*\Google\Chrome\Application\chrome.exe, C:\Program Files*\Microsoft\Edge\Application\msedge.exe, C:\Program Files*\Microsoft Office\root\Office??\OUTLOOK.EXEexcludes:process.parent.executable field:"process.parent.executable" value:"C:\Program Files*\Google\Chrome\Application\chrome.exe" field:"process.parent.executable" value:"C:\Program Files*\Microsoft\Edge\Application\msedge.exe" field:"process.parent.executable" value:"C:\Program Files*\Microsoft Office\root\Office??\OUTLOOK.EXE"
process.executablewildcard?:\Windows\Microsoft.NET\Framework*\csc.exeexcludes:process.executable field:"process.executable" value:"?:\Windows\Microsoft.NET\Framework*\csc.exe"
process.parent.command_linematch\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\DataCollectionexcludes:process.parent.command_line field:"process.parent.command_line" value:"\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\DataCollection"
process.parent.nameeqpowershell.exeexcludes:process.parent.name field:"process.parent.name" value:"powershell.exe"
process.executablewildcard?:\Windows\Microsoft.NET\Framework64\*\mscorsvw.exeexcludes:process.executable field:"process.executable" value:"?:\Windows\Microsoft.NET\Framework64\*\mscorsvw.exe"
process.parent.executablewildcard?:\Windows\Microsoft.NET\Framework64\*\ngen.exeexcludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\Microsoft.NET\Framework64\*\ngen.exe"
process.nameeqcalc.exeexcludes:process.name field:"process.name" value:"calc.exe"
process.parent.executableeq?:\Windows\Explorer.exeexcludes:process.parent.executable field:"process.parent.executable" value:"?:\Windows\Explorer.exe"
process.nameeqngen.exeexcludes:process.name field:"process.name" value:"ngen.exe"
process.parent.nameeqNGenTask.exeexcludes:process.parent.name field:"process.parent.name" value:"NGenTask.exe"
process.nameeqnotepad.exeexcludes:process.name field:"process.name" value:"notepad.exe"
process.parent.nameeqexplorer.exeexcludes:process.parent.name field:"process.parent.name" value:"explorer.exe"
process.nameeqpowershell.exe, mshta.exe, cvtres.exeexcludes:process.name field:"process.name" value:"powershell.exe" field:"process.name" value:"mshta.exe" field:"process.name" value:"cvtres.exe"
process.working_directorywildcard?:\Program Files\*, ?:\Program Files (x86)\*, ?:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\Downloads\excludes:process.working_directory field:"process.working_directory" value:"?:\Program Files\*" field:"process.working_directory" value:"?:\Program Files (x86)\*" field:"process.working_directory" value:"?:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\Downloads\"
process.nameeqpowershell.exeexcludes:process.name field:"process.name" value:"powershell.exe"
process.parent.executableeq?:\Program Files (x86)\Dell\UpdateService\ServiceShell.exe, ?:\Windows\System32\wsl.exe, ?:\Windows\Explorer.exeexcludes:process.parent.executable field:"process.parent.executable" value:"?:\Program Files (x86)\Dell\UpdateService\ServiceShell.exe" field:"process.parent.executable" value:"?:\Windows\System32\wsl.exe" field:"process.parent.executable" value:"?:\Windows\Explorer.exe"
process.executablewildcard?:\Program Files\WindowsApps\Microsoft.WindowsNotepad_*\Notepad\Notepad.exe, ?:\Windows\Microsoft.NET\Framework*\dw20.exeexcludes:process.executable field:"process.executable" value:"?:\Program Files\WindowsApps\Microsoft.WindowsNotepad_*\Notepad\Notepad.exe" field:"process.executable" value:"?:\Windows\Microsoft.NET\Framework*\dw20.exe"
process.hash.sha256eq50d1713ef6353996d0fcb5548733e960b33bc220c2eccd3e4e1bff710c002610, bea033e778048748eb1c87bf57597f7f5449b6a15bac55ddc08263c57f7a1ca8, ced3768b028225aaf35bf7aa6efd5876751918c226a608b71494f521fbb242a9excludes:process.hash.sha256 field:"process.hash.sha256" value:"50d1713ef6353996d0fcb5548733e960b33bc220c2eccd3e4e1bff710c002610" field:"process.hash.sha256" value:"bea033e778048748eb1c87bf57597f7f5449b6a15bac55ddc08263c57f7a1ca8" field:"process.hash.sha256" value:"ced3768b028225aaf35bf7aa6efd5876751918c226a608b71494f521fbb242a9"
process.parent.executablewildcard?:\Program Files (x86)\Lenovo\LeAppStore\LeASPac.exe, ?:\Program Files\Dell\DellOptimizer\DellOptimizer.exe, ?:\Program Files\WindowsApps\Microsoft.*.exe, ?:\Program Files (x86)\LabTech Client\LTClient.exe, ?:\Users\*\AppData\Local\StarlimsBridge\StarlimsBridge.exe, ?:\ProgramData\LogiShrd\LogiOptions\Software\Current\LogiOptionsMgr.exe, ?:\Program Files\LogiOptionsPlus\logioptionsplus_agent.exe, ?:\Program Files (x86)\LogiOptionsPlus\logioptionsplus_agent.exe, ?:\Windows\System32\DriverStore\FileRepository\*.exe, ?:\Windows\Microsoft.NET\Framework*\NGenTask.exe, C:\Program Files\Microsoft OneDrive\OneDrive.exe, C:\Program Files\Autodesk\Desktop Connector\DesktopConnector.Applications.Tray.exeexcludes:process.parent.executable

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
dll.namewildcard
  • vaultcli.dll corpus 8 (elastic 8)
field:"dll.name" kind:wildcard value:"vaultcli.dll"
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
process.Ext.device.product_idwildcard
  • Virtual DVD-ROM corpus 13 (elastic 13)
  • Virtual Disk corpus 13 (elastic 13)
field:"process.Ext.device.product_id" kind:wildcard
process.argswildcard
  • *Reflection.Assembly*
  • *downloadstring*
  • -e corpus 46 (elastic 46)
  • -ec
  • -enc corpus 2 (elastic 2)
  • ?:\Users\*\AppData\* corpus 6 (elastic 6)
field:"process.args" kind:wildcard
process.args_counteq
  • 1 transforms: number corpus 49 (elastic 49)
field:"process.args_count" kind:eq value:"1"
process.command_linewildcard
  • "{path}"
field:"CommandLine" kind:wildcard
process.executablewildcard
  • ?:\Windows\Microsoft.NET\*.exe corpus 8 (elastic 8)
field:"Image" kind:wildcard value:"?:\Windows\Microsoft.NET\*.exe"
process.namewildcard
  • msbuild.exe corpus 39 (elastic 36, splunk 3)
  • mshta.exe corpus 84 (elastic 79, splunk 5)
  • notepad.exe corpus 6 (elastic 4, splunk 2)
  • powershell.exe corpus 184 (elastic 140, splunk 44)
  • regasm.exe corpus 26 (elastic 24, splunk 2)
  • rundll32.exe corpus 126 (elastic 100, splunk 26)
field:"process_name" kind:wildcard