skip to content

Getting Code to Run

Where an operator's code actually runs - a binary already on the box, a script with no file of its own, another process, or below the kernel line - and what each level costs. Level decides, not name.

on this pageshow

explore

questions

17

What does calling malware 'fileless' actually claim about it, and what does it not claim?

level: juniorimportance: must knowfreq 70%

answer

  1. a claim about the executable
  2. data at rest, code in memory
  3. an interpreter does the converting
  4. durable does not mean executable
  5. not a synonym for traceless

basics

~20 s

Fileless claims only that the code which ran was never a normal executable file launched from disk; it arrived as data and became code in memory. It does not claim that nothing was written to disk.

solid answer

~50 s

The word is an assertion about the executable, not about the disk. In a fileless chain the payload travels as inert data - a base64 blob inside a scheduled job entry, a value in a configuration store, a long environment variable - and something already permitted on the host, usually a language runtime, turns that data into running code. Almost every real case still writes something durable, because the data has to be parked somewhere and something has to invoke it again. What is missing is a program file you could hash, block by hash, or refuse with an executable allowlist. So `fileless` is not a synonym for `left no trace` and not a synonym for `a reboot fixes it`. The only variant where the reboot claim holds is the deliberately disposable payload that stores nothing and expects to be delivered again.

go deeper

for a junior

Be ready to state the claim in one sentence: no program file was launched from disk, the payload travelled as data. Do not overreach into 'nothing was written' - that is the trap in the question.

for a middle

Explain the data-to-code transition: which everyday component does the converting, and why a durable data record and a trigger usually still exist even when no executable does.

for a senior

Show you can hold three properties apart - fileless, persistent and privileged are independent. Be able to say what would have to be true for a reboot to have genuinely ended the operator's code.

for a principal

Own the vocabulary across an organisation. Insist that a classification tells an owner which control classes were bypassed and which still apply, rather than becoming shorthand for a scary unbounded incident.

## The claim the word makes `Fileless` is a claim about **the executable**, and only about the executable. It says: the code that ended up running was never a program file sitting in a directory that somebody double-clicked or that a launcher started by path. It says nothing whatsoever about whether bytes were written to disk. That distinction matters because it decides which control classes are in play. A conventional payload is an ELF or PE on disk: it has a path, a size, a hash, an owner and a modification time, and a whole family of controls key off exactly that - block by hash, allow only signed programs, allow only programs in these directories, refuse execution from a writable mount. A fileless payload is specifically shaped to have none of those handles, because at rest it is not a program at all. ## What the payload is at rest At rest it is **data**. Three shapes cover most of what operators actually do: - **A blob inside a job entry.** A scheduled job record holds a long encoded string and a line that decodes it and hands the result to a runtime that is installed because the application needs it. The file on disk is a job record - a configuration artefact, not a program. - **A value in a configuration store.** A row in the application's own settings table, a key in a shared cache, a field in a service registry. The application already reads that store, and the store is not treated as executable content by anything. - **An environment variable or a startup script fragment.** A very long value carried into the process at launch and evaluated once the runtime is up. In all three, the transition from data to code happens **inside a process the environment already permits**. Nothing new appears as an image on disk. ## Why memory-only code still needs something durable Memory does not survive the process, let alone the machine. If the operator wants the code back after a service restart or a reboot, something durable must invoke it. That something is the **trigger**, and the trigger is the part of the chain that is hardest to make fileless: it has to be a record that the operating system or the application reads on its own initiative, which means it exists somewhere with a path, an owner and a timestamp. So the honest description of a typical fileless intrusion is: *no program file, but a durable data record and a durable trigger*. Calling that `nothing touched disk` is simply wrong, and it is the wrong answer this topic exists to correct. ## The one case where the reboot claim is true There is a genuine variant where nothing durable is planted: the operator does not want persistence at all. A commodity crew mass-exploiting a single flaw in an internet-facing application has a cheaper option than persistence - **come back through the same flaw**. Building a trigger costs work and gives the estate something to find; re-exploiting costs one request. For that operator, a payload that lives only in the process and dies with it is the *correct* design, not a limitation. When that is what happened, the reboot really did end the code. It did not close the way in, and everything the process could read as the service account was already read. ## Why the label is still useful Used precisely, `fileless` tells you which handles you do not have: no image hash, no signature to check, nothing for an executable allowlist to refuse. It also tells you where the handles you *do* have live - the data record, the trigger, and the interpreter that has to be present for any of it to work. Used imprecisely, it collapses into `spooky and untraceable`, which is the reading that gets a service owner told the wrong thing. ## Adjacent labels not to conflate `Fileless` is orthogonal to privilege: it does not imply kernel access, and most of it runs as an unprivileged service account. It is orthogonal to sophistication: mass-market crimeware uses it because it is cheap, not because it is advanced. And it is orthogonal to persistence: a fileless payload can be extremely persistent (a trigger plus a data blob that is re-decoded on every boot) or entirely disposable. Name the three properties separately and the classification stops being an argument.

  • If the body sits in a scheduled job entry as base64, why do people still call that fileless?
    Because the file that exists is a configuration record, not a program. There is no ELF or PE to hash, to block by hash, or to refuse with an executable allowlist, and the job record itself is the kind of file the host is supposed to have. The executable only exists after a runtime decodes the string in memory.
  • Which part of a fileless chain is hardest for an operator to keep fileless?
    The trigger. Memory does not survive a restart, so anything that wants to come back needs a durable record the system reads on its own - a job entry, a unit, a profile fragment, an application setting. That record has a path, an owner and a timestamp, so operators either accept it or drop persistence entirely and plan to re-enter through the original flaw.
  • Does fileless imply the operator has administrative or kernel privilege?
    No. The technique is about how code is delivered and started, not about what it can do. Most of it runs as whatever unprivileged account the exploited application uses, and the payload inherits exactly that account's reach. Kernel-level concealment is a separate and far more expensive choice.

