ID

VAR-201903-1260


CVE

CVE-2018-20219


TITLE

Teracue ENC-400 Vulnerabilities related to the use of hard-coded credentials in device firmware

Trust: 0.8

sources: JVNDB: JVNDB-2018-015073

DESCRIPTION

An issue was discovered on Teracue ENC-400 devices with firmware 2.56 and below. 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 hard-coded to a string in the source code (/usr/share/www/check.lp file). By setting this cookie in a browser, an attacker is able to maintain access to every ENC-400 device without knowing the password, which results in authentication bypass. Even if a user changes the password on the device, this token is static and unchanged. Teracue ENC-400 Device firmware contains a vulnerability related to the use of hard-coded credentials.Information is obtained, information is altered, and service operation is disrupted (DoS) There is a possibility of being put into a state. Teracue ENC-400 is a portable multi-stream encoder from Teracue, Germany. A security vulnerability exists in the Teracue ENC-400 due to the program's use of hardcoded authentication tokens. 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. * 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). 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). 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. 2) Missing authentication on sensitive endpoints --------------------------------------------------------------------------------- CVE-2018-20220 While the web interface requires authentication before it can be interacted with, a large portion of the HTTP endpoints are missing 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-20219 // JVNDB: JVNDB-2018-015073 // VULHUB: VHN-131003 // VULMON: CVE-2018-20219 // 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-015073 // NVD: CVE-2018-20219

CVSS

SEVERITY

CVSSV2

CVSSV3

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

Trust: 1.0

NVD: CVE-2018-20219
value: HIGH

Trust: 0.8

CNNVD: CNNVD-201902-812
value: HIGH

Trust: 0.6

VULHUB: VHN-131003
value: HIGH

Trust: 0.1

VULMON: CVE-2018-20219
value: HIGH

Trust: 0.1

nvd@nist.gov: CVE-2018-20219
severity: HIGH
baseScore: 9.3
vectorString: AV:N/AC:M/AU:N/C:C/I:C/A:C
accessVector: NETWORK
accessComplexity: MEDIUM
authentication: NONE
confidentialityImpact: COMPLETE
integrityImpact: COMPLETE
availabilityImpact: COMPLETE
exploitabilityScore: 8.6
impactScore: 10.0
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 1.9

VULHUB: VHN-131003
severity: HIGH
baseScore: 9.3
vectorString: AV:N/AC:M/AU:N/C:C/I:C/A:C
accessVector: NETWORK
accessComplexity: MEDIUM
authentication: NONE
confidentialityImpact: COMPLETE
integrityImpact: COMPLETE
availabilityImpact: COMPLETE
exploitabilityScore: 8.6
impactScore: 10.0
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 0.1

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

Trust: 1.8

sources: VULHUB: VHN-131003 // VULMON: CVE-2018-20219 // JVNDB: JVNDB-2018-015073 // CNNVD: CNNVD-201902-812 // NVD: CVE-2018-20219

PROBLEMTYPE DATA

problemtype:CWE-798

Trust: 1.9

sources: VULHUB: VHN-131003 // JVNDB: JVNDB-2018-015073 // NVD: CVE-2018-20219

THREAT TYPE

remote

Trust: 0.6

sources: CNNVD: CNNVD-201902-812

TYPE

lack of information

Trust: 0.6

sources: CNNVD: CNNVD-201902-812

CONFIGURATIONS

sources: JVNDB: JVNDB-2018-015073

EXPLOIT AVAILABILITY

sources: VULMON: CVE-2018-20219

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=89605

Trust: 0.6

sources: JVNDB: JVNDB-2018-015073 // CNNVD: CNNVD-201902-812

EXTERNAL IDS

db:NVDid:CVE-2018-20219

Trust: 2.7

db:PACKETSTORMid:151802

Trust: 2.7

db:JVNDBid:JVNDB-2018-015073

Trust: 0.8

db:CNNVDid:CNNVD-201902-812

Trust: 0.7

db:EXPLOIT-DBid:46451

Trust: 0.7

db:VULHUBid:VHN-131003

Trust: 0.1

db:VULMONid:CVE-2018-20219

Trust: 0.1

sources: VULHUB: VHN-131003 // VULMON: CVE-2018-20219 // JVNDB: JVNDB-2018-015073 // PACKETSTORM: 151802 // CNNVD: CNNVD-201902-812 // NVD: CVE-2018-20219

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-20219

Trust: 1.5

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

Trust: 0.8

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

Trust: 0.7

url:https://cwe.mitre.org/data/definitions/798.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-20220

Trust: 0.1

sources: VULHUB: VHN-131003 // VULMON: CVE-2018-20219 // JVNDB: JVNDB-2018-015073 // PACKETSTORM: 151802 // CNNVD: CNNVD-201902-812 // NVD: CVE-2018-20219

CREDITS

Stephen Shkardoon

Trust: 0.7

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

SOURCES

db:VULHUBid:VHN-131003
db:VULMONid:CVE-2018-20219
db:JVNDBid:JVNDB-2018-015073
db:PACKETSTORMid:151802
db:CNNVDid:CNNVD-201902-812
db:NVDid:CVE-2018-20219

LAST UPDATE DATE

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


SOURCES UPDATE DATE

db:VULHUBid:VHN-131003date:2019-03-25T00:00:00
db:VULMONid:CVE-2018-20219date:2019-03-25T00:00:00
db:JVNDBid:JVNDB-2018-015073date:2019-04-23T00:00:00
db:CNNVDid:CNNVD-201902-812date:2019-04-01T00:00:00
db:NVDid:CVE-2018-20219date:2024-11-21T04:01:06.427

SOURCES RELEASE DATE

db:VULHUBid:VHN-131003date:2019-03-21T00:00:00
db:VULMONid:CVE-2018-20219date:2019-03-21T00:00:00
db:JVNDBid:JVNDB-2018-015073date:2019-04-23T00:00:00
db:PACKETSTORMid:151802date:2019-02-20T23:02:22
db:CNNVDid:CNNVD-201902-812date:2019-02-20T00:00:00
db:NVDid:CVE-2018-20219date:2019-03-21T16:00:35.313