Ethical Hacking and Penetration Testing Guide


Where Are LM/NTLM Hashes Located?



Yüklə 22,44 Mb.
Pdf görüntüsü
səhifə155/235
tarix07.08.2023
ölçüsü22,44 Mb.
#138846
1   ...   151   152   153   154   155   156   157   158   ...   235
Ethical Hacking and Penetration Testing Guide ( PDFDrive )

Where Are LM/NTLM Hashes Located?
The LM/NTLM hashes are stored inside of the SAM file. The SAM file is located in the 
C:\\Windows\SYSTEM32\CONFIG
directory. While the system is running it’s not possible for us 
to copy or open a SAM file due to the protection that Microsoft has implemented. However, there 
are various techniques/tools that can be used to dump the hashes from a SAM file.


Postexploitation
◾ 
251
Dumping the Hashes
So now that we are done with understanding Windows hashes, the protocol weaknesses, and 
where they are actually located, the next step is to dump hashes so we can use offline methods to 
actually crack them; the great thing about offline cracking methods is that they are completely 
stealthy. There are various ways to dump password hashes, and it depends upon the situation you 
are in. Let’s take a look at some of the scenarios.
Scenario 1—Remote Access
So we have managed to exploit a target and have remote access to it, we can either use a Meterpreter 
script “
Hashdump
” to dump the hashes from the SAM file or use programs such as PWDUMP 
and Fgdump to dump the hashes and copy the file to your system and attempt to crack the hashes. 
Personally, I would prefer the first method as it’s easier.
Hashdump is a script available inside of Metasploit that can help us dump the hashes from the 
SAM file. On a Windows XP machine you need to have at least administrator privileges to dump 
the hashes. On Windows 7 you would need the highest privileges (SYSTEM) to dump hashes. 
Here is how the output of a hashdump looks like; the first hash is the LM hash followed by the “:” 
sign and then the NTLM hash, since LM hashing is not disabled in Windows by default.
Scenario 2—Local Access
In this scenario, we would assume that we don’t have remote access to our target machine; how-
ever, we have physical access to it. In this case we can use pwdump or fgdump to obtain hashes. 
pwdump has the capability to bypass all the restrictions and obtain hashes from the SAM file. 
Fgdump is the updated version of pwdump; it was updated because many antivirus programs were 
able to detect pwdump. So fgdump can bypass some of the restrictions. Windows 7 has an updated 
version of pwdump named pwdump7.
Note
: You need to have at least administrator privileges to run Pwdump or fgdump.

Yüklə 22,44 Mb.

Dostları ilə paylaş:
1   ...   151   152   153   154   155   156   157   158   ...   235




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin