<s>
LAN	B-Algorithm
Manager	I-Algorithm
is	O
a	O
discontinued	O
network	B-Protocol
operating	I-Protocol
system	I-Protocol
(	O
NOS	O
)	O
available	O
from	O
multiple	O
vendors	O
and	O
developed	O
by	O
Microsoft	O
in	O
cooperation	O
with	O
3Com	O
Corporation	O
.	O
</s>
<s>
It	O
was	O
designed	O
to	O
succeed	O
3Com	O
's	O
3+Share	B-General_Concept
network	B-Application
server	I-Application
software	O
which	O
ran	O
atop	O
a	O
heavily	O
modified	O
version	O
of	O
MS-DOS	B-Application
.	O
</s>
<s>
The	O
LAN	B-Algorithm
Manager	I-Algorithm
OS/2	B-Application
operating	O
system	O
was	O
co-developed	O
by	O
IBM	O
and	O
Microsoft	O
,	O
using	O
the	O
Server	B-Operating_System
Message	I-Operating_System
Block	I-Operating_System
(	O
SMB	B-Operating_System
)	O
protocol	O
.	O
</s>
<s>
It	O
originally	O
used	O
SMB	B-Operating_System
atop	O
either	O
the	O
NetBIOS	B-Protocol
Frames	I-Protocol
(	O
NBF	O
)	O
protocol	O
or	O
a	O
specialized	O
version	O
of	O
the	O
Xerox	B-Protocol
Network	I-Protocol
Systems	I-Protocol
(	O
XNS	O
)	O
protocol	O
.	O
</s>
<s>
These	O
legacy	O
protocols	O
had	O
been	O
inherited	O
from	O
previous	O
products	O
such	O
as	O
MS-Net	B-Application
for	O
MS-DOS	B-Application
,	O
Xenix-NET	O
for	O
MS-Xenix	B-Application
,	O
and	O
the	O
afore-mentioned	O
3+Share	B-General_Concept
.	O
</s>
<s>
A	O
version	O
of	O
LAN	B-Algorithm
Manager	I-Algorithm
for	O
Unix-based	O
systems	O
called	O
LAN	O
Manager/X	O
was	O
also	O
available	O
.	O
</s>
<s>
LAN	O
Manager/X	O
was	O
the	O
basis	O
for	O
Digital	O
Equipment	O
Corporation	O
's	O
Pathworks	B-Application
product	O
for	O
OpenVMS	B-Operating_System
,	O
Ultrix	B-Operating_System
and	O
Tru64	B-Operating_System
.	O
</s>
<s>
In	O
1990	O
,	O
Microsoft	O
announced	O
LAN	B-Algorithm
Manager	I-Algorithm
2.0	O
with	O
a	O
host	O
of	O
improvements	O
,	O
including	O
support	O
for	O
TCP/IP	B-Protocol
as	O
a	O
transport	O
protocol	O
for	O
SMB	B-Operating_System
,	O
using	O
NetBIOS	B-Protocol
over	O
TCP/IP	B-Protocol
(	O
NBT	O
)	O
.	O
</s>
<s>
The	O
last	O
version	O
of	O
LAN	B-Algorithm
Manager	I-Algorithm
,	O
2.2	O
,	O
which	O
included	O
an	O
MS-OS/2	O
1.31	O
base	O
operating	O
system	O
,	O
remained	O
Microsoft	O
's	O
strategic	O
server	O
system	O
until	O
the	O
release	O
of	O
Windows	B-Device
NT	I-Device
Advanced	I-Device
Server	I-Device
in	O
1993	O
.	O
</s>
<s>
The	O
LM	O
hash	B-Algorithm
is	O
computed	O
as	O
follows	O
:	O
</s>
<s>
These	O
values	O
are	O
used	O
to	O
create	O
two	O
DES	B-Algorithm
keys	O
,	O
one	O
from	O
each	O
7-byte	O
half	O
,	O
by	O
converting	O
the	O
seven	O
bytes	O
into	O
a	O
bit	O
stream	O
with	O
the	O
most	O
significant	O
bit	O
first	O
,	O
and	O
inserting	O
a	O
parity	B-Error_Name
bit	I-Error_Name
after	O
every	O
seven	O
bits	O
(	O
so	O
1010100	O
becomes	O
10101000	O
)	O
.	O
</s>
<s>
This	O
generates	O
the	O
64	O
bits	O
needed	O
for	O
a	O
DES	B-Algorithm
key	O
.	O
</s>
<s>
(	O
A	O
DES	B-Algorithm
key	O
ostensibly	O
consists	O
of	O
64	O
bits	O
;	O
however	O
,	O
only	O
56	O
of	O
these	O
are	O
actually	O
used	O
by	O
the	O
algorithm	O
.	O
</s>
<s>
The	O
parity	B-Error_Name
bits	I-Error_Name
added	O
in	O
this	O
step	O
are	O
later	O
discarded	O
.	O
)	O
</s>
<s>
Each	O
of	O
the	O
two	O
keys	O
is	O
used	O
to	O
DES-encrypt	O
the	O
constant	O
ASCII	B-Protocol
string	O
“	O
KGS	O
!	O
</s>
<s>
The	O
DES	B-Algorithm
CipherMode	O
should	O
be	O
set	O
to	O
ECB	O
,	O
and	O
PaddingMode	O
should	O
be	O
set	O
to	O
NONE	O
.	O
</s>
<s>
These	O
two	O
ciphertext	O
values	O
are	O
concatenated	O
to	O
form	O
a	O
16-byte	O
value	O
,	O
which	O
is	O
the	O
LM	O
hash	B-Algorithm
.	O
</s>
<s>
LAN	B-Algorithm
Manager	I-Algorithm
authentication	O
uses	O
a	O
particularly	O
weak	O
method	O
of	O
hashing	B-Algorithm
a	O
user	O
's	O
password	O
known	O
as	O
the	O
LM	B-Algorithm
hash	I-Algorithm
algorithm	I-Algorithm
,	O
stemming	O
from	O
the	O
mid	O
1980s	O
when	O
viruses	O
transmitted	O
by	O
floppy	O
disks	O
were	O
the	O
major	O
concern	O
.	O
</s>
<s>
Although	O
it	O
is	O
based	O
on	O
DES	B-Algorithm
,	O
a	O
well-studied	O
block	O
cipher	O
,	O
the	O
LM	O
hash	B-Algorithm
has	O
several	O
weaknesses	O
in	O
its	O
design	O
.	O
</s>
<s>
This	O
makes	O
such	O
hashes	B-Algorithm
crackable	O
in	O
a	O
matter	O
of	O
seconds	O
using	O
rainbow	B-Algorithm
tables	I-Algorithm
,	O
or	O
in	O
a	O
few	O
minutes	O
using	O
brute	O
force	O
.	O
</s>
<s>
Starting	O
with	O
Windows	B-Device
NT	I-Device
,	O
it	O
was	O
replaced	O
by	O
NTLM	O
,	O
which	O
is	O
still	O
vulnerable	O
to	O
rainbow	B-Algorithm
tables	I-Algorithm
,	O
and	O
brute	O
force	O
attacks	O
unless	O
long	O
,	O
unpredictable	O
passwords	O
are	O
used	O
,	O
see	O
password	O
cracking	O
.	O
</s>
<s>
NTLM	O
is	O
used	O
for	O
logon	O
with	O
local	O
accounts	O
except	O
on	O
domain	O
controllers	O
since	O
Windows	B-Application
Vista	I-Application
and	O
later	O
versions	O
no	O
longer	O
maintain	O
the	O
LM	O
hash	B-Algorithm
by	O
default	O
.	O
</s>
<s>
Kerberos	B-Protocol
is	O
used	O
in	O
Active	B-Protocol
Directory	I-Protocol
Environments	O
.	O
</s>
<s>
The	O
major	O
weaknesses	O
of	O
LAN	B-Algorithm
Manager	I-Algorithm
authentication	O
protocol	O
are	O
:	O
</s>
<s>
Password	O
length	O
is	O
limited	O
to	O
a	O
maximum	O
of	O
14	O
characters	O
chosen	O
from	O
the	O
95	O
ASCII	B-Protocol
printable	O
characters	O
.	O
</s>
<s>
All	O
passwords	O
are	O
converted	O
into	O
uppercase	O
before	O
generating	O
the	O
hash	B-Algorithm
value	O
.	O
</s>
<s>
Hence	O
LM	O
hash	B-Algorithm
treats	O
PassWord	O
,	O
password	O
,	O
PaSsWoRd	O
,	O
PASSword	O
and	O
other	O
similar	O
combinations	O
same	O
as	O
PASSWORD	O
.	O
</s>
<s>
This	O
practice	O
effectively	O
reduces	O
the	O
LM	O
hash	B-Algorithm
key	O
space	O
to	O
69	O
characters	O
.	O
</s>
<s>
A	O
14-character	O
password	O
is	O
broken	O
into	O
7+7	O
characters	O
and	O
the	O
hash	B-Algorithm
is	O
calculated	O
for	O
each	O
half	O
separately	O
.	O
</s>
<s>
This	O
way	O
of	O
calculating	O
the	O
hash	B-Algorithm
makes	O
it	O
dramatically	O
easier	O
to	O
crack	O
,	O
as	O
the	O
attacker	O
only	O
needs	O
to	O
brute-force	O
7	O
characters	O
twice	O
instead	O
of	O
the	O
full	O
14	O
characters	O
.	O
</s>
<s>
As	O
of	O
2020	O
,	O
a	O
computer	O
equipped	O
with	O
a	O
high-end	O
graphics	B-Architecture
processor	I-Architecture
(	O
GPUs	B-Architecture
)	O
can	O
compute	O
40	O
billion	O
LM-hashes	O
per	O
second	O
.	O
</s>
<s>
If	O
the	O
password	O
is	O
7	O
characters	O
or	O
less	O
,	O
then	O
the	O
second	O
half	O
of	O
hash	B-Algorithm
will	O
always	O
produce	O
same	O
constant	O
value	O
(	O
0xAAD3B435B51404EE	O
)	O
.	O
</s>
<s>
Therefore	O
,	O
a	O
password	O
is	O
less	O
than	O
or	O
equal	O
to	O
7	O
characters	O
long	O
can	O
be	O
identified	O
visibly	O
without	O
using	O
tools	O
(	O
though	O
with	O
high	O
speed	O
GPU	B-Architecture
attacks	O
,	O
this	O
matters	O
less	O
)	O
.	O
</s>
<s>
The	O
hash	B-Algorithm
value	O
is	O
sent	O
to	O
network	B-Application
servers	I-Application
without	O
salting	O
,	O
making	O
it	O
susceptible	O
to	O
man-in-the-middle	O
attacks	O
such	O
as	O
replay	O
the	O
hash	B-Algorithm
.	O
</s>
<s>
Without	O
salt	O
,	O
time	O
–	O
memory	O
tradeoff	O
pre-computed	O
dictionary	O
attacks	O
,	O
such	O
as	O
a	O
rainbow	B-Algorithm
table	I-Algorithm
,	O
are	O
feasible	O
.	O
</s>
<s>
In	O
2003	O
,	O
Ophcrack	B-Application
,	O
an	O
implementation	O
of	O
the	O
rainbow	B-Algorithm
table	I-Algorithm
technique	O
,	O
was	O
published	O
.	O
</s>
<s>
It	O
specifically	O
targets	O
the	O
weaknesses	O
of	O
LM	O
encryption	O
,	O
and	O
includes	O
pre-computed	O
data	O
sufficient	O
to	O
crack	O
virtually	O
all	O
alphanumeric	O
LM	O
hashes	B-Algorithm
in	O
a	O
few	O
seconds	O
.	O
</s>
<s>
Many	O
cracking	O
tools	O
,	O
such	O
as	O
RainbowCrack	B-General_Concept
,	O
Hashcat	B-Application
,	O
L0phtCrack	B-Application
and	O
Cain	B-Protocol
,	O
now	O
incorporate	O
similar	O
attacks	O
and	O
make	O
cracking	O
of	O
LM	O
hashes	B-Algorithm
fast	O
and	O
trivial	O
.	O
</s>
<s>
To	O
address	O
the	O
security	O
weaknesses	O
inherent	O
in	O
LM	O
encryption	O
and	O
authentication	O
schemes	O
,	O
Microsoft	O
introduced	O
the	O
NTLMv1	O
protocol	O
in	O
1993	O
with	O
Windows	B-Device
NT	I-Device
3.1	I-Device
.	O
</s>
<s>
For	O
hashing	B-Algorithm
,	O
NTLM	O
uses	O
Unicode	O
support	O
,	O
replacing	O
LMhash	O
=D	O
ESeach(DOSCHARSET(UPPERCASE(password )	O
)	O
,	O
"	O
KGS	O
!	O
</s>
<s>
@#$%	O
"	O
)	O
by	O
NThash	O
=	O
MD4(UTF-16-LE(password )	O
)	O
,	O
which	O
does	O
not	O
require	O
any	O
padding	O
or	O
truncating	O
that	O
would	O
simplify	O
the	O
key	O
.	O
</s>
<s>
On	O
the	O
negative	O
side	O
,	O
the	O
same	O
DES	B-Algorithm
algorithm	O
was	O
used	O
with	O
only	O
56-bit	O
encryption	O
for	O
the	O
subsequent	O
authentication	O
steps	O
,	O
and	O
there	O
is	O
still	O
no	O
salting	O
.	O
</s>
<s>
Furthermore	O
,	O
Windows	O
machines	O
were	O
for	O
many	O
years	O
configured	O
by	O
default	O
to	O
send	O
and	O
accept	O
responses	O
derived	O
from	O
both	O
the	O
LM	O
hash	B-Algorithm
and	O
the	O
NTLM	O
hash	B-Algorithm
,	O
so	O
the	O
use	O
of	O
the	O
NTLM	O
hash	B-Algorithm
provided	O
no	O
additional	O
security	O
while	O
the	O
weaker	O
hash	B-Algorithm
was	O
still	O
present	O
.	O
</s>
<s>
While	O
LAN	B-Algorithm
Manager	I-Algorithm
is	O
considered	O
obsolete	O
and	O
current	O
Windows	O
operating	O
systems	O
use	O
the	O
stronger	O
NTLMv2	O
or	O
Kerberos	B-Protocol
authentication	O
methods	O
,	O
Windows	O
systems	O
before	O
Windows	O
Vista/Windows	O
Server	O
2008	O
enabled	O
the	O
LAN	B-Algorithm
Manager	I-Algorithm
hash	B-Algorithm
by	O
default	O
for	O
backward	B-General_Concept
compatibility	I-General_Concept
with	O
legacy	O
LAN	B-Algorithm
Manager	I-Algorithm
and	O
Windows	B-Device
ME	I-Device
or	O
earlier	O
clients	O
,	O
or	O
legacy	O
NetBIOS-enabled	O
applications	O
.	O
</s>
<s>
Starting	O
with	O
Windows	B-Application
Vista	I-Application
and	O
Windows	B-Device
Server	I-Device
2008	I-Device
,	O
Microsoft	O
disabled	O
the	O
LM	O
hash	B-Algorithm
by	O
default	O
;	O
the	O
feature	O
can	O
be	O
enabled	O
for	O
local	O
accounts	O
via	O
a	O
security	O
policy	O
setting	O
,	O
and	O
for	O
Active	B-Protocol
Directory	I-Protocol
accounts	O
by	O
applying	O
the	O
same	O
setting	O
via	O
domain	O
Group	O
Policy	O
.	O
</s>
<s>
The	O
same	O
method	O
can	O
be	O
used	O
to	O
turn	O
the	O
feature	O
off	O
in	O
Windows	B-Application
2000	I-Application
,	O
Windows	O
XP	O
and	O
NT	O
.	O
</s>
<s>
Users	O
can	O
also	O
prevent	O
a	O
LM	O
hash	B-Algorithm
from	O
being	O
generated	O
for	O
their	O
own	O
password	O
by	O
using	O
a	O
password	O
at	O
least	O
fifteen	O
characters	O
in	O
length	O
.	O
</s>
<s>
NTLM	O
hashes	B-Algorithm
have	O
in	O
turn	O
become	O
vulnerable	O
in	O
recent	O
years	O
to	O
various	O
attacks	O
that	O
effectively	O
make	O
them	O
as	O
weak	O
today	O
as	O
LanMan	O
hashes	B-Algorithm
were	O
back	O
in	O
1998	O
.	O
</s>
<s>
Many	O
legacy	O
third	O
party	O
SMB	B-Operating_System
implementations	O
have	O
taken	O
considerable	O
time	O
to	O
add	O
support	O
for	O
the	O
stronger	O
protocols	O
that	O
Microsoft	O
has	O
created	O
to	O
replace	O
LM	O
hashing	B-Algorithm
because	O
the	O
open	B-Application
source	I-Application
communities	O
supporting	O
these	O
libraries	O
first	O
had	O
to	O
reverse	O
engineer	O
the	O
newer	O
protocols	O
—	O
Samba	B-Language
took	O
5	O
years	O
to	O
add	O
NTLMv2	O
support	O
,	O
while	O
JCIFS	B-Operating_System
took	O
10	O
years	O
.	O
</s>
<s>
+	O
Availability	O
of	O
NTLM	O
protocols	O
to	O
replace	O
LM	O
authentication	O
Product	O
NTLMv1	O
support	O
NTLMv2	O
support	O
Windows	B-Device
NT	I-Device
3.1	I-Device
RTM	O
(	O
1993	O
)	O
Not	O
supported	O
Windows	B-Device
NT	I-Device
3.5	I-Device
RTM	O
(	O
1994	O
)	O
Not	O
supported	O
Windows	B-Device
NT	I-Device
3.51	I-Device
RTM	O
(	O
1995	O
)	O
Not	O
supported	O
Windows	B-Device
NT	I-Device
4	I-Device
RTM	O
(	O
1996	O
)	O
Service	O
Pack	O
4	O
(	O
25	O
October	O
1998	O
)	O
Windows	B-Application
95	I-Application
Not	O
supported	O
Directory	O
services	O
client	O
(	O
released	O
with	O
Windows	B-Application
2000	I-Application
Server	O
,	O
17	O
February	O
2000	O
)	O
Windows	B-Device
98	I-Device
RTM	O
Directory	O
services	O
client	O
(	O
released	O
with	O
Windows	B-Application
2000	I-Application
Server	O
,	O
17	O
February	O
2000	O
)	O
Windows	B-Application
2000	I-Application
RTM	O
(	O
17	O
February	O
2000	O
)	O
RTM	O
(	O
17	O
February	O
2000	O
)	O
Windows	B-Device
Me	I-Device
RTM	O
(	O
14	O
September	O
2000	O
)	O
Directory	O
services	O
client	O
(	O
released	O
with	O
Windows	B-Application
2000	I-Application
Server	O
,	O
17	O
February	O
2000	O
)	O
Samba	B-Language
?	O
</s>
<s>
Poor	O
patching	O
regimes	O
subsequent	O
to	O
software	O
releases	O
supporting	O
the	O
feature	O
becoming	O
available	O
have	O
contributed	O
to	O
some	O
organisations	O
continuing	O
to	O
use	O
LM	O
Hashing	B-Algorithm
in	O
their	O
environments	O
,	O
even	O
though	O
the	O
protocol	O
is	O
easily	O
disabled	O
in	O
Active	B-Protocol
Directory	I-Protocol
itself	O
.	O
</s>
<s>
Lastly	O
,	O
prior	O
to	O
the	O
release	O
of	O
Windows	B-Application
Vista	I-Application
,	O
many	O
unattended	O
build	O
processes	O
still	O
used	O
a	O
DOS	B-Device
boot	O
disk	O
(	O
instead	O
of	O
Windows	O
PE	O
)	O
to	O
start	O
the	O
installation	O
of	O
Windows	O
using	O
WINNT.EXE	B-Device
,	O
something	O
that	O
requires	O
LM	O
hashing	B-Algorithm
to	O
be	O
enabled	O
for	O
the	O
legacy	O
LAN	B-Algorithm
Manager	I-Algorithm
networking	O
stack	O
to	O
work	O
.	O
</s>
