Vulnerabilities > CVE-2015-7611 - OS Command Injection vulnerability in Apache James Server 2.3.2
Attack vector
NETWORK Attack complexity
HIGH Privileges required
NONE Confidentiality impact
HIGH Integrity impact
HIGH Availability impact
HIGH Summary
Apache James Server 2.3.2, when configured with file-based user repositories, allows attackers to execute arbitrary system commands via unspecified vectors.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
Application | 1 |
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (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.
- Command Delimiters An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or a blacklist input validation, as opposed to whitelist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or blacklist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.
- Exploiting Multiple Input Interpretation Layers An attacker supplies the target software with input data that contains sequences of special characters designed to bypass input validation logic. This exploit relies on the target making multiples passes over the input data and processing a "layer" of special characters with each pass. In this manner, the attacker can disguise input that would otherwise be rejected as invalid by concealing it with layers of special/escape characters that are stripped off by subsequent processing steps. The goal is to first discover cases where the input validation layer executes before one or more parsing layers. That is, user input may go through the following logic in an application: In such cases, the attacker will need to provide input that will pass through the input validator, but after passing through parser2, will be converted into something that the input validator was supposed to stop.
- Argument Injection An attacker changes the behavior or state of a targeted application through injecting data or command syntax through the targets use of non-validated and non-filtered arguments of exposed services or methods.
- OS Command Injection In this type of an attack, an adversary injects operating system commands into existing application functions. An application that uses untrusted input to build command strings is vulnerable. An adversary can leverage OS command injection in an application to elevate privileges, execute arbitrary commands and compromise the underlying operating system.
Exploit-Db
id | EDB-ID:48130 |
last seen | 2020-02-24 |
modified | 2020-02-24 |
published | 2020-02-24 |
reporter | Exploit-DB |
source | https://www.exploit-db.com/download/48130 |
title | Apache James Server 2.3.2 - Insecure User Creation Arbitrary File Write (Metasploit) |
Metasploit
description | This module exploits a vulnerability that exists due to a lack of input validation when creating a user. Messages for a given user are stored in a directory partially defined by the username. By creating a user with a directory traversal payload as the username, commands can be written to a given directory. To use this module with the cron exploitation method, run the exploit using the given payload, host, and port. After running the exploit, the payload will be executed within 60 seconds. Due to differences in how cron may run in certain Linux operating systems such as Ubuntu, it may be preferable to set the target to Bash Completion as the cron method may not work. If the target is set to Bash completion, start a listener using the given payload, host, and port before running the exploit. After running the exploit, the payload will be executed when a user logs into the system. For this exploitation method, bash completion must be enabled to gain code execution. This exploitation method will leave an Apache James mail object artifact in the /etc/bash_completion.d directory and the malicious user account. |
id | MSF:EXPLOIT/LINUX/SMTP/APACHE_JAMES_EXEC |
last seen | 2020-06-08 |
modified | 2020-02-20 |
published | 2020-01-19 |
references | |
reporter | Rapid7 |
source | https://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/linux/smtp/apache_james_exec.rb |
title | Apache James Server 2.3.2 Insecure User Creation Arbitrary File Write |
Nessus
NASL family | FreeBSD Local Security Checks |
NASL id | FREEBSD_PKG_BE3069C967E711E59909002590263BF5.NASL |
description | The Apache James Project reports : This release has many enhancements and bug fixes over the previous release. See the Release Notes for a detailed list of changes. Some of the earlier defects could turn a James mail server into an Open Relay and allow files to be written on disk. All users of James Server are urged to upgrade to version v2.3.2.1 as soon as possible. |
last seen | 2020-03-18 |
modified | 2015-10-01 |
plugin id | 86214 |
published | 2015-10-01 |
reporter | This script is Copyright (C) 2015-2020 and is owned by Tenable, Inc. or an Affiliate thereof. |
source | https://www.tenable.com/plugins/nessus/86214 |
title | FreeBSD : james -- multiple vulnerabilities (be3069c9-67e7-11e5-9909-002590263bf5) |
code |
|
Packetstorm
data source | https://packetstormsecurity.com/files/download/156463/apache_james_exec.rb.txt |
id | PACKETSTORM:156463 |
last seen | 2020-02-23 |
published | 2020-02-20 |
reporter | Matthew Aberegg |
source | https://packetstormsecurity.com/files/156463/Apache-James-Server-2.3.2-Insecure-User-Creation-Arbitrary-File-Write.html |
title | Apache James Server 2.3.2 Insecure User Creation / Arbitrary File Write |
References
- http://packetstormsecurity.com/files/133798/Apache-James-Server-2.3.2-Arbitrary-Command-Execution.html
- http://packetstormsecurity.com/files/133798/Apache-James-Server-2.3.2-Arbitrary-Command-Execution.html
- http://packetstormsecurity.com/files/156463/Apache-James-Server-2.3.2-Insecure-User-Creation-Arbitrary-File-Write.html
- http://packetstormsecurity.com/files/156463/Apache-James-Server-2.3.2-Insecure-User-Creation-Arbitrary-File-Write.html
- http://www.openwall.com/lists/oss-security/2015/09/30/7
- http://www.openwall.com/lists/oss-security/2015/09/30/7
- http://www.openwall.com/lists/oss-security/2015/10/01/2
- http://www.openwall.com/lists/oss-security/2015/10/01/2
- http://www.securityfocus.com/archive/1/536575/100/0/threaded
- http://www.securityfocus.com/archive/1/536575/100/0/threaded
- https://blogs.apache.org/james/entry/apache_james_server_2_3
- https://blogs.apache.org/james/entry/apache_james_server_2_3