Scalable and Lightweight CTF Infrastructures Using Application - - PowerPoint PPT Presentation

scalable and lightweight ctf infrastructures using
SMART_READER_LITE
LIVE PREVIEW

Scalable and Lightweight CTF Infrastructures Using Application - - PowerPoint PPT Presentation

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion Scalable and Lightweight CTF Infrastructures Using Application Containers Arvind S Raj, Bithin Alangot, Seshagiri Prabhu and


slide-1
SLIDE 1

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Scalable and Lightweight CTF Infrastructures Using Application Containers

Arvind S Raj, Bithin Alangot, Seshagiri Prabhu and Krishnashree Achuthan

Amrita Center for Cybersecurity Systems and Networks Amrita Vishwa Vidyapeetham, Kerala, India

2016 USENIX Advances in Security Education Workshop

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 1/38

slide-2
SLIDE 2

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Introduction

CTFs - an effective means to teach secure coding and computer security. Two popular formats: Jeopardy and Attack-defence. Jeopardy: Self-paced, offence only, non-interactive and more popular. Attack-defence: Real-time, offence and defence, interactive but less popular.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 2/38

slide-3
SLIDE 3

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

CTF event counts

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 3/38

slide-4
SLIDE 4

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Participation trends

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 4/38

slide-5
SLIDE 5

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Format challenges

Both organizers and participants face challenges. Organizers: Complex infrastructure engineering and high resource requirements. Participants: Complex gameplay, infrastructure setup and IT policies.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 5/38

slide-6
SLIDE 6

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Problem

Can we build less resource intensive and easily scalable contest infrastructures?

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 6/38

slide-7
SLIDE 7

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Solution

Replace virtual machines with application containers.

Significant reduction in resource usage and engineering required. Eliminates several difficult to setup components. Improves gameplay experience for participants.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 7/38

slide-8
SLIDE 8

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Outline of presentation

1

Challenges in existing attack-defence CTF game format and infrastructures

2

Overview of Docker and associated technologies

3

Container-based attack-defence CTF game infrastructure

4

Performance evaluation

5

Future work

6

Conclusion

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 8/38

slide-9
SLIDE 9

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Outline

1

Challenges in existing attack-defence CTF game format and infrastructures

2

Overview of Docker and associated technologies

3

Container-based attack-defence CTF game infrastructure

4

Performance evaluation

5

Future work

6

Conclusion

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 9/38

slide-10
SLIDE 10

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Challenges

2 sources: gameplay and game infrastructure. Gameplay affects participants: requires doing too many tasks. Distracts them from primary objective. Infrastructure affects organizers and participants. 2 infrastructure types: distributed and centralized.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 10/38

slide-11
SLIDE 11

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Distributed infrastructure

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 11/38

slide-12
SLIDE 12

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Challenges

Organizers

Infrastructure needs lot of resources, engineering and monitoring. eg: rwthCTF 2012’s VPN server: 16GB RAM, 8 core i7 processor and 8 OpenVPN daemon processes.

Participants

Difficult to obtain hardware such as computers and network switches/routers. University IT policies prevent connecting to UDP based VPNs.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 12/38

slide-13
SLIDE 13

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Centralized infrastructure

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 13/38

slide-14
SLIDE 14

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Challenges

Organizers

Exponential increase in computing resources required. Setting up exploit sandboxes, installing libraries and executing exploits.

Participants

Network latency when accessing services. Recreating services locally for analysis and testing is not straightforward. Locked in to a standard exploit environment.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 14/38

slide-15
SLIDE 15

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Outline

1

Challenges in existing attack-defence CTF game format and infrastructures

2

Overview of Docker and associated technologies

3

Container-based attack-defence CTF game infrastructure

4

Performance evaluation

5

Future work

6

Conclusion

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 15/38

slide-16
SLIDE 16

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Docker vs Virtual machines

Figure : Virtual Machines Figure : Docker containers

Images courtesy www.docker.com Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 16/38

slide-17
SLIDE 17

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Why Docker?

Built-in container image reuse and extend capabilities. Remote API and programming language bindings aid in automation. Easy to share and distribute container images. Third party tools for container and image management.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 17/38

slide-18
SLIDE 18

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Distribution and PORTUS

Docker Inc’s Distribution: Tool to manage container images - similar to a Git server. SUSE’s PORTUS: Role-based access control of Distribution’s images. Allows creating namespaces for teams and assigning different access levels to them. Alternatives: GitLab, Dockerhub, Amazon EC2 container service, Google Container Registry and more.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 18/38

slide-19
SLIDE 19

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Outline

1

Challenges in existing attack-defence CTF game format and infrastructures

2

Overview of Docker and associated technologies

3

Container-based attack-defence CTF game infrastructure

4

Performance evaluation

5

Future work

6

Conclusion

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 19/38

slide-20
SLIDE 20

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Components

