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

MITRE ATT&CK Evaluations And Must-Have Intelligence For Security Leaders

In today’s dynamic threat landscape, security leaders are under constant pressure to make informed choices…

1 day ago

DICOMHawk – A Honeypot For Secure DICOM Server Monitoring

DICOMHawk is a powerful and efficient honeypot for DICOM servers, designed to attract and log…

2 days ago

Stratus Red Team – Advancing Threat Detection And Offensive Testing In Cloud Environments

Stratus Red Team is a cutting-edge tool designed to enhance cloud security by simulating granular…

2 days ago

Bomber : Navigating Security Vulnerabilities In SBOMs

bomber is an application that scans SBOMs for security vulnerabilities. So you've asked a vendor…

6 days ago

EmbedPayloadInPng : A Guide To Embedding And Extracting Encrypted Payloads In PNG Files

Embed a payload within a PNG file by splitting the payload across multiple IDAT sections.…

6 days ago

Exploit Street – Navigating The New Terrain Of Windows LPEs

Exploit-Street, where we dive into the ever-evolving world of cybersecurity with a focus on Local…

1 week ago