ESP2012 - Leune CTF
ESP2012 - Leune CTF
"Copyright Kees Leune, 2012. This work is the intellectual property of the author. Permission is granted for this
material to be shared for non-commercial, educational purposes, provided that this copyright statement appears on
the reproduced materials and notice is given that the copying is by permission of the author. To disseminate otherwise
or to republish requires written permission from the author."
Presentation outline
– Introduction
– Problem statement
– Why CTF?
– Types of CTF
– Developing your own CTF
– Running a CTF
Adjunct Professor
CISSP Mentor
GCFA CISM
Gamification :
• divides a problem into smaller pieces (challenges, flags)
• measure progress (score)
• create a sense of accomplishment (rewards, achievements)
• instill a sense of competition (leader board)
• directly applies theory
• is great fun!
Game is not a bad word or
something just meant for leisure.
Assessment Fun!
Teaching or
training Proof of concept
CTFs come in many different types.
• Single-user vs. multi-user
• Single targets vs. multiple targets
• Competitive vs. collaborative
• Short and focused vs. long-term
• Local vs. remote
• Defensive, offensive, analytical
CTF-based Teaching and Training
1. Break stuff
2. Figure out why it broke
3. Teach methods to
prevent breakage
Some Examples
de-ice.net live CDs
is a set of 3 bootable CD images that can be used for self assessment.
Capture-The-Flag
(or another technical challenge)
Examples:
• Plaintext passwords are bad
• If using SSL, make sure you check the cert path
• XSS really isn’t harmless
• LANMAN is a weak password scheme
Develop your characters
Many weaknesses are introduced by human actors.
The plot describes the anticipated flow of
the simulation.
• 1 web app
• 1 intranet server
• The domain controller
• 1 Email server
• 3 Workstations in varying degrees of patching
– Adobe Reader, Java Runtime, VLC player
Determining vulnerabilities
Make sure you reflect back on the message you need to tell!
1. Licensing
2. Isolation
3. Exploitability
4. Performance
5. Analytical capabilities
Review your license terms!
Virtual Switch
BackTrack
Email server
Server
Web
Server
Linux
File server
workstation
SSH bastion
host
Campus network
RUNNING THE CTF
Operationally, the least interesting phase of the
process. Some decisions that need to be made
are:
• Credentialing
• Duration of the simulation
• Scoring
• Ongoing maintenance
In a multi-user simulation, decide if participants
share credentials, or if they have their own.
While all students have root on the BT5 system in the previous
example, they will still log in with a dedicated account from
which they elevate with sudo. Syslogs are sent off-network.
Metrics provide an objective assessment of the
extent to which the participants complete the
challenges.
Distinguish:
• Assessing outcomes (e.g., Netwars)
• Assessing process (e.g., OSCP)
Prevent cheating
• guessing answers
• borrowing artifacts from other players
• brute-forcing
• patching by players
• denial-of-service
• attack the scoring platform itself
• etc.
Have a pre-determined response to deal with bad
behavior and publish rules of engagement!
Stuff will break
Email: [email protected]
Twitter: @leune
Blog: www.leune.org