HeadlinesBriefing favicon HeadlinesBriefing.com

Security Audit Reveals Hidden Kernel Modifications in Custom NFS Setup

Hacker News •
×

A routine GDPR compliance assessment took an unexpected turn when security researcher Klaus discovered anomalies in his client's reverse gateway infrastructure. The setup uses a custom monolithic Linux kernel with a static GOlang application across 100+ machines that boot from external USB media and mount NFS shares for configuration and certificates.

While analyzing traffic patterns to identify PII exposure, Klaus noticed unusual NFS behavior: the kernel was modifying the hardcoded 'open id:' string to 'open-id:' and returning EOF values of 77685 bytes instead of the expected 1 byte. More concerning, the actual data was exactly 8192 bytes larger than the reported read length, with uniform entropy suggesting encryption.

Using binwalk and IDA with Hex-Rays decompilation, Klaus traced the modification to an unknown_func in the kernel's nfs4xdr.c that conditionally replaces spaces with hyphens in the NFS open header. The 77685-byte EOF anomaly and encrypted data payload strongly indicate the gateways were compromised, with attackers potentially exfiltrating data through the NFS configuration stream.

This incident demonstrates how custom kernel builds can hide malicious modifications that standard security assessments might miss, especially when examining protocol-level traffic for compliance purposes. The researcher's methodology of correlating timing data with packet analysis proved essential for detecting the subtle kernel-level tampering.