Potential Initial Access via DLL Search Order Hijacking
Description
Identifies attempts to create a DLL file to a known desktop application dependencies folder such as Slack, Teams or OneDrive and by an unusual process. This may indicate an attempt to load a malicious module via DLL search order hijacking.
Query · eql
file where event.action != "deletion" and
file.extension : "dll" and
file.path :
("?:\\Users\\*\\AppData\\*\\Microsoft\\OneDrive\\*.dll",
"?:\\Users\\*\\AppData\\*\\Microsoft OneDrive\\*.dll",
"?:\\Users\\*\\AppData\\*\\Microsoft\\Teams\\*.dll",
"?:\\Users\\*\\AppData\\Local\\slack\\app-*\\*.dll",
"?:\\Users\\*\\AppData\\Local\\Programs\\Microsoft VS Code\\*",
"?:\\Users\\*\\AppData\\Local\\*\\Well Known Domains\\*\\well_known_domains.dll",
"?:\\Users\\*\\AppData\\Local\\*\\Domain Actions\\*\\domain_actions.dll") and
process.name : ("winword.exe", "excel.exe", "powerpnt.exe", "MSACCESS.EXE", "MSPUB.EXE", "fltldr.exe", "cmd.exe",
"certutil.exe", "mshta.exe", "cscript.exe", "wscript.exe", "curl.exe", "powershell.exe", "pwsh.exe",
"mstsc.exe", "explorer.exe", "dllhost.exe", "xcopy.exe", "expand.exe") and
not file.path : ("?:\\Users\\*\\AppData\\Local\\Microsoft\\OneDrive\\*\\*.dll",
"?:\\Users\\*\\AppData\\Local\\Microsoft\\Teams\\current\\resources\\meeting-addin\\*",
"?:\\Users\\*\\Teams\\current\\*")