• Stars
    star
    116
  • Rank 303,894 (Top 6 %)
  • Language
    Python
  • License
    Creative Commons ...
  • Created about 7 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

SA-ctf_scoreboard

A capture the flag scoreboard app for Splunk.

NOTE: As of January 2022, this app has been deprecated. Please visit https://bots.splunk.com for hands-on experiences using Splunk security products. Splunk will no longer provide assistance or support for this app.

This app, along with its companion admin app, allows anyone to run their own jeopardy-style capture the flag (CTF) events. These are the same apps that we at Splunk use to run early versions of our popular Splunk Boss of the SOC (BOTS) competitions. The apps include the following features:

  • User/Team management
  • Scoring management
  • Question/Answer management
  • Hint management
  • Comprehensive scoreboards, dashboards, and analytics

The scoring apps run on Splunk Enterprise. If you do not have a Splunk license, these apps can run with full functionality on the Enterprise Trial version of Splunk available at www.splunk.com

Related Projects

Installation

  1. Install Splunk Enterprise
  • The apps are designed to run on Linux and/or Mac OSX; they have never been tested on Splunk for Windows (Note: This app requires Splunk Enterprise version 8.2.x)
  • Download Splunk from www.splunk.com
  • Refer to Splunk installation instructions for Linux and Mac OSX as necessary
  • Set a strong password for the Splunk admin user
  • Set the time zone for the admin user via Splunk Web
  • Enable HTTPS on Splunk Web
  1. Set the $SPLUNK_HOME environment variable
  • The default location for Splunk is "/opt/splunk" but yours may be different
  • Assuming the default, this command will set the environment variable appropriately:
    export SPLUNK_HOME=/opt/splunk
    
  1. Install the following prerequisite Splunk apps and add-ons
  1. Install the CTF Scoreboard app

    cd $SPLUNK_HOME/etc/apps
    git clone https://github.com/splunk/SA-ctf_scoreboard
    
  2. Install the CTF Scoreboard Admin app

    cd $SPLUNK_HOME/etc/apps
    git clone https://github.com/splunk/SA-ctf_scoreboard_admin
    
  3. Restart Splunk to recognize all the prerequisites and the scoring apps

    $SPLUNK_HOME/bin/splunk restart
    
  4. Create scoreboard log directory

    mkdir $SPLUNK_HOME/var/log/scoreboard
    
  5. Create the CTF Answers service account in Splunk

  • By convention this user is called svcaccount
  • Pick a good strong password, and record it. You will need it again soon. The good news is that it does not need to be easily memorized by a human.
  • Assign the svcaccount user to role ctf_answers_service
  • This can all be accomplished from the command line as follows:
     $SPLUNK_HOME/bin/splunk add user svcaccount -password <password> -role ctf_answers_service -auth admin:<admin_password>
    
  1. Configure the custom controller
    cd $SPLUNK_HOME/etc/apps/SA-ctf_scoreboard/appserver/controllers
    cp scoreboard_controller.config.example scoreboard_controller.config
    
  • Edit scoreboard_controller.config to reflect the following:
  • The CTF Answers service account username (probably svcaccount)
  • The CTF Answers service account password you chose above
  • A vkey parameter which should just be a random string, 10-20 characters in length
  • Note: scoreboard_controller.config is prevented via .gitignore from being checked into the git repository. Only the example file is included in the repository.
  1. Restart Splunk to recognize the changes to the controller configuration file.

    $SPLUNK_HOME/bin/splunk restart
    
  2. Confirm the custom controller came up properly:

 ls -l $SPLUNK_HOME/var/log/scoreboard
 -rw------- 1 splunk staff 59 Sep 2 14:26 scoreboard.log
 -rw------- 1 splunk staff 59 Sep 2 14:26 scoreboard_admin.log
  1. Set up an admin user
  • It does not need to be the Splunk admin user, but it can be and often is
  • In Splunk Web ensure the admin user has been assigned the following roles:
  • admin
  • ctf_admin
  • can_delete
  1. Load sample data
  • Log in as the admin user created above

  • Navigate to Capture the Flag Admin app

  • Click each of the following menu items in turn:

    • Data Management...->Load SAMPLE data (DANGER)->Load sample users/teams
    • Data Management...->Load SAMPLE data (DANGER)->Load sample questions
    • Data Management...->Load SAMPLE data (DANGER)->Load sample answers
    • Data Management...->Load SAMPLE data (DANGER)->Load sample hints
    • Data Management...->Load SAMPLE data (DANGER)->Load sample hint entitlements
    • Data Management...->Load SAMPLE data (DANGER)->Load sample badges
    • Data Management...->Load SAMPLE data (DANGER)->Load sample badge entitlements
    • Data Management...->Load SAMPLE data (DANGER)->Load sample user agreements
  • It's not really dangerous, but it will overwrite the data you currently have loaded in the game.

  1. Customize your questions/answers/hints

