Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 58 guests online
 
Advertisement

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow Network Pen Testingarrow help with hashdump
EH-Net
May 22, 2013, 09:19:57 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Go back to The Ethical Hacker Network Online Magazine Home Page
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: help with hashdump  (Read 8512 times)
0 Members and 1 Guest are viewing this topic.
yatz
Full Member
***
Offline Offline

Posts: 222


View Profile WWW
« on: June 19, 2011, 08:50:51 PM »

I've been preparing a simple demonstration and wanted to show pass the hash.  After getting a meterpreter session, I run hashdump to get the hashes, but it only seems to display the local SAM database.  Is there a way to get the SAM hash for domain users as well?  I am exploiting a Windows XP box that is on an Active Directory domain with a domain user currently logged in.

Thanks!
Logged

"Live as though you would die tomorrow, learn as though you would live forever."

CCNA, MCSA, MCTS, Sec+, Net+, Linux+, CEH
lorddicranius
Sr. Member
****
Offline Offline

Posts: 447



View Profile WWW
« Reply #1 on: June 20, 2011, 02:11:33 AM »

I believe you'd need to exploit a domain controller for that.
Logged

GSEC, eCPPT, Sec+
j0rDy
Hero Member
*****
Offline Offline

Posts: 590


View Profile
« Reply #2 on: June 20, 2011, 03:24:35 AM »

true, the credentials are stored on the domain controller. Hack that and you will be king of the network!
Logged

ISC2 Associate, CEH, ECSA, OSCP, OSWP

earning my stripes appears to be a road i must travel alone...with a little help of EH.net
Data_Raid
Full Member
***
Offline Offline

Posts: 165



View Profile
« Reply #3 on: June 20, 2011, 03:35:28 AM »

This should be of interest if the DC is Win2k8: http://www.room362.com/blog/2011/5/15/dumping-hashes-on-win2k8-r2-x64-with-metasploit.html
and check out smart_hashdump: http://www.darkoperator.com/blog/2011/5/19/metasploit-post-module-smart_hashdump.html
Logged

All men by nature desire knowledge.

Aristotle
yatz
Full Member
***
Offline Offline

Posts: 222


View Profile WWW
« Reply #4 on: June 20, 2011, 08:55:45 AM »

Thanks everyone.  I did come across those links but they don't really help in my case since this is just a standard XP box.  Good to know that what I came across - need domain controller to get these - is what you came up with as well. 

However, I thought I was able to do this using the pass the hash toolkit from CORE, but it doesn't look like that is part of meterpreter (can anyone confirm?).

I think even if I don't get this fully functional I can still show the local hashes and get my point across (i.e. HEREZ THE ADMINISTRATOR GUYZZ!!!), so no worries.  Smiley  I was mainly asking for my own learning purposes.
Logged

"Live as though you would die tomorrow, learn as though you would live forever."

CCNA, MCSA, MCTS, Sec+, Net+, Linux+, CEH
cd1zz
Hero Member
*****
Offline Offline

Posts: 561


View Profile WWW
« Reply #5 on: June 20, 2011, 09:07:55 AM »

There is a module in metasploit to do it, but it's separate from meterpretery. Mubix displayed it here http://www.room362.com/blog/2009/8/26/pass-the-hash-metasploit-demo.html
Logged

cd1zz
Hero Member
*****
Offline Offline

Posts: 561


View Profile WWW
« Reply #6 on: June 20, 2011, 09:08:11 AM »

There is a module in metasploit to do it, but it's separate from meterpreter. Mubix displayed it here http://www.room362.com/blog/2009/8/26/pass-the-hash-metasploit-demo.html
Logged

lorddicranius
Sr. Member
****
Offline Offline

Posts: 447



View Profile WWW
« Reply #7 on: June 20, 2011, 09:12:25 AM »

cd1zz beat me to it hehe.  Here's a section in Metasploit Unleashed that explains "pass the hash" as well:

http://www.offensive-security.com/metasploit-unleashed/PSexec_Pass_The_Hash
Logged

GSEC, eCPPT, Sec+
yatz
Full Member
***
Offline Offline

Posts: 222


View Profile WWW
« Reply #8 on: June 20, 2011, 09:21:56 AM »

Thanks, I did come across the Metasploit Unleased link, which I was successful doing, and the video is helpful as well.

