Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/documentation/modules/exploit/freebsd/webapp/spamtitan_unauth_rce.md
Views: 11789
Vulnerable Application
TitanHQ SpamTitan Gateway is an anti-spam appliance that protects against unwanted emails and malwares. This module exploits an improper input sanitization in versions 7.01, 7.02, 7.03 and 7.07 to inject command directives into the SNMP configuration file and get remote code execution as root. Note that only version 7.03 needs authentication and no authentication is required for versions 7.01, 7.02 and 7.07.
First, it sends an HTTP POST request to the snmp-x.php
page with an SNMPD
command directives (extend
+ command) passed to the community
parameter. This payload is then added to snmpd.conf
by the application. Finally, the module triggers the execution of this command by querying the SNMP server for the correct OID.
This exploit module has been successfully tested against versions 7.01, 7.02, 7.03, and 7.07.
Installation
A demo version of the vulnerable application can be downloaded here. Since the latest version of SpamTitan Gateway has this vulnerability fixed and no demo of the vulnerable versions are available for download, the previous major release demo has to be used and updates have to be installed manually.
Installation steps:
Download SpamTitan Gateway version 6 demo
.ova
image: https://stdownload.titanhq.com/vmware/SpamTitan-6-amd64.ovaImport it to your favorite virtualization software and start it
Access the SpamTitan web user interface from the appliance IP. This IP is usually displayed on the welcome page once the virtual machine has boot up.
Login with the default credentials:
username:
admin
password:
hiadmin
Go to
System Setup
>System Updates
and clickStart
in theCheck for Updates Now
section. It will download all available update patches.From the
Available Updates
section, choose the version you want to test and click theinstall
button in front of it.
Verification Steps
Install the application (see Installation)
Start msfconsole
Do:
use exploit/freebsd/webapp/spamtitan_unauth_rce
Do:
set RHOSTS <ip>
Do:
set LHOST <ip>
Do:
run
You should get a shell.
Options
TARGETURI
The base path to SpamTitan. Default value is /
.
USERNAME
The username to authenticate, if required (depending on SpamTitan Gateway version). Default value is admin
.
PASSWORD
The password to authenticate, if required (depending on SpamTitan Gateway version). Default value is hiadmin
.
COMMUNITY
The SNMP Community String to use (random string by default).
ALLOWEDIP
The IP address that will be allowed to query the injected extend
command. This IP will be added to the SNMP configuration file on the target. This is typically this host IP address, but can be different if your are in a NAT'ed network. If not set, LHOST
will be used instead. If LHOST
is not set, it will default to 127.0.0.1
.
SNMPPORT
The target SNMP port (UDP). Default port is 161
.