Skip to content
RCE Write-up Intermediate

Escaping The Console Jail

SpamTitan Gateway contained multiple vulnerabilities, including an unauthenticated command injection in snmp-x.php that allowed an attacker to execute arbitrary commands as root, and several authenticated remote code execution flaws. An attacker could exploit these to gain full control of the appliance.

sensepost.com

Published on sensepost.com

I recently tested an Internet facing Anti-Spam product called SpamTitan Gateway. As you could infer from the name of the product, this platform’s purpose was to detect Spam and or other malicious software sent via email.

The author, on sensepost.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the web application failed to sanitise user-supplied input before writing it to a configuration file that is later executed by a privileged daemon.

Impact

An unauthenticated attacker could execute arbitrary commands as root on the SpamTitan appliance, leading to full compromise.

What the attacker needed

Network access to the SpamTitan web interface; No authentication required

The fix

The vulnerabilities were fixed in SpamTitan version 7.08, released on 26 May 2020.

How it was found

  1. Send a crafted POST request to snmp-x.php with a community value that includes an extend directive and a reverse shell command.
  2. Set up a netcat listener on the attacker's machine.
  3. Query the SNMP OID corresponding to the extend directive to trigger the reverse shell.
  4. Receive a root shell on the listener.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This report describes security holes in an email filtering appliance. One hole let anyone on the network run commands on the device without logging in, because user input was not cleaned before being saved to a configuration file. Another hole required a valid login but still allowed running commands. The vendor fixed these in updates.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.