Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title: Enhance Command-Line Argument Handling for Mimikatz RPC Script with Custom GUID #1802

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

raghavmishra
Copy link

@raghavmishra raghavmishra commented Sep 1, 2024

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:

  1. The script correctly defaults to the pre-defined UUID when the -guid argument is not provided.
    mimi_default_RPC_UUID

impacket-mimi-_default_UUID

  1. The custom GUID is correctly applied when the -guid argument is specified.
    mimi_custom_RPC_UUID

impacket-mimi-custom_UUID

  1. All other command-line arguments continue to work as intended without any regressions.

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.

… with Custom GUID Option

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:

The script correctly defaults to the pre-defined UUID when the -guid argument is not provided.
The custom GUID is correctly applied when the -guid argument is specified.
All other command-line arguments continue to work as intended without any regressions.

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.
@raghavmishra raghavmishra changed the title Title: Enhance Command-Line Argument Handling for Mimikatz RPC Script… Title: Enhance Command-Line Argument Handling for Mimikatz RPC Script with Custom GUID Sep 2, 2024
@anadrianmanrique anadrianmanrique self-assigned this Oct 3, 2024
@anadrianmanrique anadrianmanrique added the in review This issue or pull request is being analyzed label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in review This issue or pull request is being analyzed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants