Skip to content

makit v0.7.0

Latest

Choose a tag to compare

@ngvcanh ngvcanh released this 04 Oct 17:54
· 7 commits to main since this release

Upgrading: behind Caddy or nginx asking makit, paste the new snippet (makit shield snippet caddy|nginx) — makit
now reads the visitor from X-Forwarded-For and no longer reads X-Makit-Peer, X-Makit-Client or
client_ip_header. With an old snippet behind a CDN, every visitor is the CDN's address (makit shield config check
and the gate's log say so).

  • makit shield stops exploits carried in headers, each a catalog rule named by its CVE and replayed from its public
    proof of concept: the Next.js middleware bypass (x-middleware-subrequest, CVE-2025-29927), Spring Cloud Function
    SpEL (CVE-2022-22963), Struts OGNL in Content-Type (CVE-2017-5638), F5 BIG-IP iControl (CVE-2022-1388), Fortinet
    (CVE-2022-40684), ../ in Accept (Rails CVE-2019-5418) and X-Rewrite-URL (Symfony CVE-2018-14773). Shellshock
    in any header and a client's X-Original-URL are scored. Only headers no browser, crawler, CDN or load balancer
    sends are named; real browser, CDN and API traffic is replayed beside them and passes. In ask mode, what the asking
    proxy writes about the request (X-Forwarded-Uri, ingress-nginx's X-Original-URL…) is no longer matched as the
    visitor's. The eleven rules cost what the four did: the URI is lower-cased once per request instead of once per
    rule, rules are no longer copied per request, and a field's ASCII check is made once (Decide on a browser request
    5.8 µs before and after; an attack 29 allocations instead of 30).
  • makit shield reads the visitor from the fields every proxy writes — X-Forwarded-For, else Forwarded, else
    X-Real-IP — walking back through trusted_proxies, whatever is in front: Cloudflare, CloudFront, Fastly, a
    DigitalOcean or AWS load balancer, or several. A provider's own header (CF-Connecting-IP) is no longer read:
    every proxy behind the provider passes it on as received, so with a load balancer between Cloudflare and the
    server, a client that skipped Cloudflare chose its own address with it — and got any address it named banned (an
    office, Googlebot) instead of its own. client_ip_header is no longer read (config check says so).
  • Ask mode needs no header of makit's: the asking proxy appends the address it got the request from to
    X-Forwarded-For, as proxies do (nginx $proxy_add_x_forwarded_for; the Caddy snippet's
    header_up X-Forwarded-For "{http.request.header.X-Forwarded-For}, {remote_host}", since Caddy replaces the chain
    unless it trusts its peer). X-Makit-Peer and X-Makit-Client are no longer read. Paste the new snippet
    (makit shield snippet caddy|nginx): with an old one, the visitor behind a CDN is the CDN's address. makit's
    X-Makit-Client and X-Makit-Verdict answers only tell the infrastructure the request went through makit; what
    the app sees is the proxy's to set.
  • makit shield: the gate answers this machine at any of its own addresses, not only loopback and private ones. With
    admin: 172.17.0.1:9180 and docker0 down (nothing on Docker's default bridge), a request from the host leaves
    through lo and Docker's MASQUERADE rewrites its source to eth0's public address: the gate refused it, and
    makit shield status failed with "invalid character 'o' in literal false". A host Caddy or nginx asking that
    address was refused the same way. Other machines cannot use this: the kernel drops packets from outside that carry
    one of its own addresses.
  • An upgrade takes effect at once: the shield's systemd unit runs /opt/makit/current, not the folder of the version
    that wrote it, and install.sh — what makit upgrade runs — restarts a running gate on the new version after
    checking its config with the new binary (a config the new version refuses leaves the old gate running). New:
    makit shield restart.
  • A fake Googlebot (Bingbot, Applebot: any crawler with published ranges and reverse DNS) can no longer slip past
    bots.policy.spoofed by making its own reverse DNS fail. Outside the operator's ranges, reverse DNS only rescues a
    new address; a timeout or SERVFAIL — its operator's choice — left it "unknown" for 10 minutes, never spoofed. It is
    now spoofed, and asked again after 10 minutes (not 24 hours) so a real crawler whose DNS was briefly down recovers.
  • makit shield status and makit top never send the admin address's requests through http_proxy. A non-JSON
    answer is reported with its HTTP status and first line, and the gate's refusal names the address it refused.
  • tests/server-e2e.sh: a fresh VPS end to end (terrarium's linux-server: systemd, Docker inside, eth0 with the public
    address first) — install the release, makit init, the shield with its admin on Docker's bridge, then upgrade to the
    checkout and check the gate runs it, answers the CLI, and allows a visitor and blocks a probe asked from a container.
    install.sh takes MAKIT_FROM=DIR to install a build's release files, checksums verified the same way.
curl -fsSL https://raw.githubusercontent.com/material-atomic/makit/v0.7.0/install.sh | bash

Source tarball SHA256 (MAKIT_SHA256): fd87e53f2e3ac1e8a1d499bc3eddcbaa865a2e24ae3d74fe2e714e3641d27612
Source tarball and makit-core binaries: SHA256SUMS (verified by install.sh).