Hypothesis Exploration for Malware Detection Using Planning

Shirin Sohrabi, Octavian Udrea, Anton RiabovAAAI 2013

Abstract

In this paper we apply AI planning to address the hypothesis exploration problem and provide assistance to network administrators in detecting malware based on unreliable observations derived from network traffic. Building on the already established characterization and use of AI planning for similar problems, we propose a formulation of the hypothesis generation problem for malware detection as an AI planning problem with temporally extended goals and actions costs. Furthermore, we propose a notion of hypothesis "plausibility" under unreliable observations, which we model as plan quality. We then show that in the presence of unreliable observations, simply finding one most "plausible" hypothesis, although challenging, is not sufficient for effective malware detection. To that end, we propose a method for applying a state-of-the-art planner within a principled exploration process, to generate multiple distinct high-quality plans. We experimentally evaluate this approach by generating random problems of varying hardness both with respect to the number of observations, as well as the degree of unreliability. Based on these experiments, we argue that our approach presents a significant improvement over prior work that are focused on finding a single optimal plan, and that our hypothesis exploration application can motivate the development of new planners capable of generating the top high-quality plans.

Introduction

Detecting modern malware is a complex game of cat and mouse. Unlike simple viruses of the past, modern "bots" exhibit sophisticated lifecycles: they infect a host, establish contact with a Command & Control (C&C) server, spread to neighboring systems, and eventually execute malicious exploits such as DDoS attacks or data exfiltration.

Security administrators face three primary hurdles when tracking these lifecycles:

  1. Unreliability: Network logs are often incomplete or noisy.
  2. Ambiguity: A connection to a blacklisted domain could be a malware check-in or a benign user error.
  3. Inconsistency: Observations may contradict each other due to multiple processes running on the same machine.

Most existing diagnostic tools assume observations are 100% accurate. This paper addresses the need for a system that handles "messy" real-world data by providing multiple plausible explanations rather than a single, potentially incorrect, "best guess."

Methodology: Planning as Explanation

The authors frame malware detection as a Plan Recognition problem, translating the malware lifecycle into a dynamical system of states and transitions.

The malware lifecycle model and associated network observations.

The Planning Framework

The model is translated into PDDL (Planning Domain Definition Language), where the "goal" is to find a sequence of actions that explains the observed network traffic. To handle noise, the authors introduced a discard action. If an observation does not fit the malware model, the planner can choose to discard it at a high "cost."

In this framework, plausibility is equivalent to plan quality. The planner searches for the "cheapest" plan—one that explains the most observations using known malware behaviors rather than discarding them.

The Replanning Wrapper

Standard AI planners typically return only one optimal solution. However, in security, the true explanation is often buried. The authors developed a wrapper around the LAMA planner that iteratively generates a "top-K" list of distinct hypotheses. After finding the best plan, the wrapper modifies the problem to forbid those specific actions and runs the planner again to find the next most plausible scenario.

Key Results and Evaluation

The system was evaluated using a hand-crafted lifecycle model (18 states) and synthetic models (up to 100 states) to test scalability. The researchers simulated "true" malware paths, added noise, and tested if the system could rediscover the ground truth.

Distribution of solved problems across planning rounds for various model sizes.

Accuracy and the Value of Iteration

On the hand-crafted model, the system successfully identified the ground truth in its top results approximately 75-80% of the time. Crucially, as shown in the results table, the ground truth was frequently found in rounds 2 through 50 rather than the initial round. This confirms that the "optimal" plan is often not the correct one in noisy security environments.

Scalability Limits

While effective for smaller models, the system's performance declined as the state space grew. For 100-state models, the success rate dropped to roughly 30%. This suggests that while planning is a powerful diagnostic tool, it requires highly efficient search strategies to handle the scale of enterprise networks.

Conclusion

This research demonstrates that moving beyond simple optimality is essential for effective malware detection. By treating planning as a filter for competing hypotheses, administrators can focus on the most logically consistent explanations for suspicious activity. Future work points toward the development of native "Top-K" planners and automated methods for learning lifecycle models directly from network data.

Summary updated

BibTeX
@inproceedings{sohrabi2013hypothesis,
  author = {Shirin Sohrabi and Octavian Udrea and Anton Riabov},
  title = {{Hypothesis Exploration for Malware Detection Using Planning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2013},
  url = {https://openreview.net/forum?id=rk-q-xZObH},
}
Figure