# NASimEmu: Network Attack Simulator & Emulator for Training Agents Generalizing to Novel Scenarios

**Authors:** Jaromír Janisch, Tomáš Pevný, Viliam Lisý  
**arXiv:** [2305.17246](https://arxiv.org/abs/2305.17246)  
**Date:** 2023-05-26  
**Summary page:** https://www.summarizepaper.com/en/paper/2305.17246v1/

## Key points

- Current frameworks for training offensive penetration testing agents using deep reinforcement learning face challenges in real-world scenarios due to:
- Disparity between simulation-based and emulation-based frameworks
- Limited scalability of existing approaches
- Reliance on unrealistic metrics based solely on training data
- NASimEmu framework introduced by authors Jaromír Janisch, Tomáš Pevný, and Viliam Lisý addresses these challenges by:
- Providing both a simulator and an emulator with a shared interface
- Enabling agents to train in a simulated environment and validate in an emulator for realism
- Emphasizing the development of general agents capable of transferring skills to novel scenarios
- Developing general agents that can adapt to diverse scenarios
- Leveraging NASim simulator and industry-standard tools like Vagrant, VirtualBox, Metasploit for simulation and emulation
- Experimental results demonstrate successful deployment of simulation-trained agents in emulation environments using NASimEmu
- NASimEmu is available as open-source software through repositories maintained by Jaromír Janisch at:
- https://github.com/jaromiru/NASimEmu
- https://github.com/jaromiru/NASimEmu-agents

## Summary

In the realm of training offensive penetration testing agents using deep reinforcement learning, current frameworks face challenges in producing agents that can effectively perform in real-world scenarios. This is primarily due to the disparity between simulation-based frameworks and emulation-based frameworks, as well as the limited scalability of existing approaches. Moreover, many frameworks rely on unrealistic metrics that assess agent performance solely based on training data. To address these shortcomings, a novel framework called NASimEmu has been introduced in this paper by authors Jaromír Janisch, Tomáš Pevný, and Viliam Lisý. NASimEmu offers a unique solution by providing both a simulator and an emulator with a shared interface. This innovative approach enables agents to undergo training in a simulated environment and then be deployed in an emulator for validation, ensuring the realism of the abstraction used during training. One key advantage of NASimEmu is its emphasis on developing general agents capable of transferring their skills to novel scenarios that were not encountered during their training phase. The framework leverages an enhanced version of the existing simulator NASim for simulation purposes while employing industry-standard tools such as Vagrant, VirtualBox, and Metasploit for emulation. Experimental results showcased in the paper demonstrate the successful deployment of simulation-trained agents in emulation environments. Furthermore, the authors illustrate how NASimEmu can be utilized to train versatile agents capable of adapting to structurally diverse scenarios previously unseen during their training process. NASimEmu is made available as open-source software through repositories maintained by Jaromír Janisch at https://github.com/jaromiru/NASimEmu and https://github.com/jaromiru/NASimEmu-agents. By bridging the gap between simulation and emulation while prioritizing generalizability and transferability of agent skills, NASimEmu represents a significant advancement in the field of offensive penetration testing agent training with deep reinforcement learning.
