DLL side loading security issue.

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

DLL side loading security issue.

Postby joseshinoj » Mon Jul 04, 2022 4:33 am

I use libcef 80.0.20 version. I noticed that the dll loads lot of other binaries probably from the system32 folder. But the order of searching for these are not specified which can be a security concern. An attacker can simulate his dlls in these names and can place in the current folder. This will be then picked by default.
Has this issue been addressed in any of the later releases?
joseshinoj
Newbie
 
Posts: 3
Joined: Tue Sep 15, 2020 3:39 am

Re: DLL side loading security issue.

Postby magreenblatt » Mon Jul 04, 2022 5:12 am

If an attacker has write access to the local machine then they can do pretty much anything they like, including replacing libcef.dll or your exe. Chromium maintains a blocklist of DLLs that are known/likely to be problematic. Beyond that you would need to sign and verify every binary loaded by the process, and that would be extremely problematic with third-party binaries such as antivirus, device drivers, etc.
magreenblatt
Site Admin
 
Posts: 12402
Joined: Fri May 29, 2009 6:57 pm

Re: DLL side loading security issue.

Postby magreenblatt » Mon Jul 04, 2022 5:17 am

magreenblatt
Site Admin
 
Posts: 12402
Joined: Fri May 29, 2009 6:57 pm

Re: DLL side loading security issue.

Postby ndesktop » Mon Jul 04, 2022 8:55 am

Use SetDllDirectory, SetDefaultDllDirectories from the main executable to place system32 and current directory first; also you can configure the process environment variable PATH in the same manner.
More hardcore ways would be to patch LoadLibrary (if you are on Windows) - or better yet, ntdll!LdrLoadDll - using Detours or VirtualProtect patching.
Then one can check the signature of a file (both in file and catalogue), allow only certain paths etc.
ndesktop
Master
 
Posts: 754
Joined: Thu Dec 03, 2015 10:10 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 41 guests