Bifrost/docs/research/anonymous-vote-stuffing-prior-art.md
Meta Vens bf83a9321b Research: prior art on anonymous-vote stuffing defences
Served concept-mill-votes Cut 4 (anti-stuffing defence). Facts with source
pointers on PoW captchas, device cookies, network buckets, ePrivacy status of
anti-abuse cookies, and after-the-fact purge at HN, Stack Exchange and Reddit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 05:01:18 +02:00

17 KiB

Anonymous vote stuffing: prior art

Serves the fork: concept-mill-votes Cut 4, anti-stuffing defence; campaign concept-mill-votes; 2026-10-10. Subject text: "Anti-stuffing defence" in F:\Projects\Bifrost\docs\concept-mill-votes-target.md (lines ~106-130). Gathered by Eyes. Facts with pointers; no recommendation. Items marked (secondary) were not read at the primary source. Search-engine summaries were not verified against the pages unless stated.

Gaps: (a) a query for residential-proxy and CAPTCHA-farm pricing was refused by the search tool, so no measured cost of a headless/proxy farm is here; (b) StrawPoll's own duplicate-check docs were not found; (c) Friendly Captcha's own licence/docs pages were not read; (d) ALTCHA's server-verification and PoW doc pages returned 404/empty; (e) national ePrivacy guidance beyond CNIL and ICO was not searched.

1. Anonymous and low-friction voting in established systems

2. Proof-of-work challenges

