cbcvebase.
CVE-2011-4862
published 2011-12-25

CVE-2011-4862: Buffer overflow in libtelnet/encrypt.c in telnetd in FreeBSD 7.3 through 9.0, MIT Kerberos Version 5 Applications (aka krb5-appl) 1.0.2 and earlier, Heimdal…

PriorityP181critical10CVSS 2.0
AVNACLAuNCCICAC
ITWEXPLOITVulnCheck KEVInitial access
Exploited in the wild
EPSS
95.10%
99.9th percentile
Buffer overflow in libtelnet/encrypt.c in telnetd in FreeBSD 7.3 through 9.0, MIT Kerberos Version 5 Applications (aka krb5-appl) 1.0.2 and earlier, Heimdal 1.5.1 and earlier, GNU inetutils, and possibly other products allows remote attackers to execute arbitrary code via a long encryption key, as exploited in the wild in December 2011.

Affected

37 ranges· showing 25
VendorProductVersion rangeFixed in
ciscoironport_appliances_telnet
debiandebian_linux
debiandebian_linux
debiandebian_linux
debianheimdal< heimdal 1.5.dfsg.1-1 (bookworm)heimdal 1.5.dfsg.1-1 (bookworm)
debianinetutils< heimdal 1.5.dfsg.1-1 (bookworm)heimdal 1.5.dfsg.1-1 (bookworm)
debiankrb5< heimdal 1.5.dfsg.1-1 (bookworm)heimdal 1.5.dfsg.1-1 (bookworm)
fedoraprojectfedora
fedoraprojectfedora
freebsdfreebsd7.3 – 9.0
gnuinetutils< 1.91.9
gnuinetutils>= 0 < 2:1.8-62:1.8-6
gnuinetutils>= 0 < 2:1.8-62:1.8-6
gnuinetutils>= 0 < 2:1.8-62:1.8-6
gnuinetutils>= 0 < 2:1.8-62:1.8-6
heimdal_projectheimdal<= 1.5.1
heimdal_projectheimdal>= 0 < 1.5.dfsg.1-11.5.dfsg.1-1
heimdal_projectheimdal>= 0 < 1.5.dfsg.1-11.5.dfsg.1-1
heimdal_projectheimdal>= 0 < 1.5.dfsg.1-11.5.dfsg.1-1
heimdal_projectheimdal>= 0 < 1.5.dfsg.1-11.5.dfsg.1-1
mitkrb5>= 0 < 1.8+dfsg~aa+r23527-11.8+dfsg~aa+r23527-1
mitkrb5>= 0 < 1.8+dfsg~aa+r23527-11.8+dfsg~aa+r23527-1
mitkrb5>= 0 < 1.8+dfsg~aa+r23527-11.8+dfsg~aa+r23527-1
mitkrb5>= 0 < 1.8+dfsg~aa+r23527-11.8+dfsg~aa+r23527-1
mitkrb5-appl<= 1.0.2

Detection & IOCsextracted from sources · hover to see the quote

pathlibtelnet/encrypt.c
filenametelnetd-encrypt_keyid.c
urlhttp://www.exploit-db.com/exploits/18280/
bytes
\xff\xfa\x26\x00\x01\x01\x12\x13\x14\x15\x16\x17\x18\x19\xff\xf0
bytes
\xff\xfa\x26\x07
bytes
\xff\xfa\x26\x02\x01
bytes
\xeb\x76
bytes
\xeb\x46
bytes
\x31\xc0\x50\xb0\x17\x50\xcd\x80\x50\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x50\x54\x53\x50\xb0\x3b\xcd\x80
bytes
\x31\xc9\xf7\xe1\x51\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\xb0\x0b\xcd\x80
bytes
\xff\xfa\x26\x00\x01\x01\x12\x13\x14\x15\x16\x17\x18\x19\xff\xf0
bytes
\xff\xfa\x26\x07
  • Detect exploit by matching the telnet ENCRYPT SUPPORT suboption initiation sequence (IAC SB ENCRYPT SUPPORT ... IAC SE) followed immediately by an oversized ENCRYPT ENC_KEYID suboption (IAC SB ENCRYPT ENC_KEYID <400-byte key> IAC SE) on port 23.
  • Flag any telnet session where the ENCRYPT ENC_KEYID suboption payload (\xff\xfa\x26\x07) is followed by more than 64 bytes before the IAC SE (\xff\xf0) terminator, as MAXKEYLEN is defined as 63 bytes.
  • The exploit sends the malicious payload twice in sequence; detecting two rapid identical oversized ENC_KEYID suboptions from the same source within 500ms is a strong indicator of exploitation.
  • Look for the short-jump NOP sled marker bytes \xeb\x76 at offset 0 of the ENC_KEYID key data, which is characteristic of both the Linux and FreeBSD Metasploit exploit modules.
  • The exploit requires the target to respond with \xff\xfa\x26\x02\x01 (IAC SB ENCRYPT IS DES_CFB64) to confirm encryption support before sending the overflow; absence of this response causes the exploit to abort.
  • The C exploit uses a brute-force loop with a configurable delay (BRUTE_TOUT) and sends the string 'echo pikachu' to verify shell access; monitor for this string on telnet sessions.
  • Use the Metasploit auxiliary scanner module telnet_encrypt_overflow to detect vulnerable telnetd instances before exploitation.
  • ·The vulnerability only affects BSD-derived telnetd implementations (inetutils, krb5-telnet, Heimdal, FreeBSD telnetd). Most Linux distributions ship NetKit-derived telnetd which is NOT affected.
  • ·The exploit requires that the telnetd instance has encryption support compiled in and enabled; if the server does not respond with the encryption acknowledgement, the exploit aborts.
  • ·The brute-force delay constant BRUTE_TOUT must be tuned based on the target inetd connection rate limit (e.g., 900000µs for 60 conn/min, 1500000µs for 40 conn/min) to avoid triggering connection throttling.
  • ·The Telnet protocol requires 0xff bytes in the payload to be escaped as 0xff 0xff; the exploit handles this automatically, which may affect byte-pattern matching in IDS signatures.

CVSS provenance

nvdv2.010.0CRITICALAV:N/AC:L/Au:N/C:C/I:C/A:C
osv10.0CRITICAL
vulncheck10.0CRITICAL
vendor_cisco10.0CRITICAL
vendor_debian10.0HIGH
vendor_redhat10.0CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.