▄████████ ███▄▄▄▄ ▄████████ ▄█ ▄██ ▄ ▄████████ ▄█ ▄████████ ████████▄ ▄█ ▄█ ███ ███ ███▀▀▀██▄ ███ ███ ███ ███ ██▄ ███ ███ ███ ███ ███ ███ ▀███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███▄▄▄███ ███ █▀ ███▌ ███ █▀ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ▀▀▀▀▀▀███ ███ ███▌ ███ ███ ███ ███ ███ ▀███████████ ███ ███ ▀███████████ ███ ▄██ ███ ▀███████████ ███▌ ▀███████████ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███▌ ▄ ███ ███ ▄█ ███ ███ ▄█ ███ ███ ▄███ ███▌ ▄ ███▌ ▄ ███ █▀ ▀█ █▀ ███ █▀ █████▄▄██ ▀█████▀ ▄████████▀ █▀ ▄████████▀ ████████▀ █████▄▄██ █████▄▄██ ▀ ▀ ▀Using DLL hijacking to aid in malware analysis.=====|=================== Home ===================|=====
- Research - Nerd section.
- Primers on DLLs - Basic information needed to understand DLLs.
- Types of DLL Hijacking - According to the MITRE ATT&CK framework.
- References - Credits where credits are due.
=====|============================================|=====DLL Research - Nerd section.
DLL hijacking is a vulnerability in Windows DLL load order in which a malware loads its own malicious DLL that will be run before a legitimate one does; this way, it can handle any calls made and execute the contained code with the same privileges as the running application. With that in mind, the idea was to use this same technique and turn it around; is it possible to trick malware into calling DLLs that were specifically modified to handle malicious events? Understanding this could help in malware analysis by automating and deciding how to handle malicious activity executed through DLLs. The objective for this type of DLL hijacking substantially changes; rather than achieving privileged execution, the DLL was going to modify any returns to calls made by the malware without directly interacting with the malicious process.
Primers on DLLs - Basic information needed to understand DLLs.
The first thing we need to know is that when software is compiled, it is either:
In general, DLL hijacking will cause programs to still behave normally because, after executing their payload, they can redirect the call to the benign library to evade detection. This is a note that's being saved here since I'm thinking about having some calls modify the actual behavior whereas only want logging capabilities for others. Of these techniques, DLL search order hijacking, DLL redirection and DLL substitution seem like the best directions for what we're trying to do here. Admittedly, DLL substitution is surely the easiest and most straight forward and shouldn't cause any major problems since this project is aimed for analysis VMs but we'll still play around with each technique a bit for fun. 2/3 of the techniques are impacted by DLL search order so that was obviously the next topic.