forge
Explore
Log in

Don't you dare go Hollow

im

Clone
★ 0

0 watching0 forksRustAGPL-3.0542.8 KiBb9f0726Tahinli27 days ago34 commits

attack-plan.md71 lines, 4.4 KiBHistoryRawDownload
1# Attack plan
2
3How `im` (first), `in` and `iz` are attacked after each build step. Every finding becomes a fix commit plus,
4when cheap, one regression test. Attacks run only against local instances on `127.0.0.1` with scratch data.
5
6## 1. im: authentication
7
8- Login: username enumeration by message, status, timing (unknown vs wrong password vs disabled); throttle
9 bypass (case/whitespace variants of the email, IPv6 /64 rotation, `X-Forwarded-For` spoofing without a
10 trusted proxy); throttle memory growth with random keys.
11- Pre-CSRF: login without the cookie/field, with mismatched values, cross-site form post.
12- 2FA: skip `/login/2fa` by going to `/` with the pending cookie; tamper/replay the pending cookie; reuse a TOTP
13 step; brute force within the window; recovery code reuse and race (two parallel submissions).
14- Sessions: fixation (does login rotate the token?), cookie flags, logout really deletes, revoked session still
15 works on live streams, `max_sessions` race.
16- Password reset / invite / email change: token reuse, parallel redemption race, expired token, token for
17 another user, enumeration through `/forgot`, links leaking into logs or redirects, email change to a taken
18 address at confirm time, confirm only one half.
19- Setup: `/setup` after the first user exists; two parallel setups.
20
21## 2. im: OIDC
22
23- `/authorize`: open redirect via `redirect_uri` (prefix, case, trailing slash, userinfo `@`, encoded chars,
24 fragments), missing/plain PKCE, `response_type` other than `code`, scope injection, `state`/`nonce` echo
25 injection (XSS in error page), unknown/disabled client.
26- `/token`: code reuse (must revoke the family), code for another client, wrong `redirect_uri`, wrong verifier,
27 expired code, client auth with the wrong secret, both basic and post at once, oversized bodies.
28- Refresh: reuse of a rotated token (family revocation), refresh after logout/disable, refresh for another
29 client.
30- Client credentials: scopes beyond `allowed_scopes`, `audience` not a family key, disabled client.
31- JWT: `alg: none`, alg confusion, unknown `kid`, expired, `aud` array tricks, signature of another key,
32 retired key still accepted after 7 days.
33- `/userinfo`, `/introspect`, `/revoke`: token of another client, revoked tokens.
34- Back-channel: does every session end reach every client; is the outbox retried; does a failure block logout.
35- `/logout`: `post_logout_redirect_uri` not registered (open redirect), missing `id_token_hint`.
36
37## 3. im: machine APIs
38
39- Directory/photo/family without a token, with a user access token instead of a client token, with the wrong
40 audience or scope, with an expired token.
41- Stream: cursor from the future, negative, huge; resync path; connection exhaustion.
42- Photo: path traversal in `{sub}`, huge upload, polyglot image (HTML/SVG in a PNG), content-type served.
43
44## 4. im: web
45
46- CSRF on every POST (missing, wrong, other session's token).
47- Authorization: every admin route as a member and as anonymous (expect 404); last-admin demotion/disable;
48 self-disable; IDOR on sessions/apps revoke (another user's id).
49- XSS: names, emails, client names, service names, user agents, audit data rendered everywhere (including the
50 admin pages and mails); CSP effectiveness.
51- Headers on every response type (pages, JSON, SSE, assets, errors).
52- Input limits: very long names, emails, passwords (argon2 cost DoS), huge forms, unicode tricks (homoglyph
53 emails, RTL override in names, NUL bytes).
54- `safe_next` bypasses on every `next` parameter.
55- Live: streams leak other users' data or keep running after sign-out.
56
57## 5. Operational
58
59- Kill the process mid-write; restart; integrity check. Disk full during photo upload.
60- Backup → restore → compare. Restore refuses a tampered set.
61- Config: unknown keys, missing file, bad values, secret files with loose permissions.
62- Concurrency: 50 parallel logins, 20 parallel token exchanges with one code, SQLite busy errors surfacing as
63 500s.
64
65## 6. in and iz
66
67The same web, CSRF, authz, XSS and header checks, plus: path traversal in names and blob keys, quota races with
68parallel uploads, chunk index/size abuse, Range header abuse, share-link password brute force, grant leakage
69through folder moves, trashed items reachable by grantees or links, service object namespace escape, iz role
70escalation, viewer writes, cross-task IDOR on attachments/comments, mail header injection via names and
71subjects, rule loops, reminder spam, zip bombs in sheet/slides viewers, SVG/HTML served inline.