Class Password Hacking 2023
Class Password Hacking 2023
Password Hacking
Password Hacking
Password attacks are one of the most
common forms of corporate and
personal data breach.
Hackers steal your passwords through
a variety of methods including data
breaches, password cracking,
guessing, physical theft and malware.
1
9/20/2023
Passwords
Authentication
Passwords
Authentication
Password Guessing
Many passwords can be guessed either by humans or
by sophisticated cracking programs armed with
dictionaries (dictionary based) and the user's personal
information.
2
9/20/2023
3
9/20/2023
Password Guessing
blank (none)
the word "password", "passcode", "admin"
and their derivatives
the user's name or login name
the name of their significant other or another
person (loved one) their birthplace or date of
birth
a pet's name
Password Guessing
4
9/20/2023
Dictionary attack
A dictionary attack is a method used to
attack an authentication system by
trying to determine the password with
the probability of all possible words in
a dictionary.
A dictionary file (a text file full of
dictionary words) is loaded into a
cracking application (such as
L0phtCrack), which is run against user
accounts located by the application.
=
Dictionary attack
5
9/20/2023
6
9/20/2023
7
9/20/2023
Pre-computed dictionary
attack/Rainbow table attack
It is possible to achieve a time–space
tradeoff by pre-computing a list of
hashes of dictionary words and storing
these in a database using the hash as
the key.
A rainbow table is a precomputed table
for caching the outputs of a
cryptographic hash function, usually
for cracking password hashes.
Pre-computed dictionary
attack/Rainbow table attack
8
9/20/2023
Demonstration
9
9/20/2023
Hybrid attack
A hybrid attack will add numbers or symbols
to the filename to successfully crack a
password.
Many people change their passwords by simply
adding a number to the end of their current
password.
The pattern usually takes this form: first
month password is "cat"; second month
password is "cat1"; third month password is
"cat2"; and so on.
The most common combination is a
dictionary and brute force attack.
10
9/20/2023
Hybrid attack
Countering hybrid threats requires a
comprehensive password policy that
enforces multi-factor authentication, blocks
weak words and patterns, scans for
compromised passwords, and encourages
users to create lengthy passphrases.
11
9/20/2023
Default Passwords
Many applications come with a default
password.
VMS used to have a default super-user
password.
Often, the default password is the same as the
default user name.
In principle, the sys-ad changes the default
password.
Recently, applications are no longer shipped
with default passwords.
12
9/20/2023
Default Passwords
A moderately high number of local and
online applications have inbuilt default
passwords that have been configured by
programmers during development stages of
software.
There are lots of applications running on the
internet on which default passwords are
enabled.
So, it is quite easy for an attacker to enter
default password and gain access to
sensitive information.
Default Passwords
Often, the default password is the same as the
default user name.
In principle, the sys-ad changes the default
password.
Recently, applications are no longer shipped with
default passwords.
A list containing default passwords of some of the
most popular applications is available on the
internet.
https://datarecovery.com/rd/default-
passwords/
13
9/20/2023
14
9/20/2023
Password-Guessing Countermeasures
The Server Message Block (SMB) Protocol is a
network file sharing protocol, and as implemented
in Microsoft Windows is known as Microsoft SMB
Protocol.
Samba: standard Windows interoperability suite of programs
for Linux and Unix.
Samba stores its encrypted passwords in a file
called smbpasswd, which by default resides in the
/usr/local/samba/private directory
Use a network firewall to restrict access to SMB
services on TCP 139 and 445
Enforce the use of strong passwords using policy
Set an account-lockout threshold and ensure that it
applies to the built-in Administrator account
Enable audit account logon failures and regularly
review Event Logs
15
9/20/2023
Type of passwords
Plain text password
– Save in text in database.
o Hackers can steal user account database and can find
password with brute force algorithms.
Password hashing
– Password saved in 'n' bits according to hash function.
– MD5
o It is possible for hacker to steal the hashes and reverse
generate password.
Passwords
Windows Passwords
Set or change password Windows generates a LM hash and a
NT hash.
Two hashing functions used to encrypt passwords
– LAN Manager hash (LM hash)
– Password is padded with zeros until there are 14 characters.
– It is then converted to uppercase and split into two 7-character
pieces
– Each half is encrypted using an 8-byte DES (data encryption
standard) key
– Result is combined into a 16-byte, one way hash value
– NT hash (NT hash)
– Converts password to Unicode and uses MD4 hash algorithm to
obtain a 16-byte value
Hashes are stored in the Security Accounts Manager database
– Commonly known as “ SAM” or “the SAM file”
SAM is locked by system kernel when system is running.
– File location: C:\WINNT\SYSTEM32\CONFIG
SYSKEY -Windows function that encrypts the data in the Security32
Accounts Manager (SAM) database
16
9/20/2023
Passwords
Unix Passwords
33
Passwords
Hashing
34
17
9/20/2023
Passwords
Salting
35
Passwords
Salting Advantages
18
9/20/2023
Passwords
Iteration Count
37
Passwords
Shadow
19
9/20/2023
Passwords
Authentication Protocols
39
Passwords
Improving Security
40
20
9/20/2023
21
9/20/2023
Passwords
Fingerprint Authentication
43
Passwords
Iris Authentication
22
9/20/2023
Passwords
Protection/Detection
Protection:
Disable storage of LAN Manager hashes.
Configure both Local and Domain Account Policies
(Password & Account Lockout Policies).
Audit access to important files.
Implement SYSKEY security on all systems.
Set BIOS to boot first from the hard drive.
Password-protect the BIOS.
Enforce strong passwords!
Change your passwords frequently.
Use two or three factor authentication.
Use one time passwords.
45
Bios Password
Stored in CMOS
Remove power from CMOS and CMOS is
reset.
Looses valuable forensic data such as the
system clock.
Some BIOS can be programmatically
cleaned.
Looses valuable forensic data such as the
system clock.
23
9/20/2023
Windows 9x
Windows 9x stores the login password
in .pwl file
in the c:\windows directory
in encrypted form.
Obtain the password from the file.
Use an offline password cracker that
attacks the weak encryption.
Windows 9x
Windows screen saver password is
stored in user.dat file in c:\windows.
Password is in simple ASCII
encryption.
The screen saver password is very
often the system password.
24
9/20/2023
Windows NT and up
Unix
Only hash of password is stored.
Computationally impossible to
calculate password from the hash.
Can use the hash for a dictionary or
brute force attack.
HACKING PASSWORD
C:\ cd windows
C:\ cd windows> ren *.pwl *.xyz
Or
Delete memory by
C:\window>del *.pwl *.xyz.
You can enter by typing any thing
25
9/20/2023
C:\> cd windows
C:\> cd windows > dir *.scr/p
Find screen saver password
C:\>windows>edit/70
or open in notepad.
Now search for the string using CTRL F
26
9/20/2023
Cracking Windows NT
Passwords
The key to cracking Windows NT
passwords lies in SAM (security
account manager) file.
This file contains and stores all
information on both local and remote
accounts including the password
details in encrypted form.
27
9/20/2023
Cracking Windows NT
Passwords
The SAM file is equivalent of the
/etc/passwd file of the Unix operating
system.
If an attacker is able to some how gain
access to the SAM file, the process of
extracting and cracking passwords
becomes a lot easier.
28
9/20/2023
29
9/20/2023
30
9/20/2023
31
9/20/2023
32
9/20/2023
Hacking Truth
The NTFSDOS tool allows attackers to
access all files on the NTFS partition.
If an attacker wants to write to the
vulnerable system, the NTrecover and
NRLocksmith tools can be used.
Both these tools can be downloaded
from http://www.sysinternals.com .
33
9/20/2023
Countermeasures
One simple countermeasure to prevent
attackers from obtaining the SAM file
from the backup directory is to delete
the backup copy of the SAM file.
Corporations should disable the boot
from floppy drive option in the BIOS.
34
9/20/2023
Countermeasures
Until service Pack 2 was released,
windos NT used an extremely unsafe
40-bit encryption key to encrypt
passwords. Attackers could easily
crack such an encryption.
With the release of service Pack 2, an
enhanced 128-bit encryption standard
called SYSKEY was introduced
Countermeasures
One can run SYSKEY by following
process:
(a) Click on Start > Run
(b) Type ‘syskey’ in the space provided and
press enter
35
9/20/2023
Countermeasures
L0phtcrack is unable to display
nonprintable. This mean that if a
password has any nonprintable
character L0phtcrackwill not able to
display it
Attack Scenario
When user provide credentials to login to a
particular website
After clicking on login button a popup window
shows a message ”To remember user name and
password”.
If user selects this option remember the user
name and password.
The attacker can get access to password by
executing JavaScript code as shown in address
bar of the browser that shown in
The attacker can retrieve victim’s password along
with an alert box as
36
9/20/2023
37
9/20/2023
38