Title: Enhance Command-Line Argument Handling for Mimikatz RPC Script with Custom GUID #1802
+21
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
While working on gentilkiwi's Mimikatz, I noticed that the tool accepts a command-line argument for a custom GUID in the RPC::Server interface. Inspired by this functionality, this pull request enhances the Mimikatz RPC script by adding support for an optional -guid command-line argument, allowing users to specify a custom GUID for the RPC interface. If no custom GUID is provided, the script will default to the pre-defined UUID. This update also ensures that other command-line arguments continue to function seamlessly while maintaining backward compatibility.
Changes Made:
Added -guid Argument: Introduced a new optional -guid argument to the script. If provided, this argument allows users to specify a custom GUID for the Mimikatz RPC interface. The script defaults to the hardcoded UUID if the -guid argument is omitted.
Updated mimilib.py:
Implemented a set_msrpc_uuid() function to manage the global MSRPC_UUID_MIMIKATZ variable based on the presence of a custom GUID. Centralized the UUID logic for easier maintenance and updates.
Main Script Modifications:
Integrated the -guid handling logic into the main() function to ensure that the correct UUID is set based on user input. Included checks and debug print statements to enhance runtime visibility and troubleshooting.
Testing:
The changes have been thoroughly tested to confirm that:
Notes:
This update maintains full backward compatibility, introducing no breaking changes. It simply adds flexibility to the Mimikatz RPC script by supporting dynamic configuration through the new -guid option.