Blog

From packets to patterns: How foundation models detect network threats

|

In Part 1, we examined why traditional network detection fails: encryption blinds payload inspection, signatures only catch known threats, and anomaly-based systems drown teams in noise. These technical limitations create an environment where sophisticated attackers operate undetected for months.

But there's a more insidious problem hiding beneath these detection failures. The most dangerous attacks don't just evade your network security tools. They appear completely legitimate to them.

Welcome to the world of Living off the Land attacks, where adversaries achieve their objectives using the same tools your IT team relies on every day, generating network traffic patterns indistinguishable from normal business operations.

What Living off the Land Really Means

Living off the Land (LOTL) attacks, also called living-off-the-land binaries and scripts (LOLBins/LOLBas), represent a fundamental shift in attacker methodology. Instead of deploying custom malware that might trigger detection systems, adversaries use legitimate administrative tools, scripting languages, and system utilities already present in target environments.

PowerShell for Windows automation. Bash scripts on Linux systems. Windows Management Instrumentation (WMI) for system queries. Remote Desktop Protocol (RDP) for access. PsExec for remote execution. These tools exist in virtually every enterprise environment because IT administrators need them for legitimate system management, troubleshooting, and automation.

When attackers leverage these same tools, the activity appears completely normal to network security systems. The PowerShell script executing across multiple systems? Could be a legitimate automation task. The WMI queries enumerating domain controllers? Might be inventory management. The lateral movement via RDP? Perhaps an administrator troubleshooting issues.

LOTL attacks don't have distinctive signatures because they don't use anything inherently malicious. They abuse legitimate functionality in malicious ways. This fundamental difference makes them invisible to detection approaches built around identifying known-bad patterns.

Why LOTL Attacks Are Exploding

According to research tracking cybersecurity trends, LOTL techniques have become the preferred method for sophisticated threat actors. The reasons are straightforward: these attacks work, and they're difficult to detect.

Traditional security defenses focus on preventing malicious software from entering environments. Endpoint protection blocks known malware. Email gateways filter malicious attachments. Web proxies prevent downloads from suspicious sites. These perimeter defenses have become reasonably effective at stopping conventional malware.

But LOTL attacks bypass these defenses entirely. Nothing malicious needs to enter the environment because everything the attacker needs is already there. The tools are signed by Microsoft, Apple, or other trusted vendors. They're whitelisted by application control systems. They generate network traffic that security tools consider legitimate.

The explosion in LOTL attacks also reflects the maturation of the threat landscape. Less sophisticated attackers still rely on malware and exploits that traditional defenses catch. Advanced persistent threat groups, ransomware operators, and state-sponsored actors have evolved beyond these crude techniques.

These sophisticated adversaries understand your defensive posture. They know you're watching for malware signatures, unusual file downloads, and suspicious executables. So they simply don't use any of those things. Instead, they use your own infrastructure against you.

The Anatomy of a LOTL Attack

Understanding how LOTL attacks unfold reveals why network detection systems struggle to identify them. Consider a typical enterprise compromise using these techniques.

Initial Access: The attacker gains entry through spear phishing, exploiting a vulnerability, or compromising credentials. This initial foothold might involve malware, but once inside, the attacker pivots to LOTL techniques.

Reconnaissance: Using built-in tools like PowerShell, the attacker enumerates the environment. They query Active Directory to map the network topology, identify valuable targets, and locate administrator accounts. Every query uses legitimate Windows functionality generating normal-looking network traffic.

Credential Harvesting: The attacker uses Mimikatz or similar tools to extract credentials from memory. While Mimikatz itself is well-known, it can be loaded reflectively into memory without touching disk, leaving no file for antivirus to scan. The network traffic associated with this activity appears as normal system processes communicating.

Lateral Movement: With harvested credentials, the attacker moves to other systems using RDP, PsExec, or Windows Remote Management (WinRM). To network security systems, this looks identical to administrators managing systems remotely. The authentication traffic is legitimate. The protocols are standard. The behavior mimics normal IT operations.

Privilege Escalation: Using PowerShell scripts or WMI, the attacker escalates privileges to domain administrator level. Again, these are legitimate system administration tools generating normal traffic patterns.

Data Exfiltration: The attacker compresses data using built-in utilities, then transfers it using legitimate protocols. Maybe they use cloud storage services your organization already subscribes to. Perhaps they leverage existing VPN connections. The data leaves through approved channels using authorized protocols.

Persistence: The attacker establishes persistence using scheduled tasks, registry modifications, or WMI event subscriptions. All of these are legitimate Windows features, configured using standard administrative tools.

Throughout this entire attack chain, network traffic appears completely normal. Legitimate protocols, authorized tools, standard communication patterns. Traditional network detection systems see nothing suspicious because nothing technically is suspicious. The individual actions are all legitimate; only the intent behind them is malicious.

Why Traditional Detection Fails Against LOTL

