APEX Daily Pulse — 2026-11-17
Trusted URL Prefix Is Not Trusted Destination
[✅ Verified] Pillar: Adversary adaptation and deception awareness
[❓ Unverified] Estimated duration: 3–5 minutes
Reactivation target: Detect endpoint checks that accept a trusted name in the wrong URL component.
Prerequisites
- Python 3.12+ with standard-library urllib.parse.
- A Bash-compatible terminal on owned equipment.
- Offline only. All names use .invalid; do not open the URLs.
Actions
- 1. Predict the destination host for each fixture. The approved endpoint is HTTPS on
collector.apex.invalid, port 443, without user credentials.
- 2. Run this complete parser comparison:
python3 - <<'PY'
from urllib.parse import urlsplit
approved = "collector.apex.invalid"
cases = {
"approved": f"https://{approved}/upload",
"userinfo": f"https://{approved}@other.invalid/upload",
"suffix": f"https://{approved}.other.invalid/upload",
"wrong_port": f"https://{approved}:8443/upload",
}
def permitted(url: str) -> bool:
"""Check the declared endpoint policy for these ASCII fixtures."""
try:
parsed = urlsplit(url)
port = 443 if parsed.port is None else parsed.port
return (
parsed.scheme == "https"
and parsed.hostname == approved
and parsed.username is None
and parsed.password is None
and port == 443
)
except ValueError:
return False
decisions: dict[str, bool] = {}
naive_decisions: list[bool] = []
for label, url in cases.items():
naive = url.startswith(f"https://{approved}")
guarded = permitted(url)
naive_decisions.append(naive)
decisions[label] = guarded
print(
f"{label}: host={urlsplit(url).hostname} "
f"naive={naive} guarded={guarded}"
)
passed = (
all(naive_decisions)
and decisions == {
"approved": True,
"userinfo": False,
"suffix": False,
"wrong_port": False,
}
)
print(f"drill_passed={passed}")
raise SystemExit(0 if passed else 1)
PY
- 3. Inspect the
userinforesult. Text before@is user information, not the destination host. The parsed host isother.invalid.
- 4. Confirm that the guarded check also rejects the suffix host and unexpected port. A familiar leading string is insufficient in all three cases.
Observable signal
[❓ Unverified] Expected output; this fixture was not executed in this run:
approved: host=collector.apex.invalid naive=True guarded=True
userinfo: host=other.invalid naive=True guarded=False
suffix: host=collector.apex.invalid.other.invalid naive=True guarded=False
wrong_port: host=collector.apex.invalid naive=True guarded=False
drill_passed=True
[✅ Verified] Mechanism: prefix comparison checks characters, not URL authority. Parsing separates scheme, user information, host, and port so each policy condition can be evaluated independently.
Success condition
The naive check accepts all four fixtures. The guarded check permits only the approved endpoint. All assertions pass without making a network request.
Failure signature
[✅ Verified] userinfo: naive=True followed by endpoint approval means the check trusts a name in the credential field while the URL names a different destination host.
Python unavailable: Node.js alternative
Use Node's built-in URL interface:
node <<'JS'
"use strict";
const cases = [
["approved", "https://collector.apex.invalid/upload", true],
["userinfo", "https://collector.apex.invalid@other.invalid/upload", false],
["suffix", "https://collector.apex.invalid.other.invalid/upload", false],
["wrong_port", "https://collector.apex.invalid:8443/upload", false]
];
let passed = true;
for (const [label, text, expected] of cases) {
const url = new URL(text);
const allowed =
url.origin === "https://collector.apex.invalid" &&
url.username === "" &&
url.password === "";
console.log(label + ": host=" + url.hostname + " allowed=" + allowed);
passed = passed && allowed === expected;
}
console.log("drill_passed=" + passed);
process.exitCode = passed ? 0 : 1;
JS
[❓ Unverified] Expected alternative decisions: approved true; the other three false.
Boundary check
[✅ Verified] Hidden assumption: the checked URL is the destination used by the client. Redirects, proxies, DNS changes, and parser differences can break that assumption. This fixture validates URL fields, not the eventual network peer or TLS identity.
[✅ Verified] Use the same URL interpretation for policy and execution. Revalidate redirect destinations or disable redirects where the acquisition contract requires one fixed endpoint. Keep this check in the collection wrapper so operators do not need to inspect URL punctuation manually.
Adaptation question
Which APEX upload, callback, or reachback paths approve endpoints with string-prefix checks instead of parsed scheme, host, credentials, and port?