[Rule Tuning] Unsigned DLL Side-Loading from a Suspicious Folder: Add Downloads path and fix subdirectory evasion#5592
Conversation
…loads path and fix subdirectory evasion - Add Downloads folder to the suspicious paths list - Modify directory matching logic from endswith~ to startswith~ to detect DLLs loaded from subdirectories of the executable's location
|
@ailiffa thank you for reporting this gap. the problem is this side-loading using version numbers to redirect to a sub-dir or another folder is specific to chromium processes and will introduce FPs if we change the current condition |
Rule: Tuning - GuidelinesThese guidelines serve as a reminder set of considerations when tuning an existing rule. Documentation and Context
Rule Metadata Checks
Testing and Validation
|
….toml Swap back to "endswith" and add chrome_elf.dll coverage. Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>
|
@Samirbous Thanks for the feedback and the suggested approach. I wanted to check my understanding of the FP concern. My initial thought was that legitimate apps loading from subdirectories would already be filtered out by the unsigned DLL condition, since vendors like Google, Microsoft, and most Electron app publishers sign their DLLs. Am I missing something in the FP scenarios you've seen? |
@ailiffa unfortunately we see many unsigned and legit DLLs loaded from sub-dirs as well as other directories (the code signature status decreases a bit FPs but not eliminate) |
Samirbous
left a comment
There was a problem hiding this comment.
adds chrome_elf.dll in an OR condition to the current dir and Downloads to the list of suspicious folders.
Closes #5572
Summary - What I changed
This PR addresses two detection gaps in the "Unsigned DLL Side-Loading from a Suspicious Folder" rule that allowed a real DLL sideloading attack to evade detection.
Change 1: Add Downloads to suspicious paths list
Downloads is a common malware execution location but was missing from the list that already includes Documents, Pictures, Music, and Public folders.
Change 2: Fix subdirectory evasion with directory matching logic
Changed from
endswith~tostartswith~:Why this matters:
Attackers can trivially bypass the original rule by placing the malicious DLL one directory level deeper. The analyzed sample used a Chrome sideloading technique where the malicious
chrome_elf.dllwas placed in a version numbered subfolder (143.0.7499.110\), mimicking Chrome's legitimate directory structure:...\FPS_BOOSTER\...\FPS_BOOSTER\143.0.7499.110\The existing filters (suspicious base paths, unsigned DLL, trusted process signature, recent file modification time) constrain false positives when using the broader
startswith~matching. A legitimate application loading unsigned DLLs from subdirectories within a user's Downloads folder is inherently suspicious and worth investigating. Tested against a real environment without generating additional false positives.How To Test
Tested against a real info stealer sample that uses Chrome DLL sideloading. The modified rule correctly identified the sideloading activity without generating additional false positives.
Test query with both changes applied:
Sample event indicators from tested malware:
dll.namechrome_elf.dlldll.pathC:\Users\dadre\Downloads\FPS_BOOSTER\143.0.7499.110\chrome_elf.dlldll.pe.original_file_nameengine_complete_hyper.dlldll.code_signature.existsfalseprocess.executableC:\Users\dadre\Downloads\FPS_BOOSTER\fps.exeprocess.code_signature.subject_nameGoogle LLCChecklist
bug,enhancement,schema,maintenance,Rule: New,Rule: Deprecation,Rule: Tuning,Hunt: New, orHunt: Tuningso guidelines can be generatedmeta:rapid-mergelabel if planning to merge within 24 hours