FTP Configuration File Loot
After gaining shell access to a host running an FTP service, the daemon configuration files reveal user credentials, virtual account databases, chroot paths, and service settings. These often contain plaintext or recoverable passwords and expose the structure of the FTP environment for further exploitation.
vsftpd Configuration
The main vsftpd config is at /etc/vsftpd.conf:
Key values to note:
anonymous_enable=YESconfirms anonymous access is permittedlocal_enable=YESmeans system accounts can authenticatewrite_enable=YESconfirms write access is globally allowedchroot_local_user=YESmeans users are jailed to their home directoriespasv_min_portandpasv_max_portreveal the passive port rangeftpd_bannershows the configured banner string
Virtual user databases are defined separately. Check for PAM configuration:
Virtual user password files referenced in the config:
This file sometimes stores virtual FTP usernames and plaintext passwords in alternating lines.
ProFTPD Configuration
ProFTPD config is typically at /etc/proftpd/proftpd.conf or /etc/proftpd.conf:
ProFTPD supports SQL authentication via mod_sql. The config will contain database credentials if SQL auth is configured:
<Module mod_sql.c>
SQLBackend mysql
SQLConnectInfo proftpd@@localhost root dbpassword
SQLUserInfo users username password uid gid homedir shell
</Module>
The database password and user are in plaintext. Connect directly to the database with these credentials.
Include files may split configuration across multiple files:
FileZilla Server Configuration (Windows)
FileZilla Server stores its configuration in XML:
C:\Program Files\FileZilla Server\FileZilla Server.xml
C:\Program Files (x86)\FileZilla Server\FileZilla Server.xml
User accounts and their hashed or plaintext passwords are stored in this file. Older versions of FileZilla Server store passwords in MD5 or even plaintext depending on the version and configuration.
IIS FTP Configuration (Windows)
IIS FTP is configured through applicationHost.config:
C:\Windows\System32\inetsrv\config\applicationHost.config
Virtual directory mappings and authentication settings are in this file.
FTP User Account Files
On Linux, FTP users may be system accounts listed in /etc/passwd:
Accounts with a valid login shell that also have FTP access are candidates for SSH login with the same credentials.
If the FTP daemon uses a separate user database:
FTP Root Path Discovery
Knowing the FTP root path confirms whether writable directories overlap with the web root:
Cross-reference the FTP root with web server configuration:
A matching or overlapping path confirms the web shell upload path if write access existed.
References
-
vsftpd configuration referencesecurity.appspot.com/vsftpd.html (opens in new tab)
Official vsftpd documentation including all configuration directives
-
ProFTPD Configuration Directiveswww.proftpd.org/docs/directives/linked/directives.html (opens in new tab)
Official ProFTPD documentation for all configuration options
Was this helpful?
Your feedback helps improve this page.