pr00f Posted May 24, 2017 Report Posted May 24, 2017 Introduction This repository contains a library that allows native Linux programs to load and call functions from a Windows DLL. As a demonstration, I've ported Windows Defender to Linux. $ ./mpclient eicar.com main(): Scanning eicar.com... EngineScanCallback(): Scanning input EngineScanCallback(): Threat Virus:DOS/EICAR_Test_File identified. What works? The intention is to allow scalable and efficient fuzzing of self-contained Windows libraries on Linux. Good candidates might be video codecs, decompression libraries, virus scanners, image decoders, and so on. C++ exception dispatch and unwinding. Loading additional symbols from IDA. Debugging with gdb (including symbols), breakpoints, stack traces, etc. Runtime hooking and patching. Support for ASAN and Valgrind to detect subtle memory corruption bugs. If you need to add support for any external imports, writing stubs is usually quick and easy. Why? Distributed, scalable fuzzing on Windows can be challenging and inefficient. This is especially true for endpoint security products, which use complex interconnected components that span across kernel and user space. This often requires spinning up an entire virtualized Windows environment to fuzz them or collect coverage data. This is less of a problem on Linux, and I've found that porting components of Windows Antivirus products to Linux is often possible. This allows me to run the code I’m testing in minimal containers with very little overhead, and easily scale up testing. This is just personal opinion, but I also think Linux has better tools. ¯\_(ツ)_/¯ Windows Defender MsMpEng is the Malware Protection service that is enabled by default on Windows 8, 8.1, 10, Windows Server 2016, and so on. Additionally, Microsoft Security Essentials, System Centre Endpoint Protection and various other Microsoft security products share the same core engine. The core component of MsMpEng responsible for scanning and analysis is called mpengine. Mpengine is a vast and complex attack surface, comprising of handlers for dozens of esoteric archive formats, executable packers, full system emulators for various architectures and interpreters for various languages. All of this code is accessible to remote attackers. Source: https://github.com/taviso/loadlibrary 2 Quote
gigiRoman Posted May 24, 2017 Report Posted May 24, 2017 https://en.m.wikipedia.org/wiki/DLL_Hell 1 Quote