YaBB — 1 vulnerability check
noctis ships 1 vulnerability check for YaBB, covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
YaBB 1 GOLD SP 1.3.2 imsend reflected XSS
| CVE | CVE-2004-2402, CVE-2004-2403 |
|---|---|
| Severity | medium · CVSS 4.3 |
| Category | xss — XSS |
| Services | http, https |
| Detection | script, set_var, tcp_connect, match · highest QoD 75 |
| Feed | tests/vulnerabilities/yabb/yabb-1-gold-imsend-xss.yaml |
Tests a YaBB (Yet another Bulletin Board) forum for the reflected cross-site scripting flaw in the YaBB.pl instant-message form `to` parameter (CVE-2004-2402), tracked with the administrative CSRF flaw CVE-2004-2403 in YaBB 1 GOLD SP 1.3.2. Confirms by sending an inert script tag carrying a per-scan random marker and checking it is echoed back unescaped.
How noctis detects it
- Parses / computes the next value with a Rhai script
- Raw TCP (TLS on HTTPS), sent verbatim:
GET {{dir}}/YaBB.pl HTTP/1.0 - Checks
fp.bannerforPowered by YaBB|yabbforum\.com - Raw TCP (TLS on HTTPS), sent verbatim:
GET {{dir}}/YaBB.pl?board=;action=imsend;to=%22%3E%3Cscript%3E{{marker}}%3C/script%3E HTT… - Parses / computes the next value with a Rhai script
- Checks
resp.bannerfor<script>noctis[0-9a-f]+</script>→ finding QoD 75: YaBB forum at …/YaBB.pl reflected the inert tag <script>…</script> unescaped from the imsend `to` parameter — …/YaBB.pl?board=;action=imsen…
References:
Feed source — tests/vulnerabilities/yabb/yabb-1-gold-imsend-xss.yaml
# YaBB 1 GOLD SP 1.3.2 Multiple Vulnerabilities (CVE-2004-2402, CVE-2004-2403)
#
# YaBB.pl echoes the `to` parameter of the instant-message send form
# (action=imsend) into the generated HTML without escaping it — a reflected
# cross-site scripting flaw (CVE-2004-2402). The same release is also open to
# cross-site request forgery of administrative actions (CVE-2004-2403), which
# cannot be proven remotely without acting as an administrator, so the feed
# confirms the XSS and reports both IDs the way the source NVT does.
#
# Detection (ported from OpenVAS/Greenbone NVT pre2008/yabb_xss.nasl):
# 1. GET <dir>/YaBB.pl and require the YaBB footer ("Powered by YaBB" or a
# yabbforum.com link) — only a real YaBB forum is probed further.
# 2. GET <dir>/YaBB.pl?board=;action=imsend;to=%22%3E%3Cscript%3E<marker>%3C/script%3E
# and require an HTTP 200 whose body carries <script><marker></script>
# unescaped.
# Improvements over the NASL: the reflected script body is a per-scan random
# marker instead of the fixed word "foo", so a page that merely contains
# "<script>foo</script>" or caches an earlier probe cannot match; and the
# install paths tried also cover the usual CGI layouts (/cgi-bin/yabb, ...).
# The payload is URL-encoded in the query, so it is sent verbatim with
# tcp_connect (reqwest would re-encode it) and matched on resp.banner.
uid: 598f89d8-8684-46d4-a78b-a95ffaede9c4
name: "YaBB 1 GOLD SP 1.3.2 imsend reflected XSS (CVE-2004-2402)"
description: |
Tests a YaBB (Yet another Bulletin Board) forum for the reflected cross-site
scripting flaw in the YaBB.pl instant-message form `to` parameter
(CVE-2004-2402), tracked with the administrative CSRF flaw CVE-2004-2403 in
YaBB 1 GOLD SP 1.3.2. Confirms by sending an inert script tag carrying a
per-scan random marker and checking it is echoed back unescaped.
cves: [CVE-2004-2402, CVE-2004-2403]
cvss: 4.3
severity: medium
confidence_base: 0.30
category: xss
tags: [yabb, forum, perl, cgi, xss, web-abuse]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2004-2402"
- "https://nvd.nist.gov/vuln/detail/CVE-2004-2403"
- "OpenVAS/Greenbone NASL pre2008/yabb_xss.nasl (GPL-2.0-only)"
steps:
# Per-scan marker: "noctis" + 16 lowercase hex chars.
- id: mint-marker
action: script
code: '"noctis" + rand_hex(8)'
store_as: marker
# ── Loop group: every step below runs once per candidate install path ────
# Pre-initialise everything the later steps read, so a refused connection or
# a skipped probe never leaves a variable undefined (that aborts the test).
- id: init-fp
action: set_var
var_name: fp
var_value: {connected: false, banner: null}
loop:
over: ["/yabb", "/forum", "/cgi-bin/yabb", "/cgi-bin/forum", "/cgi-bin", ""]
var: dir
- id: init-resp
action: set_var
var_name: resp
var_value: {connected: false, banner: null}
- id: init-yabb-page
action: set_var
var_name: yabb_page
var_value: false
# 1 — fingerprint: the forum index must be a YaBB board (NASL gate).
- id: fingerprint
action: tcp_connect
port: "{{port}}"
send: "GET {{dir}}/YaBB.pl HTTP/1.0\r\nHost: {{target_host}}\r\nAccept: text/html,*/*\r\nConnection: close\r\n\r\n"
timeout_secs: 10
store_as: fp
- id: fingerprint-match
action: match
source: fp.banner
pattern: "Powered by YaBB|yabbforum\\.com"
on_match:
set_vars:
yabb_page: true
# 2 — the XSS probe, verbatim from the NASL except for the random marker.
- id: xss-probe
action: tcp_connect
port: "{{port}}"
condition: "yabb_page == true"
send: "GET {{dir}}/YaBB.pl?board=;action=imsend;to=%22%3E%3Cscript%3E{{marker}}%3C/script%3E HTTP/1.0\r\nHost: {{target_host}}\r\nAccept: text/html,*/*\r\nConnection: close\r\n\r\n"
timeout_secs: 10
store_as: resp
# HTTP 200 and the raw <script><marker></script> tag in the reply. An
# HTML-encoded echo (<script>…) from a fixed release does not match.
- id: verify
action: script
code: |
let b = resp.banner;
if type_of(b) != "string" { false }
else {
ereg("^HTTP/1\\.[01] 200", b) && stridx(b, "<script>" + marker + "</script>") >= 0
}
store_as: xss_hit
- id: xss-match
action: match
source: resp.banner
pattern: "<script>noctis[0-9a-f]+</script>"
condition: "xss_hit == true"
on_match:
finding:
confidence_delta: 0.55
qod: 75
evidence: "YaBB forum at {{dir}}/YaBB.pl reflected the inert tag <script>{{marker}}</script> unescaped from the imsend `to` parameter — {{dir}}/YaBB.pl?board=;action=imsend;to=%22%3E%3Cscript%3E{{marker}}%3C/script%3E"
stop: true