This still relies on having a local account (the video uses "andrew") that has the same username and password as a domain user.  I want to assume there are no local accounts on the XP box.

One would think that somewhere the domain credentials have to be cached for offline login...
Logged

"Live as though you would die tomorrow, learn as though you would live forever."

CCNA, MCSA, MCTS, Sec+, Net+, Linux+, CEH
cd1zz
Hero Member
*****
Offline Offline

Posts: 561


View Profile WWW
« Reply #9 on: June 20, 2011, 09:27:37 AM »

Mubix to the rescue
http://www.room362.com/blog/2011/2/14/cachedump-for-meterpreter-in-action.html

http://lab.mediaservice.net/code/cachedump.rb
Logged

yatz
Full Member
***
Offline Offline

Posts: 222


View Profile WWW
« Reply #10 on: June 20, 2011, 10:39:13 AM »

Cachedump, yep that worked.  I came across references to this script but didn't investigate.  Thanks!!!

Logged

"Live as though you would die tomorrow, learn as though you would live forever."

CCNA, MCSA, MCTS, Sec+, Net+, Linux+, CEH
hernano
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #11 on: June 21, 2011, 08:59:24 AM »

Hi!,

I'm the author of the defunct pass-the-hash toolkit, and also of the  Windows Credentials Editor (WCE).

I wrote the pass-the-hash toolkit and I can tell you it does not longer work. It only works on xp/2003, without current patches, and it does not work on windows 7/2008, etc etc.  So you should not expect it to work anymore.

I did write a new tool called Windows Credentials Editor, it's a much improved version of the pass-the-hash toolkit and it supports windows 7/2008. It also supports Pass-the-ticket for Kerberos which is something new I implemented..

You can download it here:
http://www.ampliasecurity.com/research/wce_v1_2.tgz

A presentation about how it works, features, etc:
http://www.ampliasecurity.com/research/WCE_Internals_RootedCon2011_ampliasecurity.pdf

Also, I'd like to point out a few things:

1-With WCE you don't need to own a Domain Controller to obtain the hashes. That's one of the good things about these tools I wrote. You can compromise a regular machine, like a backup server, and if at some point a domain administrator (or any other domain user) remotely accessed that machine using RDP for example, those hashes can remain in memory (even after the session is terminated, because of a bug in windows), and WCE will steal those hashes from memory. WCE (and previously pth toolkit) does not touch the SAM database, it steals everything from memory.

hashes are stored in memory not just by RDP sessions, but also by the runas command, services that login using an specific windows account, etc etc

2-cachedump is not the same as WCE. With cachedump you are obtaining hashes
cached. This functionality can be disabled. WCE 'steals' hashes from memory.. you can have the cache disabled, and WCE will still give you hashes..
The tools are stealing credentials from different places..

3-WCE provides 'native' pass-the-hash. You are not dependant on a third-party SMB implementation, like a modified smbclient or a SMB stack written in ruby or python which have limited functionality (can be enough for some things, but it is limited), which WCE, besides 'stealing' hashes, you can also use those hashes and do pass-the-hash directly from windows, and access remote shares using thoses hashes, etc etc

4-with WCE you can also steal kerberos tickets and reuse them on another windows box or a unix box.. but that's another story..

I hope it helps.

Thank you!




Logged
cd1zz
Hero Member
*****
Offline Offline

Posts: 561


View Profile WWW
« Reply #12 on: June 21, 2011, 09:04:32 AM »

Kick ass. Thank you.

Logged

Ignatius
Jr. Member
**
Offline Offline

Posts: 91


View Profile
« Reply #13 on: June 21, 2011, 12:57:06 PM »

That's interesting, hernano.  Thank you for the update about the successor of your well-known Pass-the-Hash toolkit.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.086 seconds with 22 queries.
 
Exclusive Deal

sansfire13_245x90_cw90.jpg
SANSFIRE 2013
June 15 - 22

5% Off w/ Code: EHN_5

SANS Deals 4 EH-Netters
5% OFF Any SANS Course in Any Format!
Coupon Code: EHN_5 Including SANS Rocky Mountain 2013 & SANS Boston 2013
Polls
Compared to this year, 2013 will be:
 
Recent Forum Topics
EH-Net News Feeds
Latest Additions
 
         
Advertisement

© 2013 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.