mimitokens module fail
Empire Version
1.5.0
OS Information (Linux flavor, Python version)
Running Empire on Ubuntu 12.04 x64 Python 2.7.3 Target OS - Microsoftr Windows Serverr 2008 Enterprise, 6.0.6002 Service Pack 2 Build 6002
Expected behavior and description of the error, including any actions taken immediately prior to the error. The more detail the better.
Error is thrown when using this module - credentials/mimikatz/mimitokens Before running this, lsadump was executed successfully - credentials/mimikatz/lsadump
Screenshot of error, embedded text output, or Pastebin link to the error
(``` Empire: credentials/mimikatz/lsadump) > usemodule credentials/mimikatz/mimitokens (Empire: credentials/mimikatz/mimitokens) > info
Name: Invoke-Mimikatz Tokens
Module: credentials/mimikatz/mimitokens
NeedsAdmin: True
OpsecSafe: True
MinPSVersion: 2 Background: False OutputExtension: None
Authors: @JosephBialek @gentilkiwi
Description: Runs PowerSploit's Invoke-Mimikatz function to list or enumerate tokens.
Options:
Name Required Value Description
elevate False Switch. Elevate instead of listing
tokens.
user False User name to list/elevate the token of.
admin False Switch. List/elevate local admin tokens.
revert False Switch. Revert process token.
domainadmin False Switch. List/elevate domain admin
tokens.
list False True Switch. List current tokens on the
machine.
id False Token ID to list/elevate the token of.
Agent True 2REGBMBGWN3UYZKS Agent to run module on.
(Empire: credentials/mimikatz/mimitokens) > execute (Empire: credentials/mimikatz/mimitokens) > error running command: Property 'AddressWidth' cannot be found on this object. Make sure that it exists.
(Empire: credentials/mimikatz/mimitokens) >
## Any additional information
NA
I ran this on my stock Windows 7 machine without issue, but don't currently have a 2k8 box to test on. Are you using the development branch or the master branch? If using master, try checking out dev and seeing if the issue is resolved.
I am using the master branch. I don't have access to that 2k8 box now but will try to get a new 2k8 vm & test with the dev branch.
Thanks.
FYI, I was able to run this on 2008R2 with no error. Can you post the OS details on a box you are able to reproduce this on?
@enigma0x3 Target OS - Microsoftr Windows Serverr 2008 Enterprise, 6.0.6002 Service Pack 2 Build 6002 Server role as Domain Controller. Had McAfee AV on the server. Issue was seen randomly across couple of 2k3 & 2k8 servers. Issue only happened with mimitokens. Dumping hashes + lsa secrets + few other cred modules were successful.
If you are able to test, can you try using Invoke-Mimikatz by itself and see if that works?
Hey @enigma0x3 sorry this was seen in a cu environment, which I don't have access to now.
Gotcha. I am unable to reproduce this on 2008r2, 2012, 2012R2, Windows 7, 8.1 and 10.This is likely due to .net versioning on the target box and is specific to that host. If you run into this again, feel free to comment back on this and we will try to run through as many troubleshooting steps as possible while you have access to a trouble box.
Thanks!
I'm not sure what causes this either, but ran into it today. I found that this fix corrected the issue for me:
https://github.com/PowerShellMafia/PowerSploit/issues/75
Specifically, line 2589 in data/module_source/credentials/Invoke-Mimikatz.ps1 currently reads:
if (((Get-WmiObject -Class Win32_Processor).AddressWidth / 8) -ne [System.Runtime.InteropServices.Marshal]::SizeOf([Type][IntPtr]))
Replace with:
if ((((Get-WmiObject -Class Win32_OperatingSystem).OSArchitecture).Substring(0,2) / 8) -ne [System.Runtime.InteropServices.Marshal]::SizeOf([Type][IntPtr]))
And it all functions correctly. For whatever reason on these systems (Get-WmiObject -Class Win32_Processor).AddressWidth returns nothing.
Hey @natronkeltner, I updated Invoke-Mimikatz with the version in the master branch of PowerSploit. This includes a bug fix for multi-processor systems. Do a pull from the dev branch and see if it fixes it for you. Here is the commit: https://github.com/PowerShellEmpire/Empire/commit/1a266ce6a031d4c7ad017fe5009ac99b56406d65#diff-5ca0e44f33d17dc01ba701253ee4264c
And the corresponding commit from PowerSploit showing the changes: https://github.com/PowerShellMafia/PowerSploit/commit/235af294aee9587c73bf82feff0566742a72c10b