Skip to content
RCE Write-up Advanced

Inside vsftpd 2.3.4 - When Curiosity Goes Low-Level

The vsftpd 2.3.4 source archive was tampered with to include a backdoor that triggers when a username contains the sequence ':)' and opens a listening shell on TCP port 6200. An attacker could connect to that port and obtain a shell without authentication.

Bian Yuxuan Jonathan Follow

Published on medium.com

As of writing this, I’m a Year 2 student at the University of Technology Sydney (UTS). This all started with a university assignment for Systems Security, where we could choose a vulnerability from the OWASP Top 10 or Metasploitable 2 and explore both how it could be exploited and defended against.

Bian Yuxuan Jonathan, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The distributed source code of vsftpd 2.3.4 was modified to include a backdoor function that checks for the ':)' sequence in a username and then spawns a shell.

Impact

An attacker could connect to port 6200 and obtain a shell on the vulnerable server without authentication.

What the attacker needed

Vsftpd 2.3.4 backdoored version; network access to port 6200

How it was found

  1. Transfer the vsftpd binary from the vulnerable machine to an analysis machine.
  2. Disassemble the binary and locate the code that checks for the ':)' sequence.
  3. Follow the call to the backdoor function and observe socket creation, bind to port 6200, and listen.
  4. Observe accept, close of standard file descriptors, dup2 redirection, and execl of /bin/sh.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A backdoor is a hidden way to access a program that bypasses normal login. In this case, the FTP server software was modified so that if someone typed a username containing a smiley face, the server secretly started a command shell listening on a network port. Anyone who could reach that port could then run commands on the server.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Bian Yuxuan Jonathan

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.