Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

New extension for Mimkatz v2.0 #79

Merged
merged 26 commits into from Apr 29, 2014
Merged

New extension for Mimkatz v2.0 #79

merged 26 commits into from Apr 29, 2014

Conversation

OJ
Copy link
Contributor

@OJ OJ commented Mar 19, 2014

Behold! This is the guts of a new extension called Kiwi, and it embodies the beginnings of a fully fledged container for all of the new goodness that Ben Delpy has baked into Mimkatz v2.0. There's lots of stuff in here so I don't expect this thing to land overnight.

The crux of its use and rationel will be in the MSF side of this PR. So for full details head over there rapid7/metasploit-framework#3121.

This includes all source up to and including revision r107 from the Mimikatz source repo. All copyright/file headers have been retained to adhere to the licence agreement. Extra code has been added to enable Meterpreter to do a better job of pulling out the details that Mimikatz has extracted.

Instead of doing the CSV-style approach like the original mimikatz extension did, this one actually operates directly on the data structures that this code operates on, which means we don't have to serialise everything to strings prior to sending it over to Metasploit.

This functionality, while inclusive of all the Mimikatz 2.0 code, has not exposed all the functions that are available. For details of the functions that have been exposed, please see the MSF PR.

The MSF PR is here: rapid7/metasploit-framework#3121

@metasploit-public-bot
Copy link

Test FAILED.
Refer to this link for build results: https://ci.metasploit.com/job/GPR-MeterpreterWin/88/

@metasploit-public-bot
Copy link

Test PASSED.
Refer to this link for build results: https://ci.metasploit.com/job/GPR-MeterpreterWin/89/

OJ added 4 commits March 20, 2014 09:17
In some cases this extension would crash. This was due to the code using the
incorrect "length" variable when dumping LSA data. This commit includes addition
of some debug output, removal of other debug output, and changing of the
kiwi-specific debug definition.

Another packet function was added to aid in construction of this fix, and the
group packet function was added to one of the calls.
@metasploit-public-bot
Copy link

Test PASSED.
Refer to this link for build results: https://ci.metasploit.com/job/GPR-MeterpreterWin/93/

@metasploit-public-bot
Copy link

Test PASSED.
Refer to this link for build results: https://ci.metasploit.com/job/GPR-MeterpreterWin/94/

@metasploit-public-bot
Copy link

Test PASSED.
Refer to this link for build results: https://ci.metasploit.com/job/GPR-MeterpreterWin/95/

targetTlv->buffer = lpStr;
}

return lpStr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function appears to leak lpStr, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the function sig mate:

@remark On success, the Tlv will contain a pointer to memory that needs to be released using \c free().

However, this function has been effectively deprecated thanks to the group TLV thing, which allows the other version to be used. I think I can safely remove this function anyway.

@metasploit-public-bot
Copy link

Test PASSED.
Refer to this link for build results: https://ci.metasploit.com/job/GPR-MeterpreterWin/97/

@OJ
Copy link
Contributor Author

OJ commented Apr 24, 2014

Hey guys, is there anything else majorly concerning about this?

@wchen-r7
Copy link
Contributor

This indeed requires more attention. Quite a large PR, but I'll allocate time to this tomorrow.

@wchen-r7 wchen-r7 self-assigned this Apr 25, 2014
@OJ
Copy link
Contributor Author

OJ commented Apr 25, 2014

Yeah sorry mate. I realise it's a biggie, which is why I haven't implemented all the features yet.

Cheers for the response!

@jlee-r7 jlee-r7 merged commit 9329a61 into rapid7:master Apr 29, 2014
jlee-r7 pushed a commit that referenced this pull request Apr 29, 2014
jlee-r7 pushed a commit to rapid7/metasploit-framework that referenced this pull request Apr 29, 2014
@OJ OJ deleted the ext_server_kiwi branch April 30, 2014 14:05
@OJ
Copy link
Contributor Author

OJ commented Apr 30, 2014

Thank you @jlee-r7 :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants