Shareaza — 1 vulnerability check
noctis ships 1 vulnerability check for Shareaza, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Shareaza update notification spoofing
| CVE | CVE-2008-7164 |
|---|---|
| Severity | critical · CVSS 10.0 |
| Category | exposure — Exposure |
| Services | http, https, gnutella |
| Detection | set_var, http_request, script, match · highest QoD 70 |
| Feed | tests/vulnerabilities/shareaza/CVE-2008-7164.yaml |
Reads the Shareaza version from the Server header of its built-in HTTP server and flags releases before 2.3.1.0, which take update notifications from update.shareaza.com, a domain the vendor no longer controls — anyone holding it can push a spoofed update to the client.
How noctis detects it
- HTTP(S) request
GET / - Parses / computes the next value with a Rhai script
- Checks
sz.versionfor^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$→ finding QoD 70: GET / answered with 'Server: Shareaza …' — below 2.3.1.0, so update notifications come from update.shareaza.com, a domain no longer control…
References:
- https://nvd.nist.gov/vuln/detail/CVE-2008-7164
- https://sourceforge.net/p/shareaza/code/HEAD/tree/trunk/shareaza/UploadTransferHTTP.cpp
Feed source — tests/vulnerabilities/shareaza/CVE-2008-7164.yaml
# Shareaza update notification spoofing — CVE-2008-7164
#
# Shareaza before 2.3.1.0 fetched its update notifications from
# update.shareaza.com, a domain the vendor no longer controlled. Whoever holds
# that domain can push a spoofed "new version" notice that points users at an
# attacker-chosen installer.
#
# Detection is a version check: the flaw lives in the client's outbound update
# request, so a network scanner cannot trigger or observe it (proving it would
# mean answering for update.shareaza.com). Fingerprint only — QoD 70.
#
# Shareaza's built-in HTTP server (the Gnutella/G2 port, 6346 by default)
# answers every request through CUploadTransferHTTP::SendDefaultHeaders(),
# which writes `Server: Shareaza <a.b.c.d>` (theApp.m_sSmartAgent =
# CLIENT_NAME + " " + m_sVersion) and, for an inbound connection, a
# `Remote-IP:` header. GET / returns the "about" page.
#
# Improvements over the NASL:
# - The four version components are compared as integers, so a 2.10.x.x or
# 2.3.10.x build is never mis-ordered by a string comparison.
# - The Server header must be exactly `Shareaza a.b.c.d`: a fork that
# renames itself (another CLIENT_NAME) or a header that merely mentions
# Shareaza does not match.
# - Runs on any HTTP port and on nmap's `gnutella` service, not only on 6346.
#
# Ported from OpenVAS/Greenbone NVT 2009/gb_shareaza_update_notification_spoof_vuln.nasl
# (GPL-2.0-only): fixed version 2.3.1.0 and port 6346 taken from that plugin.
uid: 5cd29910-f50c-4b77-afeb-fc48841ac4a4
name: "Shareaza update notification spoofing (CVE-2008-7164)"
description: |
Reads the Shareaza version from the Server header of its built-in HTTP
server and flags releases before 2.3.1.0, which take update notifications
from update.shareaza.com, a domain the vendor no longer controls — anyone
holding it can push a spoofed update to the client.
cves: [CVE-2008-7164]
cvss: 10.0
severity: critical
category: exposure
confidence_base: 0.30
tags: [shareaza, p2p, gnutella, update-spoofing, version-check, openvas, web-application-abuses]
services: [http, https, gnutella]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2008-7164"
- "https://sourceforge.net/p/shareaza/code/HEAD/tree/trunk/shareaza/UploadTransferHTTP.cpp"
# OpenVAS/Greenbone NASL 2009/gb_shareaza_update_notification_spoof_vuln.nasl (GPL-2.0-only)
steps:
# Pre-initialise so a failed request never leaves home undefined.
- id: init-home
action: set_var
var_name: home
var_value: {status: 0, body: "", headers: {}}
- id: about-page
action: http_request
method: GET
path: "/"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: home
# Server: Shareaza a.b.c.d → compare the four components as integers.
- id: parse-version
action: script
store_as: sz
code: |
let server = home.headers["server"];
let res = #{ found: false, version: "", vulnerable: false };
if type_of(server) == "string" {
let m = eregmatch("^Shareaza ([0-9]+)\\.([0-9]+)\\.([0-9]+)\\.([0-9]+)$", chomp(server));
if m.len() == 5 {
let v = [int(m[1]), int(m[2]), int(m[3]), int(m[4])];
let fixed = [2, 3, 1, 0];
let lt = false;
let decided = false;
for i in 0..4 {
if !decided && v[i] != fixed[i] {
lt = v[i] < fixed[i];
decided = true;
}
}
res.found = true;
res.version = m[1] + "." + m[2] + "." + m[3] + "." + m[4];
res.vulnerable = lt;
}
}
res
- id: affected-version
action: match
condition: "sz.found == true && sz.vulnerable == true"
source: sz.version
pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$"
on_match:
finding:
confidence_delta: 0.40 # 0.30 + 0.40 = 0.70
qod: 70
evidence: "GET / answered with 'Server: Shareaza {{sz.version}}' — below 2.3.1.0, so update notifications come from update.shareaza.com, a domain no longer controlled by the vendor"
remediation: "Upgrade Shareaza to 2.3.1.0 or later."
stop: true