CTF Owner Manual.key

76
Capture the Flag An Owner’s Manual Vito Genovese USENIX Enigma, January 27, 2016

Transcript of CTF Owner Manual.key

Page 1: CTF Owner Manual.key

Capture the Flag An Owner’s Manual

Vito Genovese

USENIX Enigma, January 27, 2016

Page 2: CTF Owner Manual.key

What is CTF?

Page 3: CTF Owner Manual.key

QualifiersMay 20 through May 22

FREE

FUN OMG

wow

Page 4: CTF Owner Manual.key

FinalsAugust 5 through August 7

Page 5: CTF Owner Manual.key

Best of the Best

Quals >1400 teams

Finals 15-20 teams

Winner

Page 6: CTF Owner Manual.key

Best of the Best

Page 7: CTF Owner Manual.key

Engineer a Non-Frustrating Game

Page 8: CTF Owner Manual.key

Operate a Reliable Game

Page 9: CTF Owner Manual.key

Have the Empathy to Make the Game Fun

Page 10: CTF Owner Manual.key

Engineering

Page 11: CTF Owner Manual.key

Engineering Process

1. Define problem

2. Research

3. Decide requirements

4. Brainstorm solutions

5. Pick the best solution

6. Build it

7. See if it's good enough

8. Redo what’s not

Page 12: CTF Owner Manual.key

What kind of game?

Jeopardy

vs.

Attack-defense

Page 13: CTF Owner Manual.key
Page 14: CTF Owner Manual.key

Jeopardy is Easy

Scoreboard

Standalone challenges

Page 15: CTF Owner Manual.key

Jeopardy is Easy

No complex networking

No complex admin work

(for players)

Page 16: CTF Owner Manual.key

Attack-Defense is Hard

Complex network

Sensitive to connectivity

Teams host services?

We host services?

Slow services

Unavailable services

Superman defenses

Metagaming

Page 17: CTF Owner Manual.key

ThemingBanking

Stuxnet

Board Game

Marijuana culture

Money Laundering

Botnet

SCADA

Wizardterrorism

Generic hacker

Page 18: CTF Owner Manual.key

Theming

web

crypto

forensics

reverse engineering

programming

shellcode

Page 19: CTF Owner Manual.key

Jeopardy ScoringSELECT t.id AS team_id, t.name AS team_name, SUM(c.points) AS score, MAX(s.created_at) AS last_solve FROM teams AS t INNER JOIN solutions AS s ON s.team_id = t.id INNER JOIN challenges AS c ON s.challenge_id = c.id WHERE team_id != 1 GROUP BY t.id ORDER BY score DESC, MAX(s.created_at) ASC, MAX(s.id) ASC

Page 20: CTF Owner Manual.key

Attack-Defense Scoring

aww jeez

Page 21: CTF Owner Manual.key

Attack-Defense Game Flow

PPP atmail

scorebot

Shellphish

Page 22: CTF Owner Manual.key

Attack-Defense Game Flow

PPP atmail

scorebot

Shellphish

deposit

Page 23: CTF Owner Manual.key

Shellphish

Attack-Defense Game Flow

PPP atmail

scorebot

steal

Page 24: CTF Owner Manual.key

Shellphish

Attack-Defense Game Flow

PPP atmail

scorebot

redeem

Page 25: CTF Owner Manual.key

Shellphish

Attack-Defense Game Flow

PPP atmail

scorebot

availability okay

availability check

Page 26: CTF Owner Manual.key

Shellphish

Attack-Defense Game Flow

PPP atmail

scorebotfailed availability

☠ can’t steal

Page 27: CTF Owner Manual.key

Attack-Defense Metagaming

Any sufficiently complex game is metagameable

Page 28: CTF Owner Manual.key

Downtime vs.

Being Hacked

Page 29: CTF Owner Manual.key

Reflection

Page 30: CTF Owner Manual.key

First Blood

Page 31: CTF Owner Manual.key

Attack-Defense Scoring

Zero Sum Finite number of flags

Flags per-service

Page 32: CTF Owner Manual.key

Attack-Defense Scoring

Can lose N-1 flags to steals per round

Stolen flags split among stealers

Remainders redistributed fairly

Page 33: CTF Owner Manual.key

Attack-Defense Scoring

Downtime means lost steal opportunity

Teams lose 2(N-1) flags to downtime

Page 34: CTF Owner Manual.key

Attack-Defense Scoring

Remainder and downtime flags are the flags of the people

Page 35: CTF Owner Manual.key

Science of Challenges

• Think of cool bugs

• Write bugs, tool to check vulnerability

• Wrap ‘em in analysis surface

• Write smoke test and health checks

Page 36: CTF Owner Manual.key

