# Protocol: DoH under captive-style DNS hijack (7 days)

Slug: `doh-captive-portal-week`  
Frozen at: `2026-11-24T13:16:10Z`  
Question: Under captive-style DNS hijack, does DoH still reach the resolver while system DNS is intercepted?

## What this is not

- Not the DNS path intermittency diary. That study tracks resolver↔path alignment over time through ProxySeller. This study asks whether encrypted DNS escapes a **local captive-style hijack**.
- Not a hotel/airport field study. We **simulate** the hijack on loopback.
- Not a ProxySeller continuity or exit-geo study. ProxySeller is optional contrast at most once (Day 0), not a diary condition.

## Decision and lean rules

Captive portals commonly intercept **plaintext recursive DNS** (UDP/TCP 53) and return a portal address for arbitrary names. DoH queries ride HTTPS to a known resolver. This design freezes a small name list and two DoH bootstrap modes, then repeats the same local hijack for a week.

Lean:

- Prefer **local captive simulation**. No exploratory ProxySeller spam.
- Cap: ≤12 frozen query names; ≤2 DoH resolvers in the primary matrix.
- ProxySeller: **Day 0 optional contrast only** (one HTTP DoH probe). Diary slots are local-only.
- Brief the parent on Day 0 freeze, blockers, and the final article. No per-slot digests.

## Vantage

- Cursor Cloud Agent, USA datacenter.
- Collectors: Python 3 + `dig` + `curl`/urllib HTTPS DoH JSON.
- Local UDP DNS hijacker on `127.0.0.1` (ephemeral high port; never claims to own real network DNS).
- Captive sentinel A record: `203.0.113.10` (TEST-NET-3 documentation address). Never a live third-party IP presented as “portal.”
- Public evidence redacts raw egress IPs (opaque hashes only). Sentinel and DoH bootstrap IPs that are public well-known anycast (`1.1.1.1`, `8.8.8.8`) may be named.

## Frozen conditions (diary)

| ID | Meaning |
| --- | --- |
| `baseline-system-dns` | `dig` via VM default recursive (`/etc/resolv.conf`) — no hijack. Control that the name still resolves on the real path. |
| `captive-hijack-dns` | `dig @127.0.0.1 -p <hijackPort>` while the local hijacker is running — expect sentinel for every frozen A query. |
| `doh-ip-cloudflare` | DoH JSON to `https://1.1.1.1/dns-query` (bootstrap by well-known IP; Host/`authority` not required for Cloudflare JSON). |
| `doh-ip-google` | DoH JSON to `https://8.8.8.8/resolve`. |
| `doh-hostname-cloudflare` | Resolve `cloudflare-dns.com` **through the hijacker**, then attempt DoH to that answer (expects fail / portal poison when hijack is total). Also attempt DoH to the hostname via system HTTPS stack for contrast labeling. |
| `doh-hostname-google` | Same pattern for `dns.google`. |

Diary slots do **not** open ProxySeller. Day 0 may run one `proxy-http-doh-contrast` probe; if secrets missing → `not_run`.


## Frozen query names (cap 12)

Order fixed before Day 0 measurement. Membership is not reordered after freeze.

1. `example.com`
2. `neverssl.com`
3. `connectivitycheck.gstatic.com`
4. `captive.apple.com`
5. `detectportal.firefox.com`
6. `www.msftconnecttest.com`
7. `cloudflare.com`
8. `dns.google`
9. `cloudflare-dns.com`
10. `one.one.one.one`
11. `wikipedia.org`
12. `freepolicytools.com`

File of record: `targets.frozen.json`.

## Per-name outcomes (pre-registered)

For each frozen name, each slot records:

| Field | Meaning |
| --- | --- |
| `baseline_ok` | Baseline dig returned ≥1 A that is **not** the sentinel |
| `hijack_hit` | Hijack dig returned the sentinel (`203.0.113.10`) as an A |
| `doh_cf_ip_real` | Cloudflare DoH-by-IP returned ≥1 A that is not the sentinel |
| `doh_gg_ip_real` | Google DoH-by-IP returned ≥1 A that is not the sentinel |
| `doh_cf_host_poisoned` | Hijacker answer for `cloudflare-dns.com` was the sentinel (bootstrap poison) |
| `doh_gg_host_poisoned` | Same for `dns.google` |

