Research notes on artificial intelligence, systems, cybersecurity, and applied mathematics.
by Sanskar Pandey
In the previous post, we introduced the central idea behind topology-based malware detection:
Malware can mutate its code, but it is much harder to mutate the geometry of its behavior.
Instead of detecting malicious binaries or static feature patterns, this approach focuses on the structure of program execution over time.
To make this possible, we first need a way to represent software behavior as a trajectory through a behavioral space.
This post explores how such trajectories can be constructed from system telemetry.
Modern operating systems already expose a large amount of runtime information about program activity. Security monitoring systems often collect signals such as:
Together, these signals form a stream of behavioral telemetry describing how a program interacts with the operating system.
For example, a simple execution sequence might look like:
process start
→ document execution
→ script interpreter spawn
→ memory allocation
→ code injection
→ outbound network connection
Each event reveals something about the evolving behavior of the program.
However, individual events alone rarely provide enough context to determine whether a program is malicious. Instead, it is the sequence and structure of these events that reveals intent.
To analyze execution systematically, we represent the behavior of a running program as a state vector.
At a given moment in time, we can summarize observable system activity using a vector:
\[x(t) \in \mathbb{R}^n\]Each dimension of this vector corresponds to a measurable property of system behavior. For example:
As the program executes, these values evolve over time.
The result is a time-varying behavioral signal: x(t₀), x(t₁), x(t₂), … , x(tₙ)
This sequence captures the changing state of the program’s interaction with the system.
Instead of analyzing these states independently, we treat them as points along a continuous behavioral trajectory.
Conceptually, the execution of a program traces a path through behavioral space: x(t)
Each point represents the current behavioral state, while the trajectory describes how that state evolves over time.
This perspective transforms malware detection into a problem of dynamical systems analysis.
Rather than asking whether a particular event is suspicious, we can ask:
One advantage of trajectory modeling is that it captures behavioral transitions.
Certain transitions are particularly characteristic of malicious activity.
For example:
document execution
→ script interpreter spawn
→ memory allocation
→ code injection
This sequence frequently appears in document-based malware and exploitation chains.
Similarly, command-and-control malware often exhibits periodic behavioral loops: sleep → beacon → sleep → beacon
These patterns become visible when execution is analyzed as a trajectory rather than isolated events.
Constructing meaningful trajectories requires careful feature selection.
Useful behavioral features often fall into several categories:
These signals together define the behavioral space in which program trajectories evolve.
In practice, the dimensionality of behavioral space can be very large.
However, real-world software tends to operate within constrained behavioral regimes. Web browsers, system services, and developer tools each occupy relatively stable regions of this space.
Malware often diverges from these regimes in distinctive ways.
This observation motivates the next step in the architecture: learning a behavioral manifold that captures the underlying structure of program execution.
In the next post, we will explore how behavioral trajectories can be embedded in such manifolds, and how topological analysis can reveal structural patterns in malware behavior.
In Part 3, we will examine how geometric and topological techniques can be applied to behavioral trajectories.
In particular, we will explore:
These tools allow detection systems to reason about the shape of behavioral evolution, rather than simply counting events.
Ultimately, this leads to a different paradigm for malware detection — one based on the geometry of program behavior rather than static artifacts.
tags: malware - cybersecurity - behavioral-analysis - system-telemetry