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 46 guests online
 
Free Business and Tech Magazines and eBooks

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow Network Pen Testingarrow Password cracking
EH-Net
May 22, 2013, 09:47:56 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: Password cracking  (Read 9813 times)
0 Members and 1 Guest are viewing this topic.
SephStorm
Hero Member
*****
Offline Offline

Posts: 530


View Profile WWW
« on: April 07, 2011, 11:42:47 AM »

I am currently in the password cracking section of my studies, and much to my dismay, the written part of the guide seems to have glossed over acquiring passwords for Windows and Nix systems. I'm sure the videos will provide examples, but the forums are here for a reason, might as well use them.

So I know that during system hacking, password files are often transferred from the remote machine to the hacker's computer. Starting with windows, how is this done? Obviously the hacker gets remote access and a command prompt, probably of a limited user.  Can the SAM be accessed with a LU account, or does it require elevated privileges?

So I just learned about the SYSKEY function. This seems to be a mute point because I know I have cracked passwords offline using LC5 and Ophcrack. So I need to ask, if syskey something I need to be aware of when conducting password attacks?

Most importantly, how do I dump the SAM remotely? I'm on youtube now, but i'm guessing most videos will be showing local dumps.

Of course the same question needs to be asked of linux, how do I retrieve the shadow file and dump them to a remote pc (my attacking pc)?
Logged

Agoonie
Full Member
***
Offline Offline

Posts: 176



View Profile WWW
« Reply #1 on: April 07, 2011, 12:43:57 PM »

Just wanted to add my two cents.  Well, for password cracking on windows, you could transfer the SAM/SYSTEM files in c:\windows\repair.  You could also use MetaSploit(Meterpreter) to get a copy of the hash. For linux, you would need root privileges to get basically read the /etc/shadow file.  There are many ways to find passwords from the hashes.  You named a few already.  Also, check out these videos.  They were a great help to me. Purehate and his group are incredible with password cracking. Not sure if this helps but still wanted to give it a try.


http://www.irongeek.com/i.php?page=videos/outerz0ne-2011-hacker-con#Pure_Hate_-_Why_your_password_policy_sucks

http://www.irongeek.com/i.php?page=videos/password-exploitation-class
Logged

OSCE, OSCP, OSWP, CISSP, GPEN

www.agoonie.com
lorddicranius
Sr. Member
****
Offline Offline

Posts: 447



View Profile WWW
« Reply #2 on: April 07, 2011, 03:12:14 PM »

Thanks for posting this links, KillJ0y.  I've yet to watch the vids on the 2nd link, but the first video is great.  This is the first I've heard of masking for password cracking.  Is that something new or am I just behind the times?

As for Windows, just as KillJ0y said, you can use Metasploit to grab the hashes.  Reversespace has been doing Metasploit classes following Offensive Security's "Metasploit Unleashed."  During their week 1 class (can be found here: http://www.grmn00bs.com/), Georgia shows an example of exploiting MS08_067 using a payload that drops into meterpreter.  Once in meterpreter, you can issue a command that prints all the usernames and their respective hashes on the screen.  Then use whichever method you prefer to crack them.

I'm new to Metasploit, so if I've misworded something or understood something incorrectly, anybody please correct me Smiley
Logged

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

Posts: 176



View Profile WWW
« Reply #3 on: April 07, 2011, 06:36:26 PM »