Use the items on the Edit menu to customize the game to your liking.

Alternatively, follow these instructions to load the Splunk BOTS questions, answers, and hints

  • Obtain the following three files: ctf_questions.csv, ctf_answers.csv, ctf_hints.csv
  • Navigate to Capture the Flag Admin app
  • Load questions
    1. Edit -> Edit Questions
    2. Click the Import button in the upper right
    3. Click Select file to import
    4. Select the ctf_questions.csv file
  • Load answers
    1. Edit -> Edit Answers
    2. Click the Import button in the upper right
    3. Click Select file to import
    4. Select the ctf_answers.csv file
  • Load hints
    1. Edit -> Edit Hints
    2. Click the Import button in the upper right
    3. Click Select file to import
    4. Select the ctf_hints.csv file
  • Check that the questions/answers were loaded properly
    1. Navigate to Capture the Flag Admin app
    2. View -> Q & A
    3. Visually inspect the Questions and Answers
  1. Set the start / end time of the questions in the competition
  • Though not required, it is easiest if you set both your computer time zone, AND the Splunk time zone for the user you are logged in as to the main time zone of the event
  • In the CTF Admin app Go to Edit->Time Setup
  • Follow the instructions embedded in the dashboard. In Step 0, first ensure you have the proper question set loaded. Review your start and end times to determine if they need to be adjusted. This is accomplished by visually inspecting the bottom panel.
  • If the questions look right, but the times need adjusting
    • Populate the start and end dates/times in the GUI. If you set your computer and Splunk TZ as suggested in an earlier step, you will likely not have to worry about the TZ setting in the pull-down.
    • Click green β€œSubmit Changes” button.
  • Check that β€œQuestion Summary” panel at the bottom for sanity.
  • Verify the start/end times by visiting View -> Q&A and inspecting the NiceStartTime and NiceEndTime columns.
  1. Disable access to the questions for the ctf_competitor role.
  • Go to CTF Admin app and load Edit->Question Access dashboard.
  • The current status of questions will be displayed. Disable access until immediately before you are ready to begin the competition, then enable it.

Clearing Results

To clear all activity from the scoring app, perform these steps.

WARNING: Running these commands will permanenently delete all the activity from the app and reset all scores to zero.

$SPLUNK_HOME/bin/splunk stop
$SPLUNK_HOME/bin/splunk clean eventdata -f scoreboard
$SPLUNK_HOME/bin/splunk clean eventdata -f scoreboard_admin
rm $SPLUNK_HOME/var/log/scoreboard/scoreboard.log
rm $SPLUNK_HOME/var/log/scoreboard/scoreboard_admin.log
$SPLUNK_HOME/bin/splunk start

Authors

Written in 2016-2018 by David Herrald and Ryan Kovar, with contributions from Brad Lindow, James Brodsky, David Veuve, John Stoner, Steve Brant, Jesse Trucks, Lily Lee, Jon Lebaugh, Bill Babillon, Luke Murphey, Filip Wijnholds, and others.

Copyright and License

To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see http://creativecommons.org/publicdomain/zero/1.0/.

Special Copyright/License Notes

The following files are included from the Splunk 6.x Dashboard Examples app version 6.6.1 and are subject to the licenses included therein.

  • appserver/static/custom_table_row_expansion.js
  • appserver/static/table_icons_inline.js
  • appserver/static/table_decorations.css

More Repositories

1

attack_range

A tool that allows you to create vulnerable instrumented local or cloud environments to simulate attacks against and collect the data into Splunk
Jinja
2,118
star
2

security_content

Splunk Security Content
Python
1,235
star
3

splunk-sdk-python

Splunk Software Development Kit for Python
Python
649
star
4

attack_data

A repository of curated datasets from various attacks
Python
560
star
5

docker-splunk

Splunk Docker GitHub Repository
Python
410
star
6

splunk-ansible

Ansible playbooks for configuring and managing Splunk Enterprise and Universal Forwarder deployments
Python
355
star
7

eventgen

Splunk Event Generator: Eventgen
Python
354
star
8

botsv2

Splunk Boss of the SOC version 2 dataset.
348
star
9

splunk-connect-for-kubernetes

Helm charts associated with kubernetes plug-ins
Python
344
star
10

docker-splunk-legacy

Docker Splunk *** LEGACY IMAGES - PLEASE SEE https://github.com/splunk/docker-splunk INSTEAD ***
Shell
304
star
11