Slot-level codes:

| Code | Rule |
| --- | --- |
| `hijack_armed` | All 12 names have `hijack_hit` |
| `doh_escapes` | `hijack_armed` and every name has `doh_cf_ip_real` **or** every name has `doh_gg_ip_real` (report both resolvers separately) |
| `doh_partial` | `hijack_armed` and some but not all names escape on a given DoH-IP resolver |
| `doh_blocked` | `hijack_armed` and that DoH-IP resolver fails or returns only sentinel for a name |
| `hijack_ineffective` | Any frozen name lacks `hijack_hit` |
| `baseline_broken` | Any frozen name lacks `baseline_ok` (lab network issue; slot excluded from rates until reviewed) |
| `inconclusive` | Tooling/timeout without a usable classification |

Primary answer to the study question: rate of `doh_escapes` on Cloudflare-IP and Google-IP across completed diary slots while `hijack_armed`.

Hostname-poison path is explanatory: under total hijack, **hostname** bootstrap of DoH is expected to fail; **IP** bootstrap is the escape under test.

## Cadence

**Schedule amendment (2026-11-28):** Extended from the Day 0 freeze (`2026-11-24T13:16:10Z`) to cover a full one-week collection window. The final slot is **`20261201T0600Z`**. Do not collect any slot after `20261201T0600Z`. Stop collection at `2026-12-01T06:30:00Z`; the deep article and site page follow after `2026-12-01T06:30:00Z`.

| Slot id | Window (UTC) |
| --- | --- |
| `20261124-immediate` | Day 0 first measurement (same day as freeze) |
| `20261124T1800Z` | `2026-11-24T17:50:00Z`–`2026-11-24T18:45:00Z` |
| `20261125T0600Z` | `2026-11-25T05:50:00Z`–`2026-11-25T06:45:00Z` |
| `20261125T1800Z` | `2026-11-25T17:50:00Z`–`2026-11-25T18:45:00Z` |
| `20261126T0600Z` | `2026-11-26T05:50:00Z`–`2026-11-26T06:45:00Z` |
| `20261126T1800Z` | `2026-11-26T17:50:00Z`–`2026-11-26T18:45:00Z` |
| `20261127T0600Z` | `2026-11-27T05:50:00Z`–`2026-11-27T06:45:00Z` |
| `20261127T1800Z` | `2026-11-27T17:50:00Z`–`2026-11-27T18:45:00Z` |
| `20261128T0600Z` | `2026-11-28T05:50:00Z`–`2026-11-28T06:45:00Z` |
| `20261128T1800Z` | `2026-11-28T17:50:00Z`–`2026-11-28T18:45:00Z` |
| `20261129T0600Z` | `2026-11-29T05:50:00Z`–`2026-11-29T06:45:00Z` |
| `20261129T1800Z` | `2026-11-29T17:50:00Z`–`2026-11-29T18:45:00Z` |
| `20261130T0600Z` | `2026-11-30T05:50:00Z`–`2026-11-30T06:45:00Z` |
| `20261130T1800Z` | `2026-11-30T17:50:00Z`–`2026-11-30T18:45:00Z` |
| `20261201T0600Z` | `2026-12-01T05:50:00Z`–`2026-12-01T06:30:00Z` (final slot) |

Mechanism: `subscribe_timer` / Cloud Agent turns running `python3 scripts/collect_slot.py --slot <id>`. No persistent cron on ephemeral VMs. Log each run in `diary/run-log.md`.

Day 0 freeze writes `targets.frozen.json`, starts the hijacker once for a dry-run sanity check, then runs `20261124-immediate`.

## Public evidence rules

- Commit under `research/doh-captive-portal-week/` and `public/research/doh-captive-portal-week/`.
- Never commit ProxySeller host, user, password, or raw residential IPs.
- `private/` is gitignored (hash salt, optional proxy URL file).

## Article rules and affiliates (amended 2026-11-28)

- Deep research article only; shallow content is never acceptable.
- Clear, specific, SEO-friendly title that states the actual finding.
- No GitHub PR numbers anywhere in the article.
- Keep ProxySeller (`https://freepolicytools.com/proxyseller/`) only if ProxySeller carried measurements in this study (Day 0 `proxy-http-doh-contrast`), with clear disclosure.