No problem.  It is funny you mention Reverse Space.  I just found their website like a week or two ago.  I follow Georgia on twitter and watched her webinar on SMS botnets on smartphones. (http://www.brighttalk.com/webcasts?q=EC-Council) Very cool.  They have videos for almost everything for MetaSploit. 

Oh, on password cracking, check out PaulDotCom to see the system they built for some cracking (http://pauldotcom.com/2010/10/your-password-cracking-system.html).  That is nice! Besides, SWTOR, their system is the reason I wanted to use three-way SLI with Nvidia.  Oclhashcat, oclhashcat+ and (cudahashcat+) has to be very nice with that.  Might be worth checking hashcat (http://hashcat.net/), JTR (http://www.openwall.com/john/), passwordpro(http://www.insidepro.com/eng/passwordspro.shtml) and Cain and Abel(www.oxid.it/cain.html) is worth a look too.  Hope I helped instead of rambling.
Logged

OSCE, OSCP, OSWP, CISSP, GPEN

www.agoonie.com
SephStorm
Hero Member
*****
Offline Offline

Posts: 530


View Profile WWW
« Reply #4 on: April 07, 2011, 08:52:32 PM »

Thanks to all for some stuff that is over my head lol. I'm still trying to understand that "meterpreter"stuff.

In any case, what about Netcat? I see that it is a popular tool, and I hear it has the ability to transfer files. I assume I would need to get a copy on the remote computer and one on my local computer. Which would be the listener, and which would connect? How do I get nc on the remote machine?

it also appears it is for nix only, so I suppose I need to look at that MSU article referenced above.
Logged

lorddicranius
Sr. Member
****
Offline Offline

Posts: 447



View Profile WWW
« Reply #5 on: April 08, 2011, 12:55:28 AM »

I found the grmn00bs/Reversespace stuff after listening to her talk about her SMS botnet project also lol.  Heard her chat about it on PaulDotCom and Hak5 @ Shmoocon.  I've bookmarked that BrightTalk website, looks like some good videos there.

As for netcat, I don't have experience using it myself (yet), but IIRC from reading, netcat on the remote machine is the listener while you connect to the machine on the port netcat is listening on.

I did some reading on SysKey and it seems that being aware of it would be beneficial since it's an extra level of encryption on the SAM file.  From what I can gather from Irongeek's article on it though (http://www.irongeek.com/i.php?page=security/localsamcrack2), if you grab the SAM file while logged in as admin, then the SAM is unencrypted.  So then you only have to worry about cracking the hashes.  Otherwise, you're going to need the system key to bypass SysKey.  The article was last updated in 2007 though, so I'm not sure if there are other ways to bypass SysKey now.  I'll edit/post again if I find something else.
« Last Edit: April 08, 2011, 02:16:44 AM by lorddicranius » Logged

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

Posts: 530


View Profile WWW
« Reply #6 on: April 08, 2011, 07:23:44 AM »

yeah, that article focuses on getting the SAM locally, which isnt the goal in this exercise, though it may be useful to someone reading this.

I assume that either during my CPT examination, or at some other time, I will need to get a SAM from over the internet. Also, looking at my W7 box, there doesn't appear to be a C:\Windows\Repair directory, perhaps it is not included in W7 or has been renamed.

I found a link to a post here on the forums, from the Remote Exploit forums that explains one way to do it on windows:

http://www.ethicalhacker.net/component/option,com_smf/Itemid,54/topic,533.0/

A also found a video that shows how to do the meterpreter exploit.

http://www.youtube.com/watch?v=XbG8qW_COaQ

of course the the video shows how to perform this when you are "in control" of both machines. I would need to find a way to get the executable on the "remote" pc and execute the binary without user interaction.

*sighs*

this course has taught me a few things, but i'm still comming up with the same questions. I think the problem is they are not presenting the material the same way a test would go...

For instance (I know this is off topic),

The syllabus goes from network recon to service identification to breaking passwords... the first two are good, but I cant crack the passwords until I have access to the machine, which hasn't been taught yet...
« Last Edit: April 08, 2011, 09:01:29 AM by SephStorm » Logged

lorddicranius
Sr. Member
****
Offline Offline

Posts: 447



View Profile WWW
« Reply #7 on: April 08, 2011, 09:00:23 AM »

Ah, good point regarding local vs remote.  I would think you'd need escalated privileges to access the SAM.  Checking my Win2k3 box, it only has permissions for administrators and system.  And I think if you have either admin or system privileges on a box, you wouldn't need to worry about the SysKey.  I think watching those week 1 Metasploit Unleashed vids from grmn00bs might of benefit to you.
Logged

GSEC, eCPPT, Sec+
ajohnson
Recruiters
Hero Member
*
Offline Offline

Posts: 1057


aka dynamik


View Profile WWW
« Reply #8 on: April 09, 2011, 03:19:54 PM »

I just skimmed this thread and may have missed this, but what course are you doing?

As others noted, if you can use Metasploit to exploit a vulnerability on the target system, you can use hashdump via the meterpreter payload's priv module to obtain the hashes.

If you have credentials and the requisite network connectivity, you can use pwdump/fgdump to obtain the hashes remotely.

Physical access allows you to boot to an alternate OS and retrieve the actual/backup SAM files (or LiveCD for cracking that specific system).

You can also use pwdump/fgdump locally. Just run one of those on your own system with no options and load the hashes into Ophcrack with the free tables to get a feel of that process.

As I'm sure you know, Linux uses /etc/passwd and /etc/shadow, but the idea is the same. Use credentials or exploits (or leverage a horrible misconfiguration) to gain access. You can combine the files with JTR (unshadow) and crack away. The salt used for the passwords will require you to use a brute-force/dictionary/hybrid method instead of rainbow tables.
Logged

WIP: GCFA | www.infosiege.net | @infosiege

The day you stop learning is the day you start becoming obsolete.
SephStorm
Hero Member
*****
Offline Offline

Posts: 530


View Profile WWW
« Reply #9 on: April 10, 2011, 11:05:28 PM »

Its okay, i didnt mention it in this thread, I am taking the InfoSec Institute Online PenTesting course (CEH/CPT). I think I'm actually about ready to write a review, i'm about 2/3rds complete.


IAC, I am watching the exploitation module, and he is now walking through exactly the method I was looking for, Exploiting the machine, then creating accounts from the command line, adding to admin groups, and now, using tftp to grab the pwdump files from a remote location and dumping the hashes to an accessible locale.

My only concern at this point, is that they were exploiting a W2k3 server that apparently had tftp installed. I need to look into how to install tftp from the windows cmd line.
Logged

WCNA
Full Member
***
Offline Offline

Posts: 187



View Profile
« Reply #10 on: April 11, 2011, 02:14:50 PM »

If you really need to crack a hash, you'll save a bunch of time by paying the guys at question-defense. They're setup to do it. It costs $5 & up.

« Last Edit: April 11, 2011, 02:23:21 PM by WCNA » Logged

ISC2 Associate, WCNA, CWNA, OSCP, Network+
ajohnson
Recruiters
Hero Member
*
Offline Offline

Posts: 1057


aka dynamik


View Profile WWW
« Reply #11 on: May 06, 2011, 07:39:46 PM »

My only concern at this point, is that they were exploiting a W2k3 server that apparently had tftp installed. I need to look into how to install tftp from the windows cmd line.

Sorry for the delayed response...

That's a fun exercise if you want to explore it, but you can grab the hashes remotely if you have credentials. You can also use SMB, FTP, HTTP, and other built-in services to transfer files. If you use meterpreter as your payload, you can upload and download files with that (but hashdump would just be the easiest at that point).

If you really need to crack a hash, you'll save a bunch of time by paying the guys at question-defense. They're setup to do it. It costs $5 & up.

I would be VERY careful with this as it's a HUGE liability. How would you feel if you were the customer and you found out that someone sent your password hashes to an unknown third party?
Logged

WIP: GCFA | www.infosiege.net | @infosiege

The day you stop learning is the day you start becoming obsolete.
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.075 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
 
         
Free Business and Tech Magazines and eBooks

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