← Back to context

Comment by crimsonnoodle58

17 hours ago

If you're running on kubernetes, a simple network policy and blocking the container from using DNS will stop any compromised image from performing a data exfill.

I do this for most containers.

If the container must have web access in some form, setup a squid proxy and only whitelist safe and trusted domains that can't be exfilled to.

> a simple network policy and blocking the container from using DNS

Can you please point to some resources that can help with how to do this?

Why do you think that DNS is required? Anything malicious could (and likely should) hard-code an IP.

  • You ensure DNS is disabled to stop DNS exfil. You can google it, but basically they exfil data by looking up encoded subdomains.

    Hardcoding an IP won't help if the network policy disallows all network access.

The web frontend could still send secrets to third parties.