PocketCTF: A Fully Featured Approach for Hosting Portable Attack and Defense Cybersecurity Exercises
Abstract
:1. Introduction
2. Related Work
3. Virtualization and Containerization Technologies
3.1. Overview
3.2. Performance Evaluation of Virtualization and Containerization Technologies
- CPU Score: This is an aggregate mark that provides the overall CPU performance. The performance metrics are based on multiple tests including mathematical calculations, sorting, and compression algorithms, among others.
- Memory Score: Memory performance is calculated similarly to the CPU by initiating SQL database operations, memory read of the cached and uncached RAM, calculating the memory latency, among others.
- Disk Read and Write (MB/sec), Read and Write I/O (MB/sec): Disk performance is provided by the calculations of reading and writing speeds. Another metric is provided as well, called IOPS (Input/Output Operations Per Second), which is retrieved by the following formula: IOPS = (MBps / Block Size) * 1024. The performance test calculates the time required to iteratively read and write a big file of 800 MB for 60 s.
4. PocketCTF: A Portable Capture the Flag
4.1. Software Architecture
4.2. Implementation of a Proof-of-Concept Scenario
- Trainees need to access the LXC dedicated to them by using RDP: The trainees are invited to access the system via RDP. The educator may explain that this will be their main system for the exercises and the total approach.
- Access the CTF platform to access the instructions: The trainees are invited to access the web API of the platform where the main features of the platform are explained.
- Set up the SIEM agents: The trainees must follow a specific process to install and configure the SIEM agents. The SIEM agents are parsers with the main purpose of retrieving log files to the SIEM (as mentioned above, in PocketCTF, we have deployed Wazuh SIEM).
- Configure IDS and read alerts: The trainees should read and evaluate the alerts from the IDS by checking the log file generated by Suricata (i.e., fast.log). Afterwards, this file will be forwarded to the SIEM.
- Forwarding log files to SIEM for parsing: The trainees should configure the SIEM agents to ingest the fast.log (generated by Suricata) and the generic log files (generated by the host OS) into Wazuh.
- Create scheduled queries which will trigger the corresponding alerts: The trainees must create scheduled queries that will fetch data to detect the DoS attack and generate an alert.
5. Discussion
6. Conclusions and Future Work
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Taylor, C.; Arias, P.; Klopchic, J.; Matarazzo, C.; Dube, E. CTF: State-of-the-Art and building the next generation. In 2017 USENIX Workshop on Advances in Security Education (ASE 17); 2017; Available online: https://www.usenix.org/conference/ase17/workshop-program/presentation/taylor (accessed on 4 August 2021).
- Davis, A.; Leek, T.; Zhivich, M.; Gwinnup, K.; Leonard, W. The Fun and Future of CTF. In Proceedings of the 2014 USENIX Summit on Gaming, Games, and Gamification in Security Education, San Diego, CA, USA, 18 August 2014. [Google Scholar]
- Schreuders, Z.C.; Shaw, T.; Shan-A-Khuda, M.; Ravichandran, G.; Keighley, J.; Ordean, M. Security Scenario Generator (SecGen): A Framework for Generating Randomly Vulnerable Rich-scenario VMs for Learning Computer Security and Hosting CTF Events. Ase’17. 2017. Available online: https://www.usenix.org/conference/ase17/workshop-program/presentation/schreuders (accessed on 4 August 2021).
- Iannacone, M.D.; Bridges, R.A. Quantifiable & Comparable Evaluations of Cyber Defensive Capabilities: A Survey & Novel, Unified Approach. arXiv 2019, arXiv:1902.00053. [Google Scholar]
- Vykopal, J.; Svabensky, V.; Chang, E.C. Benefits and Pitfalls of Using Capture The Flag Games in University Courses. In Proceedings of the 51st ACM Technical Symposium on Computer Science Education (SIGCSE ′20); Association for Computing Machinery: New York, NY, USA, 2020; pp. 752–758. [Google Scholar] [CrossRef] [Green Version]
- Mirkovic, J.; Peterson, P.A.H. Class Capture-the-Flag Exercises. In Proceedings of the 2014 USENIX Summit on Gaming, Games, and Gamification in Security Education, San Diego, CA, USA, 18 August 2014. [Google Scholar]
- Vigna, G.; Borgolte, K.; Corbetta, J.; Doupe, A.; Fratantonio, Y.; Invernizzi, L.; Kirat, D.; Shoshitaishvili, Y. Ten Years of iCTF: The Good, The Bad, and The Ugly. In Proceedings of the 2014 USENIX Summit on Gaming, Games, and Gamification in Security Education, San Diego, CA, USA, 18 August 2014. [Google Scholar]
- Jones, K.S.; Namin, A.S.; Armstrong, M.E. The core cyber-defense knowledge, skills, and abilities that cybersecurity students should learn in school: Results from interviews with cybersecurity professionals. ACM Trans. Comput. Educ. 2018, 18, 1–12. [Google Scholar] [CrossRef]
- Barth, F.; Luft, M. Towards a practical approach for teaching IT-security. In Proceedings of the 3rd International Conference on Society and Information Technologies, Orlando, FL, USA, 25–28 March 2012; pp. 300–305. [Google Scholar]
- Gondree, M.; Peterson, Z.N.J.; Denning, T. Security through play. IEEE Secur. Priv. 2013, 11, 64–67. [Google Scholar] [CrossRef]
- Perrone, G.; Romano, S.P. The docker security playground: A hands-on approach to the study of network security. In Proceedings of the 2017 Principles, Systems and Applications of IP Telecommunications (IPTComm), Chicago, IL, USA, 25–28 September 2017. [Google Scholar] [CrossRef]
- VulnHub. Available online: https://www.vulnhub.com/ (accessed on 24 July 2021).
- Karlov, A.A. Virtualization in education: Information Security lab in your hands. Phys. Part. Nucl. Lett. 2016, 13, 640–643. [Google Scholar] [CrossRef]
- Du, W. SEED: Hands-on lab exercises for computer security education. IEEE Secur. Priv. 2011, 9, 70–73. [Google Scholar] [CrossRef]
- SEED Labs. Available online: https://seedsecuritylabs.org/ (accessed on 24 July 2021).
- ENISA CSIRT—Training Resources. Available online: https://www.enisa.europa.eu/topics/trainings-for-cybersecurity-specialists/online-training-material (accessed on 24 July 2021).
- CyberDefenders. Available online: https://cyberdefenders.org/ (accessed on 24 July 2021).
- DetectionLabELK. Available online: https://github.com/cyberdefenders/DetectionLabELK (accessed on 24 July 2021).
- DetectionLab. Available online: https://github.com/clong/DetectionLab (accessed on 24 July 2021).
- de Leon, D.C.; Goes, C.E.; Haney, M.A.; Krings, A.W. ADLES: Specifying, deploying, and sharing hands-on cyber-exercises. Comput. Secur. 2018, 74, 12–40. [Google Scholar] [CrossRef]
- Braidley, S. Extending Our Cyber-Range CYRAN with Social Engineering Capabilities. September 2016. Available online: https://www.researchgate.net/profile/Sam-Braidley/publication/313241265_Extending_Our_Cyber-Range_CYRAN_with_Social_Engineering_Capabilities/links/5893764445851563f828eb20/Extending-Our-Cyber-Range-CYRAN-with-Social-Engineering-Capabilities.pdf (accessed on 4 August 2021).
- Brynielsson, J.; Franke, U.; Tariq, M.A.; Varga, S. Using cyber defense exercises to obtain additional data for attacker profiling. In Proceedings of the 2016 IEEE Conference on Intelligence and Security Informatics (ISI), Tucson, AZ, USA, 28–30 September 2016; pp. 37–42. [Google Scholar] [CrossRef]
- Childers, N.; Boe, B.; Cavallaro, L.; Cavedon, L.; Cova, M.; Egele, M.; Vigna, G. Organizing large scale hacking competitions. In Detection of Intrusions and Malware, and Vulnerability Assessment DIMVA 2010; Springer: Berlin/Heidelberg, Germany, 2010; Volume 6201, pp. 132–152. [Google Scholar] [CrossRef] [Green Version]
- Irvine, C.E.; Michael, F.; Khosalim, J. Labtainers: A Framework for Parameterized Cybersecurity Labs Using Containers. 2017. Available online: http://hdl.handle.net/10945/56211 (accessed on 4 August 2021).
- Docker. Available online: https://www.docker.com/ (accessed on 24 July 2021).
- LXC—Linux Containers. Available online: https://linuxcontainers.org/ (accessed on 24 July 2021).
- Dua, R.; Raja, A.R.; Kakadia, D. Virtualization vs containerization to support PaaS. In Proceedings of the 2014 IEEE International Conference on Cloud Engineering, Boston, MA, USA, 11–14 March 2014; pp. 610–614. [Google Scholar] [CrossRef]
- Hickman, A. Container Intrusions: Assessing the Efficacy of Intrusion Detection and Analysis Methods for Linux Container Environments. SANS Inst. InfoSec Read. Room 2017, 1–32. Available online: https://www.researchgate.net/profile/Tiago-Heinrich/publication/346246313_Deteccao_de_Anomalias_Estudo_de_Tecnicas_de_Identificacao_de_Ataques_em_um_Ambiente_de_Conteiner/links/5fbd0f8f458515b79765b64e/Deteccao-de-Anomalias-Estudo-de-Tecnicas-de-Identificacao-de-Ataques-em-um-Ambiente-de-Conteiner.pdf (accessed on 4 August 2021).
- Špaček, F.; Sohlich, R.; Dulík, T. Docker as platform for assignments evaluation. Procedia Eng. 2015, 100, 1665–1671. [Google Scholar] [CrossRef] [Green Version]
- Yin, Y.; Shao, Y.; Wang, X.; Su, Q. A Flexible Cyber Security Experimentation Platform Architecture Based on Docker. In Proceedings of the 2019 IEEE 19th International Conference on Software Quality, Reliability and Security Companion (QRS-C), Sofia, Bulgaria, 22–26 July 2019; pp. 413–420. [Google Scholar] [CrossRef]
- Hay, B.; Dodge, R.; Nance, K. Using virtualization to create and deploy computer security lab exercises. IFIP Int. Fed. Inf. Process. 2008, 278, 621–635. [Google Scholar] [CrossRef] [Green Version]
- Raj, A.S.; Alangot, B.; Prabhu, S.; Achuthan, K. Scalable and lightweight CTF infrastructures using application containers. In Proceedings of the 2016 USENIX Workshop on Advances in Security Education (ASE 16), Austin, TX, USA, 9 August 2016. [Google Scholar]
- Oh, S.K.; Stickney, N.; Hawthorne, D.; Matthews, S.J. Teaching Web-Attacks on a Raspberry Pi Cyber Range. In Proceedings of the 21st Annual Conference on Information Technology Education (SIGITE ’20); Association for Computing Machinery: New York, NY, USA, 2020; pp. 324–329. [Google Scholar] [CrossRef]
- AlSalamah, A.K.; Cámara, J.M.S.; Kelly, S. Applying virtualization and containerization techniques in cybersecurity education. In Proceedings of the 34th Information Systems Education Conference (ISECON 2018), San Antonio, TX, USA, 6 April 2018; pp. 1–14. [Google Scholar]
- Vykopal, J.; Ošlejšek, R.; Čeleda, P.; Vizváry, M.; Tovarňák, D. KYPO cyber range: Design and use cases. In Proceedings of the 12th International Conference on Software Technologies (ICSOFT 2017); SciTePress: Madrid, Spain, 2017; pp. 310–321. [Google Scholar] [CrossRef]
- Pham, C.; Tang, D.; Chinen, K.I.; Beuran, R. CyRIS: A cyber range instantiation system for facilitating security training. In Proceedings of the Seventh Symposium on Information and Communication Technology (SoICT ’16); Association for Computing Machinery: New York, NY, USA, 2016; pp. 251–258. [Google Scholar] [CrossRef]
- Beuran, R.; Pham, C.; Tang, D.; Chinen, K.i.; Tan, Y.; Shinoda, Y. Cytrone: An integrated cybersecurity training framework. In Proceedings of the 3rd International Conference on Information Systems Security and Privacy—ICISSP; SciTePress: Porto, Portugal, 2017; pp. 157–166. [Google Scholar] [CrossRef]
- Chouliaras, N.; Kittes, G.; Kantzavelou, I.; Maglaras, L.; Pantziou, G.; Ferrag, M.A. Cyber ranges and testbeds for education, training, and research. Appl. Sci. 2021, 11, 1809. [Google Scholar] [CrossRef]
- Vekaria, K.B.; Calyam, P.; Wang, S.; Payyavula, R.; Rockey, M.; Ahmed, N. Cyber Range for Research-Inspired Learning of ‘Attack Defense by Pretense’ Principle and Practice. IEEE Trans. Learn. Technol. 2021, 50, 1. [Google Scholar] [CrossRef]
- Costa, G.; Russo, E.; Armando, A. Automating the Generation of Cyber Range Virtual Scenarios with VSDL. 2020. Available online: https://arxiv.org/abs/2001.06681 (accessed on 4 August 2021).
- Chaskos, E.C. Cyber-Security Training: A Comparative Analysis of Cyber- Ranges and Emerging Trends; Technology Development for Security Practitioners; Springer: Basle, Switzerland, 2021; p. 78. [Google Scholar]
- Vykopal, J.; Vizvary, M.; Oslejsek, R.; Celeda, P.; Tovarnak, D. Lessons learned from complex hands-on defence exercises in a cyber range. In Proceedings of the 2017 IEEE Frontiers in Education Conference (FIE), Indianapolis, IN, USA, 18–21 October 2017; pp. 1–8. [Google Scholar] [CrossRef] [Green Version]
- Jamalpur, S.; Navya, Y.S.; Raja, P.; Tagore, G.; Rao, G.R.K. Dynamic Malware Analysis Using Cuckoo Sandbox. In Proceedings of the 2018 Second International Conference on Inventive Communication and Computational Technologies (ICICCT), Coimbatore, India, 20–21 April 2018; pp. 1056–1060. [Google Scholar] [CrossRef]
- Keahey, K.; Doering, K.; Foster, I. From sandbox to playground: Dynamic virtual environments in the grid. In Proceedings of the Fifth IEEE/ACM International Workshop on Grid Computing, Pittsburgh, PA, USA, 8 November 2004; Volume 3, pp. 34–42. [Google Scholar] [CrossRef]
- Chen, Y.; Zhang, G.; Hu, D.; Tao, Q. Multiscale emulation technology based on the integration of virtualization, physical and simulation networks. In Proceedings of the 2019 IEEE Fourth International Conference on Data Science in Cyberspace (DSC), Hangzhou, China, 23–25 June 2019; pp. 396–402. [Google Scholar] [CrossRef]
- Song, H.; Wang, X.; Zhai, M.; Zhang, G. High-fidelity router emulation technologies based on multi-scale virtualization. Information 2020, 11, 47. [Google Scholar] [CrossRef] [Green Version]
- Yang, S.; Wang, X.; Wang, X.; An, L.; Zhang, G. High-performance docker integration scheme based on OpenStack. World Wide Web 2020, 23, 2593–2632. [Google Scholar] [CrossRef]
- Ji, Y.; Zhang, G.; Xie, S.; Wang, X. Container Networking Performance Analysis for Large-Scale User Behavior Simulation. J. Comput. Commun. 2019, 7, 136–146. [Google Scholar] [CrossRef] [Green Version]
- Zhang, Z.; Lu, G.; Zhang, C.; Gao, Y.; Wu, Y.; Zhong, G. CyFRS: A Fast Recoverable System for Cyber Range Based on Real Network Environment. In Proceedings of the 2020 Information Communication Technologies Conference (ICTC), Nanjing, China, 29–31 May 2020; pp. 153–157. [Google Scholar] [CrossRef]
- Casalicchio, E.; Perciballi, V. Measuring Docker performance: What a mess!!! In Proceedings of the 8th ACM/SPEC on International Conference on Performance Engineering Companion (ICPE ’17 Companion); Association for Computing Machinery: New York, NY, USA, 2017; pp. 11–16. [Google Scholar] [CrossRef] [Green Version]
- Bhimani, J.; Yang, Z.; Mi, N.; Yang, J.; Xu, Q.; Awasthi, M.; Pandurangan, R.; Balakrishnan, V. Docker container scheduler for I/O intensive applications running on NVMe SSDs. IEEE Trans. Multi-Scale Comput. Syst. 2018, 4, 313–326. [Google Scholar] [CrossRef]
- Felter, W.; Ferreira, A.; Rajamony, R.; Rubio, J. An updated performance comparison of virtual machines and Linux containers. In Proceedings of the 2015 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS), Philadelphia, PA, USA, 29–31 March 2015; pp. 171–172. [Google Scholar] [CrossRef] [Green Version]
- Putri, A.R.; Munadi, R.; Negara, R.M. Performance analysis of multi services on container Docker, LXC, and LXD. Bull. Electr. Eng. Inform. 2020, 9, 2008–2011. [Google Scholar] [CrossRef]
- Karagiannis, S.; Magkos, E.; Ntantogian, C.; Ribeiro, L.L. Sandboxing the Cyberspace for Cybersecurity Education and Learning. In European Symposium on Research in Computer Security; Springer: Cham, Switzerland, 2020; pp. 181–196. [Google Scholar] [CrossRef]
- Moravcik, M.; Segec, P.; Kontsek, M.; Uramova, J.; Papan, J. Comparison of LXC and Docker Technologies. In Proceedings of the 2020 18th International Conference on Emerging eLearning Technologies and Applications (ICETA), Košice, Slovenia, 12–13 November 2020; pp. 481–486. [Google Scholar] [CrossRef]
- Beham, M.; Vlad, M.; Reiser, H.P. Intrusion detection and honeypots in nested virtualization environments. In Proceedings of the 2013 43rd Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN), Budapest, Hungary, 24–27 June 2013. [Google Scholar] [CrossRef]
- Ben-Yehuda, M.; Day, M.D.; Dubitzky, Z.; Factor, M.; Har’El, N.; Gordon, A.; Liguori, A.; Wasserman, O.; Yassour, B.A. The turtles project: Design and implementation of nested virtualization. In Proceedings of the 9th USENIX Symposium on Operating Systems Design and Implementation (OSDI ’10), Vancouver, BC, Canada, 4–6 October 2010; pp. 423–436. [Google Scholar]
- AppArmor. Available online: https://gitlab.com/apparmor/apparmor (accessed on 28 July 2021).
- Passmark—Linux Performance Test. Available online: https://www.passmark.com/products/pt_linux/index.php (accessed on 12 July 2021).
- FIO—Flexible I/O Tester. Available online: https://github.com/axboe/fio (accessed on 12 July 2021).
- Proxmox. Available online: https://www.proxmox.com/en/ (accessed on 24 July 2021).
- CTFd. Available online: https://github.com/CTFd/CTFd (accessed on 24 July 2021).
- Wazuh—The Open Source Security Platform. Available online: https://github.com/wazuh/wazuh (accessed on 24 July 2021).
- hping—Network Tool. Available online: https://github.com/antirez/hping (accessed on 24 July 2021).
- Nmap—The Network Mapper. Available online: https://github.com/nmap/nmap (accessed on 24 July 2021).
- Docker Buildx. Available online: https://github.com/docker/buildx (accessed on 24 July 2021).
Parameter | Virtual Machines | Containers |
---|---|---|
Guest OS | Each virtual system runs on virtual hardware, and the kernel is loaded into its virtual memory. | All the guests share the same kernel loaded in the physical memory. |
Isolation | Libraries and files are completely isolated. | Directories can be mounted and can be shared between the containers and the physical machine. |
Performance | All instructions need to be translated between virtual systems and the physical machine, which incurs a performance decrease. | Near-native host performance and is especially better in terms of I/O interruptions. |
Communication | Full virtualization of network devices. | A special driver is assigned for connecting the containers to network interfaces. |
Storage | Need a large amount of disk space as each virtual system needs to store the whole OS and associated applications. | Containers require less amount of storage as the base host image is shared among the containers. |
Memory requirements | Virtual machines create a unique kernel that requires a significant amount of memory | Containers do not have significant memory requirements |
Host Machine | Nested KVM | Nested Docker | Nested LXC |
---|---|---|---|
KVM | ✔ | ✔ | ✔ |
Docker | ━ | ✔ | ━ |
LXC | ━ | ✔ | ━ |
Performance Test | CPU Score | Memory Score | Disk Read (MB/Sec) | Disk Write (MB/Sec) | Read IOPS (MB/Sec) | Write IOPS (MB/Sec) |
---|---|---|---|---|---|---|
Native Linux | 11,163 | 2636 | 114 | 28.5 | 6507 | 1629 |
Docker | 11,262 | 2523 | 214 | 53.5 | 12,500 | 3208 |
LXC | 11,068 | 2550 | 208 | 51.9 | 12,200 | 3114 |
KVM | 7664 | 2530 | 111 | 27.8 | 6659 | 1667 |
Docker in LXC | 11,318 | 2667 | 213 | 53.5 | 12,532 | 3136 |
Docker in KVM | 7933 | 2636 | 100 | 25.2 | 5906 | 1478 |
Docker in Docker | 11,220 | 2577 | 205 | 51.2 | 11,000 | 3070 |
Architecture | Benefits | Limitations |
---|---|---|
x86-compatible PC machine | Can support many trainees and has a better performance overall. | Increased cost and less portability |
Raspberry Pi (ARM) | Easy to afford. Portability | Docker images might require conversion to ARM architecture by using Docker buildx [66]. KVM is too resource-intensive for RPi to run smoothly |
Characteristic | Benefits | Challenges |
---|---|---|
Portability | Running Dockers inside LXC containers allows a large variety of services within a single virtual image. | The image size could be large depending on the installed services. Need for a PC with moderate resources to run multiple machines. |
Scalability | Due to clustering support mode, LXC containers offer high scalability. | The deployed SIEM is shared between all participants. |
Compatibility | All the popular services that have already published Docker containers can be deployed. Virtual images could be revised and executed as containers. | Windows are not supported unless KVM is initiated. ARM-based dockers must be created when Raspberry Pi is used. |
Usability | Easy deployment of PocketCTF. For every new trainee, it is easy to initiate new LXC containers. Trainees and educators maintain a single endpoint of communication that automatically deploys the trainees’ operating systems, CTF platform, and other services (e.g., the SIEM) | Creating or importing new PocketCTF scenarios is relatively complex. |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Karagiannis, S.; Ntantogian, C.; Magkos, E.; Ribeiro, L.L.; Campos, L. PocketCTF: A Fully Featured Approach for Hosting Portable Attack and Defense Cybersecurity Exercises. Information 2021, 12, 318. https://doi.org/10.3390/info12080318
Karagiannis S, Ntantogian C, Magkos E, Ribeiro LL, Campos L. PocketCTF: A Fully Featured Approach for Hosting Portable Attack and Defense Cybersecurity Exercises. Information. 2021; 12(8):318. https://doi.org/10.3390/info12080318
Chicago/Turabian StyleKaragiannis, Stylianos, Christoforos Ntantogian, Emmanouil Magkos, Luís L. Ribeiro, and Luís Campos. 2021. "PocketCTF: A Fully Featured Approach for Hosting Portable Attack and Defense Cybersecurity Exercises" Information 12, no. 8: 318. https://doi.org/10.3390/info12080318
APA StyleKaragiannis, S., Ntantogian, C., Magkos, E., Ribeiro, L. L., & Campos, L. (2021). PocketCTF: A Fully Featured Approach for Hosting Portable Attack and Defense Cybersecurity Exercises. Information, 12(8), 318. https://doi.org/10.3390/info12080318