The Invisible Enemy in the Network: How Mathematics Hunts Latent Hackers
The Invisible Enemy in the Network: How Mathematics Hunts Latent Hackers
Imagine a thief slipping into a highly secured facility, such as a bank. But not in the way we usually imagine. He does not break into the vault immediately. He causes no trouble. Instead, he gets a job at the bank as a maintenance worker. He blends in completely with the crowd. He walks around, maps the corridors, and looks for the keys to the vault. In cybersecurity, this increasingly feared phenomenon is known as lateral movement.
Let us apply this example to cybersecurity. An attacker gains access to a corporate network (there are many ways to do so), but does not remain in one place. Quietly and cautiously, they begin moving from one computer to another. Gradually, they gain access to systems, sensitive data, and valuable information. By the time they reach their target, the damage has already been done. Without making a sound. So how can we detect them in time if they blend seamlessly into normal network activity?
The answer lies in information theory, a field of science that initially focused on problems related to storing and transmitting information in telecommunications systems. Today, it is a powerful tool for detecting digital spies.
Uncertainty and Its Relationship to Lateral Movement
The founder of information theory was Claude Shannon, who introduced the concept of information entropy in 1948. In mathematics, entropy expresses the degree of uncertainty or surprise within a data system. But what does this have to do with our network attacker?
Every computer network has its own baseline level of entropy, reflecting what is considered normal activity. Employees arrive at work at roughly the same times, perform repetitive actions and processes, visit the same websites, and use the same applications. Their behaviour is therefore predictable and can be described mathematically.
We have already mentioned that an attacker attempts to imitate the behaviour of an ordinary user at every step. However, just as in the physical world, every action in the digital world leaves a trace. A mathematical model continuously recalculates the entropy of data flows. If, for example, an attacker scans for open ports on a neighbouring computer or attempts to gain access to a database, the model identifies a deviation from the baseline. To the human eye, the difference may be barely noticeable, but from an entropy perspective, it can be like an explosion.
Conclusion
Lateral movement is dangerous precisely because it is difficult to see and detect using conventional security rules. However, with the help of information theory, an attacker loses their greatest advantage: invisibility. Mathematics shows us that even the most cautious attacker can disrupt the patterns described by mathematical models, effectively pointing the finger at themselves.

Co-financed by the European Union through the Slovakia Programme under project No. NFP401101C360: Research and development of advanced artificial intelligence solutions for the detection of cyber threats and defense against sophisticated attacks.