Signature-based detection fails immediately against LOTL attacks because there's nothing to match against. The tools being used aren't malicious. They're signed, trusted binaries from legitimate vendors. Creating a signature for PowerShell or WMI would flag countless legitimate activities alongside any malicious use.

Anomaly-based detection struggles differently but fails just as completely. LOTL attacks deliberately mimic normal administrative behavior. The attacker moves at human speed, making their activities blend with legitimate IT operations. They use the same tools administrators use, following similar patterns.

An anomaly detection system might flag the activity as unusual if the attacker moves too quickly or accesses too many systems. But sophisticated attackers understand this. They deliberately pace their reconnaissance and lateral movement to match normal administrative patterns. They blend in by moving slowly and methodically, appearing indistinguishable from routine maintenance.

Even when anomaly systems do flag LOTL activity as suspicious, security analysts face an impossible triage challenge. How do you distinguish between an administrator legitimately troubleshooting issues using PowerShell across multiple servers versus an attacker conducting reconnaissance using the identical tools and techniques?

Without additional context about intent, behavior patterns over time, and correlation with other activities, individual LOTL actions appear benign. Network detection systems operating at the packet or flow level lack this context entirely.

The AI Adversary Multiplier

Artificial intelligence has amplified LOTL attacks in concerning ways. AI-powered tools help attackers automate reconnaissance, identify vulnerable targets, and optimize their approach to blend with legitimate traffic patterns.

Machine learning models can analyze an environment's normal behavior patterns and generate attack sequences that statistically mimic those patterns. The AI identifies which administrative accounts are most active, when they typically perform actions, which systems they access, and what tools they commonly use. The attacker's LOTL techniques then replicate these patterns precisely.

AI also accelerates the pace of LOTL attacks while maintaining their stealth. Automated tools conduct reconnaissance, harvest credentials, and move laterally much faster than human attackers could manually. But they do so in ways calibrated to appear normal, spacing activities and varying patterns to avoid triggering anomaly detection.

The combination of LOTL techniques and AI automation creates attacks that are simultaneously faster and stealthier than traditional approaches. They accomplish objectives in hours rather than weeks while generating traffic patterns nearly indistinguishable from legitimate operations.

According to recent research, 78% of CISOs report significant impact from AI-powered threats. LOTL attacks enhanced with AI represent a particularly concerning category because they exploit the fundamental limitation of network detection: the inability to distinguish legitimate tools used maliciously from the same tools used appropriately.

The Network Traffic Perspective

Understanding LOTL attacks from a network traffic perspective reveals why detection is so challenging. When you examine what network security tools actually see, the problem becomes clear.

Traditional network security tools analyze packets or flows: source and destination addresses, ports, protocols, payload content (when not encrypted), connection timing, data volumes. These elements describe the technical characteristics of network communication but provide no insight into intent.

When an administrator uses PowerShell to query Active Directory information across the network, the traffic shows: workstation IP connecting to domain controller IP, using standard LDAP protocol on port 389, with encrypted payload (because modern AD queries use encryption), standard packet sizes and timing patterns.

When an attacker uses PowerShell to conduct the exact same query for reconnaissance purposes, the network traffic shows: compromised workstation IP connecting to domain controller IP, using standard LDAP protocol on port 389, with encrypted payload, standard packet sizes and timing patterns.

The network signatures are identical. The traffic patterns are indistinguishable. The protocols are legitimate. Nothing about the network communication reveals malicious intent.

Payload inspection, even if you could decrypt the traffic, wouldn't help. The LDAP queries are validly formatted. The PowerShell commands are legitimate. The protocols are being used exactly as designed. The malicious aspect is the intent behind these legitimate actions, and intent doesn't appear in packet captures.

The Behavioral Metadata Gap

The challenge with LOTL detection isn't lack of data. Organizations collect enormous volumes of network traffic data through flow logs, packet captures, and endpoint telemetry. The challenge is that traditional detection systems can't extract meaningful behavioral patterns from this data.

Network flows contain rich metadata: which systems communicated, when, for how long, how much data transferred, which protocols were used. This metadata describes the "who, what, when, and how much" of network communication. What it doesn't describe is the "why" or the broader context of whether these communications represent legitimate activity or attack progression.

A sophisticated attacker conducting LOTL reconnaissance might generate network flows showing:

  • Workstation connecting to multiple servers sequentially
  • Each connection using standard administrative protocols
  • Data volumes consistent with normal queries
  • Timing patterns spread over hours or days
  • Source credentials belonging to a legitimate administrator account

These same flow characteristics could equally describe:

  • An administrator performing routine system checks
  • Automated monitoring tools collecting inventory data
  • A DevOps engineer deploying configuration updates
  • An attacker conducting reconnaissance before lateral movement

Without understanding the broader behavioral context, individual flows provide insufficient information to distinguish between these scenarios. Traditional network detection tools analyze flows in isolation or apply simple correlation rules, but they lack the sophisticated behavioral understanding needed to recognize LOTL attack patterns.

Why Packet Inspection Can't Scale