A recipe card in a drawer is not a meal. It becomes one only when a cook reads it. Fileless code is the card; the interpreter is the cook - and the drawer is still a drawer, sitting on disk.

saying these in an interview costs you the question

  • Says fileless means nothing was ever written to disk
  • Treats fileless as a synonym for untraceable
  • Assumes a reboot always clears a fileless payload
  • Thinks fileless requires kernel or administrator privilege
  • Confuses fileless with advanced or state-sponsored

context

open as a page

Why does an operator already running as a user inject into that user's browser instead of opening its own connection?

level: juniorimportance: must knowfreq 70%

basics

~20 s

The operator's own process has no business reaching the internet, and its traffic carries no user identity. Running inside the user's browser borrows that person's session, proxy settings and usual destinations, so the outbound traffic looks like their ordinary browsing rather than a strange new program phoning out.

open as a page

Why does an operator run their payload through a signed Windows system binary rather than dropping an EXE?

level: juniorimportance: must knowfreq 78%

basics

~20 s

Because the binary already carries the vendor's trust and is already installed. Nothing attacker-authored arrives as an executable, no install rights are needed, and the run collides with the administration the estate performs every day.

open as a page

Does installing a rootkit give an adversary the privilege level it hides at?

level: juniorimportance: must knowfreq 68%

basics

~20 s

No. A rootkit conceals activity at a level the adversary already controls. Loading a kernel driver or writing firmware needs administrative privilege first, so concealment is something an intrusion buys after it has won, never a route to winning.

open as a page

Why is 'the payload was memory-only, so the reboot cleared it' usually the wrong conclusion?

level: seniorimportance: must knowfreq 58%

basics

~20 s

Memory-only describes the executable, not the residence. The body is normally parked as data with something durable to invoke it, so a reboot fires the trigger rather than removing it. And the way in stays open.

open as a page

You're told injecting into a user's browser 'escalated' the operator's privileges. On a shared desktop, is that right?