botsv1

302
star
12

pion

Pion Network Library (Boost licensed open source)
C++
299
star
13

splunk-operator

Splunk Operator for Kubernetes
Go
205
star
14

splunk-sdk-javascript

Splunk Software Development Kit for JavaScript
JavaScript
185
star
15

botsv3

Splunk Boss of the SOC version 3 dataset.
163
star
16

melting-cobalt

A Cobalt Strike Scanner that retrieves detected Team Server beacons into a JSON object
Python
163
star
17

qbec

configure kubernetes objects on multiple clusters using jsonnet
Go
157
star
18

splunk-connect-for-syslog

Splunk Connect for Syslog
Python
152
star
19

splunk-sdk-java

Splunk Software Development Kit for Java
Java
138
star
20

splunk-library-javalogging

Splunk logging appenders for popular Java Logging frameworks
Java
131
star
21

ansible-role-for-splunk

Splunk@Splunk's Ansible role for installing Splunk, upgrading Splunk, and installing apps/addons on Splunk deployments (VM/bare metal)
Jinja
131
star
22

attack_range_local

Build a attack range in your local machine
Jinja
129
star
23

splunk-platform-automator

Ansible framework providing a fast and simple way to spin up complex Splunk environments.
Python
117
star
24

splunk-aws-cloudformation

AWS CloudFormation templates for Splunk distributed cluster deployment
Shell
108
star
25

terraform-provider-splunk

Terraform Provider for Splunk
Go
103
star
26

securitydatasets

Home for Splunk security datasets.
97
star
27

splunk-aws-project-trumpet

Python
95
star
28

splunk-app-examples

App examples for Splunk Enterprise
JavaScript
93
star
29

splunk-demo-collector-for-analyticsjs

Example Node.js based backend collector for client-side data
JavaScript
93
star
30

vscode-extension-splunk

Visual Studio Code Extension for Splunk
Python
86
star
31

observability-workshop

To get started, please proceed to The Splunk Observability Cloud Workshop Homepage.
HTML
86
star
32

mltk-algo-contrib

Python
85
star
33

fluent-plugin-splunk-hec

This is the Fluentd output plugin for sending events to Splunk via HEC.
Ruby
83
star
34

network-explorer

C++
82
star
35

kafka-connect-splunk

Kafka connector for Splunk
Java
82
star
36

splunk-javascript-logging

Splunk HTTP Event Collector logging interface for JavaScript
JavaScript
81
star
37

splunk-reskit-powershell

Splunk Resource Kit for Powershell
PowerShell
80
star
38

corona_virus

This project includes an app that allows users to visualize and analyze information about COVID-19 using data made publicly-available by Johns Hopkins University. For more information on legal disclaimers, please see the README.
Python
79
star
39

contentctl

Splunk Content Control Tool
Python
77
star
40

salo

Synthetic Adversarial Log Objects: A Framework for synthentic log generation
Python
75
star
41

ShellSweep

ShellSweeping the evil.
PowerShell
73
star
42

docker-itmonitoring

Get Started with Streaming your Docker Logs and Stats in Splunk!
HTML
68
star
43

splunk-sdk-csharp-pcl

Splunk's next generation C# SDK
C#
65
star
44

docker-logging-plugin

Splunk Connect for Docker is a Docker logging plugin that allows docker containers to send their logs directly to Splunk Enterprise or a Splunk Cloud deployment.
Go
64
star
45

attack-detections-collector

Collects a listing of MITRE ATT&CK Techniques, then discovers Splunk ESCU detections for each technique
Python
59
star
46

splunk-aws-serverless-apps

Splunk AWS Serverless applications and Lambda blueprints
JavaScript
55
star
47

splunk-webframework

Splunk Web Framework
Python
51
star
48

splunk-app-splunkgit

GitHub App
Python
49
star
49

vault-plugin-secrets-gitlab

Vault Plugin for Gitlab Project Access Token
Go
48
star
50

pytest-splunk-addon

A Dynamic test tool for Splunk Technology Add-ons
Python
47
star
51

splunk-mltk-container-docker

Splunk App for Data Science and Deep Learning - container images repository
Jupyter Notebook
47
star
52

rba

RBA is Splunk's method to aggregate low-fidelity security events as interesting observations tagged with security metadata to create high-fidelity, low-volume alerts.
44
star
53

splunk-cloud-sdk-go

The Splunk Cloud SDK for Go, contains libraries for building apps for the Splunk Cloud Services Platform.
Go
43
star
54

splunk-app-testing

sample app along with a CICD pipeline for testing multiple versions of splunk
Shell
42
star
55

