ID CVE-2009-0543
Summary ProFTPD Server 1.3.1, with NLS support enabled, allows remote attackers to bypass SQL injection protection mechanisms via invalid, encoded multibyte characters, which are not properly handled in (1) mod_sql_mysql and (2) mod_sql_postgres.
References
Vulnerable Configurations
  • ProFTPD 1.3.1
    cpe:2.3:a:proftpd:proftpd:1.3.1
CVSS
Base: 6.8 (as of 13-02-2009 - 08:10)
Impact:
Exploitability:
CWE CWE-89
CAPEC
  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.
  • Object Relational Mapping Injection
    An attacker leverages a weakness present in the database access layer code generated with an Object Relational Mapping (ORM) tool or a weakness in the way that a developer used a persistence framework to inject his or her own SQL commands to be executed against the underlying database. The attack here is similar to plain SQL injection, except that the application does not use JDBC to directly talk to the database, but instead it uses a data access layer generated by an ORM tool or framework (e.g. Hibernate). While most of the time code generated by an ORM tool contains safe access methods that are immune to SQL injection, sometimes either due to some weakness in the generated code or due to the fact that the developer failed to use the generated access methods properly, SQL injection is still possible.
  • SQL Injection through SOAP Parameter Tampering
    An attacker modifies the parameters of the SOAP message that is sent from the service consumer to the service provider to initiate a SQL injection attack. On the service provider side, the SOAP message is parsed and parameters are not properly validated before being used to access a database in a way that does not use parameter binding, thus enabling the attacker to control the structure of the executed SQL query. This pattern describes a SQL injection attack with the delivery mechanism being a SOAP message.
  • Expanding Control over the Operating System from the Database
    An attacker is able to leverage access gained to the database to read / write data to the file system, compromise the operating system, create a tunnel for accessing the host machine, and use this access to potentially attack other machines on the same network as the database machine. Traditionally SQL injections attacks are viewed as a way to gain unauthorized read access to the data stored in the database, modify the data in the database, delete the data, etc. However, almost every data base management system (DBMS) system includes facilities that if compromised allow an attacker complete access to the file system, operating system, and full access to the host running the database. The attacker can then use this privileged access to launch subsequent attacks. These facilities include dropping into a command shell, creating user defined functions that can call system level libraries present on the host machine, stored procedures, etc.
  • SQL Injection
    This attack exploits target software that constructs SQL statements based on user input. An attacker crafts input strings so that when the target software constructs SQL statements based on the input, the resulting SQL statement performs actions other than those the application intended. SQL Injection results from failure of the application to appropriately validate input. When specially crafted user-controlled input consisting of SQL syntax is used without proper validation as part of SQL queries, it is possible to glean information from the database in ways not envisaged during application design. Depending upon the database and the design of the application, it may also be possible to leverage injection to have the database execute system-related commands of the attackers' choice. SQL Injection enables an attacker to talk directly to the database, thus bypassing the application completely. Successful injection can cause information disclosure as well as ability to add or modify data in the database. In order to successfully inject SQL and retrieve information from a database, an attacker:
  • Blind SQL Injection
    Blind SQL Injection results from an insufficient mitigation for SQL Injection. Although suppressing database error messages are considered best practice, the suppression alone is not sufficient to prevent SQL Injection. Blind SQL Injection is a form of SQL Injection that overcomes the lack of error messages. Without the error messages that facilitate SQL Injection, the attacker constructs input strings that probe the target through simple Boolean SQL expressions. The attacker can determine if the syntax and structure of the injection was successful based on whether the query was executed or not. Applied iteratively, the attacker determines how and where the target is vulnerable to SQL Injection. For example, an attacker may try entering something like "username' AND 1=1; --" in an input field. If the result is the same as when the attacker entered "username" in the field, then the attacker knows that the application is vulnerable to SQL Injection. The attacker can then ask yes/no questions from the database server to extract information from it. For example, the attacker can extract table names from a database using the following types of queries: If the above query executes properly, then the attacker knows that the first character in a table name in the database is a letter between m and z. If it doesn't, then the attacker knows that the character must be between a and l (assuming of course that table names only contain alphabetic characters). By performing a binary search on all character positions, the attacker can determine all table names in the database. Subsequently, the attacker may execute an actual attack and send something like:
