The vsftpd 2.3.4 tarball on the master site held a backdoor, live from 30 June to 3 July 2011.
A user who logged in with a name that contained the characters :) got a command shell on port 6200. The CVE is CVE-2011-2523.
The original code had no flaw. The attacker changed the file in the distribution channel.
What happened
An unknown attacker uploaded a different version of vsftpd 2.3.4 to the master download site.
- The change was in
str.c. - A user name that begins with the bytes
0x3a 0x29(the characters:)) runs the functionvsf_sysutil_extra(). - That function opens a TCP socket on port 6200 and starts
/bin/shon it. - A valid user name character must come before the smiley, for example
X:). - The shell needed no valid password. It worked for anyone who can reach both the FTP port and port 6200.
The archive was tampered with between 30 June and 1 July 2011. The author, Chris Evans, found it on 3 July 2011 and removed it that day.
Affected versions
- vsftpd 2.3.4, from the tarball
vsftpd-2.3.4.tar.gzon the master site from 30 June to 3 July 2011. - The sources name no other versions and no copies from other sources.
Indicators of compromise
- A user name that contains
:)in FTP logs. - A listener on TCP port
6200on the FTP server. - The byte sequence
0x3a29and the function namevsf_sysutil_extrain the source filestr.c.
How to check
If you built vsftpd from a 2.3.4 tarball, search the source. Any match means the tarball is the backdoored one.
grep -rn "vsf_sysutil_extra" vsftpd-2.3.4/
To check a running server, look for a listener on port 6200.
ss -ltnp | grep :6200
What to do now
- Upgrade to a patched version of vsftpd later than 2.3.4, from a source that you trust.
- If a server ran the backdoored build, treat it as compromised. The shell ran with the rights of the server process, so rebuild the host.
- Block inbound traffic to port 6200 at the firewall.
- Check downloaded source against the author's GPG signature.
Frequently asked questions
Where did the download move?
Evans moved the main download to a new site on Google App Engine.
Who were the victims?
The sources give no list of victims.
Sources
Send this page to the person who looks after AI at your company.