
Spartacus DLL/COM Hijacking Toolkit
[!CAUTION] This repo is unmaintained, visit https://github.com/sadreck/Spartacus for the latest version.
If you have seen the film Spartacus from 1960, you will remember the scene where the Romans are asking for Spartacus to give himself up. The moment the real Spartacus stood up, a lot of others stood up as well and claimed to be him using the "I AM SPARTACUS" phrase.
When a process that is vulnerable to DLL Hijacking is asking for a DLL to be loaded, it's kind of asking "WHO IS VERSION.DLL?" and random directories start claiming "I AM VERSION.DLL" and "NO, I AM VERSION.DLL". And thus, Spartacus.
DllMain. This technique was inspired and implemented from the walkthrough described at https://www.redteam.cafe/red-team/dll-sideloading/dll-sideloading-not-by-dllmain, by Shantanu Khandelwal.[Defence] Monitoring mode trying to identify running applications proxying calls, as in "DLL Hijacking in progress". This is just to get any low hanging fruit and should not be relied upon.Find and download the latest version of Spartacus under Releases. Otherwise simply clone this repository and build from source.
Below is a description of each of the modes that Spartacus supports.
Note: Command line arguments have significantly changed from v1 to v2.
The original functionality of Spartacus was solely finding DLL hijacking vulnerabilities. The way it works is:
CreateFile..dll.procmon.exe or procmon64.exe.Drop Filtered Events to ensure minimum PML output size.Auto Scroll.ENTER.ENTER.Collect all events and save them into C:\Data\logs.pml. All vulnerable DLLs will be saved as C:\Data\VulnerableDLLFiles.csv and all proxy DLLs solutions in C:\Data\Solutions.
--mode dll --procmon C:\SysInternals\Procmon.exe --pml C:\Data\logs.pml --csv C:\Data\VulnerableDLLFiles.csv --solution C:\Data\Solutions --verbose
Parse an existing PML event log output, save output to CSV, and generate proxy Visual Studio solutions.
--mode dll --existing --pml C:\MyData\SomeBackup.pml --csv C:\Data\VulnerableDLLFiles.csv --solution C:\Data\Solutions --verbose


A new functionality of Spartacus is to identify local COM hijacking vulnerabilities. The way it works is:
RegOpenKey.procmon.exe or procmon64.exe.Drop Filtered Events to ensure minimum PML output size.Auto Scroll.ENTER.ENTER.InprocServer32 and its result is NAME_NOT_FOUND.HKEY_CURRENT_USER, search for its GUID under HKEY_CLASSES_ROOT and include its details in the export CSV (if found).proxy mode.For COM hijacking Spartacus also supports scanning the local system for misconfigured COM entries:
HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, and HKEY_LOCAL_MACHINE.InProcServer, InProcServer32, LocalServer, or LocalServer32.Collect all events and save them into C:\Data\logs.pml. All vulnerable COM information will be saved as C:\Data\VulnerableCOM.csv.
--mode com --procmon C:\SysInternals\Procmon.exe --pml C:\Data\logs.pml --csv C:\Data\VulnerableCOM.csv --verbose
Process an existing PML file to identify vulnerable COM entries.
--mode com --existing --pml C:\Data\logs.pml --csv C:\Data\VulnerableCOM.csv --verbose
Enumerate the local system registry to identify missing/misconfigured COM libraries and executables.
--mode com --acl --csv C:\Data\VulnerableCOM.csv --verbose

