gemini-2.5-pro| input-price: 1.25 output-price: 10 max-context-length: 200_000 (cost: $0.03) · Anfrage: 2025-11-10T08:25:49.219428

Generated by rs-summarizer Version unbekannt

Abstract:

This article explains binfmt_misc, a Linux kernel feature that allows the system to execute non-native binary formats by registering custom handlers. While a legitimate feature, it can be exploited to create a stealthy persistence and privilege escalation backdoor, a technique referred to as "Shadow SUID."

The attack involves an adversary with root access registering a new binfmt_misc handler. This handler is configured to match the "magic bytes" (the initial bytes) of a legitimate, but rarely used, SUID binary like chfn. The handler then redirects execution to a malicious interpreter. By using the special 'C' (credentials) flag, the kernel runs this malicious interpreter with the SUID binary's root privileges, effectively granting any user who runs chfn a root shell. This technique is highly evasive because the malicious interpreter itself does not have the SUID bit set, rendering standard permission-based detection methods ineffective. Detection relies on actively monitoring the /proc/sys/fs/binfmt_misc/ directory for suspicious handlers. The persistence is not reboot-persistent by default, requiring attackers to establish a separate mechanism to re-register the handler, which offers an additional opportunity for detection.

Today I learned: binfmt_misc for Stealthy Persistence

Summary Rating: No ratings yet
Article Rating: No ratings yet

Source