Container registry: Git server like service for container images. Container hosts: Servers which run all the containers. Service related containers: Docker containers which either run a service or an exploit for a service. Flag volume: Docker volumes for persistent storage of flags. Modified versions of components of the iCTF centralized framework.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 20/38

slide-21
SLIDE 21

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

System design

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 21/38

slide-22
SLIDE 22

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Gameplay

Organizers Configure a CTF contest as desired. Build the service container images. Configure the container registry and upload service container images to it. Setup the game database and configure all game scripts. Optionally distribute encrypted copies of service container images to all teams.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 22/38

slide-23
SLIDE 23

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Gameplay (cont.)

Participants Import the service container images from registry or

  • rganizer distributed copies.

Analyze services for vulnerabilities, fix them and commit and upload changes to container registry. Create exploit containers for discovered vulnerabilities in accordance with the requirements, test them locally and upload them.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 23/38

slide-24
SLIDE 24

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Game round overview

A game consists of several rounds with following phases Synchronize: All updated container images are synchronized with their live containers or images. Store flags: Flags are stored in all services of all teams and services’ status is updated. Run exploits: All exploit containers are run against all services of all teams except exploit author. Retrieve flags: Flags stored earlier are retrieved, service status is updated and points are deducted if not retrieved successfully.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 24/38

slide-25
SLIDE 25

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Benefits for organizers

Lightweight game infrastructure. No need for engineering and monitoring VPN network. No need for configuring exploit environments. Tools like Docker swarm and Docker cloud further ease managing infrastructure.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 25/38

slide-26
SLIDE 26

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Benefits for participants

No additional hardware, dealing with IT policies or setting up VPN. No dealing with network latency: setup services locally. Infrastructure maintains service backups, simplifying gameplay. Fully customizable exploit environments.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 26/38

slide-27
SLIDE 27

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Outline

1

Challenges in existing attack-defence CTF game format and infrastructures

2

Overview of Docker and associated technologies

3

Container-based attack-defence CTF game infrastructure

4

Performance evaluation

5

Future work

6

Conclusion

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 27/38

slide-28
SLIDE 28

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Experiments performed

Two kinds of experiments

3 services, 5 to 40 teams. 30 teams, 1 to 8 services.

Measure CPU utilization and memory usage for a 10 minute game round. Worst case: All teams write exploits for all services. Compare with estimated usage in VM based infrastructure.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 28/38

slide-29
SLIDE 29

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Estimating VM resource usage

Simulating requires high amounts of resources. Estimate based on requirements for InCTF’s attack-defence round. 1GB RAM for 3 services found sufficient in past 5 editions. 200MB RAM per service and rest for the OS.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 29/38

slide-30
SLIDE 30

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Observations

Container server: 16GB RAM and 8 core Intel Core i5 2600 processor. Highest memory usage: 3.4GB and 4.4GB. Exploits included. Estimated usage for VMs: 40GB and 60GB. Exploits not included. Highest CPU usage observed 13% and 20%. Can easily handle loads comparable to most attack-defence CTFs today.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 30/38

slide-31
SLIDE 31

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Outline

1

Challenges in existing attack-defence CTF game format and infrastructures

2

Overview of Docker and associated technologies

3

Container-based attack-defence CTF game infrastructure

4

Performance evaluation

5

Future work

6

Conclusion

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 31/38

slide-32
SLIDE 32

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Future work

Develop techniques and identify tuning parameters to prevent overloading of Docker daemon with several simultaneous requests. Provide teams access to network traffic captures for reverse engineering exploits. Identify parameters to determine utility of CTF game infrastructures. Perform usability study of container-based infrastructure.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 32/38

slide-33
SLIDE 33

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Outline

1

Challenges in existing attack-defence CTF game format and infrastructures

2

Overview of Docker and associated technologies

3

Container-based attack-defence CTF game infrastructure

4

Performance evaluation

5

Future work

6

Conclusion

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 33/38

slide-34
SLIDE 34

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Conclusion

Existing attack-defence CTF game infrastructures are complex to setup and require several computing resources. Using application containers instead of virtual machines reduces resource requirement and engineering effort needed. Additional tools can improve gameplay experience for participants and further simplify infrastructure management. https://github.com/inctf/inctf-framework.

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 34/38

slide-35
SLIDE 35

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Observations

Figure : Average memory usage: 3 services, multiple teams

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 35/38

slide-36
SLIDE 36

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Observations(cont.)

Figure : Average memory usage: 30 teams, multiple services

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 36/38

slide-37
SLIDE 37

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Observations

Figure : Average CPU usage: 3 services, multiple teams

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 37/38

slide-38
SLIDE 38

Existing game infrastructures Docker Container-based game infrastructure Evaluation Future work Conclusion

Observations(cont.)

Figure : Average CPU usage: 30 teams, multiple services

Arvind, Bithin, Seshagiri, Krishnashree — Scalable and Lightweight CTF Infrastructures Using Application Containers 38/38