Why it matters:
* Many web apps (PHP, Ruby, Python, etc.) on AWS EC2 need a lightweight way to confirm their code hasn’t been changed. * Traditional approaches that rely on metadata often create false positives. * Kekkai checks only file content, so it reliably detects real changes. * I’ve deployed it to an EC2 PHP application in production, and it’s working smoothly so far.
Key points:
* *Content-only hashing* (ignores timestamps/metadata) * *Symlink protection* (detects swaps/changes) * *Secure S3 storage* (deploy servers write-only, app servers read-only) * *Single Go binary* with minimal dependencies
Would love feedback from others running apps on EC2 or managing file integrity in production.
teraflop•2h ago
You're assuming that an attacker already has access to your system, and you want to detect any changes they make to certain files.
If you are dealing with a relatively unsophisticated attacker, surely it would be easier to just mount the data that shouldn't be changed on a read-only filesystem, or set the immutable bit?
And if the attacker is sophisticated, surely they could just disable the verifier? Or replace it with a no-op that doesn't actually check hashes?
> Many web apps (PHP, Ruby, Python, etc.) on AWS EC2 need a lightweight way to confirm their code hasn’t been changed.
I don't think this is true, any more than the square-root function needs a way to confirm that its argument hasn't been tampered with. You're solving the problem in the wrong place. It seems like security theater.
abhas9•1h ago
File Integrity Monitoring gives you a way to prove whether critical code or configuration has been changed after deployment. That’s valuable not only for security investigations but also for compliance.
For example, PCI DSS (Payment Card Industry Data Security Standard) explicitly requires this. Requirement 11.5.2 states:
"Deploy a change-detection mechanism (for example, file-integrity monitoring tools) to alert personnel to unauthorized modification of critical content files, configuration files, or system binaries."
Sure, a "sufficiently advanced" attacker could try to tamper with the monitoring tool, but (1) defense in depth is about making that harder, and (2) good implementations isolate the baseline and reports (e.g. write-only to S3, read-only on app servers), which raises the bar considerably.
teraflop•1h ago
> for example, through misconfigured deployments, command injection, [...] or overly broad privileges.
Seems to me like it would be more useful to build something into your deployment process that verifies that permissions are set correctly.
I don't really buy that `mount -o ro` is inherently more prone to being misconfigured than `kekkai verify` or whatever.
> supply chain attacks
This wouldn't actually do anything to stop or detect supply chain attacks, right? Even if one of your dependencies is malicious, you're not going to be able to spot that by checking a hash against a deployment that was built with the same malicious code.
> good implementations isolate the baseline and reports (e.g. write-only to S3, read-only on app servers), which raises the bar considerably.
I don't see how that raises the bar at all. The weakness is that it's easy for an attacker to bypass the verifier on the app server itself. Making the hashes read-only in whatever place they're stored isn't a barrier to that.
> For example, PCI DSS (Payment Card Industry Data Security Standard) explicitly requires this.
This seems like the best actual reason for this software to exist. But if the point is just to check a compliance box, then I think it would make sense to point that out prominently in the README, so that people who actually have a need for it will know that it meets their needs. Similar to how FIPS-compliant crypto exists to check a box but everyone knows it isn't inherently any more secure.