According to recent reports, every time a phishing attack makes the news, the conversation collapses into the same tired take: "people just need better training." That framing is wrong, and it lets the real culprits off the hook. Phishing is a structural problem rooted in how domains are trusted, displayed, and verified. If you run self-hosted services, understanding those fundamentals is not optional. It is the difference between a hardened stack and one that hands attackers a free ride.

According to recent reports, when you expose a service to the internet, you inherit every weakness in the domain trust model. An attacker does not need to break your app. They can register a lookalike domain, spin up a clone of your login page, and let confused owners hand over credentials. Your Vaultwarden, Nextcloud, or Gitea instance can be perfectly patched and still lose users to a domain that looks like yours at a glance.

According to recent reports, the browser URL bar is the one signal people are told to trust, and it is surprisingly easy to abuse. Homograph attacks, subdomain tricks, and lookalike TLDs all exploit the gap between "looks legit" and "is legit." Technical defenses on your domain close that gap more reliably than any awareness poster.

Domain hijacking is the most direct phishing enabler. An attacker who controls your registrar account controls your DNS, which means they control where your domain points. Before anything else, treat your registrar login as a critical asset.

Registrar lock is a single checkbox that blocks most automated transfer attacks. There is no reason not to enable it.

A huge percentage of phishing uses spoofed sender addresses. Publishing SPF, DKIM, and DMARC records tells receiving mail servers what to do with mail that claims to come from your domain. Without them, anyone can send email that appears to be from you@yourdomain.com.

Sources indicate that SPF specifies which servers are allowed to send mail for your domain. Add a TXT record to your DNS zone:.

Sources indicate that replace [your-mail-provider] with the include value from your mail provider's documentation. The -all at the end is a hard fail: it tells receivers that any server not listed is not authorized to send for your domain. Whether that mail is actually rejected is up to the receiving server's policy, which is where DMARC comes in. Publish only one SPF record per domain, and stay within SPF's limit of 10 DNS lookups, because every include counts toward it. Consult your provider's docs for the exact include string.

DKIM adds a cryptographic signature to outgoing mail. Your mail provider generates the key pair and gives you a TXT record to publish. The record name looks like:.

Industry observers note that the selector name and public key value come from your mail provider. Copy them exactly.

Recent findings suggest that DMARC tells receivers what to do when a message fails both the SPF and DKIM alignment checks, and where to send aggregate reports that show which servers are sending mail as your domain. Start in monitor mode, then tighten the policy once you are confident your legitimate mail passes:.

When reports show only your expected mail sources passing, move to p=quarantine and eventually p=reject. Reject is the goal. It means spoofed mail from your domain gets dropped outright.

Industry observers note that DNSSEC adds cryptographic signatures to your DNS responses. Without it, an attacker positioned between a resolver and your DNS zone can return forged records, redirecting your domain to a server they control without touching your registrar account. This is DNS spoofing or cache poisoning. DNSSEC lets validating resolvers detect those forged answers and refuse them, although it does not encrypt DNS and only protects users whose resolver actually validates.

It has been revealed that enabling DNSSEC is a two-part process: your DNS provider signs your zone, and you publish a DS record at your registrar to chain the trust. Most major DNS providers (Cloudflare, Route 53, and others) have a one-click or simple toggle to enable signing. Your registrar then needs the DS record to complete the chain. Check both your DNS provider and registrar docs for the exact steps, because the UI differs across platforms.

One caveat: if your DNS provider and registrar are different services, make sure both support DNSSEC before enabling it. A broken DNSSEC chain is worse than no DNSSEC.

HTTPS with a valid certificate is table stakes at this point. But you can go further with HTTP Strict Transport Security. Once a browser has seen the HSTS header, it will always connect to your domain over HTTPS for the max-age period, even if a user types just the hostname.

Add this header to your reverse proxy or web server config:.

In a recent development, if you are confident all subdomains are HTTPS-only, you can submit your domain to the HSTS preload list at hstspreload.org. To qualify, the header on your base domain must also include the preload directive, for example Strict-Transport-Security: max-age=63072000; includeSubDomains; preload, with a max-age of at least 31536000, and plain HTTP must redirect to HTTPS. Preloaded domains are hardcoded into browsers as HTTPS-only, so there is no initial plain HTTP request an attacker could intercept and redirect. Treat it as a long-term commitment: removal is possible but slow, so only submit when you are sure every subdomain, including internal-only homelab ones, serves HTTPS.

You cannot control what domains other people register, but you can watch for ones that target yours. Certificate Transparency logs are public, and publicly trusted TLS certificates are logged there, since major browsers require it. Tools like crt.sh let you search for certificates issued to domains similar to yours.

For ongoing monitoring, tools like dnstwist (open source, installable with pip install dnstwist[full] or runnable as the elceef/dnstwist Docker image, with a hosted version at dnstwist.it) generate permutations of your domain name and check which ones are in use. Running it periodically against your domain surfaces lookalikes before your users encounter them. If you find one that is clearly impersonating your service, most registrars and hosting providers have abuse reporting processes.

In a recent development, phishing is not a user education problem waiting for a training solution. It is a trust infrastructure problem, and the controls exist to address it at the technical layer. For self-hosted services, the stack is straightforward: lock your registrar account, publish SPF, DKIM, and DMARC, enable DNSSEC, enforce HTTPS with HSTS, and monitor for lookalike domains.

Sources indicate that none of these steps are exotic. Most take under an hour to implement. They will not stop every attack, but they close the easiest and most commonly abused vectors attackers use against domains exactly like yours. Start with registrar lock and DMARC in monitor mode today, then work through the rest of the list.

Originally published at codewithromi.com.

โ†’ Read original article