Menu

Search for hundreds of thousands of exploits

"Advantech EKI-6340 - Command Injection"

Author

Exploit author

"Core Security"

Platform

Exploit platform

cgi

Release date

Exploit published date

2014-11-24

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
Core Security - Corelabs Advisory
http://corelabs.coresecurity.com/

Advantech EKI-6340 Command Injection


1. *Advisory Information*

Title: Advantech EKI-6340 Command Injection
Advisory ID: CORE-2014-0009
Advisory URL:
http://www.coresecurity.com/advisories/advantech-eki-6340-command-injection
Date published: 2014-11-19
Date of last update: 2014-11-19
Vendors contacted: Advantech
Release mode: User release


2. *Vulnerability Information*

Class: OS Command Injection [CWE-78]
Impact: Code execution
Remotely Exploitable: Yes
Locally Exploitable: No
CVE Name: CVE-2014-8387


3. *Vulnerability Description*


    The Advantech EKI-6340 [1] series are wireless Mesh AP for outdoor
deployment. With self-healing and self-forming capabilities, the
wireless network is free from interruption even part of Mesh nodes
failed. It's especially critical to infrastructures where wired
solutions are hard to deploy. This Mesh network covers growing rich data
demands such as video security, surveillance and entertainment.

    Advantech EKI-6340 series is vulnerable to a OS Command Injection,
which can be exploited by remote attackers to execute arbitrary code and
commands, by using a non privileged user against a vulnerable CGI file.


4. *Vulnerable packages*


   . Advantech EKI-6340 V2.05
   . Other versions may probably be affected too, but they were not checked.


5. *Vendor Information, Solutions and Workarounds*


    Considering that the vendor is not going to fix or update this
device the following recommendations should be taken into consideration
in case of using a vulnerable device:

        - Change the 'guest' user password (or delete the user in case
is not used)
        - Edit the fshttpd.conf and remove the line
'guest_allow=/cgi/ping.cgi'.
        - Check that the 'admin' user doesn't has the default password
as well.
    

6. *Credits*


    This vulnerability was discovered and researched by Facundo Pantaleo
and Flavio Cangini from Core Security Engineering Team. The publication
of this advisory was coordinated by Joaquín Rodríguez Varela from Core
Advisories Team.
    

7. *Technical Description / Proof of Concept Code*


    This vulnerability is caused by an incorrect sanitization of the
input parameters of the file "ping.cgi" that is a symbolic link of
"utility.cgi".
It allows to concatenate commands after the IP direction parameter,
therefore enabling a user to inject OS commands. The "call_ping"
function inside the file "/usr/webui/webroot/cgi/utility.cgi" is where
the vulnerability lays.
    
    The CGI file requieres authentication, but the "admin" user is not
the only one allowed to execute it. Based on the webservers default
configuration file, the "guest" has permissons over it as well. This
user is rarely disbled and its password tends to remain unchanged. This
default credentials are username "user" and password "user" as well.
Below is an example of the webserver (based on Mongoose webserver [2])
default configuration file "fshttpd.conf":
    

