Code Monkey home page Code Monkey logo

mitre-cyber-academy / ctf-scoreboard Goto Github PK

View Code? Open in Web Editor NEW
54.0 4.0 29.0 35.49 MB

This scoreboard allows you to host your own cybersecurity capture-the-flag (jeopardy-style or attack/defend) competition. Also includes team creation!

Home Page: http://mitrecyberacademy.org/

License: Apache License 2.0

Ruby 81.78% JavaScript 0.71% CoffeeScript 0.81% CSS 0.20% HTML 0.55% SCSS 2.34% Haml 13.19% Dockerfile 0.09% Shell 0.30% Procfile 0.02%
ruby rails ctf-registration ctf-platform ctf-scoreboard hackathon-platform coding-competitions pentest-competition redvsblue attack-defense-ctf

ctf-scoreboard's Introduction

MITRE CTF Scoreboard

Build Status Code Climate

MITRE CTF Scoreboard is a fully featured CTF platform with scoreboard and registration application built with Ruby on Rails. It is used for MITRE Capture the Flag competition website.

Installation

Development

See wiki instructions for creating a local development installation of the scoreboard.

Testing

Once you have installed the application using the development steps shown above, the tests can be run by running bundle exec rails test.

To generate a local code coverage report in coverage/index.html set the $LOCAL_COVERAGE environment variable: export LOCAL_COVERAGE=true

Production

Follow the wiki instructions for creating a production installation of the scoreboard.

Automated Emails

Automated emails can be setup by adding the crontab:

min hour * * * /bin/bash -l -c 'cd /path/to/ctf-scoreboard && RAILS_ENV=production bundle exec rake email:automated_email --silent'

Where min, hour, and path/to/ctf-scoreboard are replaced with the values you prefer. If the project is being hosted on Heroku a daily task can be created using the Heroku Scheduler to run rake email:automated_email

Screenshots

Gameboard

gameboard

Administration Dashboard

admin dashboard

Administration Dashboard -> Add challenge

add challenge

More screenshots available on the wiki.

License

This application is licensed under Apache License 2.0.

ctf-scoreboard's People

Contributors

an-empty-string avatar bialogs avatar bryansingh avatar camdenmoors avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar domur avatar james-tobin avatar noraj avatar rapeterson-git avatar rbclark avatar renovate-bot avatar renovate[bot] avatar sesheikholeslam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ctf-scoreboard's Issues

Create alerts for users when the CTF is coming up

If we integrate the registration and the scoreboard together we no longer have to email users beforehand with their credentials for the competition. This unfortunately means that they also don't get any reminder that the CTF is coming up. We should still send them out an alert the day before the competition to all users reminding them that the CTF is the next day.

User is able to send password reset email when they have never set a password before.

There is a bit of an edge case that happens if a user registers and then uses the forgot password option before completing registration. It sends them an email asking them to reset their password but then won't let them reset their password because they haven't set their name and a bunch of other fields. In order to get around this we need to do some checking before sending the forgot password email.

Automatically email users with their completion certificates post competition

This is something that needs to be added in once the scoreboard is integrated. We need to have the ability to automatically have all the teams receive a completion certificate once the competition is completed with all the information filled in automatically. This should be an option on the game object to enable or disable this feature.

Add data disclaimer

Add a statement of data protection to the user registration page & profile page

Installation steps needed

I'm not a dev and I'm not expert on how RoR works.

Can you provide simple steps to configure the app before starting the web server?

Because if I only do:

  • gem install bundler
  • bundle install
  • bin/rails server

