Rapid7 Vulnerability & Exploit Database

Maltrail Unauthenticated Command Injection

Back to Search

Maltrail Unauthenticated Command Injection

Disclosed
07/31/2023
Created
08/17/2023

Description

Maltrail is a malicious traffic detection system, utilizing publicly available blacklists containing malicious and/or generally suspicious trails. The Maltrail versions < 0.54 is suffering from a command injection vulnerability. The `subprocess.check_output` function in `mailtrail/core/http.py` contains a command injection vulnerability in the `params.get("username")` parameter. An attacker can exploit this vulnerability by injecting arbitrary OS commands into the username parameter. The injected commands will be executed with the privileges of the running process. This vulnerability can be exploited remotely without authentication. Successfully tested against Maltrail versions 0.52 and 0.53.

Author(s)

  • Ege BALCI <egebalci@pm.me>
  • Chris Wild

Platform

Linux,Unix

Architectures

cmd, x86, x64

Development

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/unix/http/maltrail_rce
msf exploit(maltrail_rce) > show targets
    ...targets...
msf exploit(maltrail_rce) > set TARGET < target-id >
msf exploit(maltrail_rce) > show options
    ...show and set options...
msf exploit(maltrail_rce) > 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

;