Project Licence Self-host .NET Pointers
ALTCHA MIT (widget README) Yes Official server list: TS, Dart, PHP, Go, Python, Java, Ruby, Elixir, Rust, C++ (no C#). Community: Ixnas.AltchaNet (0.4.x; SHA-256; replay store interface; bundled in-memory store "for testing only") and unofficial Altcha.Net 1.2.0 (replay store interface; in-memory not advised multi-server) https://raw.githubusercontent.com/altcha-org/altcha/main/README.md ; https://www.nuget.org/packages/Altcha.Net ; https://www.nuget.org/packages/Ixnas.AltchaNet (via search, not opened)
mCaptcha AGPL-3.0 Yes, Docker Compose; separate Rust service None found https://github.com/mCaptcha/mCaptcha ; README: "active development", no releases listed, SHA-256 PoW, difficulty scales with load (about 2 s under attack), proof configs expire after 30 s and are single-use, cookie-free, IP-independent
Cap Apache-2.0 Yes, Docker/workers None stated https://github.com/tiagozip/cap ; README claims "gpu-resistant" PoW plus instrumentation challenges; no algorithm parameters; size claims are marketing
Friendly Captcha Third-party listings: front end MPL-2.0 (unconfirmed); back end hosted commercial, a "lite" self-host server mentioned (unconfirmed) Hosted service Not checked https://friendlycaptcha.com/insights/open-source-captcha/ ; https://openalternative.co/friendly-captcha (secondary)
Anubis MIT, Go Yes, reverse-proxy sidecar n/a https://github.com/TecharoHQ/anubis ; aimed at scrapers; README calls itself "a bit of a nuclear response" and notes it can block good bots
  • ALTCHA widget: PBKDF2/SHA variants bundled; Argon2id and Scrypt (memory-bound, "harder to accelerate on ASICs or GPUs") are separate imports; minDuration default 500 ms; timeout default 90 s; humanInteractionSignature on by default (mechanism not documented in the README). Ixnas.AltchaNet defaults: complexity 50000-100000, expiry 120 s (search summary).
  • Argued or measured attacker cost:
  • Reuse shape: mCaptcha tokens are single-use and short-lived; Anubis issues a cookie that covers later requests.

3. ASP.NET Core rate limiting and forwarded headers

Docs read: https://learn.microsoft.com/en-us/aspnet/core/performance/rate-limit (ms.date 2026-09-03; covers 7.0-12.0) and https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer (ms.date 2026-04-23).

  • Rate limiter: AddRateLimiter, GlobalLimiter or named policies, PartitionedRateLimiter.Create<HttpContext,string>, RateLimitPartition.GetFixedWindowLimiter etc. The doc's "By IP address" sample keys on Connection.RemoteIpAddress?.ToString() ?? "unknown". The page contains no IPv6 prefix guidance.
  • Doc warnings: partitioning on user-controlled input can exhaust memory (each distinct key creates and caches a limiter); "if you create partitions by using client IP addresses, your app becomes vulnerable to Denial of Service attacks that use IP Source Address Spoofing" (cites BCP 38).
  • UseRateLimiter must come after UseRouting when endpoint-specific policies/attributes are used; global-only may precede it.
  • Time-based limiters do not refund a permit already taken when a later chained limiter rejects.
  • OnRejected/RejectionStatusCode are needed for 429; the doc shows setting Retry-After manually or from lease metadata.
  • Forwarded headers:
    • Middleware "should run before other middleware" (before UseHsts; may follow diagnostics/error handling). Anything reading RemoteIpAddress, including the rate limiter, must come after it to see the forwarded address.
    • Default KnownNetworks is a single loopback entry (IPNetwork(IPAddress.Loopback, 8)), and KnownProxies likewise loopback-only. Forwarded values are accepted only if the immediate peer matches one of the lists.
    • Default ForwardLimit is 1: only the rightmost X-Forwarded-For entry is processed (right to left). Null is advised only with known proxies/networks configured.
    • Doc: "Only allow trusted proxies and networks to forward headers. Otherwise, IP spoofing attacks are possible."
    • Dual-mode sockets: IPv4 entries must be given in IPv4-mapped IPv6 form; check RemoteIpAddress to see which applies.
    • ASPNETCORE_FORWARDEDHEADERS_ENABLED=true uses cloud-style settings and "doesn't enable features such as the KnownProxies option".
    • Unverified: whether newer .NET renames KnownNetworks; the page read lists KnownNetworks with IPNetwork.
  • IPv6 prefix practice (practitioner sources only; no standard or vendor guidance found):

5. Known failure modes per layer

  • Device token: cleared cookies, private windows and fresh profiles reset it (poll vendors, Kentico); a scripted client omits or discards it. Unpersisted Data Protection keys invalidate every issued token on each restart; deleted keys invalidate tokens signed with them.
  • IP/prefix limits:
    • Shared NAT: poll vendors report schools and offices tripping IP checks. CGN measurement: Livadariu et al. infer 4.1K ASes deploy CGN (2014-2016 data); Mandalari et al. found CGN in 10% of 60+ tested ISPs; Richter et al. https://arxiv.org/abs/1605.05606 ; CAIDA https://www-old.caida.org/publications/papers/2018/inferring_carrier_grade_nat/ . Blocklists and address reuse: https://steel.isi.edu/members/sivaram/papers/blocklisting_impact.pdf . No CGN false-positive rate for voting found.
    • Mobile IPv6: carriers commonly assign a /64 per device (forum, secondary); whether a named carrier changes the prefix per session was not found. RFC 8981 rotates addresses within the /64.
    • Delegated prefixes larger than /64 span many buckets (v6ops/NANOG above).
    • Header trust: forged X-Forwarded-For is accepted only when the immediate peer is in KnownProxies/Networks; without UseForwardedHeaders, RemoteIpAddress is the proxy for every client (one bucket). IP-keyed partitions carry the doc's DoS/memory warning.
  • Audit-and-purge: HN and Stack Exchange both reverse or demote by pattern and both document false positives (above); neither publishes thresholds.
  • PoW: Laurie/Clayton and Anubis (above): attackers with solvers or botnets pay CPU; legitimate low-end devices pay too; a reusable cookie spreads one solve over many requests. .NET libraries require a replay store; in-memory stores are test-only/single-instance. Headless-farm cost: not gathered.
  • Third-party challenge: CNIL Q17 names reCAPTCHA as requiring consent where the provider reuses data.

Where the current design's assumptions are contradicted by evidence

  1. The design lists proof-of-work as slowing scripts yet barely touching determined attackers; the cited literature agrees, but the design also says ALTCHA "needs no third party" and is "ALTCHA-style library served from Bifrost": ALTCHA has no official C# server library, only community packages that need a custom replay store for production.
  2. Data Protection default key persistence is process-lifetime unless a profile/registry/volume exists; default key lifetime is 90 days, not one year. The one-year device cookie depends on retired keys being kept and DataProtection__KeysPath set (the doc's fact 22 flags the path; the doc does not state the key-loss consequence for tokens).
  3. The design's /64 partition for IPv6 is described by practitioner sources as bypassable by one household holding a /56 or /48 and by privacy-extension rotation inside a /64; the opposite risk (aggregating above /64 on mobile) is documented as collateral damage. No evidence was found for the /24 IPv4 choice.
  4. The design treats the device cookie as needing no consent notice; ICO and CNIL exempt security cookies only where security is the sole purpose and from the user's side, CNIL calls fraud-prevention trackers generally non-exempt (exception: securing an authentication mechanism), and ICO says users should still be informed. A vote-integrity cookie is not an authentication mechanism and was not addressed by either text found.
  5. The design says large sites "rely on after-the-fact detection ... then discount or purge": confirmed for HN, Stack Exchange and (secondary) Reddit, but those systems also publish no thresholds, keep false-positive reversals, and Reddit/Product Hunt add vote fuzzing or voter-history weighting, which the design does not include.