ID

VAR-201903-1261


CVE

CVE-2018-20220


TITLE

Teracue ENC-400 Authentication vulnerabilities in device firmware

Trust: 0.8

sources: JVNDB: JVNDB-2018-015072

DESCRIPTION

An issue was discovered on Teracue ENC-400 devices with firmware 2.56 and below. While the web interface requires authentication before it can be interacted with, a large portion of the HTTP endpoints are missing authentication. An attacker is able to view these pages before being authenticated, and some of these pages may disclose sensitive information. Teracue ENC-400 There is an authentication vulnerability in the device firmware.Information may be obtained. Teracue ENC-400 is a portable multi-stream encoder from Teracue, Germany. Introduction ============ Multiple vulnerabilities were identified within the Teracue ENC-400, including pre-authenticated remote code authentication. While the vendor has released updated firmware after these issues were identified, they are not all resolved with the latest version of the firmware. Product ======= The Teracue ENC-400 is accessible over an HTTP interface, which allows device configuration (including setting passwords or video stream destinations and servers). The vendor describes the device as follows: This HD/SD H.264 fanless video encoder is able to deliver multiple streams in multiple bitrates and protocols to multiple destinations. Note that the latest version of firmware, v2.57, does not adequately resolve all identified issues. Specific notes have been added to issues in the Technical Details section. Technical Details ================= 1) Command injection in login form ---------------------------------- CVE-2018-20218 The login form passes user input directly to a shell command without any kind of escaping or validation. In the file /usr/share/www/check.lp: #!/usr/bin/env cgilua.cgi <% local pass = cgilua.POST.password local com1 = os.execute("echo \'"..cgilua.POST.password.."\' | (su -c /bin/true)") An attacker is able to perform command injection using the "password" parameter displayed on the login form. An example "password" to bypass this authentication would be: f' > /dev/null # It is also possible for an attacker to simply execute code directly on the server. * Resolution Status * While this instance of remote code execution has been resolved, the resolution does not protect the entire codebase. In /usr/share/www/web/system_password.lp: local oldpass = cgilua.POST.oldpass local newpass = cgilua.POST.newpass local com1=os.execute("echo '"..oldpass.."' | (su -c 'echo '"..oldpass.."' | (su root -c '/bin/true') > /dev/null 2>&1 ; echo $?')") This allows an authenticated user to execute commands without knowing the existing password. This is particularly important given the insufficient resolution of CVE-2018-20219 (issue 2). 2) Hard-coded authentication token ---------------------------------- CVE-2018-20219 After successful authentication, the device sends an authentication cookie to the end user such that they can access the devices web administration panel. This token is hardcoded to a string in the source code. In the file /usr/share/www/check.lp: cookies.sethtml("AuthByPasswdENC400","Teracue:dGFpOfrtmR1bW1thrf5dGV4nhyxxdA==",{path='/'}) (Note: Line may be slightly different in different firmware versions, though the token is still the same). By simply setting this cookie in a browser, an attacker is able to maintain access to every ENC-400 device without knowing the password. Even if a user changes the password on the device, this token is static and unchanged. This results in an authentication bypass. * Resolution Status * While this cookie is now dynamically generated, the latest code generates cookie values from the current time in seconds. In the file /usr/share/www/check.lp: math.randomseed(os.time()) local cookie_value=RandomVariable(30) An attacker is able to trivially bypass authentication simply by knowing the approximate time of the last successful authentication. The "/configuration.xml" file, for example, includes all information required to access a video stream, such as the IP and port information, and any encryption information if specified. * Resolution Status * No verification was performed as to whether this issue was appropriately resolved, or whether other files may be left unprotected. Disclosure Timeline =================== Attempts to contact vendor begin: August 30, 2018 Vendor contacted: September 7, 2018 Vendor acknowledges issues: October 23, 2018 Initial fixes released for testing: December 4, 2018 Response indicating insufficient fixes: December 4, 2018 Public firmware release: February 13, 2019 References ========== [1] https://www.teracue.com/en/iptv-products/encoding

Trust: 1.89

sources: NVD: CVE-2018-20220 // JVNDB: JVNDB-2018-015072 // VULHUB: VHN-131005 // VULMON: CVE-2018-20220 // PACKETSTORM: 151802

AFFECTED PRODUCTS

vendor:teracuemodel:enc-400 hdmiscope:lteversion:2.56

Trust: 1.8

vendor:teracuemodel:enc-400 hdmi2scope:lteversion:2.56

Trust: 1.8

vendor:teracuemodel:enc-400 hdsdiscope:lteversion:2.56

Trust: 1.8

sources: JVNDB: JVNDB-2018-015072 // NVD: CVE-2018-20220

CVSS

SEVERITY

CVSSV2

CVSSV3

nvd@nist.gov: CVE-2018-20220
value: HIGH

Trust: 1.0

NVD: CVE-2018-20220
value: HIGH

Trust: 0.8

CNNVD: CNNVD-201902-811
value: HIGH

Trust: 0.6

VULHUB: VHN-131005
value: MEDIUM

Trust: 0.1

VULMON: CVE-2018-20220
value: MEDIUM

Trust: 0.1

nvd@nist.gov: CVE-2018-20220
severity: MEDIUM
baseScore: 5.0
vectorString: AV:N/AC:L/AU:N/C:P/I:N/A:N
accessVector: NETWORK
accessComplexity: LOW
authentication: NONE
confidentialityImpact: PARTIAL
integrityImpact: NONE
availabilityImpact: NONE
exploitabilityScore: 10.0
impactScore: 2.9
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 1.9

