<s>
The	O
Character	B-Protocol
Generator	I-Protocol
Protocol	I-Protocol
(	O
CHARGEN	B-Protocol
)	O
is	O
a	O
service	O
of	O
the	O
Internet	B-Protocol
Protocol	I-Protocol
Suite	I-Protocol
defined	O
in	O
in	O
1983	O
by	O
Jon	O
Postel	O
.	O
</s>
<s>
A	O
host	O
may	O
connect	O
to	O
a	O
server	O
that	O
supports	O
the	O
Character	B-Protocol
Generator	I-Protocol
Protocol	I-Protocol
on	O
either	O
Transmission	B-Protocol
Control	I-Protocol
Protocol	I-Protocol
(	O
TCP	O
)	O
or	O
User	B-Protocol
Datagram	I-Protocol
Protocol	I-Protocol
(	O
UDP	O
)	O
port	B-Protocol
number	I-Protocol
19	O
.	O
</s>
<s>
On	O
most	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
,	O
a	O
CHARGEN	B-Protocol
server	O
is	O
built	O
into	O
the	O
inetd	B-Protocol
or	O
xinetd	B-Operating_System
daemon	B-Operating_System
.	O
</s>
<s>
The	O
CHARGEN	B-Protocol
service	O
is	O
usually	O
not	O
enabled	O
by	O
default	O
.	O
</s>
<s>
It	O
may	O
be	O
enabled	O
by	O
adding	O
the	O
following	O
lines	O
to	O
the	O
file	O
and	O
telling	O
inetd	B-Protocol
to	O
reload	O
its	O
configuration	O
:	O
</s>
<s>
The	O
CHARGEN	B-Protocol
service	O
may	O
be	O
used	O
as	O
a	O
source	O
of	O
a	O
byte-stream	O
for	O
debugging	O
TCP	O
network	O
code	O
for	O
proper	O
bounds	O
checking	O
and	O
buffer	O
management	O
.	O
</s>
<s>
Consideration	O
must	O
be	O
given	O
if	O
hardware	O
compression	O
is	O
active	O
,	O
as	O
the	O
output	O
from	O
the	O
CHARGEN	B-Protocol
service	O
is	O
easily	O
and	O
efficiently	O
compressed	O
.	O
</s>
<s>
A	O
typical	O
CHARGEN	B-Protocol
service	O
session	O
looks	O
like	O
this	O
:	O
The	O
user	O
connects	O
to	O
the	O
host	O
using	O
a	O
telnet	B-Protocol
client	O
.	O
</s>
<s>
The	O
user	O
receives	O
a	O
stream	O
of	O
bytes	B-Application
.	O
</s>
<s>
Although	O
the	O
specific	O
format	O
of	O
the	O
output	O
is	O
not	O
prescribed	O
by	O
,	O
the	O
recommended	O
pattern	O
(	O
and	O
a	O
de	O
facto	O
standard	O
)	O
is	O
shifted	O
lines	O
of	O
72	O
ASCII	B-Protocol
characters	I-Protocol
repeating	O
.	O
</s>
<s>
This	O
continues	O
until	O
the	O
TCP	O
connection	O
is	O
closed	O
as	O
shown	O
in	O
the	O
trace	O
by	O
ending	O
the	O
telnet	B-Protocol
session	O
.	O
</s>
<s>
The	O
service	O
was	O
used	O
maliciously	O
to	O
crash	O
Microsoft	O
domain	B-Protocol
name	I-Protocol
servers	I-Protocol
(	O
DNS	O
)	O
running	O
Windows	B-Device
NT	I-Device
4.0	I-Device
by	O
piping	O
the	O
arbitrary	O
characters	O
straight	O
into	O
the	O
DNS	B-Protocol
server	I-Protocol
listening	O
port	O
(	O
telnet	B-Protocol
ntbox	O
19	O
|	O
telnet	B-Protocol
ntbox	O
53	O
)	O
.	O
</s>
<s>
However	O
,	O
the	O
attack	O
may	O
have	O
been	O
a	O
symptom	O
of	O
improper	O
buffer	O
management	O
on	O
the	O
part	O
of	O
Microsoft	O
's	O
DNS	O
service	O
and	O
not	O
directly	O
related	O
to	O
the	O
CHARGEN	B-Protocol
service	O
.	O
</s>
<s>
UDP	O
CHARGEN	B-Protocol
is	O
commonly	O
used	O
in	O
denial-of-service	O
attacks	O
.	O
</s>
<s>
By	O
using	O
a	O
fake	O
source	O
address	O
the	O
attacker	O
can	O
send	O
bounce	O
traffic	O
off	O
a	O
UDP	O
CHARGEN	B-Protocol
application	O
to	O
the	O
victim	O
.	O
</s>
<s>
UDP	O
CHARGEN	B-Protocol
sends	O
200	O
to	O
1,000	O
times	O
more	O
data	O
than	O
it	O
receives	O
,	O
depending	O
upon	O
the	O
implementation	O
.	O
</s>
<s>
CHARGEN	B-Protocol
was	O
widely	O
implemented	O
on	O
network-connected	O
printers	O
.	O
</s>
<s>
As	O
printer	O
firmware	O
was	O
rarely	O
updated	O
on	O
older	O
models	O
before	O
CHARGEN	B-Protocol
and	O
other	O
security	O
concerns	O
were	O
known	O
,	O
there	O
may	O
still	O
be	O
many	O
network-connected	O
printers	O
which	O
implement	O
the	O
protocol	O
.	O
</s>
<s>
Potential	O
attackers	O
often	O
scan	O
networks	O
looking	O
for	O
UDP	O
port	O
19	O
CHARGEN	B-Protocol
sources	O
.	O
</s>
<s>
So	O
notorious	O
is	O
the	O
availability	O
of	O
CHARGEN	B-Protocol
in	O
printers	O
that	O
some	O
distributed	O
denial	O
of	O
service	O
trojans	O
now	O
use	O
UDP	O
port	O
19	O
for	O
their	O
attack	O
traffic	O
.	O
</s>