I have an error ActiveRecord::NoDatabaseError (FATAL: database "registration_development" does not exist so I assume there is some database provision and configuration (bundle exec rake something) to do before starting the web server.

Graduate Student

Graduate Student is not a real option when selecting year in school. Instead it is saved as Not in School. Occurs with new accounts and when editing existing account.

Attempting to join a team with no team captain fails

Currently if you create a bunch of empty teams in the database with no team captain and then try to join one of them an error is thrown. We should make sure this doesn't happen.

One good thing we could do that would make this easier to fix is adding a users_count field to the database and setting up a counter cache, see http://stackoverflow.com/a/9209705

This would also be useful for fixing the following from happening on the join_team page

screen shot 2017-05-21 at 11 20 04 am

We could then just set the default team filter to not show teams where the user count is empty, which would hide any team that accidentally gets in that state from the user.

Users can exist as the team captain without being included in users

We have a strange case where a user managed to register and create a team and somehow remove themselves from the team but remain as the team captain. This breaks the export script so we kinda need to figure out how to fix it at some point. The team was team number 241 and user 621. It may represent a bug in the team destroy or user destroy code.

Team ineligible for prizes when all users are eligible

When ineligible user leaves team, eligibility doesn't get updated.

To reproduce:

Create two users, Eligible and Ineligible.
Have Eligible create a team.
Have Ineligible join the team.
Team should now be considered NOT eligible for prizes.
Have Ineligible leave the team.
Team is still considered NOT eligible even though the only team member is eligible.

Rails admin has not password on rails 4

For some reason the rails 4 branch is not working right with authentication and rails_admin. Mainly it just doesn't ask for a password for the admin panel. This needs to be addressed before merging this branch into master.

Top teams should automatically be emailed asking for resumes

We should automate the requesting of resumes and transcripts and integrate it into the scoreboard for the top 10 teams for each division. We could also put a countdown on it for when it is due by in order to make it clear to the competitors how soon we need the information by. This makes it a lot easier to keep track of the data.

Delete Teams

I'm thinking of two paths for team deletion:

  1. Everyone leaves the team
  2. Captain decides to delete the team. In this case we should send an email to all team members saying they are off a team.

Comments?

User invites showing up with no team association.

Not exactly sure how this is possible, but there are a few rare instances currently where users have outstanding team invitations but there is no team associated. I am not 100% sure this is an issue yet, however we have had at least one person at this point email and say they were having trouble joining a team and they do have a user invite which is in such a state. It may be best to simply delete all associated user invites and requests when a team is deleted.

Email should autofill on user invite

When a user clicks a link to register after being invited by a team captain, the email should auto populate.

Consider a message that warns users that if they register with an email other than the email they were invited with, they will not have the invite to the team.

Add optional area for profile

Optional area for profile contains additional information and the ability to edit information a user registered with

Team with no captain

Causes a NoMethodError in UserRequestsController#create when trying to join a team as there is no Team Captain to send the request email to.

To reproduce:

Create two accounts, PersonA and PersonB.
Have PersonA create a team.
Have PersonB join the team.
Have PersonA navigate to Edit Team page.
Have PersonB delete their account.
WITHOUT RELOADING have PersonA transfer captaincy to PersonB.
Team Captain is now null and will throw the error when anyone else requests to join the team.

Issue also occurs if PersonB leaves the team instead of deleting their account.

Challenge states should be global, not per division.

If a team opens a challenge on the high school division it should open it for the college and professional divisions as well. That makes the state of the challenge code a lot cleaner and also eases the integration of the registration site and the scoreboard significantly since teams can technically increase in division during the competition if they add more players of a higher division level.

Change serve_static_files to public_file_server

DEPRECATION WARNING: config.serve_static_files is deprecated and will be removed in Rails 5.1.
Please use config.public_file_server.enabled = true instead.
(called from block in <top (required)> at /app/config/environments/production.rb:27)

NA shows up in North America in the scoreboard

Not a big deal, but all teams with NA are showing up in the USA which is technically incorrect. The reason this is happening is because users can choose from any US state or NA. We could fix this by adding a fallback where when they choose NA they are prompted to input a country, or we could forget about it altogether. Also since we are allowing competitors from all over the world, having a US only map no longer really works.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.