Access
VectorComplexityAuthentication
NETWORK MEDIUM NONE
Impact
ConfidentialityIntegrityAvailability
PARTIAL PARTIAL PARTIAL
exploit-db via4
description ProFTPd with mod_mysql Authentication Bypass Vulnerability. CVE-2009-0542,CVE-2009-0543. Remote exploits for multiple platform
file exploits/multiple/remote/8037.txt
id EDB-ID:8037
last seen 2016-02-01
modified 2009-02-10
platform multiple
port
published 2009-02-10
reporter gat3way
source https://www.exploit-db.com/download/8037/
title ProFTPd with mod_mysql - Authentication Bypass Vulnerability
type remote
nessus via4
  • NASL family FTP
    NASL id PROFTPD_1_3_1_SQL_BYPASS.NASL
    description The remote host is using ProFTPD, a free FTP server for Unix and Linux. According to its banner, the version of ProFTPD installed on the remote host is 1.3.1x and may be affected by SQL injection protection bypass when NLS support is enabled.
    last seen 2019-02-21
    modified 2018-02-13
    plugin id 106750
    published 2018-02-12
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=106750
    title ProFTPD 1.3.1 SQL injection protection bypass
  • NASL family Debian Local Security Checks
    NASL id DEBIAN_DSA-1727.NASL
    description Two SQL injection vulnerabilities have been found in proftpd, a virtual-hosting FTP daemon. The Common Vulnerabilities and Exposures project identifies the following problems : - CVE-2009-0542 Shino discovered that proftpd is prone to a SQL injection vulnerability via the use of certain characters in the username. - CVE-2009-0543 TJ Saunders discovered that proftpd is prone to a SQL injection vulnerability due to insufficient escaping mechanisms, when multybite character encodings are used.
    last seen 2019-02-21
    modified 2018-11-28
    plugin id 35739
    published 2009-02-26
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=35739
    title Debian DSA-1727-1 : proftpd-dfsg - SQL injection vulnerabilites
  • NASL family Gentoo Local Security Checks
    NASL id GENTOO_GLSA-200903-27.NASL
    description The remote host is affected by the vulnerability described in GLSA-200903-27 (ProFTPD: Multiple vulnerabilities) The following vulnerabilities were reported: Percent characters in the username are not properly handled, which introduces a single quote character during variable substitution by mod_sql (CVE-2009-0542). Some invalid, encoded multibyte characters are not properly handled in mod_sql_mysql and mod_sql_postgres when NLS support is enabled (CVE-2009-0543). Impact : A remote attacker could send specially crafted requests to the server, possibly resulting in the execution of arbitrary SQL statements. Workaround : There is no known workaround at this time.
    last seen 2019-02-21
    modified 2018-07-11
    plugin id 35917
    published 2009-03-13
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=35917
    title GLSA-200903-27 : ProFTPD: Multiple vulnerabilities
  • NASL family Mandriva Local Security Checks
    NASL id MANDRIVA_MDVSA-2009-061.NASL
    description multiple vulnerabilities has been identified and fixed in proftpd : ProFTPD 1.3.1 interprets long commands from an FTP client as multiple commands, which allows remote attackers to conduct cross-site request forgery (CSRF) attacks and execute arbitrary FTP commands via a long ftp:// URI that leverages an existing session from the FTP client implementation in a web browser. (CVE-2008-4242) SQL injection vulnerability in ProFTPD Server 1.3.1 through 1.3.2rc2 allows remote attackers to execute arbitrary SQL commands via a '%' (percent) character in the username, which introduces a ''' (single quote) character during variable substitution by mod_sql. (CVE-2009-0542) ProFTPD Server 1.3.1, with NLS support enabled, allows remote attackers to bypass SQL injection protection mechanisms via invalid, encoded multibyte characters, which are not properly handled in (1) mod_sql_mysql and (2) mod_sql_postgres. (CVE-2009-0543) The updated packages have been upgraded to the latest proftpd version (1.3.2) to prevent this.
    last seen 2019-02-21
    modified 2019-01-02
    plugin id 37354
    published 2009-04-23
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=37354
    title Mandriva Linux Security Advisory : proftpd (MDVSA-2009:061)
  • NASL family Debian Local Security Checks
    NASL id DEBIAN_DSA-1730.NASL
    description The security update for proftpd-dfsg in DSA-1727-1 caused a regression with the postgresql backend. This update corrects the flaw. Also it was discovered that the oldstable distribution (etch) is not affected by the security issues. For reference the original advisory follows. Two SQL injection vulnerabilities have been found in proftpd, a virtual-hosting FTP daemon. The Common Vulnerabilities and Exposures project identifies the following problems : - CVE-2009-0542 Shino discovered that proftpd is prone to a SQL injection vulnerability via the use of certain characters in the username. - CVE-2009-0543 TJ Saunders discovered that proftpd is prone to a SQL injection vulnerability due to insufficient escaping mechanisms, when multybite character encodings are used. The oldstable distribution (etch) is not affected by these problems.
    last seen 2019-02-21
    modified 2018-11-28
    plugin id 35755
    published 2009-03-03
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=35755
    title Debian DSA-1730-1 : proftpd-dfsg - SQL injection vulnerabilites
  • NASL family FreeBSD Local Security Checks
    NASL id FREEBSD_PKG_CA0841FF125411DEA9640030843D3802.NASL
    description Secunia reports : Some vulnerabilities have been reported in ProFTPD, which can be exploited by malicious people to conduct SQL injection attacks. The application improperly sets the character encoding prior to performing SQL queries. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code in an environment using a multi-byte character encoding. An error exists in the 'mod_sql' module when processing e.g. user names containing '%' characters. This can be exploited to bypass input sanitation routines and manipulate SQL queries by injecting arbitrary SQL code.
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 35941
    published 2009-03-17
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=35941
    title FreeBSD : proftpd -- multiple sql injection vulnerabilities (ca0841ff-1254-11de-a964-0030843d3802)
refmap via4
confirm http://bugs.proftpd.org/show_bug.cgi?id=3173
debian DSA-1730
gentoo GLSA-200903-27
mandriva MDVSA-2009:061
mlist
  • [oss-security] 20090211 CVE request for proftpd
  • [oss-security] 20090211 Re: CVE request for proftpd
secunia 34268
Last major update 09-06-2009 - 01:32
Published 12-02-2009 - 11:30
Back to Top