Mobile tactical networks facilitate communication, coordination, and information dissemination between soldiers in the field. Their increasing use provides important benefits, yet also makes them a prime enemy target. Furthermore, their dynamic, distributed, and ad-hoc nature makes them particularly vulnerable to cyber attack. Unfortunately, most existing research on cybersecurity in mobile ad-hoc networks either uses simplistic mobility models that are easier to analyze mathematically or focuses on modeling the dynamics of civilian networks. In this work, we present an agent-based modeling framework to study malware spread in mobile tactical networks. Our framework includes military-inspired models of hierarchical command structure, unit movement, communication over short-range radio, self-propagating malware, and cyber defense mechanisms. We implement several example scenarios representing military units engaged in tactical operations on a synthetic battlefield. Finally, we conduct a case study, using agent-based simulation to analyze the impact of hierarchy and cybersecurity policies on malware spread. Our results support the claim that agent-based modeling is particularly well-suited for representing the complex organizational and spatial structures inherent to military operations, and we urge others to incorporate the key elements of our framework into existing modeling tools when performing studies of cyber attacks on mobile tactical networks and corresponding cybersecurity measures.