level: seniorimportance: must knowfreq 60%

basics

~20 s

No. Injecting into a process at the same integrity level escalates nothing — the operator already held that user's rights. It buys the user's identity on outbound traffic, a permitted egress path and a plausible lifetime. Privilege is spent only when the operator crosses into a different user's session.

open as a page

We reimaged the disk, so the rootkit is gone - when is that claim wrong?

level: seniorimportance: must knowfreq 55%

basics

~10 s

Reimaging is only sound above the level the implant occupies. Reinstalling the system volume can leave a boot component in the EFI System Partition; replacing the disk leaves platform-flash and option-ROM implants untouched.

open as a page

What does an operator gain and lose by storing a payload as data for an installed interpreter?

level: middleimportance: should knowfreq 52%

basics

~20 s

Gain: nothing on disk is a program, so hash blocking and executable allowlists have nothing to grab. Loss: it runs only where that interpreter already exists and is permitted, with capability capped by the language.

open as a page

In process hollowing, what must an operator do to a suspended host before the payload can run?

level: middleimportance: should knowfreq 55%

basics

~20 s

Hollowing starts a legitimate process suspended so it never actually runs, unmaps its original image from memory, writes the payload in its place, fixes the payload's relocations to wherever it landed, repoints the primary thread's entry at the payload, then resumes. The process ends up running code it was never loaded with.

open as a page

How does an operator chain signed Windows utilities to run a remote scriptlet without dropping a tool?

level: middleimportance: should knowfreq 61%

basics

~20 s

By composing utilities that each do one narrow job: one retrieves remote content, a script host interprets it, and a component entry point turns registering or hosting something into executing it. The chain is what makes it work and what it costs.

open as a page

Why load someone else's legitimately signed but vulnerable kernel driver?

level: middleimportance: should knowfreq 47%

basics

~20 s

Because it is already signed. Reaching kernel level needs a signing identity the system trusts - scarce, attributable, dead once revoked. A real vendor's signed driver exposing an unchecked memory or process primitive supplies the same crossing for free.

open as a page

Why can a kernel-mode rootkit lie to a user-mode program but not the reverse?

level: middleimportance: should knowfreq 61%

basics

~20 s

Because 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.

open as a page

An operator injects into a user's browser tab to blend traffic; the user closes it. What just happened to their code?

level: seniorimportance: should knowfreq 45%

basics

~20 s

It died with the process. Memory-only injection has no life of its own — when the user closes the browser, the host exits and the payload is gone. To survive, the operator needs a separate trigger that re-injects on each new session, or must accept a longer-lived host that is worse cover.

open as a page

A change board asks: can we just block mshta, rundll32 and regsvr32 on the admin jump host?

level: seniorimportance: should knowfreq 52%

basics

~20 s

Split the list rather than answer yes or no. The HTML application host is often genuinely removable; the library-export and component-registration binaries are load-bearing for installation and configuration, so a blanket block breaks delegated administration and gets reversed.

open as a page

How can a Linux process execute a binary that has no name in any filesystem?

level: middleimportance: nice to knowfreq 32%

basics

~20 s

The kernel can create an anonymous, memory-backed file that has a descriptor but no directory entry. Bytes are written into it and executed from that descriptor, so the running image has no path and dies with the process.

open as a page

What capability does an operator give up by driving rundll32 or mshta instead of their own tool?

level: middleimportance: nice to knowfreq 34%

basics

~20 s

Only the binary's designed behaviour is available. There is no arbitrary system call, the argument surface is capped and awkward, error handling is nearly absent, the process ends when the utility's job ends, and nothing in the chain provides persistence.

open as a page

How do you decide on a vulnerable-driver blocklist when enforcing it breaks a production driver?

level: principalimportance: nice to knowfreq 34%

basics

~20 s

Treat it as a scoped purchase, not a switch. Enforce everywhere the driver is not needed, scope a narrow exception for the machine class that needs it, name an owner who accepts the residual risk, and date it.

open as a page