Git Product home page Git Product logo

echoctf / echoctf.red Goto Github PK

View Code? Open in Web Editor NEW
106.0 106.0 23.0 106.11 MB

A platform to develop, run and administer CTF competitions. The online echoCTF.RED platform user interfaces and codebase

Home Page: https://echoCTF.RED/

License: BSD 2-Clause "Simplified" License

PHP 70.97% CSS 6.82% JavaScript 19.09% PLpgSQL 0.37% Dockerfile 0.13% Shell 0.78% Perl 0.22% Jinja 0.50% Hack 0.50% HTML 0.61%
ctf cybersecurity echoctf hacking

echoctf.red's People

Contributors

0xjaeg3r avatar akorovesi avatar dependabot[bot] avatar g0rchy avatar hitmanalharbi avatar proditis 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  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  avatar

echoctf.red's Issues

Show platform counters on dashboard

Counters for total users, online, users on VPN on dashboard. This is an early solution for a better infrastructure status page later on

  • Player::model()->count()
  • Player::model()->online()->count()
  • Player::model()->on_vpn()->count()

Create restapi challenge submission

create restapi and possibly pui challenge submission.

The challenge submissions bust be yml or json structured with the following format
proposed challenge yml/json structure

---
author: 1 # Your profile id
name: "This is the challenge name"
category: Tutorial # Free form
difficulty: easy # Free form
player_type: offense # offense or defense
filename: challenge1.zip # Optional filename that comes with the challenge
description: "<p>Description of the challenge allows limited html</p>"
questions:
  - {
       name: "1st question name"
       description: "1st question description"
       points: 100
       code: "answer1"
       weight: 0
    }
  - {
       name: "2nd question name"
       description: "2nd question description"
       points: 100
       code: "answer2"
       weight: 1
    }

Add Terms and Conditions

  • Create a _terms_and_conditions.php view to be used as renderPartial
  • Change profile label to "I accept the echoCTF RED Terms and Conditions"
  • Make the Terms and Conditions link popup that will render the Terms and Conditions view
  • Add Terms and Conditions checkbox with link popup on registration page
  • Decide on static or sysconfig key for page content

Update openvpn connection script for vpn servers to update the table instead of memcached

Update vpn up/down script to update mysql table player_last instead of memcached ovpn:id key.
This should include updates of on_vpn=NOW(), vpn_local_address=INET_ATON($local_IP), vpn_remote_address=INET_ATON($remote_ip) WHERE id=$cn

The script should keep on checking if the ovpn:id key is set to deny secondary logins, however the key will be populated by mysql triggers instead of nc

Fix controller names for related models

  • Change controller names across mUI from PlayertreasureController into PlayerTreasureController.
  • This will require changing the main menu links from module/playertreasure to module/player-treasure
  • The views folders will also need to be renamed from views/playertreasure to views/player-treasure

GDPR Compliance

  • Label for GDPR checkbox I accept the privacy policy of echoCTF Red.
  • Create a _privacy_policy.php view
  • Make privacy policy link popup that renders the view
  • Decide on static content or sysconfig key

Add Hint request for specific targets

Allow users to request hints for a target with "penalty".

The process will be in the form of

  1. user clicks on request for hint of target
  2. modal dialog appears for the user to attach his/her question
  3. Moderators receive the hint request and attach an answer and points that will be deducted and optional assign a treasure that this hint is related to.
  4. Participant receives a notification and is informed that seeing the hint will deduct the points from the treasure associated with the hint

On target headshots row include the number of hints received for the target by the headshot user

Create target badge generation

Using #33 & #34 generate badges for the targets. This will allow us to embed images into misc post such as

<img src="https://echoctf.red/target/10/badge"/>

Implement operation for moving a target from one network to another

Implement the operation to move a target from one network (eg AAnet) to another (eg CVEnet)

Certain rules need to be followed for this transfer

  • Change ip, net, docker server of target
  • Re-populate targets pf table
  • Re-populate match findings for pf
  • Delete existing container from old docker server
  • Spin container with new details

Experience Levels introduction

Add Experience Levels based on points

  • migration with fields (id,name, description, icon, min_points, max_points)
  • Display Experience level on profile based on a query similar to select * from experience WHERE points between min_points and max_points or SELECT * from experience where points >= min_points limit 1
  • Create Gameplay or Settings sub model & CRUD for experience
  • On pUI profile show Experience levels

