Two attack classes keep showing up in cloud security reviews I run for clients: rainbow table attacks against poorly hashed credentials, and man-in-the-middle (MITM) interception of traffic between cloud services. Both are old, well-understood problems — and both are still exploitable today because of small, avoidable configuration mistakes. Here's how to close them off properly.
A rainbow table is a precomputed lookup of hash values mapped back to their original plaintext inputs. If an attacker gets access to a database of password hashes, they don't need to crack each one individually — they just look it up. This only works, though, against hashes that were generated without a per-user random salt, or using a fast, general-purpose hash algorithm like plain MD5 or SHA-256 that was never designed for password storage.
A unique, random salt per user means two identical passwords produce completely different hashes, which makes a precomputed table useless. Use an algorithm built for this purpose — bcrypt, scrypt, or Argon2 — never a general-purpose hash like MD5 or unsalted SHA-256:
bcrypt's cost factor and Argon2's memory/time parameters both control how expensive each hash computation is. Higher cost means slower brute-force attempts for an attacker, at the price of slightly slower logins for legitimate users. Benchmark on your actual production hardware and pick the highest cost that keeps login latency acceptable — a good target is roughly 250–500ms per hash operation.
Hashing correctly is undermined the moment plaintext passwords appear anywhere they shouldn't — application logs, error tracking tools, request logging middleware, or analytics events. Audit your logging pipeline specifically for this; it's one of the most common ways a "properly hashed" system still leaks plaintext credentials.
In a cloud environment, MITM risk isn't just about a user's browser connection — it extends to traffic between your own services: application to database, service to service inside a VPC, application to third-party API, and CI/CD pipeline to deployment target. An attacker who can position themselves on any of these paths can intercept or tamper with data in transit, even if your public-facing site has a valid TLS certificate.
It's common to see TLS terminated at the load balancer and then plain HTTP used for internal traffic between services, on the assumption the VPC is "trusted." Treat internal traffic the same as external — encrypt it. For nginx, redirect and enforce HTTPS:
Standard TLS proves the server's identity to the client, but not the other way around. Mutual TLS requires both sides to present valid certificates, so a compromised or spoofed service can't simply connect and start talking to your backend. Service meshes like Istio or Linkerd can enforce mTLS automatically across every internal connection without changing application code.
Certificate pinning tells a client to only trust one specific certificate (or public key) rather than any certificate signed by any trusted CA. This closes off attacks where a MITM attacker has obtained a fraudulently issued certificate for your domain from a compromised or coerced CA — rare, but it has happened.
Neither of these attack classes requires exotic tooling to defend against — both come down to disciplined defaults applied consistently, everywhere, rather than only at the edges of your infrastructure that are easiest to remember.
Need a security review of your cloud infrastructure and authentication setup? This is part of what I cover in DevOps services engagements.