Maintaining access using search order hijacking in standard software
The DLL search order hijacking/DLL planting technique is one of my favorite persistence-gaining methods to achieve long-time access while evading the eyes of administrators. Let's talk about this technique in the following section.
DLL search order hijacking
As the name suggests, the DLL search order hijacking vulnerability allows an attacker to hijack the search order of DLLs loaded by a program and will enable them to insert a malicious DLL instead of a legitimate one.
Mostly, software, once executed, will look for DLL files in its current folder and System32
folder. However, sometimes, the DLLs, which are not found in their current directory, are then searched for in the System32
folder instead of directly loading them from System32
first-hand. This situation can be exploited by an attacker where they can put a malicious DLL file in the current folder and hijack the flow, which would have otherwise...