Skip to content

bott0n/dll_sideloading_discovery

Repository files navigation

DLL Generator

This script generates a DLL from a specified file path. It supports both C++ and C# projects.

Usage

python dll_generator.py [-h] dll_path {cpp,cs}

C++ DLL Example

Here we use Integrator.exe and msi.dll as example.

  1. Generator dll code from a desired dll file.
python dll_generator.py C:\windows\system32\msi.dll cpp
  1. Compile the code using Visual Studio
  2. Copy the compiled dll and rename to \DLL\Integrator\
  3. CMD exeucte Integrator.exe and discover the function to sideload.
  4. We can found MsiDatabaseGenerateTransformA for dll sideloading.

C# DLL Example

Here we use Integrator.exe and msi.dll as example. And we found MsiDatabaseGenerateTransformA to be the function to exeucte payload.

  1. Generator dll code from a desired dll file and it output to cs_dll.txt.
python dll_generator.py C:\windows\system32\msi.dll cs
  1. Copy the cs_dll.txt content to a c# dll project.
  2. Right Click Solution Explorer Untitled
  3. Browse and Install DllExport Untitled
  4. In the directory, run DllExport.bat Untitled
  5. Follow the setting and apply and reload the project to compile.Untitled
  6. Change MsiDatabaseGenerateTransformA to execute the payload function.
  7. Compile and copy dll and rename to \DLL\Integrator\ and exeucte.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published