Coder Social home page Coder Social logo

jremes-foss / beectf Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 3.0 2.43 MB

Laravel-Based Community CTF Platform

License: MIT License

PHP 73.26% CSS 0.09% JavaScript 0.53% Vue 0.25% Dockerfile 0.40% SCSS 0.48% Blade 24.98%
laravel ctf-platform ctf laravel-framework laravel-application docker php7 php ctf-events ctf-challenges laravel6 hacktoberfest

beectf's Introduction

BeeCTF

Build Status Coverage Status

Laravel-Based Community CTF Platform.

Introduction

BeeCTF is a CTF platform intended for small and local community groups who want to host their own CTF competitions. A small size and light weight makes BeeCTF a good platform to be hosted even in a small computer such as Raspberry Pi effectively. Built on Laravel 8, BeeCTF is easy to install and run even if your hardware is more limited.

Requirements

BeeCTF requires PHP version 7.3.0 with composer and NodeJS.

Installation

Local

Installation of BeeCTF in traditional way is easy:

git clone https://github.com/Newman101/BeeCTF
composer install
composer update
php artisan key:generate
php artisan user:create-admin

In order to build NPM dependencies for development purposes, please run:

npm install
npm run dev

Please note: pngquant dependency requires libpng-dev library, so it must be installed first in order to get the npm to build successfully. Otherwise, the result will be ELIFECYCLE error.

As BeeCTF is built on Laravel, please make sure to set the correct parameters in the .env file. To run the system after installation, you can use your own web server (such as Nginx or Apache) or use built-in server by:

php artisan serve

Docker

With Docker (currently for development purposes only, the production image is work in progress):

git clone https://github.com/Newman101/BeeCTF
composer install
composer update
docker-compose build
docker-compose up -d
docker-compose exec app php artisan migrate
docker-compose exec app php artisan user:create-admin

After creating an administrative user and database connection, the system is ready to use.

In order to debug any potential issues regarding Docker build, you have a docker-compose shell access with:

docker-compose exec app sh
docker-compose exec mysql sh
docker-compose exec webserver sh

Alternatively, you can also check which services are up:

docker-compose ps

API

There is an internal API available. This API is used for various purposes, including listing challenges, categories, and getting scoreboard on the command line.

Get Categories and Challenges

BeeCTF API allows you to fetch all categories and challenges in JSON format. Syntax as follows:

curl -X GET http://HOST/api/categories?api_token=API_TOKEN -H "Accept: application/json" -H "Content-Type: application/json"
curl -X GET http://HOST/api/challenges?api_token=API_TOKEN -H "Accept: application/json" -H "Content-Type: application/json"

Get Scoreboard

You can fetch the scoreboard via BeeCTF API. Example with cURL:

curl -X GET http://HOST/api/scoreboard?api_token=API_TOKEN -H "Accept: application/json" -H "Content-Type: application/json"

This command returns the scoreboard in JSON format.

Get Team Scoreboard

You can fetch the team scoreboard via BeeCTF API. Example with cURL:

curl -X GET http://HOST/api/teamscoreboard?api_token=API_TOKEN -H "Accept: application/json" -H "Content-Type: application/json"

This command returns the team scoreboard in JSON format.

Get Number of Solved Challenges

You can get number of solved challenges via BeeCTF API. Example with cURL:

curl -X GET http://HOST/api/numbersolved?api_token=API_TOKEN -H "Accept: application/json" -H "Content-Type: application/json"

This command returns number of challenges solved in JSON format.

Pull Requests

Feel free to send any bug fixes, new features, etc. via pull requests. Please note that BeeCTF is still heavily work in progress so there are a lot of issues to fix and all contributions are welcome. Before submitting unit tests, please make sure all unit tests pass and the code is following the standards established in contribution guide.

License

Copyright (c) <2019> Juha Remes

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

beectf's People

Contributors

dependabot[bot] avatar jremes-foss avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

beectf's Issues

It is showing 500 error page

I have done docker installation steps. When I launching the application on localhost it's showing 500 error page.

Sending flags for the second time shouldn't score

Hallo sir minta maaf jika terganggu

When the User submits the flag and succeeds when he submits the same flag, for the second time the score should not increase but the alert flag is ready

ok thanks sir

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.