Create target vs profile_id view

Create target vs profile_id view. Link the target/view on profile/id page to the versus page. This page will be similar to the current target view for logged in users, but instead of displaying the current profile we will load the details of the profile given on the versus link.

The links will be in the form of target/11/versus/31337 and will show the current progress for the particular player on the target.

add pull image on target view

On mui next to the image name on target/view add the ability to pull the image into the docker. This will help in spinning the target faster for the first time since the image will already be there.

Make sure findings match only on SYN/ACK flags only

Problem
A user (./0xRar) reported he received a finding for a host he didnt scan. He was working on krusty and received a finding for moleman. Upon inspection it appeared that the system (moleman) had attempted to connect to the users VPN IP and the finding came from his system sending a response.

This was due to the fact that a user added a wrong IP on the form of moleman.

Solution

  • Make match finding rules to only work on initial connection attempts. This way we can at least limit the amount of times this can happen.
  • Update instructions to include information to users on protecting their systems and only allowing connection back from system they allow manualy

Limit reset requests for players based on criteria

Problem
It was been observed that when users first join the platform test all the available links they can click in order to figure out what each does. Unavoidably they will click on the restart button for a target.

  • This leads to systems restarting randomly
  • Users loosing their restart requests for the day early on which then limits the available restarts when they start playing the same day

We need to avoid unnecessary restarts so we need to limit the restarts only to cases that this is needed.

Solutions
Allow restarts by users who:

  • have connected on the VPN before (at least once)
  • are currently connected to the VPN
  • have progress on a target (eg have finding or treasure)

Vote Allow restarts by users who:


Create avatar upload and/or external avatars inclusion

Introduce the ability to upload or link existing avatars to the user profiles (eg link avatars from github/twitter etc).

Requirements:

  • Images must be validated (<=1mb, png/jpg)
  • All images must be re-created and scaled through appropriate libraries (ie, gd, cimg etc)
  • All images must remain "hidden" until a moderator approves the images
  • All image filenames will be converted to profile_id.png
  • Scaled images with any side smaller than 300 must be centered accordingly on a 300x300 frame. This will allow us to have consistent sizes for avatars.

Implement target difficulty rating by users

This may be an overkill but lets make it so that we keep each vote as a separate table.

This will allow us to display the ratings of each user as extra details on target/view as well as the average rating on dashboard/index

Furthermore, on profile/me & profile/index we can display the the vote of the profile owner on the target list

Create target images

Create images to be used as target avatars. The images must be transparent and should mesh correctly with our logo when merged together.

Update target with required and suggested XP levels

Update target with required and suggested experience levels

  • Add suggested minimum experience level for targets (suggested_xp) through migration
  • Add required minimum experience level for targets (required_xp) through migrations

Allow temporary disabling the triggers

Modify triggers to include ability to be disabled on request, this way we will be able to import data from other instances without invoking them. This will also allow us to perform operations without TRIGGERS from the mui

add new column to question (parent_id)

Add a parent_id column to question in order to be able to implement challenges that do not reveal the next step unless you complete the one required by parent_id

Create a smart tweet widget to include on our targets, stream msgs, profile

Create a smart tweet widget to include on our targets, stream msgs, profile

We need to be able to generate the following get parameters

url: absolute url
text: the message with correct references for platform (`@echoCTF`) and user if exists `@userhandle`
related: list of handles

<a href="https://twitter.com/intent/tweet?url=http%3a%2f%2fwww.tomtunguz.com%2fimportance-and-mystery-demand-generation%2f&text=Why%20Demand%20Generation%20Can%20Be%20So%20Challenging%20For%20Startups%20via%20@ttunguz&related=ttunguz">Share this post</a>

`mail_optin` implementation

  • Add description for email opt-in checkbox
    Check this if you would like to receive mail notifications from the platform. We will not use your email address to send you unsolicited emails.
  • Change label to I want to receive emails from echoCTF RED

Make certain target details publicly accessible

  • Make target/view publicly accessible (with limited details).
  • Include appropriate meta tags for twitter "product" display
  • Create dynamic logo generation for each target (split into #33, #34, #35)
  • Create dynamic badge image generation for each target (split into #33, #34, #35)
  • Create our own custom tweet button and add on page (split into #31 and #32)

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.