Viralator — 1 vulnerability check

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

← All products · Feeds on GitHub

Viralator viralator.cgi download URL command execution

CVECVE-2001-0849
Severityhigh · CVSS 7.5
Categoryrce — Remote code execution
Serviceshttp, https
Detectionset_var, http_request · highest QoD 70
Feedtests/vulnerabilities/viralator/CVE-2001-0849.yaml

Detects the viralator.cgi script of Viralator, a web front end that downloads a file with wget and passes it to a virus scanner. Viralator 0.9pre1 and earlier pass the URL of the file to download to wget insecurely, which lets a remote attacker run commands with the rights of the web server account (CVE-2001-0849). The test requests viralator.cgi under the web root, /cgi-bin, /scripts and /cgi, after a random-name control request that must not answer 200, and reports an HTML reply that names Viralator. No injection payload is sent.

How noctis detects it

  1. HTTP(S) request GET /cgi-bin/noctis-{{oob_token}}.cgi
  2. HTTP(S) request GET {{loc.dir}}/viralator.cgi, for each of 4 values → finding QoD 70: Viralator viralator.cgi present — CVE-2001-0849

References:

Feed source — tests/vulnerabilities/viralator/CVE-2001-0849.yaml
# Viralator — viralator.cgi command execution through the download URL
# (CVE-2001-0849, BID 3495)
#
# Credit: target program from Greenbone's `2008/viralator.nasl` (GPL-2.0-only),
# which reports any host where /viralator.cgi exists under the CGI directories.
#
# Facts:
#  - NVD: "viralator CGI script in Viralator 0.9pre1 and earlier allows remote
#    attackers to execute arbitrary code via a URL for a file being downloaded,
#    which is insecurely passed to a call to wget."
#  - Viralator is a web front end that downloads a file through wget and hands it
#    to a virus scanner. The project is abandoned; no per-install version is shown.
#
# Why no exploitation proof: the injection sits in the download URL field
# of the form; the exact parameter and quoting of the vulnerable releases is not
# documented in any source available here, and a guessed payload would be a
# blind shell command against a target. Presence of the CGI is the finding (QoD 70).
#
# Better than the reference check (which accepts any 200 on the path):
#  - a random /cgi-bin/<token>.cgi control must not answer 200, and
#  - the reply must be an HTML page naming Viralator (a catch-all or
#    custom 200 page cannot match), not the script source.
uid: d6d14f01-bc4e-461a-8b2d-eec9a58d37f6
name: "Viralator viralator.cgi download URL command execution (CVE-2001-0849)"
description: |
  Detects the viralator.cgi script of Viralator, a web front end that downloads
  a file with wget and passes it to a virus scanner. Viralator 0.9pre1 and
  earlier pass the URL of the file to download to wget insecurely, which lets a
  remote attacker run commands with the rights of the web server account
  (CVE-2001-0849). The test requests viralator.cgi under the web root, /cgi-bin,
  /scripts and /cgi, after a random-name control request that must not answer
  200, and reports an HTML reply that names Viralator. No injection payload is
  sent.
cves: [CVE-2001-0849]
cvss: 7.5
severity: high
category: rce
confidence_base: 0.30
tags: [viralator, cgi, wget, command-injection, rce]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2001-0849"
  - "http://www.securityfocus.com/bid/3495"

steps:
  - id: init-control
    action: set_var
    var_name: control_ok
    var_value: false

  - id: control
    action: http_request
    method: GET
    path: "/cgi-bin/noctis-{{oob_token}}.cgi"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 8
    store_as: control
    on_success:
      condition: "control.status != 200"
      set_vars:
        control_ok: true

  - id: probe-viralator
    action: http_request
    condition: "control_ok"
    method: GET
    path: "{{loc.dir}}/viralator.cgi"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: probe
    loop:
      over:
        - {dir: ""}
        - {dir: "/cgi-bin"}
        - {dir: "/scripts"}
        - {dir: "/cgi"}
      var: loc
    on_success:
      condition: 'control_ok && probe.status == 200 && !ereg("^\\s*#!", probe.body) && ereg("(?i)<title>[^<]*viralator", probe.body)'
      finding:
        title: "Viralator viralator.cgi present — CVE-2001-0849"
        description: "{{loc.dir}}/viralator.cgi answered with a Viralator page while a random CGI name did not. Viralator 0.9pre1 and earlier pass the download URL to wget insecurely, so a remote attacker can run commands as the web server account (CVE-2001-0849). No payload was sent."
        remediation: "Remove viralator.cgi: the project is abandoned and no fixed release is known. Replace it with maintained download-scanning software, or restrict it to trusted clients."
        confidence_delta: 0.40
        qod: 70
        evidence: "GET {{loc.dir}}/viralator.cgi -> HTTP {{probe.status}}, Viralator page; control /cgi-bin/noctis-<token>.cgi -> {{control.status}}"

View these feeds on GitHub