gentilkiwi / mimikatz

A little tool to play with Windows security
http://blog.gentilkiwi.com/mimikatz
19.48k stars 3.74k forks source link

can't find a syntax to call Mimikatz from the command line with embedded quotes #424

Open rick-engle opened 1 year ago

rick-engle commented 1 year ago

I'd like to pass all of these commands to Mimikatz as command line arguments, but I can't figure out how to wrap one of the parameters so that it is handled properly:

mimikatz.exe privilege::debug sid::patch sid::add /sam:jeffl /new:"Domain Admins" exit

The /new:"Domain Admins" is what I am having problems with. The Domain Admins group has a space in it so I need to wrap it in quotes. But mimikatz does not parse the properly and breaks the command link flow.

Is there a way to properly pass embedded or escaped quotes so that the command line succeeds?

Thanks.

TheOnAndOnlyZenomat commented 1 year ago

I also had that problem. I couldn't figure out a way to escape in in Powershell, but running it in cmd with \"log test.log\" worked