Home page logo

nmap-dev logo Nmap Development mailing list archives

New script for detecting FreeBSD remote root vulnerability
From: Fyodor <fyodor () insecure org>
Date: Tue, 27 Dec 2011 17:43:57 -0800

Hi folks!  You may have seen this "Merry Christmas from the FreeBSD
Security Team" note:


Unfortunately, their gift of 5 security advisories is not what your
typical network/systems administrator wanted on Christmas eve.  But
the FreeBSD folks had no choice on the timing since one of the vulns
is a remotely exploitable bug in their telnetd which was already being
exploited in the wild:


Here is a root exploit:


David and Patrik and I were chatting about NSE today and we decided to
write a script to help sysadmins quickly detect this vulnerability on
their networks before attackers do.  Then they can get back to holiday
celebrations ASAP :).  Technically, what our new script detects are
telnet servers which support the encryption option.  In my tests
against thousands of telnet servers on the Internet, that seems to be
fewer than 1% of them.  So it doesn't guarantee that a server is
vulnerable, but it dramatically limits the number you need to look at.

In the interests of expediency, I've already committed this into the
/nmap trunk.  But there is definitely room for improvement if anyone
wants to give it a shot!  In particular, it would probably be pretty
easy to send a payload which overruns the buffers with a bunch
0x4e6d6170 words to see if the telnetd crashes.  Telnetd is normally
spawned by inetd, in which case it should remain available for use or
exploitation even after the crash.  It would also be nice for this
script (particularly with this change) to use the vuln library.

For a vulnerable text box, you can find a FreeBSD 8.2 x86 VMWare
machine on this page:


You can already use the new script from Nmap SVN, or you can download
it individually for your current version of Nmap from its nsedoc page:


You can run it against a network with a command like:

nmap -p23 -PS23 --script telnet-encryption -oA telnetscan -v [networks]

Happy holidays!
Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
  • New script for detecting FreeBSD remote root vulnerability Fyodor (Dec 28)
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]