/-----
 
    listening_ports=80,443s
    user_admin=admin
    pass_admin=admin
    user_guest=user
    pass_guest=user
    document_root=/usr/webui/webroot
    authorize_uri=/authorize
    unauthorize_uri=/unauthorize
    login_uri=/login.html
    logout_uri=/logout.html
    login_fail_uri=/err/login_fail.html
    sessions_full_uri=/err/nosessions.html
    no_redirect_uri=/cgi/fwupstatus.cgi
    guest_allow=/admin/FWUPStatus.html
    guest_allow=/status/*
    guest_allow=/utility/Ping.html
    guest_allow=/utility/RssiCalc.html
    guest_allow=/utility/FresnelZone.html
    guest_allow=/cgi/ping.cgi
    guest_allow=/cgi/status_query.cgi
    guest_allow=/cgi/nodeinfo_query_MAC.cgi
    guest_allow=/cgi/nodeinfo_query.cgi
    guest_allow=/cgi/nodeinfo_query_AP.cgi
    guest_allow=/cgi/fwupstatus.cgi
    nologin_allow=/
    nologin_allow=/index.*
    nologin_allow=/css/*
    nologin_allow=/template/*
    nologin_allow=/images/*
    nologin_allow=/images/dhtmlxcalendar_dhx_skyblue/*
    nologin_allow=/js/*
    nologin_allow=/favicon.ico
    nologin_allow=/err/*

-----/


7.1. *Proof of Concept*


/-----
 
      
   
http://localhost:80/cgi/ping.cgi?pinghost=127.0.0.1;sleep%2010&pingsize=3
     
    When requested for credentials use the following:
     
    User: user
    Password: user
      
    
-----/


8. *Report Timeline*

. 2014-10-01:

    Initial notification sent to ICS-CERT informing of the vulnerability
and requesting the vendor's contact information.
      
. 2014-10-01:

    ICS-CERT informs that they will ask the vendor if they want to
coordinate directly with us or if they prefer to have ICS-CERT mediate.
They request the vulnerability report.
      
. 2014-10-01:

    ICS-CERT informs that the vendor answered that they would like the
ICS-CERT to mediate the coordination of the advisory. They requested
again the vulnerability report.
      
. 2014-10-01:

    We send the vulnerability detail, including technical description
and a PoC.
 
. 2014-10-09:

    We request a status update on the reported vulnerability.
      
. 2014-10-20:

    ICS-CERT informs that the vendor plans to discontinue EKI-6340 early
next year and therefore they will not fix it.
      
. 2014-11-13:

    We inform them that we will publish this advisory as user release on
Wednesday 19th of November.
      
. 2014-11-19:

    Advisory CORE-2014-0009 published.


9. *References*

[1]
http://www.advantech.com.tw/products/56bfcf50-1ada-4ac6-aaf5-4e726ebad002/EKI-6340/mod_04f43dee-f991-44f1-aa1b-bbb1b30f2a72.aspx.
    
[2] https://code.google.com/p/mongoose/.
    

10. *About CoreLabs*

    CoreLabs, the research center of Core Security, is charged with
anticipating the future needs and requirements for information security
technologies. We conduct our research in several important areas of
computer security including system vulnerabilities, cyber attack
planning and simulation, source code auditing, and cryptography. Our
results include problem formalization, identification of
vulnerabilities, novel solutions and prototypes for new technologies.
CoreLabs regularly publishes security advisories, technical papers,
project information and shared software tools for public use at:
http://corelabs.coresecurity.com.
    

11. *About Core Security*


    Core Security enables organizations to get ahead of threats with
security test and measurement solutions that continuously identify
and demonstrate real-world exposures to their most critical assets. Our
customers can gain real visibility into their security standing, real
validation of their security controls, and real metrics to more
effectively secure their organizations.
    
    Core Security's software solutions build on over a decade of trusted
research and leading-edge threat expertise from the company's Security
Consulting Services, CoreLabs and Engineering groups. Core Security can
be reached at +1 (617) 399-6980 or on the Web at:
http://www.coresecurity.com.


12. *Disclaimer*

    The contents of this advisory are copyright (c) 2014 Core Security
and (c) 2014 CoreLabs, and are licensed under a Creative Commons
Attribution Non-Commercial Share-Alike 3.0 (United States) License:
http://creativecommons.org/licenses/by-nc-sa/3.0/us/


13. *PGP/GPG Keys*


    This advisory has been signed with the GPG key of Core Security
advisories team, which is available for download at
http://www.coresecurity.com/files/attachments/core_security_advisories.asc.
Release Date Title Type Platform Author
2020-12-02 "aSc TimeTables 2021.6.2 - Denial of Service (PoC)" local windows "Ismael Nava"
2020-12-02 "Anuko Time Tracker 1.19.23.5311 - No rate Limit on Password Reset functionality" webapps php "Mufaddal Masalawala"
2020-12-02 "Ksix Zigbee Devices - Playback Protection Bypass (PoC)" remote multiple "Alejandro Vazquez Vazquez"
2020-12-02 "Mitel mitel-cs018 - Call Data Information Disclosure" remote linux "Andrea Intilangelo"
2020-12-02 "ChurchCRM 4.2.0 - CSV/Formula Injection" webapps multiple "Mufaddal Masalawala"
2020-12-02 "Artworks Gallery 1.0 - Arbitrary File Upload RCE (Authenticated) via Edit Profile" webapps multiple "Shahrukh Iqbal Mirza"
2020-12-02 "ChurchCRM 4.2.1 - Persistent Cross Site Scripting (XSS)" webapps multiple "Mufaddal Masalawala"
2020-12-02 "DotCMS 20.11 - Stored Cross-Site Scripting" webapps multiple "Hardik Solanki"
2020-12-02 "NewsLister - Authenticated Persistent Cross-Site Scripting" webapps multiple "Emre Aslan"
2020-12-02 "IDT PC Audio 1.0.6433.0 - 'STacSV' Unquoted Service Path" local windows "Manuel Alvarez"
Release Date Title Type Platform Author
2020-11-19 "Gemtek WVRTM-127ACN 01.01.02.141 - Authenticated Arbitrary Command Injection" webapps cgi "Gabriele Zuddas"
2020-10-29 "Mailman 1.x > 2.1.23 - Cross Site Scripting (XSS)" webapps cgi "Valerio Alessandroni"
2020-04-23 "Zen Load Balancer 3.10.1 - Directory Traversal (Metasploit)" webapps cgi "Dhiraj Mishra"
2020-04-10 "Zen Load Balancer 3.10.1 - 'index.cgi' Directory Traversal" webapps cgi "Basim Alabdullah"
2020-03-30 "Zen Load Balancer 3.10.1 - Remote Code Execution" webapps cgi "Cody Sixteen"
2020-02-11 "CHIYU BF430 TCP IP Converter - Stored Cross-Site Scripting" webapps cgi Luca.Chiou
2019-09-09 "Rifatron Intelligent Digital Security System - 'animate.cgi' Stream Disclosure" webapps cgi LiquidWorm
2019-07-12 "Citrix SD-WAN Appliance 10.2.2 - Authentication Bypass / Remote Command Execution" webapps cgi "Chris Lyne"
2019-02-18 "Master IP CAM 01 3.3.4.2103 - Remote Command Execution" webapps cgi "Raffaele Sabato"
2019-02-11 "IPFire 2.21 - Cross-Site Scripting" webapps cgi "Ozer Goker"
Release Date Title Type Platform Author
2018-10-05 "D-Link Central WiFiManager Software Controller 1.03 - Multiple Vulnerabilities" webapps php "Core Security"
2018-07-27 "SoftNAS Cloud < 4.0.3 - OS Command Injection" webapps php "Core Security"
2018-07-13 "QNAP Qcenter Virtual Appliance - Multiple Vulnerabilities" webapps hardware "Core Security"
2018-02-22 "Trend Micro Email Encryption Gateway 5.5 (Build 1111.00) - Multiple Vulnerabilities" webapps jsp "Core Security"
2018-02-14 "Dell EMC Isilon OneFS - Multiple Vulnerabilities" webapps linux "Core Security"
2017-06-28 "Kaspersky Anti-Virus File Server 8.0.3.297 - Multiple Vulnerabilities" webapps linux "Core Security"
2017-05-10 "SAP SAPCAR 721.510 - Heap Buffer Overflow" dos linux "Core Security"
2016-11-22 "TP-LINK TDDP - Multiple Vulnerabilities" dos hardware "Core Security"
2016-08-10 "SAP SAPCAR - Multiple Vulnerabilities" dos linux "Core Security"
2016-03-16 "FreeBSD 10.2 (x64) - 'amd64_set_ldt' Heap Overflow" dos freebsd_x86-64 "Core Security"
2015-12-09 "Microsoft Windows Media Center - '.Link' File Incorrectly Resolved Reference (MS15-134)" remote windows "Core Security"
2015-07-08 "AirLive (Multiple Products) - OS Command Injection" webapps hardware "Core Security"
2015-07-08 "AirLink101 SkyIPCam1620W - OS Command Injection" webapps hardware "Core Security"
2015-05-26 "Sendio ESP - Information Disclosure" webapps jsp "Core Security"
2015-03-18 "Fortinet Single Sign On - Stack Overflow" dos windows "Core Security"
2015-01-29 "FreeBSD - Multiple Vulnerabilities" dos freebsd "Core Security"
2015-01-26 "Android WiFi-Direct - Denial of Service" dos android "Core Security"
2014-11-24 "Advantech EKI-6340 - Command Injection" webapps cgi "Core Security"
2014-10-17 "SAP NetWeaver Enqueue Server - Denial of Service" dos windows "Core Security"
2014-04-17 "SAP Router - Timing Attack Password Disclosure" remote hardware "Core Security"
2014-03-12 "Oracle VM VirtualBox - 3D Acceleration Multiple Vulnerabilities" dos multiple "Core Security"
2014-02-06 "Publish-It 3.6d - Buffer Overflow" dos windows "Core Security"
2013-12-17 "Microsoft Windows Kernel - 'win32k.sys' Integer Overflow (MS13-101)" dos windows "Core Security"
2013-12-11 "IcoFX 2.5.0.0 - '.ico' Buffer Overflow (PoC)" dos windows "Core Security"
2013-11-08 "Vivotek IP Cameras - RTSP Authentication Bypass" webapps hardware "Core Security"
2013-10-02 "PinApp Mail-SeCure 3.70 - Access Control Failure" local linux "Core Security"
2013-09-09 "Sophos Web Protection Appliance - Multiple Vulnerabilities" webapps linux "Core Security"
2013-08-29 "AVTECH DVR Firmware 1017-1003-1009-1003 - Multiple Vulnerabilities" dos hardware "Core Security"
2013-08-07 "Hikvision IP Cameras 4.1.0 b130111 - Multiple Vulnerabilities" webapps hardware "Core Security"
2013-08-02 "TP-Link TL-SC3171 IP Cameras - Multiple Vulnerabilities" webapps hardware "Core Security"
import requests
response = requests.get('http://127.0.0.1:8181?format=json')

For full documentation follow the link above

Cipherscan. Find out which SSL ciphersuites are supported by a target.

Identify and fingerprint Web Application Firewall (WAF) products protecting a website.