VULHUB: VHN-131005
severity: MEDIUM
baseScore: 5.0
vectorString: AV:N/AC:L/AU:N/C:P/I:N/A:N
accessVector: NETWORK
accessComplexity: LOW
authentication: NONE
confidentialityImpact: PARTIAL
integrityImpact: NONE
availabilityImpact: NONE
exploitabilityScore: 10.0
impactScore: 2.9
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 0.1

nvd@nist.gov: CVE-2018-20220
baseSeverity: HIGH
baseScore: 7.5
vectorString: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
attackVector: NETWORK
attackComplexity: LOW
privilegesRequired: NONE
userInteraction: NONE
scope: UNCHANGED
confidentialityImpact: HIGH
integrityImpact: NONE
availabilityImpact: NONE
exploitabilityScore: 3.9
impactScore: 3.6
version: 3.0

Trust: 1.8

sources: VULHUB: VHN-131005 // VULMON: CVE-2018-20220 // JVNDB: JVNDB-2018-015072 // CNNVD: CNNVD-201902-811 // NVD: CVE-2018-20220

PROBLEMTYPE DATA

problemtype:CWE-306

Trust: 1.1

problemtype:CWE-287

Trust: 0.9

sources: VULHUB: VHN-131005 // JVNDB: JVNDB-2018-015072 // NVD: CVE-2018-20220

THREAT TYPE

remote

Trust: 0.6

sources: CNNVD: CNNVD-201902-811

TYPE

access control error

Trust: 0.6

sources: CNNVD: CNNVD-201902-811

CONFIGURATIONS

sources: JVNDB: JVNDB-2018-015072

EXPLOIT AVAILABILITY

sources: VULMON: CVE-2018-20220

PATCH

title:Encodingurl:https://www.teracue.com/en/iptv-products/encoding

Trust: 0.8

title:Teracue ENC-400 Security vulnerabilitiesurl:http://www.cnnvd.org.cn/web/xxk/bdxqById.tag?id=89604

Trust: 0.6

sources: JVNDB: JVNDB-2018-015072 // CNNVD: CNNVD-201902-811

EXTERNAL IDS

db:NVDid:CVE-2018-20220

Trust: 2.7

db:PACKETSTORMid:151802

Trust: 2.7

db:JVNDBid:JVNDB-2018-015072

Trust: 0.8

db:CNNVDid:CNNVD-201902-811

Trust: 0.7

db:EXPLOIT-DBid:46451

Trust: 0.7

db:VULHUBid:VHN-131005

Trust: 0.1

db:VULMONid:CVE-2018-20220

Trust: 0.1

sources: VULHUB: VHN-131005 // VULMON: CVE-2018-20220 // JVNDB: JVNDB-2018-015072 // PACKETSTORM: 151802 // CNNVD: CNNVD-201902-811 // NVD: CVE-2018-20220

REFERENCES

url:http://packetstormsecurity.com/files/151802/teracue-enc-400-command-injection-missing-authentication.html

Trust: 3.2

url:http://seclists.org/fulldisclosure/2019/feb/48

Trust: 1.9

url:https://zxsecurity.co.nz/research.html

Trust: 1.8

url:https://nvd.nist.gov/vuln/detail/cve-2018-20220

Trust: 1.5

url:https://cve.mitre.org/cgi-bin/cvename.cgi?name=cve-2018-20220

Trust: 0.8

url:https://www.exploit-db.com/exploits/46451

Trust: 0.7

url:https://cwe.mitre.org/data/definitions/306.html

Trust: 0.1

url:https://nvd.nist.gov

Trust: 0.1

url:https://www.teracue.com/en/iptv-products/encoding

Trust: 0.1

url:https://nvd.nist.gov/vuln/detail/cve-2018-20219

Trust: 0.1

sources: VULHUB: VHN-131005 // VULMON: CVE-2018-20220 // JVNDB: JVNDB-2018-015072 // PACKETSTORM: 151802 // CNNVD: CNNVD-201902-811 // NVD: CVE-2018-20220

CREDITS

Stephen Shkardoon

Trust: 0.7

sources: PACKETSTORM: 151802 // CNNVD: CNNVD-201902-811

SOURCES

db:VULHUBid:VHN-131005
db:VULMONid:CVE-2018-20220
db:JVNDBid:JVNDB-2018-015072
db:PACKETSTORMid:151802
db:CNNVDid:CNNVD-201902-811
db:NVDid:CVE-2018-20220

LAST UPDATE DATE

2024-11-23T23:04:49.379000+00:00


SOURCES UPDATE DATE

db:VULHUBid:VHN-131005date:2020-08-24T00:00:00
db:VULMONid:CVE-2018-20220date:2020-08-24T00:00:00
db:JVNDBid:JVNDB-2018-015072date:2019-04-23T00:00:00
db:CNNVDid:CNNVD-201902-811date:2020-08-25T00:00:00
db:NVDid:CVE-2018-20220date:2024-11-21T04:01:06.570

SOURCES RELEASE DATE

db:VULHUBid:VHN-131005date:2019-03-21T00:00:00
db:VULMONid:CVE-2018-20220date:2019-03-21T00:00:00
db:JVNDBid:JVNDB-2018-015072date:2019-04-23T00:00:00
db:PACKETSTORMid:151802date:2019-02-20T23:02:22
db:CNNVDid:CNNVD-201902-811date:2019-02-20T00:00:00
db:NVDid:CVE-2018-20220date:2019-03-21T16:00:35.407