Why can a kernel-mode rootkit lie to a user-mode program but not the reverse?
answer
- lies travel upward only
- who composes the answer wins
- a hook fools one process
- unlink the object, not the query
- worth as much as the lowest level reached
basics
~20 sBecause each layer composes the answers the layer above receives. Kernel code can edit the process and file lists user mode is handed; a user-mode hook only rewrites what one process sees, while the kernel below keeps the truth.
solid answer
~50 sConcealment runs one way: a layer can lie to layers above it and never to layers below. A user-mode hook patches an import entry or the first bytes of an API function inside one process, so only that process is fooled - anything asking the kernel directly gets the truth. Kernel code sits where the answers are assembled, so it can filter an enumeration or unlink an object and every user-mode caller receives the doctored result. The same relationship repeats downward: a boot-chain implant decides which kernel starts, and firmware decides whether the boot chain is the one you shipped. The practical rule is that any statement about the machine is only worth as much as the lowest level the adversary reached, and an answer produced at or above the implant's level is worth nothing.
go deeper
Know the direction of the rule: a lower layer can mislead higher ones, never the other way, and the kernel sits below every ordinary program.
Explain at least one mechanism per rung - import or inline hooking inside a process versus filtering an enumeration or unlinking an object in the kernel - and why the first fools only one process.
Turn the rule into practice: state that any claim about a host is bounded by the lowest level the adversary reached, and that a trustworthy answer has to come from below or outside the implant.
Own the architectural consequence: if trust flows upward, spend on hardware-rooted measurement and on shrinking who can reach kernel level, rather than on more instrumentation at a level an implant already dominates.
## The one rule that organises the whole subject Concealment is directional. **A layer can lie to the layers above it, and never to the layers below it.** Everything else on this topic - why user-mode tricks are cheap and weak, why kernel implants are expensive and strong, why boot and firmware implants are in a different category again - falls out of that single sentence. The reason is compositional. Software does not perceive a machine; it asks a lower layer a question and believes the answer. Whoever *composes* the answer controls what the asker believes. ## User mode: rewriting one process's view A user-mode implant works inside a process's own address space. Two classic shapes: - **Import-table patching**: a program calls library functions through a table of addresses filled in at load time. Overwrite an entry and the call goes to the implant, which forwards to the real function and edits the result on the way back. - **Inline hooking**: overwrite the first instructions of the target function with a jump into the implant, which does its work and jumps back into the untouched remainder. Either way the deception is bounded by the process. A different process on the same machine, unhooked, asks the kernel and gets the real list. Even inside the hooked process, code that bypasses the patched function - issuing the system call directly rather than going through the library stub - sees through the lie. That fragility is exactly why user-mode hooking is the cheap rung: it costs no privilege beyond writing into the target, and it buys correspondingly little. ## Kernel mode: rewriting what the machine reports Move below the system-call boundary and the picture inverts. Kernel code is not a participant in the conversation; it is the party that answers. Two families of technique: - **Filtering the enumeration.** The implant interposes on the path that services a request - a filter driver in a stack, or an intercepted dispatch routine - and removes rows from the result before it is copied back to the caller. Every user-mode caller, hooked or not, gets the same edited list, because the editing happened before the boundary was crossed. - **Manipulating the objects themselves.** The kernel tracks live objects in linked structures. Unlink a process's entry from the list that enumeration walks, and there is nothing to filter - the process still runs, because scheduling uses different structures, but the walk that builds the answer never reaches it. The second family is the sharper illustration of the rule: the implant did not intercept a question, it edited the source of truth the question is answered from. ## Below the kernel: the same relationship, one rung down The kernel is not the bottom. A boot-chain implant runs before the kernel and decides which kernel image is loaded and with what patches applied - so the kernel's own integrity checks may be running in an environment their author never anticipated. Below that, platform firmware decides whether the boot chain is the one that shipped, and runs on the flash chip before any operating system exists. A peripheral's option ROM gets execution during platform initialisation for the same reason. At each step the newly-lowest layer can compose what the layer above believes about itself. This is why *level*, not *family name*, is the useful classification. Calling two implants both `rootkits` says nothing; saying one is a hooked library inside one process and the other rewrote the boot manager says everything about what each can and cannot control. ## The corollary you will be asked for If the rule is `a layer can only lie upward`, then a statement about a machine is worth exactly as much as the lowest level the adversary reached. Ask a compromised kernel to describe itself and you receive the answer the implant wrote. Any claim of a clean machine has to come from a vantage **below or outside** the implant: the storage read on different hardware, the platform's own hardware-rooted measurement of what executed, or simply removing the hardware from service. And the rule cuts the other way too, which is the part candidates forget. A user-mode implant cannot hide from kernel-level code, and a kernel implant cannot alter what the platform recorded about the boot before the kernel existed. Depth is a two-sided constraint: it is what makes an implant strong against everything above it and completely powerless against everything beneath.
- How does an unlinked kernel object differ from an intercepted enumeration, and why does it matter?Interception edits the answer on its way out; unlinking edits the structure the answer is built from, so nothing has to be intercepted at all. The unlinked process still runs because scheduling uses different structures than enumeration walks. It matters because the two leave different marks and require different levels to undo - the second has no interception point to look for.
- Why is a user-mode inline hook defeated by code that issues a system call directly?Because the hook is planted on the library stub, not on the kernel. A caller that skips the stub and crosses the boundary itself never touches the patched bytes, so it receives whatever the kernel actually holds. That is the practical face of the rule: the lie lives above the boundary, so anything at or below it is unaffected.
- If a kernel implant can lie about the machine, can it lie about what happened before the kernel started?No. Whatever the platform recorded during boot was composed by layers below the kernel and completed before kernel code ran. A kernel implant can lie about the present and about what it now reports, but it cannot retroactively author a record produced by a layer beneath it. That asymmetry is why hardware-rooted boot measurement is a different kind of claim.
A translator can misreport what a speaker said to everyone who needs the translation, but cannot change what the speaker actually said. Move down a layer and you become the speaker.
saying these in an interview costs you the question
- Treats user-mode hooking and kernel implants as the same capability
- Says a kernel implant can hide from platform firmware
- Believes hiding is total once a rootkit is present
- Cannot name a mechanism, only the word rootkit
- Assumes asking the compromised machine yields a usable answer