Package: turdshovel
TurdshovelDescriptionTurdshovel is an interactive CLI tool that allows users to dump objects from .NET memory dumps without having to fully understand the intricacies of WinDbg. It usesPython.NETto wrap aroundClrMDand perform basic operations for dumping objects and sections of memory. The primary goal of Turdshovel is to focus on finding secrets in memory dumps quickly.It is absolutely not intended to be a full-fledged memory dump analysis tool.InstallationTurdshovel is written in Python 3.8 and at the moment is expected to only work with Python 3.8. No testing has been performed with other Python versions. This is because Turdshovel has a dependency onPython.NET, which requires specific installations of its files per Python version. This may change in the future with the release of Python.NET 3.0 and Turdshovel will support Python >3.8 as long as Python.NET supports it.Additionally, Turdshovel is meant to be installed onWindowsand has only been tested onWindows. No testing has been performed with Linux. However, Turdshovel uses the .NET Standard 2.0 versions ofClrMDwhich supports:.NET Core (2.0 - 6.0).NET Framework (4.6.1 - 4.8)Mono (5.4, 6.4)The inclusion of Mono may mean that Turdshovel works on Linux, especially sinceClrMD does support Linux. However, future plans for Turdshovel may include features that will be limited to Windows due to dependencies. These features will not be supported on other OSes, so a Windows environment is your best bet for usage.Microsoft offers free Windows 10 development environment VMshere.Installing with PipxAs a CLI tool, installation is highly recommended usingPipxto avoid any dependency confusions.Honestly, you should use Pipx for most Python CLI tools!Additionally, since Turdshovel only works with Python 3.8, this helps ensure that your virtual environment is set to use Python 3.8 at all times.If your Pipx install was done with Python 3.8:pipx install turdshovelIf your Pipx install was done with different version:pipx install --python <path/to/python3.8> turdshovelUsageTurdshovel usesNubiaas its framework for an interactive CLI.CommandArgumentsDescriptionloadLoads a dump for a sessiondump heapfilter- Filter objects by stringsLists objects on the heapdump objaddress- Address of object to dumpsave- Save ouput to diskDumps object on heap by addressdump memaddress- Address of memory to readlength- Length of bytes to readDumps the memory in bytes at locationdump statfilter- Filter objects by stringssort- Sort object by count or objectreverse- Reverse sorting outputDumps the memory in bytes at locationhelpShow helpexitExitCommandsloadTheloadcommand takes the path to the file dump as an argument.dump heapSimilar to the dump heap command viaSOS, this command will list the objects on the heap as well as their type. However, the output differs in that Turdshovel does not show objects which are listed as "Free" on the heap. You can optionally pass a list of strings as the filter.dump objSimilar to the dump obj command viaSOS, this command will dump all of the non-static fields of the object on the heap in JSON representation. You can also passsave=Trueto save the resulting JSON to disk.IMPORTANT:When dumping a complex object, you may noticed fields<!>. This indicates that the field would have caused a recursion error to occur so Turdshovel did not parse the field. This usually occurs with objects that reference themselves.dump memPrints the bytes at the location specified for the amount of bytes specified. This is useful when objects point to locations in memory that are not objects, such as encrypted data, or just seeing what is around any given memory address. The example shows a simple string which you could find with the strings command but there are better use cases, specifically with pointers!dump statPrints the count of each type of object. You can optionally filter the type usingfilter=and can sort the output by count or object usingsort=.Built WithPython-Nubia- CLI FrameworkPython.NET- Python/C# InteropClrMD- .NET Diagnostics LibraryRich- Amazing text, highlighting, and formattingSpecial ThanksSteve Dower- Helped fixed the recursion issue!