Rapid7 Vulnerability & Exploit Database

KarjaSoft Sami FTP Server v2.0.2 USER Overflow

Back to Search

KarjaSoft Sami FTP Server v2.0.2 USER Overflow



This module exploits an unauthenticated stack buffer overflow in KarjaSoft Sami FTP Server version 2.0.2 by sending an overly long USER string during login. The payload is triggered when the administrator opens the application GUI. If the GUI window is open at the time of exploitation, the payload will be executed immediately. Keep this in mind when selecting payloads. The application will crash following execution of the payload and will not restart automatically. When the application is restarted, it will re-execute the payload unless the payload has been manually removed from the SamiFTP.binlog log file. This module has been tested successfully on Sami FTP Server versions: 2.0.2 on Windows XP SP0 (x86); 2.0.2 on Windows 7 SP1 (x86); 2.0.2 on Windows 7 SP1 (x64); and 2.0.2 on Windows 10 (1909) (x64).


  • Muhammad Ahmed Siddiqui
  • Critical Security
  • n30m1nd
  • aushack <patrick@osisecurity.com.au>
  • bcoles <bcoles@gmail.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 exploit/windows/ftp/sami_ftpd_user
msf exploit(sami_ftpd_user) > show targets
msf exploit(sami_ftpd_user) > set TARGET < target-id >
msf exploit(sami_ftpd_user) > show options
    ...show and set options...
msf exploit(sami_ftpd_user) > exploit

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