Asp Inline Calendar — 1 vulnerability check
noctis ships 1 vulnerability check for Asp Inline Calendar, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
ASP Inline Corporate Calendar details.asp / defer.asp SQL injection
| CVE | CVE-2005-1481 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | sqli — SQL injection |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/asp-inline-calendar/CVE-2005-1481.yaml |
ASP Inline Corporate Calendar, a classic ASP events calendar backed by Microsoft Access, places the Event_ID parameter of details.asp and defer.asp into its database query without validation, so a remote attacker can run arbitrary SQL against the calendar database.
On /calendar and the web root, this check requests both pages with an Event_ID made of a random word and a single stray quote. This value only makes the query fail to parse and changes nothing. A page is suspect when the reply shows the database string syntax error (Access "Syntax error in string in query expression" or SQL Server "Unclosed quotation mark") quoting the random word. The check then sends the same word with the quote doubled, which is a valid SQL string: the flaw is confirmed only when this second request does not raise the error, proving the lone quote reached the SQL parser.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{v.d}}/{{v.p}}?Event_ID={{sc.tok}}%27{{v.post}} - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{v.d}}/{{v.p}}?Event_ID={{sc.tok}}%27%27{{v.post}} - Parses / computes the next value with a Rhai script
- Checks
hitfor\.asp Event_ID→ finding QoD 75: ASP Inline Corporate Calendar Event_ID SQL injection (CVE-2005-1481)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2005-1481
- https://seclists.org/bugtraq/2005/May/29
- https://www.exploit-db.com/exploits/25595
- https://www.exploit-db.com/exploits/25596
Feed source — tests/vulnerabilities/asp-inline-calendar/CVE-2005-1481.yaml
# ASP Inline Corporate Calendar — details.asp / defer.asp Event_ID SQL injection
# (CVE-2005-1481, BID 13485 / 13487).
#
# ASP Inline Corporate Calendar (Aaron Outpost, classic ASP + Access) splices the
# Event_ID parameter of details.asp and defer.asp into its database query
# ("... WHERE Event_ID LIKE ..."). Advisory PoCs (Bugtraq, 2005-05-03):
# Calendar/details.asp?Event_ID='
# Calendar/defer.asp?Event_ID='&Occurr_ID=0
# The product sources were never published; the vectors follow the advisory.
#
# Detection (QoD 75), read-only: under /calendar and the web root, both pages are
# requested with Event_ID=NOCTIS<random>' (a random word and one stray quote).
# The value cannot run anything: the database only fails to parse the query. A
# hit needs the database "Syntax error in string in query expression" (Jet /
# Access, ADO or ODBC) or SQL Server "Unclosed quotation mark" quoting the word,
# with an HTTP 500 or a database driver name. The same page is then requested
# with Event_ID=NOCTIS<random>'' (the quote doubled, so the string is balanced):
# the flaw is reported only when this control does NOT raise the string error —
# the error is caused by the lone quote reaching the SQL parser, not by a page
# that prints a database error for any value.
#
# Compared with the OpenVAS/Greenbone NVT `pre2008/asp_inline_sql_injection.nasl`
# (OID 1.3.6.1.4.1.25623.1.0.18187, GPL-2.0-only), which sends Event_ID=' to
# details.asp only and matches the fixed text "Syntax error in string in query
# expression 'Event_ID LIKE": this feed also tests defer.asp (the second sink of
# the CVE), works whether Event_ID is quoted or not in the query, requires a
# random word echoed by the parser error, and adds the balanced-quote control.
# CVSS: NVD carries only a CVSS v2 score (7.5).
uid: 89142de8-7448-47fc-bde1-c8cdcb4f9e8f
name: "ASP Inline Corporate Calendar details.asp / defer.asp SQL injection (CVE-2005-1481)"
description: |
ASP Inline Corporate Calendar, a classic ASP events calendar backed by
Microsoft Access, places the Event_ID parameter of details.asp and defer.asp
into its database query without validation, so a remote attacker can run
arbitrary SQL against the calendar database.
On /calendar and the web root, this check requests both pages with an
Event_ID made of a random word and a single stray quote. This value only
makes the query fail to parse and changes nothing. A page is suspect when
the reply shows the database string syntax error (Access "Syntax error in
string in query expression" or SQL Server "Unclosed quotation mark") quoting
the random word. The check then sends the same word with the quote doubled,
which is a valid SQL string: the flaw is confirmed only when this second
request does not raise the error, proving the lone quote reached the SQL
parser.
cves: [CVE-2005-1481]
cvss: 7.5
severity: high
category: sqli
confidence_base: 0.30
tags: [asp-inline-calendar, calendar, asp, access, sqli]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2005-1481"
- "https://seclists.org/bugtraq/2005/May/29"
- "https://www.exploit-db.com/exploits/25595"
- "https://www.exploit-db.com/exploits/25596"
steps:
- id: gen-marker
action: script
code: |
let tok = "NOCTIS" + rand_int(10000000, 99999999);
#{ tok: tok,
re: "(?i)(syntax error in string|unclosed quotation mark)[^<\\r\\n]{0,200}" + tok }
store_as: sc
- id: init-hit
action: set_var
var_name: hit
var_value: ""
# ── Per install dir × page (loop group) ───────────────────────────────────
- id: init-r
action: set_var
var_name: r
var_value: {status: 0, body: ""}
loop:
var: v
over:
- {d: "/calendar", p: "details.asp", post: ""}
- {d: "/calendar", p: "defer.asp", post: "&Occurr_ID=0"}
- {d: "", p: "details.asp", post: ""}
- {d: "", p: "defer.asp", post: "&Occurr_ID=0"}
- id: init-c
action: set_var
var_name: c
var_value: {status: 0, body: ""}
- id: init-sus
action: set_var
var_name: sus
var_value: false
- id: probe
action: http_request
method: GET
path: "{{v.d}}/{{v.p}}?Event_ID={{sc.tok}}%27{{v.post}}"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'hit == ""'
store_as: r
- id: check
action: script
condition: 'hit == ""'
code: |
let b = if type_of(r.body) == "string" { r.body } else { "" };
let drv = r.status == 500 || ereg("(?i)80040e14|JET Database Engine|Microsoft Access|ODBC|OLE DB|SQL Server", b);
r.status != 0 && drv && ereg(sc.re, b)
store_as: sus
# Control: the same word with the quote doubled is a valid SQL string.
- id: control
action: http_request
method: GET
path: "{{v.d}}/{{v.p}}?Event_ID={{sc.tok}}%27%27{{v.post}}"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
condition: 'hit == "" && sus'
store_as: c
- id: verdict
action: script
condition: 'hit == "" && sus'
code: |
let cb = if type_of(c.body) == "string" { c.body } else { "" };
if c.status != 0 && !ereg(sc.re, cb) {
let m = eregmatch("(?i)(Syntax error in string in query expression|Unclosed quotation mark)", r.body);
let what = if type_of(m) == "array" && m.len() > 0 { m[0] } else { "SQL string syntax error" };
v.d + "/" + v.p + " Event_ID: HTTP " + r.status + ", \"" + what + "\" quoting " + sc.tok +
"'; balanced control " + sc.tok + "'' gave HTTP " + c.status + " without it"
} else { "" }
store_as: hit
# ── Finding ───────────────────────────────────────────────────────────────
- id: report
action: match
source: hit
pattern: "\\.asp Event_ID"
condition: 'hit != ""'
on_match:
finding:
title: "ASP Inline Corporate Calendar Event_ID SQL injection (CVE-2005-1481)"
description: "ASP Inline Corporate Calendar passed the Event_ID parameter into its database query unvalidated: a lone quote broke the SQL string and the parser error quoted the injected word, while the same word with the quote doubled did not raise the string error. An attacker can run arbitrary SQL against the calendar database (read or change its events and accounts)."
remediation: "Remove ASP Inline Corporate Calendar or restrict access to it: the product is no longer maintained and no fixed release exists. If it must stay, validate Event_ID / Occurr_ID as integers and use parameterised queries in details.asp and defer.asp."
confidence_delta: 0.50
qod: 75
evidence: "{{hit}}"
stop: true