Art of Challenges

The machine is your canvas and the only limit is ~your imagination~

Page 37: CTF Owner Manual.key

Art of Challenges

Historic interest

Uniqueness

Inherent humor

Page 38: CTF Owner Manual.key

Challenges and Team Size

Smaller teams don’t solve challenges slower

Bigger teams can solve more challenges at once

Page 39: CTF Owner Manual.key

Challenges and Team Size

Fewer

and

Harder

Smaller

and

Smarter

Page 40: CTF Owner Manual.key

Challenges and Team Size

Page 41: CTF Owner Manual.key

Challenges and Operations

Engineering great, fun, reliable challenges is the best ops improvement you can make.

Page 42: CTF Owner Manual.key

Operations

Page 43: CTF Owner Manual.key

CTF Operations

The dream is for the organizing team to just party and be jerks to teams during the game

Page 44: CTF Owner Manual.key

CTF Operations

“Is this down or broken?”

“Is this actually exploitable?”

Page 45: CTF Owner Manual.key

CTF Operations

It only has to work for a weekend

Page 46: CTF Owner Manual.key

CTF Operations

Start on time by being ready early

Page 47: CTF Owner Manual.key

Jeopardy Operations

Boston Key Party Servers $27

Quals 2013 Servers $284

Quals 2013 Booze $340

Page 48: CTF Owner Manual.key

Attack-Defense Operations

Page 49: CTF Owner Manual.key

Attack-Defense Operations

Page 50: CTF Owner Manual.key

Attack-Defense Operations

We bring hardware to Vegas

Page 51: CTF Owner Manual.key

Bring Hardware

Weird architectures

Page 52: CTF Owner Manual.key

Bring Hardware

Teams don't want to bring hardware

Page 53: CTF Owner Manual.key

Bring Hardware

Don’t trust the uplink

Page 54: CTF Owner Manual.key

Exceptions

• Stratum Auhuur who trusted the uplink at cccamp

• Also shout out to Shellfish for bringing a server rack to compete at DEF CON

Page 55: CTF Owner Manual.key

Attack-Defense Operations

Page 56: CTF Owner Manual.key

Attack-Defense Dynamics

Page 57: CTF Owner Manual.key

Attack-Defense Dynamics

Player time is a limited resource

1 shower

2 meals

3 hours of sleep

Page 58: CTF Owner Manual.key

Attack-Defense Dynamics

1. Player 1 solves Service A

2. Player 1 starts Service B

3. Service A’ is released

4. Player 1 has a choice

Page 59: CTF Owner Manual.key

Defecators & Ventilators

Sometimes challenges break

Page 60: CTF Owner Manual.key

Defecators & Ventilators

10 hours / 1 Tester = 10 Hours

10 hours / 20 Teams = 30 Minutes

10 hours / 1000 Teams = 36 Seconds

Page 61: CTF Owner Manual.key

Defecators & Ventilators

Perverse incentives

Page 62: CTF Owner Manual.key

Empathy

Page 63: CTF Owner Manual.key

Challenges and Empathy

The game is for the players

Players want good, fun, working challenges

Page 64: CTF Owner Manual.key

Empathy

• We do it for the users/players/audience

• picture of CLU goes here

Page 65: CTF Owner Manual.key

Empathy

Run the game you want to play

Page 66: CTF Owner Manual.key

Empathy

Don’t lie to players

Deceive the players iff it makes the game more fun

Page 67: CTF Owner Manual.key

Frustration

Trivia & Memes are hit or miss

Think of non-US and non-English teams

Page 68: CTF Owner Manual.key

Guessing and Large Solution Spaces

Writing a solver for a 28 solution space is fun

Writing and paying for a 216 space isn't

Page 69: CTF Owner Manual.key

Preserve Player Agency

No hints once a challenge has been solved

Think carefully about force-unlocking Jeopardy challenges

Page 70: CTF Owner Manual.key

Preserve Player Enjoyment

Force-unlock easy challenges for teams to learn from

Force-unlock hard challenges early enough they'll be solvable

Page 71: CTF Owner Manual.key

Hacking Computers is Fun!

Page 72: CTF Owner Manual.key

Engineer a Non-Frustrating Game

Page 73: CTF Owner Manual.key

Operate a Reliable Game

Page 74: CTF Owner Manual.key

Have the Empathy to Make the Game Fun

Page 75: CTF Owner Manual.key

QualifiersMay 20 through May 22

https://legitbs.net/ FREE

FUN OMG

wow

Page 76: CTF Owner Manual.key

ThanksVito Genovese

[email protected]

@vito_lbs

GPG B07D616143CAA77B

https://legitbs.net

@legitbs_ctf