Rapid7 Vulnerability & Exploit Database

tnftp "savefile" Arbitrary Command Execution

Back to Search

tnftp "savefile" Arbitrary Command Execution



This module exploits an arbitrary command execution vulnerability in tnftp's handling of the resolved output filename - called "savefile" in the source - from a requested resource. If tnftp is executed without the -o command-line option, it will resolve the output filename from the last component of the requested resource. If the output filename begins with a "|" character, tnftp will pass the fetched resource's output to the command directly following the "|" character through the use of the popen() function.


  • Jared McNeill
  • wvu <wvu@metasploit.com>

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use auxiliary/server/tnftp_savefile
msf auxiliary(tnftp_savefile) > show actions
msf auxiliary(tnftp_savefile) > set ACTION < action-name >
msf auxiliary(tnftp_savefile) > show options
    ...show and set options...
msf auxiliary(tnftp_savefile) > run 

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security