Content deleted Content added
Citation bot (talk | contribs) Alter: url. URLs might have been anonymized. Add: archive-date, archive-url. | Use this bot. Report bugs. | Suggested by BrownHairedGirl | Linked from User:BrownHairedGirl/url=web.archive.org | #UCB_webform_linked 512/2193 |
m format RFCs |
||
(11 intermediate revisions by 9 users not shown) | |||
Line 1:
{{Short description|Internet Protocol Suite service}}
{{distinguish|character generator}}
{{one source|date=October 2015}}
{{Infobox networking protocol
| title = Character Generator Protocol
| logo =
| logo alt =
| image =
| image alt =
| caption =
| is stack = No
| abbreviation = CHARGEN
| purpose = {{Unbulleted list|Testing|Debugging|Measurement}}
| developer = [[Jon Postel]]
| date = {{Start date and age|1983}}
| based on =
| influenced =
| osilayer = [[Application layer]] (7)
| ports = tcp/19, udp/19
| rfcs = {{IETF RFC|864|plainlink=yes}}
| hardware =
}}
{{IPstack}}
The '''Character Generator Protocol''' ('''CHARGEN''') is a service of the [[Internet Protocol Suite]] defined in {{IETF RFC|864}} in 1983 by [[Jon Postel]]. It is intended for testing, debugging, and measurement purposes. The protocol is rarely used, as its design flaws allow for ready misuse.<ref>{{Cite web|url=https://nvd.nist.gov/vuln/detail/CVE-1999-0103|title=NVD - CVE-1999-0103|website=nvd.nist.gov|access-date=2018-02-05}}</ref>
A host may connect to a server that supports the Character Generator Protocol on either [[Transmission Control Protocol]] (TCP) or [[User Datagram Protocol]] (UDP) [[port number]] 19. Upon opening a TCP connection, the server starts sending arbitrary characters to the connecting host and continues until the host closes the connection. In the UDP implementation of the protocol, the server sends a UDP datagram containing a random number (between 0 and 512) of characters every time it receives a datagram from the connecting host. Any data received by the server is discarded.
Line 13 ⟶ 33:
==Applications==
The CHARGEN service may be used as a source of a byte-stream for debugging TCP network code for proper bounds checking and buffer management. It may also be a source of generic payload for bandwidth measurement and/or QoS fine-tuning.{{Citation needed|date=August 2010}}
==Sample session==
Line 126 ⟶ 146:
</pre>
This continues until the TCP connection is closed as shown in the trace by ending the telnet session.
== Visual output simulation ==
For security reasons, most modern machines should have CHARGEN services disabled. The following is a Linux bash script that will simulate the visual appearance of the CHARGEN service in the terminal window. The script can be stopped by pressing {{Keypress|Ctrl|C}}.
<syntaxhighlight lang="bash">
strg=""; for n in {32..126}; do c=`printf '%x' $n | xxd -r -p`; strg=${strg}${c}; done; strg=${strg}${strg}; n=0; while :; do m=n%95; echo "${strg:m:72}"; n=$((n+1)); sleep .1; done;
</syntaxhighlight>
==Abuse==
The service was used maliciously to crash [[Microsoft]] [[Name server|___domain name servers]] (DNS) running [[Windows NT 4.0]] by piping the arbitrary characters straight into the DNS server listening port (<code>telnet ntbox 19 | telnet ntbox 53</code>).<ref>{{cite web|url=http://support.microsoft.com/kb/169461|title=Access Violation in Dns.exe Caused by Malicious Telnet Attack|date=2006-11-01|publisher=Support.microsoft.com|archive-url=https://web.archive.org/web/20140819172557/http://support.microsoft.com/kb/169461|url-status=live|accessdate=2009-05-31|archive-date=2014-08-19}}</ref><ref>{{Cite news|url=
UDP CHARGEN is commonly used in denial-of-service attacks. By using a fake source address the attacker can send bounce traffic off a UDP CHARGEN application to the victim. UDP CHARGEN sends 200 to 1,000 times more data than it receives, depending upon the implementation. This "traffic multiplication" is also attractive to an attacker because it obscures the attacker's IP address from the victim.{{Citation needed|date=April 2024}}
CHARGEN was widely implemented on network-connected printers. As printer firmware was rarely updated on older models before CHARGEN and other security concerns were known, there may still be many network-connected printers which implement the protocol. Where these are visible to the Internet, they are invariably misused as denial of service vectors. Potential attackers often scan networks looking for UDP port 19 CHARGEN sources.
So notorious is the availability of CHARGEN in [[Printer (computing)|printers]] that some [[Denial-of-service attack|distributed denial of service]] trojans now use UDP port 19 for their attack traffic. The supposed aim is to throw investigators off the track; to have them looking for old printers rather than subverted computers.{{Citation needed|date=April 2024}}
==See also==
{{Portal|Internet}}
* [[Barber pole#Computer science|Barber pole]]
* [[Echo Protocol]]
|