rwi_executive_dashboard

Splunk Remote Work Insights - Executive Dashboard
HTML
38
star
56

splunk-sdk-ruby

Splunk Software Development Kit for Ruby
Ruby
36
star
57

splunk-shuttl

Splunk app for archive management, including HDFS support.
Java
35
star
58

attack_range_cloud

Attack Range to test detection against nativel serverless cloud services and environments
Python
35
star
59

addonfactory-ucc-generator

A framework to generate UI-based Splunk Add-ons.
Python
34
star
60

splunk-for-securityHub

Python
34
star
61

azure-functions-splunk

Azure Functions for getting data in to Splunk
JavaScript
30
star
62

dashboard-conf19-examples

Splunk new dashboard framework examples .conf 2019
JavaScript
30
star
63

github_app_for_splunk

A collection of dashboards and knowledge objects for Github data
JavaScript
29
star
64

splunk-connect-for-snmp

Python
28
star
65

twinclams

because twin clams are better than one clam?
Python
27
star
66

jupyterhub-istio-proxy

JupyterHub proxy implementation for kubernetes clusters running istio service mesh
Go
27
star
67

observability-content-contrib

Contribution repository for Splunk Observability Content (e.g. Dashboards, Detectors, Examples, etc)
HCL
26
star
68

lightproto

Protobuf compatible code generator
Java
26
star
69

splunk-app-twitter

Twitter application for Splunk
Python
25
star
70

splunk-library-dotnetlogging

Support for logging from .NET Tracing and ETW / Semantic Logging ApplicationBlock to Splunk.
C#
25
star
71

splunkrepl

An awesome little REPL for issuing SPLUNK queries
JavaScript
24
star
72

fluent-plugin-kubernetes-objects

This is the Fluentd input plugin which queries Kubernetes API to collect Kubernetes objects (like Nodes, Namespaces, Pods, etc.)
Ruby
23
star
73

splunk-ref-pas-code

Splunk Reference App - Pluggable Auditing System (PAS) - Code Repo
Python
22
star
74

vault-plugin-splunk

Vault plugin to securely manage Splunk admin accounts and password rotation
Go
22
star
75

splunk-sdk-php

Splunk Software Development Kit for PHP
PHP
22
star
76

splunk-heatwave-viz

A heatmap vizualization of bucketed ranged data over time.
JavaScript
21
star
77

pipelines

Concurrent processing pipelines in Go.
Go
21
star
78

splunk-gcp-functions

Python
20
star
79

PEAK

Security Content for the PEAK Threat Hunting Framework
Jupyter Notebook
20
star
80

splunk-tableau-wdc

Splunk Tableau Web Data Connector (WDC) Example
JavaScript
20
star
81

splunkforjenkins

Java
19
star
82

splunk-3D-graph-network-topology-viz

Plot relationships between objects with force directed graph based on ThreeJS/WebGL.
JavaScript
19
star
83

minecraft-app

Splunking Minecraft with the App Framework
JavaScript
19
star
84

splunk-add-on-jira-alerts

Splunk custom alert action for Atlassian JIRA
Python
19
star
85

terraform-provider-scp

Splunk Terraform Provider to manage config resources for Splunk Cloud Platform
Go
18
star
86

splunk-bunyan-logger

A Bunyan stream for Splunk's HTTP Event Collector
JavaScript
18
star
87

slack-alerts

Splunk custom alert action for sending messages to Slack channels
Python
18
star
88

public-o11y-docs

Splunk Observability Cloud docs
HTML
18
star
89

dashpub

Generate next.js apps to publish Splunk dashboards
JavaScript
18
star
90

vale-splunk-style-guide

Splunk Style Guide for the Vale linter
18
star
91

SA-ctf_scoreboard_admin

Python
18
star
92

acs-privateapps-demo

Demo of private-apps ci/cd integration into splunkcloud using the admin config service
Go
17
star
93

splunk-cloud-sdk-python

The Splunk Cloud SDK for Python, contains libraries for building apps for the Splunk Cloud Services Platform.
Python
17
star
94

fabric-logger

Logs blocks, transactions and events from Hyperledger Fabric to Splunk.
TypeScript
17
star
95

deep-learning-toolkit

Deep Learning Toolkit for Splunk
Python
15
star
96

k8s-yaml-patch

jsonnet library to patch objects loaded from yaml
Go
15
star
97

acs-cli

Admin Config Service CLI
15
star
98

TA-osquery

A Splunk technology add-on for osquery
14
star
99

ml-toolkit-docs

ML Toolkit & Showcase application documents
14
star
100

splunk-sdk-csharp

Splunk Software Development Kit for CSharp
C#
14
star