Some security teams attempt to solve LOTL detection by deploying comprehensive packet capture and deep packet inspection (DPI). If you can't distinguish legitimate from malicious based on flow metadata, perhaps examining full packet contents will reveal the difference.

This approach fails for multiple reasons. First, encryption makes payload inspection impossible for the majority of modern network traffic. Even when decryption is technically feasible, it creates massive performance bottlenecks, privacy concerns, and regulatory compliance issues.

Second, the infrastructure required for comprehensive packet capture at enterprise scale is prohibitively expensive. Capturing, storing, and analyzing full packets for all network traffic demands enormous storage capacity and processing power. Most organizations can only capture a small percentage of their traffic, creating visibility gaps attackers exploit.

Third, and most importantly, packet inspection doesn't solve the fundamental LOTL detection problem. Even if you can see inside encrypted traffic, LOTL attacks use legitimate protocols and tools exactly as designed. The packet contents are valid. The commands are properly formatted. The API calls are authorized. Nothing about the technical implementation reveals malicious intent.

An attacker using PowerShell Remoting to move laterally generates the same packet contents an administrator uses for remote system management. The WinRM protocol works identically for both. The authentication is valid. The session establishment follows standard procedures. Examining packet contents provides no additional insight into whether the activity is malicious.

The Cloud and SaaS Blind Spot

LOTL attacks become even harder to detect in cloud and Software as a Service (SaaS) environments. Cloud infrastructure provides powerful APIs and command-line tools for managing resources. SaaS applications offer extensive automation capabilities through scripting interfaces.

Attackers leverage these same capabilities to compromise cloud workloads, exfiltrate data from SaaS applications, and move between on-premises and cloud environments. The activities use legitimate cloud APIs, generating traffic that cloud security tools classify as normal administrative actions.

Traditional network security tools have limited visibility into these environments. Cloud workloads communicate directly with cloud services without traversing traditional network monitoring points. SaaS applications exchange data peer-to-peer. The network traffic exists, but your on-premises detection systems never see it.

Cloud-native security tools provide some visibility within their respective environments, but they face the same LOTL detection challenges. AWS CloudTrail logs show API calls, but can't distinguish between legitimate cloud administration and attackers using the AWS CLI for reconnaissance. Azure Activity Logs record resource access, but can't tell whether PowerShell scripts interacting with Azure resources serve legitimate automation or malicious purposes.

The Detection Gap Widens

While LOTL techniques have become the preferred method for sophisticated attackers, most network security budgets still focus on traditional detection approaches that LOTL attacks inherently evade.

Organizations invest in next-generation firewalls that perform deep packet inspection on traffic that's increasingly encrypted. They deploy IDS platforms that rely on signatures for attacks that use legitimate tools. They implement NDR solutions that flag anomalies when LOTL attacks deliberately mimic normal behavior.

Meanwhile, the attackers who represent the greatest threat operate undetected for months. Research consistently shows that sophisticated breaches remain undiscovered for extended periods, often only identified when the attacker makes an obvious mistake or deliberately announces their presence through ransomware deployment.

The detection gap isn't narrowing. It's widening. As more attackers adopt LOTL techniques and enhance them with AI automation, the percentage of threats invisible to traditional network detection continues growing.

What Actually Works

Detecting LOTL attacks requires a fundamentally different approach to network security. Instead of looking for malicious payloads that don't exist or anomalies that blend with normal behavior, detection systems need to understand the context and intent behind network activity.

This requires analyzing network behavior at a higher level of abstraction. Rather than asking "does this traffic match a known attack signature?" or "is this traffic statistically unusual?", the question becomes "does this sequence of network behaviors make sense given the broader context of what's happening across the environment?"

Answering this question demands understanding normal behavior patterns in sophisticated ways. Not just "user X typically accesses systems A, B, and C" but "when user X accesses systems in this particular sequence, with this timing, following this pattern of reconnaissance, it indicates reconnaissance behavior regardless of whether the individual actions appear normal."

This level of behavioral understanding exceeds what traditional network detection systems can provide. It requires processing network metadata at scale, learning complex patterns, and recognizing subtle deviations that indicate malicious intent even when individual actions appear legitimate.

The technology to enable this exists, but it requires moving beyond packet inspection, signature matching, and simple anomaly detection to approaches that truly understand network behavior patterns. Organizations that continue relying on traditional network detection will continue missing LOTL attacks designed specifically to evade those systems.

Part 3 will explore what effective detection of network-based threats actually looks like, examining the technical approaches that can identify malicious behavior even when it uses legitimate tools and mimics normal traffic patterns.

See the threats your tools can’t.

DeepTempo’s LogLM works with your existing stack to uncover evolving threats that traditional systems overlook — without adding complexity or replacing what already works.

Request a demo
Empowering SOC teams with real-time collective AI-defense and deep learning to stop breaches faster.
Built by engineers and operators who’ve lived the challenges of security operations, we deliver open, AI-native software that runs on any data lake—freeing teams from legacy constraints. Our LogLMs return control to defenders, enabling faster, smarter, and more collaborative responses to cyber threats.