├── .gitignore ├── LICENSE ├── QUICKSTART.md ├── README.md ├── TODO.md ├── __init__.py ├── ares ├── aws │ ├── .gitignore │ ├── 0_make_credentials.py │ ├── 1_make_auto_tfvars.py │ ├── 4_generate_ssh_config.py │ ├── 5_register_teamvms.py │ ├── bootstrap_game.py │ ├── config_schema.yml │ ├── configlint.py │ ├── destroy_game.py │ ├── full_bootstrap_game.sh │ ├── infrastructure │ │ ├── ami.tf │ │ ├── database.tf │ │ ├── dispatcher.tf │ │ ├── dns.tf │ │ ├── gamebot.tf │ │ ├── locals.tf │ │ ├── logger.tf │ │ ├── outputs.tf │ │ ├── registry.tf │ │ ├── router.tf │ │ ├── scoreboard.tf │ │ ├── scriptbot.tf │ │ ├── security_groups.tf │ │ ├── subnets.tf │ │ ├── teaminterface.tf │ │ ├── teamvm.tf │ │ ├── variables.tf │ │ └── vpc.tf │ ├── populate_docker_registry.py │ ├── prepopulate_docker_registry.sh │ ├── register_services_and_teams.sh │ ├── ssh_config2 │ └── util_scripts │ │ ├── connect_to_scriptbot_for_team.sh │ │ ├── create_random_teams.py │ │ ├── ictf_submit_test.py │ │ ├── pull_and_restart_scriptbots.sh │ │ ├── push_local_service_docker.sh │ │ ├── run_on_scriptbots.sh │ │ └── run_on_teamvms.sh ├── docker │ ├── .gitignore │ ├── 0_make_credentials.py │ ├── deploy_infra.py │ ├── docker-compose-local.yml.j2 │ └── register_services_and_teams.sh └── install_requirements ├── aws_vars.example.env ├── common ├── ares_provisioning │ ├── ansible-provisioning.yml │ └── roles │ │ └── common_provisioning │ │ ├── files │ │ └── deploy_on_ec2.sh │ │ ├── tasks │ │ └── main.yml │ │ ├── templates │ │ └── aws_credentials.j2 │ │ └── vars │ │ └── main.yml └── hephaestus_provisioning │ └── teamhosts ├── database ├── README.md ├── api │ ├── __init__.py │ ├── brand_new_scoring.py │ ├── db_helpers.py │ ├── flaskext │ │ ├── __init__.py │ │ └── mysql.py │ ├── general.py │ ├── scored_events.py │ ├── scores.py │ ├── scores_old.py │ ├── scripts.py │ ├── services.py │ ├── teams.py │ ├── ticket.py │ ├── uploads.py │ └── utils.py ├── dump_teams_json.py ├── ictf-db-export-s3.py ├── provisioning │ ├── ares_provisioning │ │ └── docker-compose.yml │ ├── create_services.py │ ├── create_teams.py │ ├── hephaestus_provisioning │ │ ├── ansible-provisioning.yml │ │ └── files │ │ │ ├── aws_config.yml.j2 │ │ │ ├── logstash.conf │ │ │ ├── mysql.conf │ │ │ └── nginx.conf │ └── wait_rest_api.py ├── requirements.txt ├── reset_db.py ├── services │ └── ictf-db-export-s3.conf ├── settings.py ├── start.sh ├── support │ ├── mysql-connector-python-2.1.3 │ │ ├── CHANGES.txt │ │ ├── LICENSE.txt │ │ ├── MANIFEST.in │ │ ├── PKG-INFO │ │ ├── README.txt │ │ ├── docs │ │ │ └── README_DOCS.txt │ │ ├── examples │ │ │ ├── __init__.py │ │ │ ├── dates.py │ │ │ ├── engines.py │ │ │ ├── inserts.py │ │ │ ├── microseconds.py │ │ │ ├── multi_resultsets.py │ │ │ ├── mysql_warnings.py │ │ │ ├── prepared_statements.py │ │ │ ├── transaction.py │ │ │ ├── unicode.py │ │ │ └── warnings.py │ │ ├── lib │ │ │ ├── __init__.py │ │ │ ├── cpy_distutils.py │ │ │ └── mysql │ │ │ │ ├── __init__.py │ │ │ │ └── connector │ │ │ │ ├── __init__.py │ │ │ │ ├── abstracts.py │ │ │ │ ├── authentication.py │ │ │ │ ├── catch23.py │ │ │ │ ├── charsets.py │ │ │ │ ├── connection.py │ │ │ │ ├── connection_cext.py │ │ │ │ ├── constants.py │ │ │ │ ├── conversion.py │ │ │ │ ├── cursor.py │ │ │ │ ├── cursor_cext.py │ │ │ │ ├── custom_types.py │ │ │ │ ├── dbapi.py │ │ │ │ ├── django │ │ │ │ ├── __init__.py │ │ │ │ ├── base.py │ │ │ │ ├── client.py │ │ │ │ ├── compiler.py │ │ │ │ ├── creation.py │ │ │ │ ├── features.py │ │ │ │ ├── introspection.py │ │ │ │ ├── operations.py │ │ │ │ ├── schema.py │ │ │ │ └── validation.py │ │ │ │ ├── errorcode.py │ │ │ │ ├── errors.py │ │ │ │ ├── fabric │ │ │ │ ├── __init__.py │ │ │ │ ├── balancing.py │ │ │ │ ├── caching.py │ │ │ │ └── connection.py │ │ │ │ ├── locales │ │ │ │ ├── __init__.py │ │ │ │ └── eng │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── client_error.py │ │ │ │ ├── network.py │ │ │ │ ├── optionfiles.py │ │ │ │ ├── pooling.py │ │ │ │ ├── protocol.py │ │ │ │ ├── utils.py │ │ │ │ └── version.py │ │ ├── setup.py │ │ ├── setupinfo.py │ │ ├── src │ │ │ ├── exceptions.c │ │ │ ├── force_cpp_linkage.cc │ │ │ ├── include │ │ │ │ ├── catch23.h │ │ │ │ ├── exceptions.h │ │ │ │ ├── mysql_capi.h │ │ │ │ ├── mysql_capi_conversion.h │ │ │ │ └── mysql_connector.h │ │ │ ├── mysql_capi.c │ │ │ ├── mysql_capi_conversion.c │ │ │ └── mysql_connector.c │ │ ├── tests │ │ │ ├── __init__.py │ │ │ ├── cext │ │ │ │ ├── __init__.py │ │ │ │ ├── test_cext_api.py │ │ │ │ ├── test_cext_connection.py │ │ │ │ └── test_cext_cursor.py │ │ │ ├── data │ │ │ │ ├── local_data.csv │ │ │ │ ├── option_files │ │ │ │ │ ├── dup_groups.cnf │ │ │ │ │ ├── include_files │ │ │ │ │ │ ├── 1.cnf │ │ │ │ │ │ └── 2.cnf │ │ │ │ │ ├── my.cnf │ │ │ │ │ └── pool.cnf │ │ │ │ └── ssl │ │ │ │ │ ├── tests_CA_cert.pem │ │ │ │ │ ├── tests_CA_key.pem │ │ │ │ │ ├── tests_client_cert.pem │ │ │ │ │ ├── tests_client_key.pem │ │ │ │ │ ├── tests_server_cert.pem │ │ │ │ │ └── tests_server_key.pem │ │ │ ├── mysqld.py │ │ │ ├── py26.py │ │ │ ├── test_abstracts.py │ │ │ ├── test_authentication.py │ │ │ ├── test_bugs.py │ │ │ ├── test_connection.py │ │ │ ├── test_constants.py │ │ │ ├── test_conversion.py │ │ │ ├── test_cursor.py │ │ │ ├── test_django.py │ │ │ ├── test_errorcode.py │ │ │ ├── test_errors.py │ │ │ ├── test_examples.py │ │ │ ├── test_fabric.py │ │ │ ├── test_locales.py │ │ │ ├── test_mysql_datatypes.py │ │ │ ├── test_network.py │ │ │ ├── test_optionfiles.py │ │ │ ├── test_pep249.py │ │ │ ├── test_pooling.py │ │ │ ├── test_protocol.py │ │ │ ├── test_setup.py │ │ │ ├── test_style.py │ │ │ └── test_utils.py │ │ └── unittests.py │ ├── mysql.conf │ ├── nginx.conf │ ├── restart.sql │ ├── schema.sql │ ├── service.conf │ ├── service_reset.sql │ └── sysctl.conf ├── test_db.py ├── uwsgi.ini └── wsgi.py ├── dispatcher ├── provisioning │ └── ares_provisioning │ │ └── docker-compose.yml └── start.sh ├── game_config.example.json ├── gamebot ├── README.md ├── __init__.py ├── dbapi.py ├── gamebot.py ├── provisioning │ ├── ares_provisioning │ │ ├── ansible-provisioning.yml │ │ └── files │ │ │ └── docker-compose.yml.j2 │ └── hephaestus_provisioning │ │ ├── ansible-provisioning.yml │ │ └── files │ │ └── logstash.conf ├── requirements.txt ├── scripts_facade.py ├── settings.py ├── start.sh ├── support │ └── init │ │ └── ictf-gamebot.conf └── utils.py ├── go.sh ├── hephaestus ├── aws │ ├── 0_teamvm_base │ │ └── packer.json │ ├── 1_teamvm_primer │ │ └── packer.json │ ├── build_ictf_base.sh │ ├── build_ictf_bastion.sh │ ├── build_infra.sh │ ├── build_teamvm_base.sh │ ├── build_teamvm_primer.sh │ ├── ictf_base │ │ ├── ansible-provisioning.yml │ │ └── packer.json │ ├── ictf_bastion │ │ ├── ansible-provisioning.yml │ │ └── packer.json │ └── install_ansible.sh ├── docker │ ├── 0_ictf_base │ │ └── Dockerfile │ ├── 1_database │ │ └── Dockerfile │ ├── 1_dispatcher │ │ └── Dockerfile │ ├── 1_gamebot │ │ └── Dockerfile │ ├── 1_logger │ │ └── Dockerfile │ ├── 1_router │ │ └── Dockerfile │ ├── 1_scoreboard │ │ └── Dockerfile │ ├── 1_scriptbot │ │ └── Dockerfile │ ├── 1_teaminterface │ │ └── Dockerfile │ ├── build_infra.sh │ ├── build_teamvm.py │ ├── docker-compose-base.yml │ ├── docker-compose-infra.yml │ ├── docker-compose-teamvm.yml │ └── teamvm │ │ └── Dockerfile └── virtualbox │ ├── .gitignore │ ├── 0_teamvm_base │ └── packer.json │ ├── 1_teamvm_primer │ └── packer.json │ ├── build │ └── .keep │ ├── files │ └── http │ │ └── preseed.cfg │ └── setup.sh ├── ictf-base └── provisioning │ ├── ansible-provisioning.yml │ └── requirements-ansible-roles.yml ├── install_all_requirements ├── logger ├── provisioning │ ├── ares_provisioning │ │ └── docker-compose.yml │ └── hephaestus_provisioning │ │ ├── ansible-provisioning.yml │ │ └── files │ │ ├── elasticsearch.yml │ │ ├── grafana_dashboards.yml │ │ ├── ictf_overview_dashboard.json │ │ ├── kibana.yml │ │ ├── prometheus.yml.j2 │ │ └── prometheus_datasource.yml └── start.sh ├── make_secrets.sh ├── requirements.txt ├── router ├── README.md ├── create_ip_sets.dat ├── dir_zipper.py ├── doc │ └── vulnbox.txt ├── firewall.rules ├── form_ip_sets.py ├── game │ ├── README.md │ ├── concentrator_tgz_tpl │ │ ├── ictf-in-a-box.conf │ │ └── ictf-in-a-box │ │ │ ├── ccd │ │ │ └── team.tpl │ │ │ └── keys │ │ │ ├── ca.crt.placeholder │ │ │ ├── server.crt.placeholder │ │ │ └── server.key.placeholder │ ├── install.sh │ └── start.sh ├── gen_qos_rules.py ├── ictf-pcap-rm.py ├── ictf-pcap-s3.py ├── ictf-tcpdump.py ├── iptables_log_parse.py ├── pcap-gz.sh ├── pcap-mv.sh ├── provisioning │ ├── ares_provisioning │ │ └── docker-compose.yml │ ├── aws_config.yml.j2 │ ├── hephaestus_provisioning │ │ ├── ansible-provisioning.yml │ │ ├── files │ │ │ ├── aws_config.yml.j2 │ │ │ └── logstash.conf │ │ └── iptables_rules │ └── terraform_provisioning.yml ├── requirements2.txt ├── requirements3.txt ├── run_tcp_dump.sh ├── services │ ├── ictf-attackup.conf │ ├── ictf-pcap-s3.conf │ └── ictf-tcpdump.conf ├── start.sh ├── sysctl.conf ├── team-network-files │ ├── teameth0 │ └── teamhosts └── usr.sbin.tcpdump ├── scoreboard ├── .eslintrc ├── .gitignore ├── .nvmrc ├── DEPLOY_README.md ├── README.md ├── __init__.py ├── _static │ └── .gitkeep ├── ansible.cfg ├── app.py ├── bin │ ├── Stress_Test.conf │ ├── add_cloudflare_ufw_rules.sh │ ├── deploy │ ├── nginx │ │ └── ictf-scoreboard.conf │ ├── stress_test.py │ └── upstart │ │ ├── ictf-gunicorn.conf │ │ └── ictf-poller.conf ├── config.json ├── frontend │ ├── .gitignore │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ ├── flags │ │ │ ├── ABW.png │ │ │ ├── AFG.png │ │ │ ├── AGO.png │ │ │ ├── AIA.png │ │ │ ├── ALA.png │ │ │ ├── ALB.png │ │ │ ├── AND.png │ │ │ ├── ANT.png │ │ │ ├── ARE.png │ │ │ ├── ARG.png │ │ │ ├── ARM.png │ │ │ ├── ASM.png │ │ │ ├── ATA.png │ │ │ ├── ATF.png │ │ │ ├── ATG.png │ │ │ ├── AUS.png │ │ │ ├── AUT.png │ │ │ ├── AZE.png │ │ │ ├── BDI.png │ │ │ ├── BEL.png │ │ │ ├── BEN.png │ │ │ ├── BFA.png │ │ │ ├── BGD.png │ │ │ ├── BGR.png │ │ │ ├── BHR.png │ │ │ ├── BHS.png │ │ │ ├── BIH.png │ │ │ ├── BLM.png │ │ │ ├── BLR.png │ │ │ ├── BLZ.png │ │ │ ├── BMU.png │ │ │ ├── BOL.png │ │ │ ├── BRA.png │ │ │ ├── BRB.png │ │ │ ├── BRN.png │ │ │ ├── BTN.png │ │ │ ├── BWA.png │ │ │ ├── CAF.png │ │ │ ├── CAN.png │ │ │ ├── CCK.png │ │ │ ├── CHE.png │ │ │ ├── CHL.png │ │ │ ├── CHN.png │ │ │ ├── CIV.png │ │ │ ├── CMR.png │ │ │ ├── COD.png │ │ │ ├── COG.png │ │ │ ├── COK.png │ │ │ ├── COL.png │ │ │ ├── COM.png │ │ │ ├── CPV.png │ │ │ ├── CRI.png │ │ │ ├── CUB.png │ │ │ ├── CUW.png │ │ │ ├── CXR.png │ │ │ ├── CYM.png │ │ │ ├── CYP.png │ │ │ ├── CZE.png │ │ │ ├── DEU.png │ │ │ ├── DJI.png │ │ │ ├── DMA.png │ │ │ ├── DNK.png │ │ │ ├── DOM.png │ │ │ ├── DZA.png │ │ │ ├── ECU.png │ │ │ ├── EGY.png │ │ │ ├── ERI.png │ │ │ ├── ESH.png │ │ │ ├── ESP.png │ │ │ ├── EST.png │ │ │ ├── ETH.png │ │ │ ├── EUR.png │ │ │ ├── FIN.png │ │ │ ├── FJI.png │ │ │ ├── FLK.png │ │ │ ├── FRA.png │ │ │ ├── FRO.png │ │ │ ├── FSM.png │ │ │ ├── GAB.png │ │ │ ├── GBR.png │ │ │ ├── GEO.png │ │ │ ├── GGY.png │ │ │ ├── GHA.png │ │ │ ├── GIB.png │ │ │ ├── GIN.png │ │ │ ├── GMB.png │ │ │ ├── GNB.png │ │ │ ├── GNQ.png │ │ │ ├── GRC.png │ │ │ ├── GRD.png │ │ │ ├── GRL.png │ │ │ ├── GTM.png │ │ │ ├── GUM.png │ │ │ ├── GUY.png │ │ │ ├── HKG.png │ │ │ ├── HND.png │ │ │ ├── HRV.png │ │ │ ├── HTI.png │ │ │ ├── HUN.png │ │ │ ├── ICT.png │ │ │ ├── IDN.png │ │ │ ├── IMN.png │ │ │ ├── IND.png │ │ │ ├── IRL.png │ │ │ ├── IRN.png │ │ │ ├── IRQ.png │ │ │ ├── ISL.png │ │ │ ├── ISR.png │ │ │ ├── ITA.png │ │ │ ├── JAM.png │ │ │ ├── JEY.png │ │ │ ├── JOR.png │ │ │ ├── JPN.png │ │ │ ├── KAZ.png │ │ │ ├── KEN.png │ │ │ ├── KGZ.png │ │ │ ├── KHM.png │ │ │ ├── KIR.png │ │ │ ├── KNA.png │ │ │ ├── KOR.png │ │ │ ├── KWT.png │ │ │ ├── LAO.png │ │ │ ├── LBN.png │ │ │ ├── LBR.png │ │ │ ├── LBY.png │ │ │ ├── LCA.png │ │ │ ├── LIE.png │ │ │ ├── LKA.png │ │ │ ├── LSO.png │ │ │ ├── LTU.png │ │ │ ├── LUX.png │ │ │ ├── LVA.png │ │ │ ├── MAC.png │ │ │ ├── MAF.png │ │ │ ├── MAR.png │ │ │ ├── MCO.png │ │ │ ├── MDA.png │ │ │ ├── MDG.png │ │ │ ├── MDV.png │ │ │ ├── MEX.png │ │ │ ├── MHL.png │ │ │ ├── MKD.png │ │ │ ├── MLI.png │ │ │ ├── MLT.png │ │ │ ├── MMR.png │ │ │ ├── MNE.png │ │ │ ├── MNG.png │ │ │ ├── MNP.png │ │ │ ├── MOZ.png │ │ │ ├── MRT.png │ │ │ ├── MSR.png │ │ │ ├── MTQ.png │ │ │ ├── MUS.png │ │ │ ├── MWI.png │ │ │ ├── MYS.png │ │ │ ├── MYT.png │ │ │ ├── NAM.png │ │ │ ├── NCL.png │ │ │ ├── NER.png │ │ │ ├── NFK.png │ │ │ ├── NGA.png │ │ │ ├── NIC.png │ │ │ ├── NIU.png │ │ │ ├── NLD.png │ │ │ ├── NOR.png │ │ │ ├── NPL.png │ │ │ ├── NRU.png │ │ │ ├── NZL.png │ │ │ ├── OMN.png │ │ │ ├── PAK.png │ │ │ ├── PAN.png │ │ │ ├── PCN.png │ │ │ ├── PER.png │ │ │ ├── PHL.png │ │ │ ├── PLW.png │ │ │ ├── PNG.png │ │ │ ├── POL.png │ │ │ ├── PRI.png │ │ │ ├── PRK.png │ │ │ ├── PRT.png │ │ │ ├── PRY.png │ │ │ ├── PSE.png │ │ │ ├── PYF.png │ │ │ ├── QAT.png │ │ │ ├── ROU.png │ │ │ ├── RUS.png │ │ │ ├── RWA.png │ │ │ ├── SAU.png │ │ │ ├── SDN.png │ │ │ ├── SEN.png │ │ │ ├── SGP.png │ │ │ ├── SGS.png │ │ │ ├── SHN.png │ │ │ ├── SLB.png │ │ │ ├── SLE.png │ │ │ ├── SLV.png │ │ │ ├── SMR.png │ │ │ ├── SOM.png │ │ │ ├── SRB.png │ │ │ ├── SSD.png │ │ │ ├── STP.png │ │ │ ├── SUR.png │ │ │ ├── SVK.png │ │ │ ├── SVN.png │ │ │ ├── SWE.png │ │ │ ├── SWZ.png │ │ │ ├── SYC.png │ │ │ ├── SYR.png │ │ │ ├── TCA.png │ │ │ ├── TCD.png │ │ │ ├── TGO.png │ │ │ ├── THA.png │ │ │ ├── TJK.png │ │ │ ├── TKL.png │ │ │ ├── TKM.png │ │ │ ├── TLS.png │ │ │ ├── TON.png │ │ │ ├── TTO.png │ │ │ ├── TUN.png │ │ │ ├── TUR.png │ │ │ ├── TUV.png │ │ │ ├── TWN.png │ │ │ ├── TZA.png │ │ │ ├── UGA.png │ │ │ ├── UKR.png │ │ │ ├── URY.png │ │ │ ├── USA.png │ │ │ ├── UZB.png │ │ │ ├── VAT.png │ │ │ ├── VCT.png │ │ │ ├── VEN.png │ │ │ ├── VGB.png │ │ │ ├── VIR.png │ │ │ ├── VNM.png │ │ │ ├── VUT.png │ │ │ ├── WLF.png │ │ │ ├── WSM.png │ │ │ ├── XXX.png │ │ │ ├── YEM.png │ │ │ ├── ZAF.png │ │ │ ├── ZMB.png │ │ │ ├── ZWE.png │ │ │ ├── _abkhazia.png │ │ │ ├── _basque-country.png │ │ │ ├── _british-antarctic-territory.png │ │ │ ├── _commonwealth.png │ │ │ ├── _england.png │ │ │ ├── _gosquared.png │ │ │ ├── _kosovo.png │ │ │ ├── _mars.png │ │ │ ├── _nagorno-karabakh.png │ │ │ ├── _nato.png │ │ │ ├── _northern-cyprus.png │ │ │ ├── _olympics.png │ │ │ ├── _red-cross.png │ │ │ ├── _scotland.png │ │ │ ├── _somaliland.png │ │ │ ├── _south-ossetia.png │ │ │ ├── _united-nations.png │ │ │ ├── _unknown.png │ │ │ ├── _wales.png │ │ │ └── convert_flags.py │ │ ├── index.html │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── robots.txt │ ├── src │ │ ├── components │ │ │ ├── AcademicSwitch.jsx │ │ │ ├── App.jsx │ │ │ ├── Scores.jsx │ │ │ ├── Scores_new.jsx │ │ │ ├── ServiceExploits.jsx │ │ │ ├── ServiceStates.jsx │ │ │ ├── Services.jsx │ │ │ ├── Teams.jsx │ │ │ └── shared │ │ │ │ ├── Countdown.jsx │ │ │ │ ├── Flag.jsx │ │ │ │ └── Table.jsx │ │ ├── hooks │ │ │ └── useInterval.ts │ │ ├── index.tsx │ │ ├── logo.svg │ │ ├── mixins │ │ │ └── SetIntervalMixin.js │ │ ├── react-app-env.d.ts │ │ ├── reportWebVitals.ts │ │ ├── routes.jsx │ │ ├── sources │ │ │ ├── abstract_api.js │ │ │ ├── api.js │ │ │ ├── api_hooks.js │ │ │ └── dayjs-local.js │ │ ├── styles │ │ │ ├── _font-faces.sass │ │ │ ├── blocks │ │ │ │ ├── _align.sass │ │ │ │ ├── _button.sass │ │ │ │ ├── _c3-override.sass │ │ │ │ ├── _center.sass │ │ │ │ ├── _chart-controls.sass │ │ │ │ ├── _chart.sass │ │ │ │ ├── _countdown.sass │ │ │ │ ├── _font-size.sass │ │ │ │ ├── _grid.sass │ │ │ │ ├── _link.sass │ │ │ │ ├── _logo.sass │ │ │ │ ├── _main-content.sass │ │ │ │ ├── _main-header.sass │ │ │ │ ├── _main-sidebar.sass │ │ │ │ ├── _navitagion.sass │ │ │ │ ├── _sizes.sass │ │ │ │ ├── _slide-hover.sass │ │ │ │ ├── _space.sass │ │ │ │ ├── _state-legend.sass │ │ │ │ ├── _state-table.sass │ │ │ │ ├── _state-tag.sass │ │ │ │ ├── _table.sass │ │ │ │ ├── _title.sass │ │ │ │ ├── _truncate.sass │ │ │ │ ├── _wrap.sass │ │ │ │ └── all.sass │ │ │ ├── functions │ │ │ │ ├── _assign-inputs.sass │ │ │ │ ├── _breakpoints.sass │ │ │ │ ├── _unpack.sass │ │ │ │ └── all.sass │ │ │ ├── main.sass │ │ │ ├── mixins │ │ │ │ ├── _at-breakpoint.sass │ │ │ │ ├── _at-hidpi.sass │ │ │ │ ├── _center.sass │ │ │ │ ├── _clearfix.sass │ │ │ │ ├── _debug.sass │ │ │ │ ├── _ellipsis.sass │ │ │ │ ├── _font-size.sass │ │ │ │ ├── _grid.sass │ │ │ │ ├── _position.sass │ │ │ │ ├── _rem.sass │ │ │ │ ├── _size.sass │ │ │ │ ├── _space.sass │ │ │ │ ├── _triangle.sass │ │ │ │ ├── _wrap.sass │ │ │ │ └── all.sass │ │ │ ├── transitions │ │ │ │ ├── _moveUp.sass │ │ │ │ └── all.sass │ │ │ ├── variables │ │ │ │ ├── _breakpoints.sass │ │ │ │ ├── _colors.sass │ │ │ │ ├── _easings.sass │ │ │ │ ├── _font-size.sass │ │ │ │ ├── _grid.sass │ │ │ │ ├── _sidebar.sass │ │ │ │ ├── _sizes.sass │ │ │ │ ├── _space.sass │ │ │ │ ├── _wrap.sass │ │ │ │ └── all.sass │ │ │ └── vendor │ │ │ │ ├── _normalize.scss │ │ │ │ ├── all.sass │ │ │ │ └── c3.scss │ │ └── utils │ │ │ ├── pad.js │ │ │ └── round.js │ ├── tsconfig.json │ └── yarn.lock ├── mock │ ├── mock_db.py │ └── serve.sh ├── nvm.sh ├── poller.py ├── provisioning │ ├── ares_provisioning │ │ └── docker-compose.yml │ └── hephaestus_provisioning │ │ ├── ansible-provisioning.yml │ │ └── files │ │ └── logstash.conf ├── requirements.txt ├── service.conf ├── shellogo │ ├── orig.txt │ ├── shellphishlogo.js │ ├── shellphishlogo.txt │ └── transform.py ├── start.sh └── uwsgi.ini ├── scoring_ictf ├── .gitignore ├── scoring_ictf │ ├── __init__.py │ ├── game_state_interface.py │ ├── scoring_ictf2017.py │ ├── scoring_interface.py │ └── simple_lru_cache.py └── setup.py ├── scriptbot ├── README.md ├── db_client.py ├── provisioning │ ├── ares_provisioning │ │ ├── ansible-provisioning.yml │ │ └── files │ │ │ ├── docker-compose.yml.j2 │ │ │ └── teamhosts │ └── hephaestus_provisioning │ │ ├── ansible-provisioning.yml │ │ └── files │ │ └── logstash.conf ├── registry_client.py ├── requirements.txt ├── script_executor.py ├── scriptbot.py ├── settings.py ├── start.sh └── start_idle_mode.sh ├── service_submission_process.md ├── teaminterface ├── README.md ├── config.py.example ├── lib │ ├── __init__.py │ ├── captcha.py │ ├── data │ │ └── tld_names │ ├── domain.py │ ├── file_checker.py │ ├── mailer.py │ ├── python_fu.py │ ├── redis_ratelimit.py │ └── test.tgz ├── meta_add.py ├── metadata_questions ├── provisioning │ ├── ares_provisioning │ │ └── docker-compose.yml │ └── hephaestus_provisioning │ │ ├── ansible-provisioning.yml │ │ └── files │ │ └── logstash.conf ├── requirements.txt ├── set_pw.py ├── start.py ├── start.sh ├── start_wsgi.py ├── support │ ├── nginx.conf │ ├── service.conf │ └── sysctl.conf ├── support_console.py ├── team_interface.py ├── team_list.py ├── uwsgi.ini └── validate.py ├── teaminterface_client ├── .gitignore ├── PKG-INFO ├── setup.py └── swpag_client │ ├── __init__.py │ └── client.py ├── teamvms ├── .gitignore ├── provisioning │ ├── ares_provisioning │ │ └── ansible-provisioning.yml │ └── hephaestus_provisioning │ │ └── ansible │ │ ├── ansible-provisioning.yml │ │ ├── files │ │ └── docker-compose.yml.j2 │ │ └── roles │ │ ├── deploy_ctf_service │ │ └── tasks │ │ │ └── main.yml │ │ ├── register_service_daemon │ │ ├── handlers │ │ │ └── main.yml │ │ ├── tasks │ │ │ └── main.yml │ │ └── templates │ │ │ └── template.service.j2 │ │ ├── teamvm_base │ │ ├── files │ │ │ ├── 91-no-redirects.conf │ │ │ ├── 92-dmesg-restrict.conf │ │ │ ├── fuse.conf │ │ │ └── teamhosts │ │ └── tasks │ │ │ ├── install_team_utils.yml │ │ │ ├── main.yml │ │ │ ├── setup_append_only.yml │ │ │ └── setup_proc_hiding.yml │ │ └── teamvm_primed │ │ ├── tasks │ │ └── main.yml │ │ └── templates │ │ ├── docker-compose.yml.j2 │ │ └── motd.j2 └── start.sh └── test_service ├── .gitignore └── simplecalc ├── Makefile ├── README.md ├── docker-compose.yml ├── info.yaml ├── scripts ├── Dockerfile ├── benign ├── exploit ├── getflag └── setflag ├── service ├── Dockerfile ├── append │ └── .keep ├── ro │ ├── simplecalc │ └── xinetd.conf └── rw │ └── .keep └── src ├── Makefile ├── simplecalc └── simplecalc.c /TODO.md: -------------------------------------------------------------------------------- 1 | # TODOs 2 | 3 | ## The README is outdated and needs to be extended to explain how to create a competition (including how to link an AWS account) 4 | 5 | ## Get started instructions 6 | 7 | ## Scoreboard documentation 8 | 9 | The documentation of the scoreboard/dashboard need to be updated 10 | 11 | ## Team interface documentation 12 | 13 | The README.md for the team interface need to be updated 14 | 15 | ## DB API 16 | 17 | The team table should include latitude and longitude -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/__init__.py -------------------------------------------------------------------------------- /ares/aws/.gitignore: -------------------------------------------------------------------------------- 1 | ssh_config 2 | ./ssh_config 3 | ictf_game_vars.auto.tfvars.json 4 | result_provision.json 5 | ecr_password 6 | -------------------------------------------------------------------------------- /ares/aws/infrastructure/ami.tf: -------------------------------------------------------------------------------- 1 | data "aws_ami" "ictf_base" { 2 | most_recent = true 3 | 4 | filter { 5 | name = "name" 6 | values = ["ictf_base_18.04"] 7 | } 8 | 9 | owners = ["self"] 10 | } -------------------------------------------------------------------------------- /ares/aws/infrastructure/subnets.tf: -------------------------------------------------------------------------------- 1 | // This module contains the configuration for all the subnets needed by the game 2 | resource "aws_subnet" "war_range_subnet" { 3 | vpc_id = aws_vpc.ictf.id 4 | cidr_block = var.war_zone_subnet_cidr 5 | map_public_ip_on_launch = true 6 | availability_zone = "${var.region}a" 7 | 8 | tags = { 9 | Name = "War_Range_SN" 10 | } 11 | 12 | depends_on = [aws_route.internet_access] 13 | } 14 | 15 | resource "aws_subnet" "master_and_db_range_subnet" { 16 | vpc_id = aws_vpc.ictf.id 17 | cidr_block = var.master_and_db_zone_subnet_cidr 18 | map_public_ip_on_launch = true 19 | availability_zone = "${var.region}a" 20 | 21 | tags = { 22 | Name = "Master_SN" 23 | } 24 | 25 | depends_on = [aws_route.internet_access] 26 | } 27 | -------------------------------------------------------------------------------- /ares/aws/infrastructure/vpc.tf: -------------------------------------------------------------------------------- 1 | provider "aws" { 2 | region = var.region 3 | access_key = var.access_key 4 | secret_key = var.secret_key 5 | } 6 | 7 | resource "aws_vpc" "ictf" { 8 | cidr_block = var.vpc_cdir_block 9 | enable_dns_hostnames = true 10 | enable_dns_support = true 11 | } 12 | 13 | resource "aws_internet_gateway" "ictf" { 14 | vpc_id = aws_vpc.ictf.id 15 | } 16 | 17 | resource "aws_route" "internet_access" { 18 | depends_on = [aws_internet_gateway.ictf] 19 | route_table_id = aws_vpc.ictf.main_route_table_id 20 | destination_cidr_block = "0.0.0.0/0" 21 | gateway_id = aws_internet_gateway.ictf.id 22 | } 23 | -------------------------------------------------------------------------------- /ares/aws/register_services_and_teams.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -x 4 | 5 | DATABASE_IP=$1 6 | GAME_CONFIG_PATH=$2 7 | 8 | python3 ../../database/provisioning/create_teams.py "$DATABASE_IP" "$GAME_CONFIG_PATH" 9 | python3 ../../database/provisioning/create_services.py "$DATABASE_IP" "$GAME_CONFIG_PATH" 10 | -------------------------------------------------------------------------------- /ares/aws/util_scripts/connect_to_scriptbot_for_team.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | NUM_SCRIPTBOTS="27" 6 | SCRIPTBOT_ID=$(python -c "print((($1 - 1) % $NUM_SCRIPTBOTS) + 1)") 7 | echo "Running on scriptbot $SCRIPTBOT_ID" 8 | ssh -o StrictHostKeyChecking=no -F ssh_config "scriptbot$SCRIPTBOT_ID" 9 | -------------------------------------------------------------------------------- /ares/aws/util_scripts/pull_and_restart_scriptbots.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | NUM_SCRIPTBOTS="$1" 5 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 6 | 7 | "$DIR/run_on_scriptbots.sh" "$NUM_SCRIPTBOTS" 'cd /opt/ictf/scriptbot; git pull; sudo service scriptbot restart; sudo service scriptbot status; echo $?' -------------------------------------------------------------------------------- /ares/aws/util_scripts/push_local_service_docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | REGISTRY_ID="$1" 6 | SERVICE_NAME="$2" 7 | 8 | AKEY="$AWS_ACCESS_KEY" 9 | SKEY="$AWS_SECRET_KEY" 10 | REG="$AWS_REGION" 11 | 12 | REGISTRY_ENDPOINT="${REGISTRY_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com" 13 | DOCKER_IMAGE_NAME="${SERVICE_NAME}_scripts" 14 | REPOSITORY_URL="${REGISTRY_ENDPOINT}/${DOCKER_IMAGE_NAME}" 15 | 16 | python populate_docker_registry.py "$AKEY" "$SKEY" "$REG" "$REGISTRY_ID" "$REPOSITORY_URL" "$DOCKER_IMAGE_NAME" -------------------------------------------------------------------------------- /ares/aws/util_scripts/run_on_scriptbots.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | NUM_SCRIPTBOTS="$1" 6 | ((LAST_SCRIPTBOT=NUM_SCRIPTBOTS-1)) 7 | CMD="$2" 8 | 9 | for i in $(seq 0 "$LAST_SCRIPTBOT"); 10 | do 11 | echo "Running on scriptbot $i" 12 | ssh -o StrictHostKeyChecking=no -F ssh_config "scriptbot$i" $CMD 13 | done 14 | -------------------------------------------------------------------------------- /ares/aws/util_scripts/run_on_teamvms.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | NUM_TEAMS="$1" 6 | CMD="$2" 7 | 8 | for i in $(seq 1 "$NUM_TEAMS"); 9 | do 10 | echo "Running on teamvm $i" 11 | ssh -o StrictHostKeyChecking=no -F ssh_config "teamvm$i" $CMD 12 | done 13 | -------------------------------------------------------------------------------- /ares/docker/.gitignore: -------------------------------------------------------------------------------- 1 | docker-compose-local.generated.yml -------------------------------------------------------------------------------- /ares/docker/register_services_and_teams.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | GAME_CONFIG_PATH=$1 4 | 5 | python3 ../../database/provisioning/create_teams.py 127.0.0.1:5000 $GAME_CONFIG_PATH 6 | python3 ../../database/provisioning/create_services.py 127.0.0.1:5000 $GAME_CONFIG_PATH 7 | -------------------------------------------------------------------------------- /ares/install_requirements: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eux 3 | 4 | export VER="0.12.24" 5 | if [ ! -d ~/.local/bin ]; 6 | then 7 | echo "Please create ~/.local/bin and add it to your path!" 8 | exit 1 9 | fi 10 | cd /tmp 11 | wget https://releases.hashicorp.com/terraform/${VER}/terraform_${VER}_linux_amd64.zip 12 | unzip terraform_${VER}_linux_amd64.zip 13 | mv terraform ~/.local/bin 14 | rm terraform_${VER}_linux_amd64.zip 15 | cd - 16 | 17 | source $1/bin/activate && pip install termcolor cmd2 pycryptodome requests pyaml docker jsonschema boto3 jinja2 -------------------------------------------------------------------------------- /aws_vars.example.env: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export AWS_REGION="" 4 | export AWS_ACCESS_KEY="" 5 | export AWS_SECRET_KEY="" 6 | -------------------------------------------------------------------------------- /common/ares_provisioning/ansible-provisioning.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | remote_user: root 3 | become: true 4 | 5 | roles: 6 | - common_provisioning -------------------------------------------------------------------------------- /common/ares_provisioning/roles/common_provisioning/files/deploy_on_ec2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | AWS_REGION="$1" 4 | AWS_REGISTRY_URL="$2" 5 | COMPONENT_NAME="$3" 6 | 7 | aws ecr get-login-password --region "$1" | docker login --username AWS --password-stdin "$AWS_REGISTRY_URL" 8 | docker pull "$AWS_REGISTRY_URL" 9 | docker tag "$AWS_REGISTRY_URL" "ictf_$COMPONENT_NAME" -------------------------------------------------------------------------------- /common/ares_provisioning/roles/common_provisioning/templates/aws_credentials.j2: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id = {{ AWS_ACCESS_KEY }} 3 | aws_secret_access_key = {{ AWS_SECRET_KEY }} -------------------------------------------------------------------------------- /common/ares_provisioning/roles/common_provisioning/vars/main.yml: -------------------------------------------------------------------------------- 1 | AWS_REGISTRY_URL: "{{ AWS_REGISTRY_URL | regex_replace('/.*', '') }}" 2 | USER_HOME_DIRECTORY: /home/ubuntu 3 | USER: ubuntu -------------------------------------------------------------------------------- /database/api/flaskext/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/database/api/flaskext/__init__.py -------------------------------------------------------------------------------- /database/api/scored_events.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | from . import app, mysql 4 | from .utils import requires_auth 5 | from .db_helpers import get_scored_events, get_full_service_status_report, get_attack_report 6 | 7 | 8 | @app.route("/scored_events/") 9 | @requires_auth 10 | def endpoint_scored_events(tick): 11 | scored_events = get_scored_events(tick) 12 | return json.dumps(scored_events) 13 | 14 | 15 | @app.route("/scored_events/service_status_report/") 16 | @requires_auth 17 | def endpoint_service_status_report(tick): 18 | cursor = mysql.cursor() 19 | 20 | report = get_full_service_status_report(cursor, tick) 21 | return json.dumps(report) 22 | 23 | 24 | @app.route("/scored_events/attack_report/") 25 | @requires_auth 26 | def endpoint_attack_report(tick): 27 | cursor = mysql.cursor() 28 | 29 | report = get_attack_report(cursor, tick) 30 | return json.dumps(report) 31 | -------------------------------------------------------------------------------- /database/provisioning/ares_provisioning/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | 5 | ictf_database: 6 | image: ictf_database 7 | sysctls: 8 | - net.core.somaxconn=65535 9 | ports: 10 | - "80:80" 11 | - "9100:9100" 12 | environment: 13 | - LOGSTASH_ID=database 14 | -------------------------------------------------------------------------------- /database/provisioning/hephaestus_provisioning/files/aws_config.yml.j2: -------------------------------------------------------------------------------- 1 | region: {{AWS_REGION}} 2 | access_key: {{AWS_ACCESS_KEY}} 3 | secret_key: {{AWS_SECRET_KEY}} 4 | bucket_name: {{AWS_BUCKET_NAME}} -------------------------------------------------------------------------------- /database/provisioning/hephaestus_provisioning/files/logstash.conf: -------------------------------------------------------------------------------- 1 | input { 2 | file { 3 | path => "/var/log/ictf-database-api.log" 4 | } 5 | } 6 | 7 | filter { 8 | mutate { 9 | gsub => ["message", "\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", ""] # Remove ANSI colors 10 | add_field => { "logstash_host" => "${LOGSTASH_ID}" } 11 | } 12 | # Avoid duplicates in ES. 13 | fingerprint { 14 | source => ["message"] 15 | target => "fingerprint" 16 | key => "78787878" 17 | method => "SHA1" 18 | concatenate_sources => true 19 | } 20 | } 21 | 22 | output { 23 | elasticsearch { 24 | hosts => ["logger.ictf:9200"] 25 | index => "ictf-database-api" 26 | document_id => "%{fingerprint}" 27 | } 28 | } 29 | 30 | output { 31 | stdout {} 32 | } -------------------------------------------------------------------------------- /database/provisioning/hephaestus_provisioning/files/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name 0.0.0.0; 4 | 5 | location / { 6 | uwsgi_pass unix:///tmp/uwsgi-ictf-database-api.sock; 7 | include uwsgi_params; 8 | client_max_body_size 50M; 9 | uwsgi_read_timeout 60; 10 | } 11 | } 12 | 13 | server { 14 | listen 8888; 15 | server_name 127.0.0.1; 16 | 17 | location /status { 18 | stub_status on; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /database/provisioning/wait_rest_api.py: -------------------------------------------------------------------------------- 1 | 2 | import requests 3 | import sys 4 | import time 5 | 6 | ''' 7 | Waiting for the database REST api to show up! 8 | ''' 9 | if __name__== "__main__": 10 | database_api_ip = sys.argv[1] # ip of database passed from terraform script 11 | while True: 12 | try: 13 | ping_url = "http://" + database_api_ip + "/game/ping" 14 | result = requests.get(ping_url) 15 | if result.status_code is requests.status_codes.codes.OK: 16 | break 17 | else: 18 | time.sleep(10) 19 | except requests.exceptions.ConnectionError: 20 | time.sleep(10) 21 | continue 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /database/requirements.txt: -------------------------------------------------------------------------------- 1 | #flask 2 | #uwsgi 3 | #boto3 4 | #pyyaml 5 | pyOpenSSL 6 | ndg-httpsclient 7 | pyasn1 8 | setuptools-rust 9 | wheel 10 | Flask==0.12.2 11 | uWSGI==2.0.15 12 | PyYAML==3.12 13 | boto3==1.4.8 14 | mysql-connector-python 15 | cache 16 | coloredlogs 17 | -e /opt/ictf/scoring_ictf 18 | -------------------------------------------------------------------------------- /database/services/ictf-db-export-s3.conf: -------------------------------------------------------------------------------- 1 | description "iCTF tcpdump Service" 2 | 3 | # When to start the service 4 | start on runlevel [2345] and started nginx 5 | 6 | # When to stop the service 7 | stop on runlevel [016] 8 | 9 | # Automatically restart process if crashed 10 | respawn 11 | respawn limit unlimited 12 | 13 | console log 14 | 15 | #setuid gamemaster 16 | 17 | chdir /opt/ictf/database 18 | 19 | # Start the process 20 | exec /opt/ictf/venv/database/bin/python ictf-db-export-s3.py 21 | -------------------------------------------------------------------------------- /database/settings.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding:utf-8 -*- 3 | 4 | """These are the default settings for the central database API server. 5 | 6 | You should not edit this file. You should edit /ictf/settings.py instead. 7 | """ 8 | 9 | # General 10 | DEBUG = True 11 | LISTEN = "0.0.0.0" 12 | API_SECRET = "lol" 13 | 14 | # MySQL 15 | MYSQL_DATABASE_USER = "ictf" 16 | MYSQL_DATABASE_PASSWORD = "" 17 | MYSQL_DATABASE_DB = "ictf" 18 | MYSQL_DATABASE_UNIX_SOCKET = "/var/run/mysqld/mysqld.sock" 19 | 20 | # Flag Generation 21 | FLAG_ALPHABET = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" 22 | FLAG_LENGTH = 13 23 | FLAG_PREFIX = "FLG" 24 | FLAG_SUFFIX = "" 25 | 26 | # Submitting Flags 27 | MAX_INCORRECT_FLAGS_PER_TICK = 1000 28 | NUMBER_OF_TICKS_FLAG_VALID = 3 29 | ATTACKUP_HEAD_BUCKET_SIZE = 10 # The top N teams can freely attack each other 30 | 31 | # Database API 32 | USER_PASSWORD_SALT = "YOU SHOULD OVERWRITE THIS" 33 | -------------------------------------------------------------------------------- /database/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | service mysql start 4 | service nginx start 5 | service prometheus-node-exporter start 6 | 7 | # TO FIX, REGISTER AS SERVICE PLZ. 8 | /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/syslog.conf & 9 | 10 | 11 | ICTF_DATABASE_SETTINGS=/opt/ictf/settings/database-api.py /usr/bin/uwsgi -c uwsgi.ini & 12 | 13 | /opt/ictf/venv/database/bin/python ictf-db-export-s3.py 14 | -------------------------------------------------------------------------------- /database/support/mysql-connector-python-2.1.3/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.txt 2 | include LICENSE.txt 3 | include CHANGES.txt 4 | include setup.py 5 | include setupinfo.py 6 | include unittests.py 7 | include MANIFEST.in 8 | 9 | recursive-include examples *.py 10 | recursive-include lib *.py 11 | recursive-include tests *.py *.csv *.pem *.cnf 12 | recursive-include src *.c *.h *.cc 13 | 14 | include docs/README_DOCS.txt 15 | 16 | -------------------------------------------------------------------------------- /database/support/mysql-connector-python-2.1.3/docs/README_DOCS.txt: -------------------------------------------------------------------------------- 1 | The manual of MySQL Connector/Python is available online here: 2 | 3 | http://dev.mysql.com/doc/connector-python/en/index.html 4 | 5 | 6 | It is also available for download in various formats here: 7 | 8 | http://dev.mysql.com/doc/index-connectors.html 9 | 10 | -------------------------------------------------------------------------------- /database/support/mysql-connector-python-2.1.3/examples/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/database/support/mysql-connector-python-2.1.3/examples/__init__.py -------------------------------------------------------------------------------- /database/support/mysql-connector-python-2.1.3/lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/database/support/mysql-connector-python-2.1.3/lib/__init__.py -------------------------------------------------------------------------------- /database/support/mysql-connector-python-2.1.3/lib/mysql/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/database/support/mysql-connector-python-2.1.3/lib/mysql/__init__.py -------------------------------------------------------------------------------- /database/support/mysql-connector-python-2.1.3/lib/mysql/connector/django/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/database/support/mysql-connector-python-2.1.3/lib/mysql/connector/django/__init__.py -------------------------------------------------------------------------------- /database/support/mysql-connector-python-2.1.3/tests/cext/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/database/support/mysql-connector-python-2.1.3/tests/cext/__init__.py -------------------------------------------------------------------------------- /database/support/mysql-connector-python-2.1.3/tests/data/local_data.csv: -------------------------------------------------------------------------------- 1 | 1 c1_1 c2_1 2 | 2 c1_2 c2_2 3 | 3 c1_3 c2_3 4 | 4 c1_4 c2_4 5 | 5 c1_5 c2_5 6 | 6 c1_6 c2_6 -------------------------------------------------------------------------------- /database/support/mysql-connector-python-2.1.3/tests/data/option_files/dup_groups.cnf: -------------------------------------------------------------------------------- 1 | [connector_python] 2 | user=root 3 | password=mypass 4 | database=cpydata 5 | port=10000 6 | 7 | [connector_python] 8 | user=mysql 9 | password=mypass 10 | database=duplicate_data 11 | -------------------------------------------------------------------------------- /database/support/mysql-connector-python-2.1.3/tests/data/option_files/include_files/1.cnf: -------------------------------------------------------------------------------- 1 | [group1] 2 | option1 = 5 3 | option2 = 10 4 | 5 | [group2] 6 | option1 = 10 7 | option2 = 20 8 | 9 | [group3] 10 | option3 = 100 11 | 12 | [mysql] 13 | user = ham -------------------------------------------------------------------------------- /database/support/mysql-connector-python-2.1.3/tests/data/option_files/include_files/2.cnf: -------------------------------------------------------------------------------- 1 | [group1] 2 | option1 = 15 3 | option2 = 20 4 | 5 | [group2] 6 | option1 = 20 7 | option2 = 30 8 | 9 | [group4] 10 | option3 = 200 11 | 12 | [client] 13 | user = spam -------------------------------------------------------------------------------- /database/support/mysql-connector-python-2.1.3/tests/data/option_files/my.cnf: -------------------------------------------------------------------------------- 1 | 2 | [client] 3 | password=12345 4 | port=1000 5 | socket=/var/run/mysqld/mysqld.sock 6 | ssl-ca=dummyCA 7 | ssl-cert=dummyCert 8 | ssl-key=dummyKey 9 | 10 | [mysqld_safe] 11 | socket=/var/run/mysqld/mysqld1.sock 12 | nice=0 13 | 14 | [mysqld] 15 | user=mysql 16 | pid-file=/var/run/mysqld/mysqld.pid 17 | socket=/var/run/mysqld/mysqld2.sock 18 | port=1001 19 | basedir=/usr 20 | datadir=/var/lib/mysql 21 | tmpdir=/tmp 22 | lc-messages-dir=/usr/share/mysql 23 | skip-external-locking 24 | 25 | bind-address=127.0.0.1 26 | 27 | log_error=/var/log/mysql/error.log 28 | 29 | -------------------------------------------------------------------------------- /database/support/mysql-connector-python-2.1.3/tests/data/option_files/pool.cnf: -------------------------------------------------------------------------------- 1 | [pooling] 2 | pool_size = 1 3 | pool_name = my_pool 4 | pool_reset_session = True 5 | 6 | [fabric] 7 | fabric_host = fabric.example.com 8 | fabric_connect_delay = 3 9 | fabric_ssl_ca = /path/to/ssl 10 | fabric_password = foo 11 | 12 | [failover] 13 | failover = ({'port': 3306, 'pool_name': 'failA' }, {'port': 3307, 'pool_name': 'failB' },) 14 | 15 | -------------------------------------------------------------------------------- /database/support/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name 0.0.0.0; 4 | 5 | location / { 6 | uwsgi_pass unix:///tmp/uwsgi-ictf-database-api.sock; 7 | include uwsgi_params; 8 | client_max_body_size 50M; 9 | uwsgi_read_timeout 60; 10 | } 11 | } 12 | 13 | server { 14 | listen 8888; 15 | server_name 127.0.0.1; 16 | 17 | location /status { 18 | stub_status on; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /database/support/service.conf: -------------------------------------------------------------------------------- 1 | description "iCTF database-api service" 2 | 3 | # When to start the service 4 | start on runlevel [2345] and started mysql and started nginx 5 | 6 | # When to stop the service 7 | stop on runlevel [016] 8 | 9 | # Automatically restart process if crashed 10 | respawn 11 | respawn limit unlimited 12 | 13 | console log 14 | 15 | setuid nobody 16 | 17 | chdir /opt/ictf/database/ 18 | 19 | env ICTF_DATABASE_SETTINGS=/opt/ictf/settings/database-api.py 20 | 21 | # Start the process 22 | exec uwsgi -c uwsgi.ini 23 | -------------------------------------------------------------------------------- /database/support/sysctl.conf: -------------------------------------------------------------------------------- 1 | net.core.somaxconn = 65535 2 | net.core.netdev_max_backlog = 65535 3 | fs.file-max = 2097152 4 | -------------------------------------------------------------------------------- /database/test_db.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import subprocess 4 | import requests 5 | import sys 6 | import threading 7 | from time import sleep 8 | from subprocess import Popen 9 | import time 10 | 11 | def getJASONResponse(query, data): 12 | try: 13 | r = requests.post(query, data) 14 | 15 | if r.status_code == 200: 16 | return r.json() 17 | 18 | except Exception as e: 19 | print(e) 20 | 21 | return None 22 | 23 | 24 | def main(): 25 | data = { 26 | 'ctf_key': "FUNSTUFF", 27 | 'root_key': "NOTFUNSTUFF", 28 | 'ip': '172.31.64.22', 29 | 'port': '1337' 30 | } 31 | 32 | url = "http://localhost/team/add/keys/2" 33 | print (getJASONResponse(url, data)) 34 | 35 | 36 | if __name__ == "__main__": 37 | main() 38 | -------------------------------------------------------------------------------- /database/uwsgi.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | # ------------- 3 | # Settings: 4 | # key = value 5 | # Comments >> # 6 | # ------------- 7 | logto = /var/log/ictf-database-api.log 8 | 9 | socket = /tmp/uwsgi-ictf-database-api.sock 10 | chmod-socket = 777 11 | 12 | # Base application directory 13 | virtualenv = /opt/ictf/venv/database/ 14 | chdir = /opt/ictf/database 15 | 16 | # WSGI module and callable 17 | plugin = python3 18 | module = api:app 19 | 20 | # master = [master process (true of false)] 21 | master = true 22 | 23 | # processes = [number of processes] 24 | processes = 10 25 | listen = 65535 26 | max-requests = 655350 27 | 28 | # Log to logstash! 29 | #logto = localhost:1717 30 | thread-logger = True 31 | logformat = database_api %(ltime) %(method) %(uri) %(proto) returning with status %(status) 32 | -------------------------------------------------------------------------------- /database/wsgi.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from api import app 5 | 6 | if __name__ == "__main__": 7 | app.run(port=5001,debug=True) 8 | 9 | -------------------------------------------------------------------------------- /dispatcher/provisioning/ares_provisioning/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | 5 | ictf_dispatcher: 6 | image: ictf_dispatcher 7 | sysctls: 8 | - net.core.somaxconn=65535 9 | ports: 10 | - "5672:5672" 11 | - "15672:15672" 12 | environment: 13 | - RABBIT_USERNAME=dummy 14 | - RABBIT_PASSWORD=dummy 15 | 16 | -------------------------------------------------------------------------------- /dispatcher/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Create Rabbitmq user and delete default Guest user 4 | ( rabbitmqctl wait --timeout 60 $RABBITMQ_PID_FILE ; \ 5 | rabbitmqctl add_user $RABBIT_USERNAME $RABBIT_PASSWORD 2>/dev/null ; \ 6 | rabbitmqctl set_user_tags $RABBIT_USERNAME administrator ; \ 7 | rabbitmqctl set_permissions -p / $RABBIT_USERNAME ".*" ".*" ".*" ; \ 8 | rabbitmqctl delete_user guest ; \ 9 | echo "*** User '$RABBIT_USERNAME' with password '$RABBIT_PASSWORD' completed. ***" ; \ 10 | echo "*** User guest deleted. ***" ; \ 11 | echo "*** Log into the WebUI at port 15672 (example: http://localhost:15672) ***") & 12 | 13 | # $@ is used to pass arguments to the rabbitmq-server command. 14 | # For example if you use it like this: docker run -d rabbitmq arg1 arg2, 15 | # it will be as you run in the container rabbitmq-server arg1 arg2 16 | rabbitmq-server $@ 17 | -------------------------------------------------------------------------------- /gamebot/README.md: -------------------------------------------------------------------------------- 1 | # The Gamebot 2 | 3 | The gamebot is responsible for advancing the game. 4 | 5 | The gamebot is responsible for two tasks: 6 | 7 | 1) Determine which scripts need to be run during the current tick. 8 | 9 | 2) Process the data associated with the previous tick and update the scores of the teams. -------------------------------------------------------------------------------- /gamebot/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/gamebot/__init__.py -------------------------------------------------------------------------------- /gamebot/provisioning/ares_provisioning/ansible-provisioning.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | remote_user: root 3 | become: true 4 | 5 | tasks: 6 | 7 | - name: template docker-compose 8 | template: 9 | src: ./files/docker-compose.yml.j2 10 | dest: ~/docker-compose.yml 11 | become_user: "{{ USER }}" -------------------------------------------------------------------------------- /gamebot/provisioning/ares_provisioning/files/docker-compose.yml.j2: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | 5 | ictf_gamebot: 6 | image: ictf_gamebot 7 | sysctls: 8 | - net.core.somaxconn=65535 9 | environment: 10 | - LOGSTASH_ID=gamebot 11 | - RABBIT_ENDPOINT={{ DISPATCHER_IP }} 12 | - RABBIT_USERNAME=dummy 13 | - RABBIT_PASSWORD=dummy 14 | - NUM_SCRIPTBOTS={{ NUM_SCRIPTBOTS }} 15 | ports: 16 | - "9100:9100" 17 | -------------------------------------------------------------------------------- /gamebot/provisioning/hephaestus_provisioning/ansible-provisioning.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | remote_user: root 3 | become: true 4 | 5 | vars: 6 | - ICTF_API_SECRET: "{{ lookup('file', '/opt/ictf/secrets/database-api/secret') }}" 7 | 8 | tasks: 9 | 10 | - name: ictf-database database connection settings.py configuration - set ICTF_API_ADDRESS 11 | replace: 12 | name=/opt/ictf/gamebot/settings.py 13 | regexp="(THE_API_ADDRESS_GOES_HERE)" 14 | replace="{{ ICTF_API_ADDRESS }}" 15 | 16 | - name: ictf-database database connection config.json configuration - set API_SECRET 17 | replace: 18 | name=/opt/ictf/gamebot/settings.py 19 | regexp="(THESECRETPASSPHRASEGOESHERE)" 20 | replace="{{ ICTF_API_SECRET }}" 21 | 22 | - name: logstash - config 23 | copy: 24 | src=./files/logstash.conf 25 | dest=/etc/logstash/conf.d/syslog.conf 26 | owner=root group=root mode="u=rw,g=r,o=r" -------------------------------------------------------------------------------- /gamebot/provisioning/hephaestus_provisioning/files/logstash.conf: -------------------------------------------------------------------------------- 1 | input { 2 | tcp { 3 | port => 1717 4 | } 5 | } 6 | 7 | filter { 8 | mutate { 9 | gsub => ["message", "\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", ""] 10 | add_field => { "logstash_host" => "${LOGSTASH_ID}" } 11 | } 12 | json { 13 | source => "message" 14 | } 15 | # Avoid duplicates in ES. 16 | fingerprint { 17 | source => ["message"] 18 | target => "fingerprint" 19 | key => "78787878" 20 | method => "SHA1" 21 | concatenate_sources => true 22 | } 23 | } 24 | 25 | output { 26 | elasticsearch { 27 | hosts => ["logger.ictf:9200"] 28 | index => "ictf-gamebot" 29 | document_id => "%{fingerprint}" 30 | } 31 | } -------------------------------------------------------------------------------- /gamebot/requirements.txt: -------------------------------------------------------------------------------- 1 | wheel 2 | coloredlogs==7.3.1 3 | requests==2.18.4 4 | setuptools==44.0.0 5 | python-logstash 6 | pika 7 | -------------------------------------------------------------------------------- /gamebot/settings.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | # Logstash settings 4 | LOGSTASH_PORT = 1717 5 | LOGSTASH_IP = "localhost" 6 | 7 | # DB settings 8 | DB_HOST = 'THE_API_ADDRESS_GOES_HERE' 9 | DB_SECRET = 'THESECRETPASSPHRASEGOESHERE' 10 | 11 | # RabbitMQ settings 12 | RABBIT_USERNAME = os.environ['RABBIT_USERNAME'] 13 | RABBIT_PASSWORD = os.environ['RABBIT_PASSWORD'] 14 | RABBIT_ENDPOINT = os.environ['RABBIT_ENDPOINT'] 15 | 16 | # For scriptbot task division 17 | SCRIPTBOT_INSTANCES = int(os.environ['NUM_SCRIPTBOTS']) 18 | -------------------------------------------------------------------------------- /gamebot/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | service prometheus-node-exporter start 4 | 5 | /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/syslog.conf & 6 | python3 gamebot.py 7 | -------------------------------------------------------------------------------- /gamebot/support/init/ictf-gamebot.conf: -------------------------------------------------------------------------------- 1 | description "iCTF gamebot service" 2 | 3 | # Stanzas 4 | # 5 | # Stanzas control when and how a process is started and stopped 6 | # See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn 7 | 8 | # When to start the service 9 | start on runlevel [2345] and started mysql 10 | 11 | # When to stop the service 12 | stop on runlevel [016] 13 | 14 | # Automatically restart process if crashed 15 | respawn 16 | respawn limit unlimited 17 | 18 | console log 19 | 20 | setuid nobody 21 | 22 | chdir /ictf/ 23 | 24 | env CTF_SETTINGS=/ictf/settings.py 25 | 26 | # Start the process 27 | exec /ictf/venvs/database/bin/python -m database.gamebot 28 | -------------------------------------------------------------------------------- /gamebot/utils.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | __author__ = 'machiry' 3 | 4 | 5 | def flatten_list(nested_list): 6 | """ 7 | Given a list of lists, it flattens it to a single list. 8 | :param nested_list: list of lists 9 | :return: Single list containing flattened list. 10 | """ 11 | return [item for sub_list in nested_list for item in sub_list] 12 | -------------------------------------------------------------------------------- /hephaestus/aws/build_ictf_base.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | packer validate ./ictf_base/packer.json 4 | packer build --force ./ictf_base/packer.json 5 | -------------------------------------------------------------------------------- /hephaestus/aws/build_ictf_bastion.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | packer validate ./ictf_bastion/packer.json 4 | packer build --force ./ictf_bastion/packer.json 5 | -------------------------------------------------------------------------------- /hephaestus/aws/build_infra.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | printf "Building ictf_base...\n" 4 | ./build_ictf_base.sh 5 | 6 | printf "\n\nBuilding teamvm base...\n" 7 | ./build_teamvm_base.sh 8 | 9 | printf "\n\nBuilding teamvm primer...\n" 10 | ./build_teamvm_primer.sh 11 | 12 | printf "\n\nBuilding ictf bastion...\n" 13 | ./build_ictf_bastion.sh -------------------------------------------------------------------------------- /hephaestus/aws/build_teamvm_base.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | packer validate ./0_teamvm_base/packer.json 4 | packer build --force ./0_teamvm_base/packer.json 5 | -------------------------------------------------------------------------------- /hephaestus/aws/build_teamvm_primer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | packer validate ./1_teamvm_primer/packer.json 4 | packer build --force ./1_teamvm_primer/packer.json 5 | -------------------------------------------------------------------------------- /hephaestus/aws/install_ansible.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | # Install Ansible repository. 4 | # The line above will cause the process to get stuck during the updating of grub 5 | # See: https://github.com/chef/bento/issues/661#issuecomment-248136601 6 | DEBIAN_FRONTEND=noninteractive sudo apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade 7 | sudo apt-get -y install software-properties-common 8 | sudo apt-add-repository ppa:ansible/ansible 9 | 10 | # Install Ansible. 11 | sudo apt-get -y update 12 | sudo apt-get -y install ansible 13 | -------------------------------------------------------------------------------- /hephaestus/docker/0_ictf_base/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | RUN DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade && \ 4 | apt-get update -y && \ 5 | apt-get -y install software-properties-common && \ 6 | apt-add-repository ppa:ansible/ansible && \ 7 | apt-get -y update && apt-get -y install ansible net-tools iputils-ping 8 | 9 | RUN apt-get -y install --only-upgrade python3 python3.8 10 | # RUN update-alternatives --set python3 /usr/bin/python3.8 11 | 12 | COPY ./secrets /opt/ictf/secrets 13 | COPY ./ictf-base/provisioning/ansible-provisioning.yml /root 14 | COPY ./ictf-base/provisioning/requirements-ansible-roles.yml /tmp 15 | 16 | RUN ansible-playbook /root/ansible-provisioning.yml 17 | -------------------------------------------------------------------------------- /hephaestus/docker/1_database/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ictf_base 2 | 3 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y nginx uwsgi uwsgi-plugin-python3 mysql-server python3-pip python3-virtualenv python3-mysqldb python3-dev python3-setuptools python3-wheel cron daemon 4 | RUN pip install --upgrade pip 5 | 6 | COPY ./database /opt/ictf/database 7 | COPY ./scoring_ictf /opt/ictf/scoring_ictf 8 | 9 | WORKDIR /opt/ictf/database 10 | 11 | RUN chmod +x ./start.sh && ansible-playbook ./provisioning/hephaestus_provisioning/ansible-provisioning.yml 12 | 13 | ENTRYPOINT ./start.sh 14 | -------------------------------------------------------------------------------- /hephaestus/docker/1_dispatcher/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM rabbitmq:management 2 | 3 | ENV RABBITMQ_PID_FILE /var/lib/rabbitmq/mnesia/rabbitmq 4 | 5 | COPY ./dispatcher /opt/ictf/dispatcher 6 | 7 | WORKDIR /opt/ictf/dispatcher 8 | 9 | RUN chmod +x ./start.sh 10 | 11 | ENTRYPOINT ./start.sh 12 | -------------------------------------------------------------------------------- /hephaestus/docker/1_gamebot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ictf_base 2 | 3 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3-pip python3-wheel 4 | 5 | COPY ./gamebot /opt/ictf/gamebot 6 | 7 | WORKDIR /opt/ictf/gamebot 8 | 9 | RUN pip install -r requirements.txt 10 | 11 | RUN chmod +x ./start.sh 12 | 13 | RUN ansible-playbook ./provisioning/hephaestus_provisioning/ansible-provisioning.yml --extra-vars ICTF_API_ADDRESS="database.ictf" 14 | 15 | ENTRYPOINT ./start.sh 16 | -------------------------------------------------------------------------------- /hephaestus/docker/1_logger/Dockerfile: -------------------------------------------------------------------------------- 1 | 2 | FROM ubuntu:18.04 3 | 4 | RUN DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade && \ 5 | apt-get update -y && \ 6 | apt-get -y install software-properties-common && \ 7 | apt-add-repository ppa:ansible/ansible && \ 8 | apt-get -y update && apt -y install ansible git wget curl vim iputils-ping python-pip python-dev python3-dev build-essential htop 9 | 10 | COPY ./secrets /opt/ictf/secrets 11 | COPY ./logger /opt/ictf/logger 12 | 13 | WORKDIR /opt/ictf/logger 14 | 15 | #RUN pip install --upgrade pip && pip install -r requirements2.txt 16 | 17 | RUN ansible-playbook provisioning/hephaestus_provisioning/ansible-provisioning.yml --become --extra-vars ICTF_USER="root" --extra-vars ICTF_FRAMEWORK_DIR_HOST="/opt/ictf" 18 | 19 | RUN chmod +x ./start.sh 20 | 21 | ENTRYPOINT ./start.sh -------------------------------------------------------------------------------- /hephaestus/docker/1_router/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ictf_base 2 | 3 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends iptraf python3 python3-pip python3-dev build-essential awscli iptables-persistent iftop libcurl4-openssl-dev libssl-dev python3-apt zip unzip openvpn python3-setuptools python3-wheel 4 | 5 | COPY ./router /opt/ictf/router 6 | 7 | WORKDIR /opt/ictf/router 8 | 9 | RUN pip install -r requirements3.txt 10 | 11 | RUN ansible-playbook provisioning/hephaestus_provisioning/ansible-provisioning.yml --become 12 | 13 | RUN chmod +x ./start.sh 14 | 15 | ENTRYPOINT ./start.sh 16 | -------------------------------------------------------------------------------- /hephaestus/docker/1_scoreboard/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ictf_base 2 | 3 | ENV DEBIAN_FRONTEND=noninteractive 4 | RUN apt-get update && apt-get install -y nginx git redis-server build-essential 5 | RUN apt-get update && apt-get install -y sudo uwsgi daemon 6 | 7 | RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - 8 | RUN apt-get update && apt-get install -y nodejs 9 | RUN apt-get update && apt-get install -y python3-pip python3-virtualenv python3-dev uwsgi-plugin-python3 python3-setuptools python3-wheel 10 | #RUN pip install --upgrade pip 11 | #RUN pip --version 12 | 13 | COPY ./scoreboard /opt/ictf/scoreboard 14 | 15 | WORKDIR /opt/ictf/scoreboard 16 | 17 | RUN pip install -r requirements.txt 18 | 19 | RUN ansible-playbook provisioning/hephaestus_provisioning/ansible-provisioning.yml --become --extra-vars ICTF_USER="root" --extra-vars ICTF_FRAMEWORK_DIR_HOST="/opt/ictf" --extra-vars ICTF_API_ADDRESS="database.ictf" 20 | 21 | RUN chmod +x ./start.sh 22 | 23 | ENTRYPOINT ./start.sh 24 | -------------------------------------------------------------------------------- /hephaestus/docker/1_scriptbot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ictf_base 2 | 3 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip python3-virtualenv python3 python3-dev git libssl-dev libffi-dev build-essential libc6-dev-i386 4 | 5 | COPY ./scriptbot /opt/ictf/scriptbot 6 | 7 | WORKDIR /opt/ictf/scriptbot 8 | 9 | COPY ./common/hephaestus_provisioning/teamhosts ./teamhosts 10 | 11 | RUN pip3 install -r requirements.txt 12 | 13 | RUN ansible-playbook provisioning/hephaestus_provisioning/ansible-provisioning.yml 14 | 15 | RUN chmod +x ./start.sh && chmod +x ./start_idle_mode.sh 16 | 17 | ENTRYPOINT ./start.sh 18 | -------------------------------------------------------------------------------- /hephaestus/docker/1_teaminterface/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ictf_base 2 | 3 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y nginx python3-pip python3-virtualenv python3-dev libjpeg8 libjpeg-dev zlib1g zlib1g-dev libpng-dev libmemcached-dev libmemcached-tools libgeoip1 libgeoip-dev geoip-bin geoip-database redis-server 4 | 5 | COPY ./teaminterface /opt/ictf/teaminterface 6 | 7 | WORKDIR /opt/ictf/teaminterface 8 | 9 | RUN pip install -r requirements.txt 10 | 11 | RUN ansible-playbook provisioning/hephaestus_provisioning/ansible-provisioning.yml --become --extra-vars ICTF_DB_API_ADDRESS="database.ictf" 12 | 13 | RUN chmod +x ./start.sh 14 | 15 | ENTRYPOINT ./start.sh 16 | -------------------------------------------------------------------------------- /hephaestus/docker/build_infra.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo 3 | 4 | docker-compose -f ./docker-compose-base.yml build $@ 5 | docker-compose -f ./docker-compose-infra.yml build --parallel $@ 6 | ./build_teamvm.py ../../game_config.json 7 | -------------------------------------------------------------------------------- /hephaestus/docker/docker-compose-base.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | 5 | ictf_base: 6 | image: ictf_base 7 | build: 8 | dockerfile: ./hephaestus/docker/0_ictf_base/Dockerfile 9 | context: ../../ -------------------------------------------------------------------------------- /hephaestus/docker/docker-compose-teamvm.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | 5 | ictf_teamvm: 6 | image: ictf_teamvm 7 | hostname: teamvm 8 | build: 9 | dockerfile: ./hephaestus/docker/teamvm/Dockerfile 10 | context: ../../ 11 | entrypoint: /bin/bash 12 | volumes: 13 | - type: bind 14 | source: /var/run/docker.sock 15 | target: /var/run/docker.sock 16 | -------------------------------------------------------------------------------- /hephaestus/virtualbox/.gitignore: -------------------------------------------------------------------------------- 1 | build/* 2 | !build/.keep 3 | -------------------------------------------------------------------------------- /hephaestus/virtualbox/build/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/hephaestus/virtualbox/build/.keep -------------------------------------------------------------------------------- /hephaestus/virtualbox/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | # Add vagrant user to sudoers. 4 | echo "ubuntu ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers 5 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 6 | 7 | # Disable daily apt unattended updates. 8 | echo 'APT::Periodic::Enable "0";' >> /etc/apt/apt.conf.d/10periodic -------------------------------------------------------------------------------- /ictf-base/provisioning/requirements-ansible-roles.yml: -------------------------------------------------------------------------------- 1 | - src: tumf.systemd-service -------------------------------------------------------------------------------- /install_all_requirements: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eux 4 | FW_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | VENV_NAME=$1 6 | 7 | for f in $FW_DIR/*/install_requirements; do 8 | $f $VENV_NAME 9 | done 10 | -------------------------------------------------------------------------------- /logger/provisioning/ares_provisioning/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | 5 | ictf_logger: 6 | image: ictf_logger 7 | sysctls: 8 | - net.core.somaxconn=65535 9 | ports: 10 | - "3000:3000" 11 | - "5601:5601" 12 | - "9000-9999:9000-9999" 13 | environment: 14 | - LOGSTASH_ID=logger -------------------------------------------------------------------------------- /logger/provisioning/hephaestus_provisioning/files/grafana_dashboards.yml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | - name: 'dafault' 5 | orgId: 1 6 | folder: '' 7 | folderUid: '' 8 | type: file 9 | disableDeletion: false 10 | editable: true 11 | updateIntervalSeconds: 30 12 | allowUiUpdates: true 13 | options: 14 | path: /var/lib/grafana/dashboards 15 | -------------------------------------------------------------------------------- /logger/provisioning/hephaestus_provisioning/files/prometheus_datasource.yml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | datasources: 4 | - name: Prometheus 5 | type: prometheus 6 | url: http://logger.ictf:9090 7 | isDefault: true 8 | editable: true 9 | -------------------------------------------------------------------------------- /logger/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | update-rc.d elasticsearch defaults 95 10 4 | 5 | service elasticsearch start 6 | service grafana-server start 7 | service prometheus start 8 | 9 | /usr/share/kibana/bin/kibana --allow-root 10 | -------------------------------------------------------------------------------- /make_secrets.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function gen_pass() 4 | { 5 | cat /dev/urandom | base64 | head -c $1 | sed 's/[+/]/_/g' 6 | } 7 | 8 | mkdir -p secrets/database-api 9 | echo '172.31.64.13:80' > secrets/api_address 10 | gen_pass 25 > secrets/database-api/mysql 11 | gen_pass 25 > secrets/database-api/salt 12 | gen_pass 25 > secrets/database-api/secret 13 | gen_pass 500 > secrets/teamvm_ova_key 14 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # Created by running: 2 | # for x in `ls **/req*.txt`; do echo "-r $x" >> requirements.txt; done 3 | -r arse_bak/requirements.txt 4 | -r database/requirements.txt 5 | -r gamebot/requirements.txt 6 | -r game_master/requirements2.txt 7 | -r game_master/requirements.txt 8 | -r gm/requirements.txt 9 | -r scoreboard/requirements.txt 10 | -r scriptbot/requirements.txt 11 | -r service_tester/reqs.txt 12 | -r teaminterface/requirements.txt 13 | -------------------------------------------------------------------------------- /router/README.md: -------------------------------------------------------------------------------- 1 | # Router 2 | 3 | The documentation for the different components of the router can be found in their respective directories. 4 | 5 | More precisely: 6 | 7 | - game/README.md: contains the documentation of the central routing host 8 | 9 | - teams/README.md: contains the documentation of the routing host of each team -------------------------------------------------------------------------------- /router/doc/vulnbox.txt: -------------------------------------------------------------------------------- 1 | /etc/network/interfaces 2 | 3 | auto eth0 4 | iface eth0 inet static 5 | address 10.7.YOUR_TEAM_ID.2 6 | netmask 255.255.255.255 7 | up route add 10.7.0.1 dev eth0 8 | up route add default gw 10.7.0.1 9 | -------------------------------------------------------------------------------- /router/game/concentrator_tgz_tpl/ictf-in-a-box.conf: -------------------------------------------------------------------------------- 1 | port 1194 2 | proto udp 3 | dev tun0 4 | 5 | ca /etc/openvpn/ictf-in-a-box/keys/ca.crt 6 | cert /etc/openvpn/ictf-in-a-box/keys/server.crt 7 | key /etc/openvpn/ictf-in-a-box/keys/server.key 8 | dh /etc/openvpn/ictf-in-a-box/keys/dh2048.pem 9 | client-config-dir /etc/openvpn/ictf-in-a-box/ccd/ 10 | 11 | keepalive 10 120 12 | persist-key 13 | persist-tun 14 | 15 | status /etc/openvpn/ictf-in-a-box/openvpn.log 16 | 17 | verb 3 18 | 19 | server 10.7.0.0 255.255.0.0 20 | -------------------------------------------------------------------------------- /router/game/concentrator_tgz_tpl/ictf-in-a-box/ccd/team.tpl: -------------------------------------------------------------------------------- 1 | ifconfig-push 10.7.${TEAMID}.1 10.7.${TEAMID}.254 2 | iroute 10.7.${TEAMID}.0 255.255.255.0 3 | push "route 10.7.0.0 255.255.0.0" 4 | -------------------------------------------------------------------------------- /router/game/concentrator_tgz_tpl/ictf-in-a-box/keys/ca.crt.placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/router/game/concentrator_tgz_tpl/ictf-in-a-box/keys/ca.crt.placeholder -------------------------------------------------------------------------------- /router/game/concentrator_tgz_tpl/ictf-in-a-box/keys/server.crt.placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/router/game/concentrator_tgz_tpl/ictf-in-a-box/keys/server.crt.placeholder -------------------------------------------------------------------------------- /router/game/concentrator_tgz_tpl/ictf-in-a-box/keys/server.key.placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/router/game/concentrator_tgz_tpl/ictf-in-a-box/keys/server.key.placeholder -------------------------------------------------------------------------------- /router/game/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script setups the VPN concentrator VM to route traffic to the vulnerable 4 | # boxes. 5 | 6 | apt-get -y install openvpn 7 | 8 | tar -xf concentrator.tgz -C /etc/openvpn/ 9 | 10 | service openvpn restart ictf-in-a-box 11 | 12 | source $(dirname $0)/start.sh 13 | -------------------------------------------------------------------------------- /router/game/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # This script starts up forwarding and does some randomization on traffic. 5 | # 6 | 7 | echo "Enabling IPv4 forwarding" 8 | sysctl -w net.ipv4.ip_forward=1 9 | 10 | for ${TEAM} in ${TEAMS}; do 11 | route add 10.7.${TEAM}.2 dev eth1 12 | iptables -t nat -A POSTROUTING -d 10.7.${TEAM}.0/24 -j SNAT --to-source 10.7.253.1-10.7.253.255 13 | done 14 | -------------------------------------------------------------------------------- /router/iptables_log_parse.py: -------------------------------------------------------------------------------- 1 | import subprocess as sub 2 | from sys import argv 3 | import re 4 | 5 | 6 | if len(argv) != 2: 7 | print "Please enter a time as argv[1]" 8 | exit() 9 | 10 | output = open('/var/log/kern.log', 'r').read()#.split('\n') 11 | regex = "(Mar [1-9]+\s[0-9]+:[0-9]+:[0-9]+).*Connection Limit Reached.*SRC=([0-9]*.[0-9]*.[0-9]*.[0-9]*) DST=([0-9]*.[0-9]*.[0-9]*.[0-9]*).*SPT=([0-9]*) DPT=([0-9]*)" 12 | delta = int(argv[1]) 13 | time_regex = "Mar [0-9]+ [0-9]+:([0-9]+):" 14 | sus_conns = re.findall(regex, output) 15 | init_time = int(re.match(time_regex, sus_conns[-1][0]).group(1)) 16 | 17 | target = init_time - delta if init_time - delta > 0 else init_time - delta + 60 18 | 19 | 20 | for grp in reversed(sus_conns): 21 | minutes = int(re.match(time_regex, grp[0]).group(1)) 22 | if minutes == target: 23 | break 24 | print grp 25 | 26 | -------------------------------------------------------------------------------- /router/pcap-gz.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | gzip -S ".tmp" "$1" 3 | mv "$1.tmp" "$1.gz" 4 | -------------------------------------------------------------------------------- /router/pcap-mv.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Not an actual GZ file: 4 | mv "$1" "$1.gz" 5 | -------------------------------------------------------------------------------- /router/provisioning/ares_provisioning/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | 5 | ictf_router: 6 | image: ictf_router 7 | privileged: true 8 | sysctls: 9 | - net.core.somaxconn=65535 10 | environment: 11 | - LOGSTASH_ID=router 12 | volumes: 13 | - /home/ubuntu/openvpn.zip:/etc/openvpn/openvpn.zip 14 | network_mode: host 15 | -------------------------------------------------------------------------------- /router/provisioning/aws_config.yml.j2: -------------------------------------------------------------------------------- 1 | region: {{AWS_REGION}} 2 | access_key: {{AWS_ACCESS_KEY}} 3 | secret_key: {{AWS_SECRET_KEY}} 4 | bucket_name: {{AWS_BUCKET_NAME}} -------------------------------------------------------------------------------- /router/provisioning/hephaestus_provisioning/files/aws_config.yml.j2: -------------------------------------------------------------------------------- 1 | region: {{AWS_REGION}} 2 | access_key: {{AWS_ACCESS_KEY}} 3 | secret_key: {{AWS_SECRET_KEY}} 4 | bucket_name: {{AWS_BUCKET_NAME}} -------------------------------------------------------------------------------- /router/provisioning/hephaestus_provisioning/files/logstash.conf: -------------------------------------------------------------------------------- 1 | input { 2 | tcp { 3 | port => 1717 4 | } 5 | } 6 | 7 | filter { 8 | mutate { 9 | gsub => ["message", "\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", ""] # Remove ANSI colors 10 | } 11 | json { 12 | source => "message" 13 | } 14 | } 15 | 16 | output { 17 | elasticsearch { 18 | hosts => ["logger.ictf:9200"] 19 | index => "ictf-router" 20 | } 21 | } -------------------------------------------------------------------------------- /router/requirements2.txt: -------------------------------------------------------------------------------- 1 | setuptools-rust 2 | cryptography==3.2 3 | wheel 4 | requests 5 | awscli 6 | boto3 7 | coloredlogs 8 | ipaddress 9 | python-vagrant 10 | PyYAML 11 | requests 12 | ansible 13 | appdirs 14 | botocore 15 | chardet 16 | Cheetah 17 | colorama 18 | configobj 19 | decorator==4.4.2 20 | docutils 21 | futures 22 | Glances 23 | html5lib 24 | httplib2 25 | humanfriendly 26 | Jinja2 27 | jmespath 28 | jsonpatch 29 | jsonpointer 30 | Markdown==1.7 31 | MarkupSafe 32 | monotonic 33 | oauth 34 | packaging 35 | PAM 36 | paramiko 37 | pexpect 38 | prettytable==1.0.1 39 | psutil 40 | pyasn1 41 | pycrypto 42 | pycurl 43 | pyparsing 44 | pyserial 45 | pyOpenSSL 46 | ndg-httpsclient 47 | pyasn1 48 | python-apt 49 | python-dateutil 50 | python-debian 51 | rsa 52 | s3transfer 53 | simplegeneric 54 | urllib3 55 | virtualenv 56 | zope.interface 57 | python-logstash 58 | -------------------------------------------------------------------------------- /router/requirements3.txt: -------------------------------------------------------------------------------- 1 | setuptools-rust 2 | cryptography==3.2 3 | wheel 4 | requests 5 | awscli 6 | boto3 7 | coloredlogs 8 | ipaddress 9 | python-vagrant 10 | PyYAML 11 | requests 12 | ansible 13 | appdirs 14 | botocore 15 | chardet 16 | Cheetah3 17 | colorama 18 | configobj 19 | decorator==4.4.2 20 | docutils 21 | futures 22 | Glances 23 | html5lib 24 | httplib2 25 | humanfriendly 26 | Jinja2 27 | jmespath 28 | jsonpatch 29 | jsonpointer 30 | Markdown==1.7 31 | MarkupSafe 32 | monotonic 33 | oauth 34 | packaging 35 | PAM 36 | paramiko 37 | pexpect 38 | prettytable==1.0.1 39 | psutil 40 | pyasn1 41 | pycrypto 42 | pycurl 43 | pyparsing 44 | pyserial 45 | pyOpenSSL 46 | ndg-httpsclient 47 | pyasn1 48 | python-apt 49 | python-dateutil 50 | python-debian 51 | rsa 52 | s3transfer 53 | simplegeneric 54 | urllib3 55 | virtualenv 56 | zope.interface 57 | python-logstash 58 | -------------------------------------------------------------------------------- /router/services/ictf-attackup.conf: -------------------------------------------------------------------------------- 1 | description "iCTF Attack UP Service alters ipsets to match Team Rankings" 2 | 3 | # When to start the service 4 | start on (starting network-interface 5 | or starting network-manager 6 | or starting networking) 7 | 8 | # When to stop the service 9 | stop on runlevel [016] 10 | 11 | # Automatically restart process if crashed 12 | respawn 13 | respawn limit unlimited 14 | 15 | console log 16 | 17 | #setuid gamemaster 18 | 19 | chdir /ictf/router 20 | 21 | # Start the process 22 | exec /usr/bin/python3 form_ip_sets.py 23 | -------------------------------------------------------------------------------- /router/services/ictf-pcap-s3.conf: -------------------------------------------------------------------------------- 1 | description "iCTF tcpdump Service" 2 | 3 | # When to start the service 4 | start on runlevel [2345] 5 | 6 | # When to stop the service 7 | stop on runlevel [016] 8 | 9 | # Automatically restart process if crashed 10 | respawn 11 | respawn limit unlimited 12 | 13 | console log 14 | 15 | #setuid gamemaster 16 | 17 | chdir /ictf/router 18 | 19 | # Start the process 20 | exec /usr/bin/python ictf-pcap-s3.py 21 | -------------------------------------------------------------------------------- /router/services/ictf-tcpdump.conf: -------------------------------------------------------------------------------- 1 | description "iCTF tcpdump Service" 2 | 3 | # When to start the service 4 | start on runlevel [2345] and started nginx 5 | 6 | # When to stop the service 7 | stop on runlevel [016] 8 | 9 | # Automatically restart process if crashed 10 | respawn 11 | respawn limit unlimited 12 | 13 | console log 14 | 15 | #setuid gamemaster 16 | 17 | chdir /ictf/router 18 | 19 | # Start the process 20 | exec /usr/bin/python ictf-tcpdump.py 21 | -------------------------------------------------------------------------------- /router/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | iptables-restore < ./provisioning/hephaestus_provisioning/iptables_rules 4 | 5 | unzip -d /etc/openvpn/ /etc/openvpn/openvpn.zip 6 | 7 | service openvpn start 8 | 9 | python ictf-tcpdump.py & 10 | 11 | python ictf-pcap-s3.py -------------------------------------------------------------------------------- /router/team-network-files/teameth0: -------------------------------------------------------------------------------- 1 | # The primary network interface 2 | auto eth0 3 | iface eth0 inet dhcp 4 | 5 | # routing for 172.31.128.0 - 172.31.159.255 6 | up route add -net 172.31.128.0 netmask 255.255.224.0 gw 172.31.172.1 7 | 8 | -------------------------------------------------------------------------------- /scoreboard/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "rules": { 4 | "indent": [ 5 | 1, 6 | 2 7 | ], 8 | "quotes": [ 9 | 1, 10 | "single" 11 | ], 12 | "linebreak-style": [ 13 | 1, 14 | "unix" 15 | ], 16 | "semi": [ 17 | 1, 18 | "always" 19 | ], 20 | "no-unused-vars": 1, 21 | "no-console": 1 22 | }, 23 | "env": { 24 | "es6": true, 25 | "browser": true 26 | }, 27 | "extends": "eslint:recommended", 28 | "ecmaFeatures": { 29 | "jsx": true, 30 | "experimentalObjectRestSpread": true 31 | }, 32 | "plugins": [ 33 | "react" 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /scoreboard/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /scoreboard/.nvmrc: -------------------------------------------------------------------------------- 1 | 6 2 | -------------------------------------------------------------------------------- /scoreboard/DEPLOY_README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/DEPLOY_README.md -------------------------------------------------------------------------------- /scoreboard/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/__init__.py -------------------------------------------------------------------------------- /scoreboard/_static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/_static/.gitkeep -------------------------------------------------------------------------------- /scoreboard/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | log_path=/opt/ictf/scoreboard/ansible.log -------------------------------------------------------------------------------- /scoreboard/bin/Stress_Test.conf: -------------------------------------------------------------------------------- 1 | # main section for the test case 2 | [main] 3 | title=Stress tests 4 | description=Simply testing iCTF 2015 5 | url=192.35.222.13 6 | 7 | # a section for each test 8 | [test_simple] 9 | description=Access the main URL %(nb_time)s times 10 | ap_list=/api/services,/api/scripts/team,/api/scripts,/api/services/states,/api/scores,/api/teams 11 | nb_time=20 12 | 13 | # a section to configure the test mode 14 | [ftest] 15 | log_to = console file 16 | log_path = stress-test.log 17 | result_path = stress-test.xml 18 | sleep_time_min = 0 19 | sleep_time_max = 0 20 | 21 | # a section to configure the bench mode 22 | [bench] 23 | cycles = 1:100:1000 24 | duration = 20 25 | startup_delay = 0.01 26 | sleep_time = 1 27 | cycle_time = 1 28 | log_to = 29 | log_path = stress-bench.log 30 | result_path = stress-bench.xml 31 | sleep_time_min = 0 32 | sleep_time_max = 0.5 33 | -------------------------------------------------------------------------------- /scoreboard/bin/deploy: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | deploy_dir="/home/deploy/ictf-framework/scoreboard" 4 | 5 | remote_exec() 6 | { 7 | echo "[Running as $1] $2" 8 | ssh ${1}@scoreboard.ictf2015.net -x $2 9 | } 10 | 11 | service() 12 | { 13 | remote_exec root "service ictf-gunicorn $1; service ictf-poller $1; service nginx $1" 14 | } 15 | 16 | 17 | deploy() 18 | { 19 | echo "[Checking eslint errors...]" 20 | npm run eslint && remote_exec deploy "cd $deploy_dir && git pull origin master && npm install && npm run build" 21 | } 22 | 23 | 24 | case "$1" in 25 | deploy) 26 | deploy 27 | ;; 28 | start) 29 | service start 30 | ;; 31 | stop) 32 | service stop 33 | ;; 34 | restart) 35 | service restart 36 | ;; 37 | status) 38 | service status 39 | ;; 40 | *) 41 | echo "Usage: $0 [deploy|start|stop|restart|status]" 42 | exit 1 43 | esac 44 | 45 | exit 0 46 | -------------------------------------------------------------------------------- /scoreboard/bin/nginx/ictf-scoreboard.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name ictf-scoreboard 0.0.0.0; 4 | 5 | gzip on; 6 | gzip_proxied any; 7 | gzip_types text/css text/plain text/xml application/xml application/javascript application/x-javascript text/javascript application/json text/x-json; 8 | gzip_vary on; 9 | 10 | location / { 11 | alias /opt/ictf/scoreboard/_static/; 12 | index index.html; 13 | try_files $uri $uri/ @proxy; 14 | expires max; 15 | } 16 | 17 | location @proxy { 18 | include proxy_params; 19 | proxy_pass http://unix:/opt/ictf/scoreboard/gunicorn.sock; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /scoreboard/bin/upstart/ictf-gunicorn.conf: -------------------------------------------------------------------------------- 1 | description "Gunicorn application server handling ictf API" 2 | 3 | start on runlevel [2345] 4 | stop on runlevel [!2345] 5 | 6 | respawn 7 | #setuid deploy 8 | #setgid deploy 9 | chdir /opt/ictf/scoreboard 10 | 11 | exec /opt/ictf/scoreboard/bin/run_app.sh 12 | -------------------------------------------------------------------------------- /scoreboard/bin/upstart/ictf-poller.conf: -------------------------------------------------------------------------------- 1 | description "Service to poll for iCTF DB changes" 2 | 3 | start on runlevel [2345] 4 | stop on runlevel [!2345] 5 | 6 | respawn 7 | setuid deploy 8 | setgid deploy 9 | chdir /opt/ictf/scoreboard 10 | 11 | script 12 | /opt/ictf/venv/scoreboard/bin/python poller.py config.json 13 | 14 | end script 15 | -------------------------------------------------------------------------------- /scoreboard/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_endpoint": "THE_API_ADDRESS_GOES_HERE", 3 | "secret": "THESECRETPASSPHRASEGOESHERE", 4 | "db_port": 5000, 5 | "lock_name": "redis_cache", 6 | "redis_host": "localhost", 7 | "redis_port": 6379, 8 | "redis_db_id": 0, 9 | "polling_sleep_time": 5, 10 | "setup_sleep_time": 30, 11 | "max_requested_ticks": 30, 12 | 13 | "dynamic_endpoints": { 14 | "previous_tick": [ 15 | "/services/states/tick/" 16 | ], 17 | "latest": [ 18 | "/services/exploited", 19 | "/scores/firstbloods", 20 | "/scores" 21 | ] 22 | }, 23 | 24 | "static_endpoints": [ 25 | "/services", 26 | "/teams/info" 27 | ], 28 | 29 | "tick_endpoint": { 30 | "key": "tick_id", 31 | "e": "/game/tick/" 32 | }, 33 | "game_start": { 34 | "key": "num", 35 | "stat": "/game/state" 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /scoreboard/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /scoreboard/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/favicon.ico -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ABW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ABW.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/AFG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/AFG.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/AGO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/AGO.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/AIA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/AIA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ALA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ALA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ALB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ALB.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/AND.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/AND.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ANT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ANT.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ARE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ARE.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ARG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ARG.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ARM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ARM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ASM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ASM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ATA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ATA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ATF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ATF.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ATG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ATG.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/AUS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/AUS.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/AUT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/AUT.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/AZE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/AZE.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BDI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BDI.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BEL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BEL.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BEN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BEN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BFA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BFA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BGD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BGD.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BGR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BGR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BHR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BHR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BHS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BHS.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BIH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BIH.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BLM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BLM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BLR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BLR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BLZ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BLZ.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BMU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BMU.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BOL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BOL.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BRA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BRA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BRB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BRB.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BRN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BRN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BTN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BTN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/BWA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/BWA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/CAF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/CAF.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/CAN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/CAN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/CCK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/CCK.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/CHE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/CHE.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/CHL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/CHL.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/CHN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/CHN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/CIV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/CIV.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/CMR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/CMR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/COD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/COD.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/COG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/COG.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/COK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/COK.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/COL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/COL.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/COM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/COM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/CPV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/CPV.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/CRI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/CRI.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/CUB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/CUB.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/CUW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/CUW.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/CXR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/CXR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/CYM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/CYM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/CYP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/CYP.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/CZE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/CZE.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/DEU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/DEU.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/DJI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/DJI.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/DMA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/DMA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/DNK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/DNK.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/DOM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/DOM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/DZA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/DZA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ECU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ECU.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/EGY.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/EGY.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ERI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ERI.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ESH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ESH.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ESP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ESP.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/EST.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/EST.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ETH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ETH.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/EUR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/EUR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/FIN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/FIN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/FJI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/FJI.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/FLK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/FLK.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/FRA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/FRA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/FRO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/FRO.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/FSM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/FSM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/GAB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/GAB.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/GBR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/GBR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/GEO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/GEO.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/GGY.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/GGY.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/GHA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/GHA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/GIB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/GIB.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/GIN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/GIN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/GMB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/GMB.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/GNB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/GNB.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/GNQ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/GNQ.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/GRC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/GRC.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/GRD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/GRD.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/GRL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/GRL.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/GTM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/GTM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/GUM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/GUM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/GUY.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/GUY.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/HKG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/HKG.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/HND.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/HND.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/HRV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/HRV.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/HTI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/HTI.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/HUN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/HUN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ICT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ICT.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/IDN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/IDN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/IMN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/IMN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/IND.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/IND.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/IRL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/IRL.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/IRN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/IRN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/IRQ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/IRQ.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ISL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ISL.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ISR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ISR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ITA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ITA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/JAM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/JAM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/JEY.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/JEY.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/JOR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/JOR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/JPN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/JPN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/KAZ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/KAZ.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/KEN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/KEN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/KGZ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/KGZ.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/KHM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/KHM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/KIR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/KIR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/KNA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/KNA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/KOR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/KOR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/KWT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/KWT.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/LAO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/LAO.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/LBN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/LBN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/LBR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/LBR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/LBY.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/LBY.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/LCA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/LCA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/LIE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/LIE.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/LKA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/LKA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/LSO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/LSO.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/LTU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/LTU.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/LUX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/LUX.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/LVA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/LVA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MAC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MAC.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MAF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MAF.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MAR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MAR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MCO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MCO.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MDA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MDA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MDG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MDG.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MDV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MDV.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MEX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MEX.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MHL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MHL.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MKD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MKD.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MLI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MLI.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MLT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MLT.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MMR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MMR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MNE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MNE.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MNG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MNG.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MNP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MNP.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MOZ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MOZ.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MRT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MRT.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MSR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MSR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MTQ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MTQ.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MUS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MUS.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MWI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MWI.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MYS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MYS.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/MYT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/MYT.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/NAM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/NAM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/NCL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/NCL.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/NER.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/NER.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/NFK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/NFK.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/NGA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/NGA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/NIC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/NIC.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/NIU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/NIU.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/NLD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/NLD.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/NOR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/NOR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/NPL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/NPL.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/NRU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/NRU.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/NZL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/NZL.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/OMN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/OMN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/PAK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/PAK.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/PAN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/PAN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/PCN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/PCN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/PER.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/PER.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/PHL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/PHL.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/PLW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/PLW.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/PNG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/PNG.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/POL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/POL.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/PRI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/PRI.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/PRK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/PRK.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/PRT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/PRT.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/PRY.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/PRY.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/PSE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/PSE.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/PYF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/PYF.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/QAT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/QAT.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ROU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ROU.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/RUS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/RUS.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/RWA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/RWA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SAU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SAU.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SDN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SDN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SEN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SEN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SGP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SGP.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SGS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SGS.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SHN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SHN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SLB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SLB.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SLE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SLE.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SLV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SLV.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SMR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SMR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SOM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SOM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SRB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SRB.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SSD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SSD.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/STP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/STP.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SUR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SUR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SVK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SVK.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SVN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SVN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SWE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SWE.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SWZ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SWZ.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SYC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SYC.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/SYR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/SYR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/TCA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/TCA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/TCD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/TCD.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/TGO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/TGO.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/THA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/THA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/TJK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/TJK.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/TKL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/TKL.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/TKM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/TKM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/TLS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/TLS.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/TON.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/TON.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/TTO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/TTO.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/TUN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/TUN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/TUR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/TUR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/TUV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/TUV.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/TWN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/TWN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/TZA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/TZA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/UGA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/UGA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/UKR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/UKR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/URY.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/URY.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/USA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/USA.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/UZB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/UZB.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/VAT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/VAT.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/VCT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/VCT.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/VEN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/VEN.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/VGB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/VGB.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/VIR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/VIR.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/VNM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/VNM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/VUT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/VUT.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/WLF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/WLF.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/WSM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/WSM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/XXX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/XXX.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/YEM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/YEM.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ZAF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ZAF.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ZMB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ZMB.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/ZWE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/ZWE.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_abkhazia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_abkhazia.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_basque-country.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_basque-country.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_british-antarctic-territory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_british-antarctic-territory.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_commonwealth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_commonwealth.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_england.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_england.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_gosquared.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_gosquared.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_kosovo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_kosovo.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_mars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_mars.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_nagorno-karabakh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_nagorno-karabakh.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_nato.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_nato.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_northern-cyprus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_northern-cyprus.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_olympics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_olympics.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_red-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_red-cross.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_scotland.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_scotland.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_somaliland.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_somaliland.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_south-ossetia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_south-ossetia.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_united-nations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_united-nations.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_unknown.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/_wales.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/flags/_wales.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/flags/convert_flags.py: -------------------------------------------------------------------------------- 1 | 2 | import os 3 | import pycountry 4 | 5 | directory = './' 6 | 7 | for filename in os.listdir(directory): 8 | if filename.endswith(".png") and len(filename) == 6: 9 | country_code_2_letter = filename.split(".")[0] 10 | png_path = os.path.realpath(filename) 11 | #print(country_code_2_letter) 12 | 13 | for country in pycountry.countries: 14 | if country.alpha_2 == country_code_2_letter: 15 | country_code_3_letter = country.alpha_3 16 | print("Converting {} to {}".format(country.alpha_2, country.alpha_3)) 17 | print("Will rename {} to {}".format(png_path,png_path.replace(country.alpha_2,country_code_3_letter ) )) 18 | 19 | os.rename(png_path, png_path.replace(country.alpha_2,country_code_3_letter )) 20 | -------------------------------------------------------------------------------- /scoreboard/frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/logo192.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/public/logo512.png -------------------------------------------------------------------------------- /scoreboard/frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /scoreboard/frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/components/AcademicSwitch.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Link } from 'react-router'; 3 | import PropTypes from 'prop-types'; 4 | 5 | export default class AcademicSwitch extends Component { 6 | static propTypes = { 7 | location: PropTypes.object.isRequired 8 | } 9 | 10 | render() { 11 | return ( 12 |
13 | 17 | All 18 | 19 | / 20 | 24 | Academic 25 | 26 |
27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/components/shared/Flag.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | export default class Flag extends Component { 5 | static propTypes = { 6 | country: PropTypes.string.isRequired, 7 | size: PropTypes.string 8 | } 9 | 10 | static defaultProps = { 11 | size: "32" 12 | } 13 | 14 | render() { 15 | return ( 16 | {`flag 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/hooks/useInterval.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useRef } from 'react' 2 | 3 | function useInterval(callback: () => void, delay: number | null) { 4 | const savedCallback = useRef(callback) 5 | 6 | // Remember the latest callback if it changes. 7 | useEffect(() => { 8 | savedCallback.current = callback 9 | }, [callback]) 10 | 11 | // Set up the interval. 12 | useEffect(() => { 13 | // Don't schedule if no delay is specified. 14 | if (delay === null) { 15 | return 16 | } 17 | 18 | const id = setInterval(() => savedCallback.current(), delay) 19 | 20 | return () => clearInterval(id) 21 | }, [delay]) 22 | } 23 | 24 | export default useInterval -------------------------------------------------------------------------------- /scoreboard/frontend/src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | //import './index.css'; 4 | import './styles/main.sass' 5 | import reportWebVitals from './reportWebVitals'; 6 | import Routes from './routes'; 7 | 8 | 9 | ReactDOM.render( 10 | 11 | 12 | , 13 | document.getElementById('root') 14 | ); 15 | 16 | // If you want to start measuring performance in your app, pass a function 17 | // to log results (for example: reportWebVitals(console.log)) 18 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 19 | reportWebVitals(); 20 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/mixins/SetIntervalMixin.js: -------------------------------------------------------------------------------- 1 | import mixin from 'universal-mixin'; 2 | 3 | export default mixin({ 4 | componentWillMount() { 5 | this.intervals = []; 6 | }, 7 | 8 | setInterval() { 9 | this.intervals.push(setInterval.apply(null, arguments)); 10 | }, 11 | 12 | componentWillUnmount: function() { 13 | this.intervals.forEach(clearInterval); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/reportWebVitals.ts: -------------------------------------------------------------------------------- 1 | import { ReportHandler } from 'web-vitals'; 2 | 3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => { 4 | if (onPerfEntry && onPerfEntry instanceof Function) { 5 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 6 | getCLS(onPerfEntry); 7 | getFID(onPerfEntry); 8 | getFCP(onPerfEntry); 9 | getLCP(onPerfEntry); 10 | getTTFB(onPerfEntry); 11 | }); 12 | } 13 | }; 14 | 15 | export default reportWebVitals; 16 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/routes.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | Route, 4 | } from 'react-router'; 5 | import {BrowserRouter} from 'react-router-dom'; 6 | import App from './components/App' 7 | 8 | const Routes = () => ( 9 | 10 | 11 | 12 | ); 13 | 14 | export default Routes; -------------------------------------------------------------------------------- /scoreboard/frontend/src/sources/api.js: -------------------------------------------------------------------------------- 1 | import AbstractApi from './abstract_api'; 2 | 3 | const BASE_URL = '/api'; // http://api.address.com/api 4 | 5 | class Api extends AbstractApi { 6 | constructor() { 7 | super(BASE_URL); 8 | } 9 | } 10 | 11 | export default new Api(); 12 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/sources/dayjs-local.js: -------------------------------------------------------------------------------- 1 | // Load dayjs, plugins and language packs. 2 | import dayjs from 'dayjs' 3 | import timezone from 'dayjs/plugin/timezone' 4 | import utc from 'dayjs/plugin/utc' 5 | 6 | 7 | // Register plugins 8 | dayjs.extend(timezone) 9 | dayjs.extend(utc) 10 | 11 | export default dayjs -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/_font-faces.sass: -------------------------------------------------------------------------------- 1 | @import url(//cdn.jsdelivr.net/font-hack/2.018/css/hack.min.css) 2 | @import url(https://fonts.googleapis.com/css?family=Roboto:400,700,700italic,400italic) 3 | 4 | @mixin body-font-family 5 | font-family: 'Roboto', sans-serif 6 | 7 | @mixin heading-font-family 8 | font-family: Hack, monospace 9 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_align.sass: -------------------------------------------------------------------------------- 1 | .align--right 2 | text-align: right 3 | 4 | .align--center 5 | text-align: center 6 | 7 | .align--bottom 8 | vertical-align: bottom 9 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_c3-override.sass: -------------------------------------------------------------------------------- 1 | .c3 2 | & path, & line 3 | stroke: $text-color 4 | 5 | & text 6 | fill: $text-color 7 | 8 | .c3-line 9 | stroke-width: 2px 10 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_center.sass: -------------------------------------------------------------------------------- 1 | .center 2 | +center 3 | 4 | .center--v 5 | +center-vertically 6 | 7 | .center--h 8 | +center-horizontally 9 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_chart-controls.sass: -------------------------------------------------------------------------------- 1 | .chart-controls 2 | text-align: center 3 | +position(relative, -12px none none none) 4 | +font-size(milli) 5 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_chart.sass: -------------------------------------------------------------------------------- 1 | .chart 2 | height: 480px 3 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_countdown.sass: -------------------------------------------------------------------------------- 1 | .countdown 2 | display: block 3 | +heading-font-family 4 | font-weight: bold 5 | width: 160px 6 | color: $text-color 7 | text-align: center 8 | margin: 0 auto 9 | +vertical-margin(2) 10 | +debug 11 | 12 | .countdown__label 13 | display: block 14 | font-size: 20px 15 | line-height: 1 16 | 17 | .countdown__time 18 | font-size: 50px 19 | display: block 20 | line-height: 1 21 | 22 | .countdown__time--small 23 | @extend .countdown__time 24 | font-size: 30px 25 | 26 | +at-breakpoint(desk) 27 | .countdown 28 | +position(absolute, none none ($grid-gutter - 8) $grid-gutter) 29 | margin: 0 30 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_font-size.sass: -------------------------------------------------------------------------------- 1 | @each $name in map-keys($heading-font-sizes) 2 | $size: map-get($heading-font-sizes, $name) 3 | 4 | .#{$name} 5 | +heading-font-family 6 | +rem-rule(font-size, $size) 7 | 8 | @each $name in map-keys($smallprint-font-sizes) 9 | $size: map-get($smallprint-font-sizes, $name) 10 | 11 | .#{$name} 12 | +rem-rule(font-size, $size) 13 | 14 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_link.sass: -------------------------------------------------------------------------------- 1 | .link 2 | padding: 0 .5em 3 | text-decoration: underline 4 | display: inline-block 5 | white-space: nowrap 6 | font-family: inherit 7 | cursor: pointer 8 | background-color: transparent 9 | -webkit-appearance: none 10 | border-radius: 0 11 | box-sizing: border-box 12 | transition: color 0.3s $material-ease 13 | 14 | color: $text-color 15 | &:visited, &:active, &:link 16 | color: $text-color 17 | 18 | .link--active 19 | @extend .link 20 | color: $accent-color 21 | &:visited, &:active, &:link 22 | color: $accent-color 23 | border-color: $accent-color 24 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_logo.sass: -------------------------------------------------------------------------------- 1 | .logo 2 | display: block 3 | text-decoration: none 4 | +heading-font-family 5 | font-weight: bold 6 | color: $text-color 7 | line-height: 1 8 | margin: 0 auto 9 | text-align: center 10 | +debug 11 | 12 | .logo__name 13 | font-size: 80px 14 | display: inline-block 15 | line-height: 1 16 | 17 | .logo__year 18 | font-size: 30px 19 | display: inline-block 20 | line-height: 1 21 | letter-spacing: 5px 22 | 23 | +at-breakpoint(desk) 24 | .logo 25 | margin: 0 26 | +margin-bottom(4) 27 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_main-content.sass: -------------------------------------------------------------------------------- 1 | .main-content 2 | position: relative 3 | +debug 4 | > * > div 5 | background-color: $bg-color 6 | 7 | +at-breakpoint(desk) 8 | .main-content 9 | width: calc(100% - #{$sidebar-width}) 10 | left: $sidebar-width 11 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_main-header.sass: -------------------------------------------------------------------------------- 1 | .main-header 2 | text-align: center 3 | position: relative 4 | +debug 5 | 6 | +at-breakpoint(desk) 7 | .main-header 8 | +position(fixed, 0px none 0px 0px) 9 | z-index: 1000 10 | text-align: left 11 | width: $sidebar-width 12 | background-color: $bg-color 13 | padding: $grid-gutter 14 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_main-sidebar.sass: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/scoreboard/frontend/src/styles/blocks/_main-sidebar.sass -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_navitagion.sass: -------------------------------------------------------------------------------- 1 | .navigation 2 | +margin-top(2) 3 | +margin-bottom(4) 4 | > a 5 | display: inline-block 6 | +padding(1) 7 | padding-top: 0 8 | text-decoration: none 9 | +heading-font-family 10 | font-weight: bold 11 | 12 | &.is-active 13 | color: $accent-color 14 | 15 | +at-breakpoint(desk) 16 | .navigation 17 | +padding-left(1) 18 | > a 19 | display: block 20 | +horizontal-padding(0) 21 | +padding-bottom(1) 22 | 23 | &:before 24 | content: "$> " 25 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_sizes.sass: -------------------------------------------------------------------------------- 1 | @each $size in $sizes 2 | @each $break in $size-breakpoints 3 | .width--#{$size}-on-#{$break} 4 | +at-breakpoint($break) 5 | width: #{$size}px 6 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_slide-hover.sass: -------------------------------------------------------------------------------- 1 | .slide-hover 2 | display: inline-block 3 | position: relative 4 | width: 100% 5 | overflow: hidden 6 | 7 | &:hover 8 | .slide-hover__show 9 | transform: translateY(100%) 10 | .slide-hover__hidden 11 | transform: translateY(0%) 12 | 13 | .slide-hover__show, 14 | .slide-hover__hidden 15 | display: block 16 | transition: transform .3s ease-out 17 | 18 | .slide-hover__hidden 19 | position: absolute 20 | top: 0px 21 | bottom: 0px 22 | white-space: nowrap 23 | transform: translateY(-100%) 24 | font-weight: bold 25 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_space.sass: -------------------------------------------------------------------------------- 1 | @each $amount in ( 1, 2, 3, 4, 5, 6, 7, 8 ) 2 | @each $direction in ( top bottom ) 3 | .space--#{$direction}-#{$amount} 4 | +space-rule("margin-#{$direction}", $amount) 5 | 6 | @each $name in ( desk ) 7 | .space--#{$direction}-#{$amount}-on-#{$name} 8 | +at-breakpoint($name) 9 | +space-rule("margin-#{$direction}", $amount) 10 | 11 | .space--both-#{$amount}-on-#{$name} 12 | +at-breakpoint($name) 13 | +space-rule("margin-top", $amount) 14 | +space-rule("margin-bottom", $amount) 15 | 16 | .space--both-#{$amount} 17 | +space-rule("margin-top", $amount) 18 | +space-rule("margin-bottom", $amount) 19 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_state-legend.sass: -------------------------------------------------------------------------------- 1 | .state-legend 2 | list-style-type: none 3 | padding: 0 4 | 5 | .state-tag 6 | +margin-right(1) 7 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_state-table.sass: -------------------------------------------------------------------------------- 1 | .state-table 2 | width: auto !important 3 | +font-size(milli) 4 | 5 | th.state-table__th--big 6 | white-space: nowrap 7 | background-color: transparent 8 | +font-size($base-font-size) 9 | 10 | th.state-table__th--rotate 11 | height: 140px 12 | white-space: nowrap 13 | background-color: transparent 14 | & > div 15 | /* Magic Numbers */ 16 | /* 45 is really 360 - 45 */ 17 | transform: translate(19px, 49px) rotate(315deg) 18 | width: 30px 19 | & > span 20 | border-bottom: 1px solid rgba($text-color, .3) 21 | padding: 5px 10px 22 | &.is-down 23 | color: $down-color 24 | td 25 | border-right: 1px solid rgba($text-color, .3) 26 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_state-tag.sass: -------------------------------------------------------------------------------- 1 | .state-tag 2 | display: inline-block 3 | +size(14px) 4 | border-radius: 3px 5 | transition: all .3s ease-out 6 | cursor: pointer 7 | &:hover 8 | opacity: .6 9 | 10 | &.is-up 11 | background-color: $up-color 12 | 13 | &.is-down 14 | background-color: $down-color 15 | 16 | &.is-untested 17 | background-color: $untested-color 18 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_title.sass: -------------------------------------------------------------------------------- 1 | .title 2 | +font-size(alpha) 3 | +heading-font-family 4 | line-height: 1 5 | margin-top: 0 6 | +margin-bottom(2) 7 | +debug 8 | 9 | +at-breakpoint(desk) 10 | .title 11 | height: 132px 12 | line-height: 232px 13 | +margin-bottom(4) 14 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_truncate.sass: -------------------------------------------------------------------------------- 1 | .truncate 2 | white-space: nowrap 3 | +ellipsis 4 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/_wrap.sass: -------------------------------------------------------------------------------- 1 | .wrap 2 | +wrap 3 | 4 | @each $name in $breakpoint-names 5 | .wrap--on-#{$name} 6 | +at-breakpoint($name) 7 | +wrap 8 | 9 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/blocks/all.sass: -------------------------------------------------------------------------------- 1 | @import _align.sass 2 | @import _button.sass 3 | @import _c3-override.sass 4 | @import _center.sass 5 | @import _chart-controls.sass 6 | @import _chart.sass 7 | @import _countdown.sass 8 | @import _font-size.sass 9 | @import _grid.sass 10 | @import _link.sass 11 | @import _logo.sass 12 | @import _main-content.sass 13 | @import _main-header.sass 14 | @import _main-sidebar.sass 15 | @import _navitagion.sass 16 | @import _sizes.sass 17 | @import _slide-hover.sass 18 | @import _space.sass 19 | @import _state-legend.sass 20 | @import _state-table.sass 21 | @import _state-tag.sass 22 | @import _table.sass 23 | @import _title.sass 24 | @import _truncate.sass 25 | @import _wrap.sass 26 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/functions/_assign-inputs.sass: -------------------------------------------------------------------------------- 1 | @function assign-inputs($inputs, $pseudo: null) 2 | $list: () 3 | @each $input in $inputs 4 | $input: unquote($input) 5 | $input: if($pseudo, $input + ":" + $pseudo, $input) 6 | $list: append($list, $input, comma) 7 | @return $list 8 | 9 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/functions/_unpack.sass: -------------------------------------------------------------------------------- 1 | @function unpack($shorthand) 2 | @if length($shorthand) == 1 3 | @return nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1) 4 | @else if length($shorthand) == 2 5 | @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 1) nth($shorthand, 2) 6 | @else if length($shorthand) == 3 7 | @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 3) nth($shorthand, 2) 8 | @else 9 | @return $shorthand 10 | 11 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/functions/all.sass: -------------------------------------------------------------------------------- 1 | @import _assign-inputs.sass 2 | @import _breakpoints.sass 3 | @import _unpack.sass -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/main.sass: -------------------------------------------------------------------------------- 1 | @import 'vendor/all.sass' 2 | 3 | @import font-faces 4 | 5 | @import functions/all.sass 6 | @import variables/all.sass 7 | @import mixins/all.sass 8 | @import transitions/all.sass 9 | @import blocks/all.sass 10 | 11 | * 12 | box-sizing: border-box 13 | /* user-select: none 14 | 15 | img 16 | max-width: 100% 17 | height: auto 18 | 19 | body 20 | color: $text-color 21 | background-color: $bg-color 22 | +body-font-family 23 | 24 | a 25 | transition: color .3s $material-ease 26 | &:visited, &:active, &:link 27 | color: inherit 28 | &:hover 29 | color: $accent-color 30 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/mixins/_at-breakpoint.sass: -------------------------------------------------------------------------------- 1 | @mixin at-breakpoint($media-query) 2 | @if map-has-key($breakpoint-media-queries, $media-query) 3 | @media #{map-get($breakpoint-media-queries, $media-query)} 4 | @content 5 | 6 | @else 7 | @warn "Breakpoint ‘#{$media-query}’ does not exist" 8 | 9 | @mixin except-at-breakpoint($media-query) 10 | @if map-has-key($breakpoint-inverse-media-queries, $media-query) 11 | @media #{map-get($breakpoint-inverse-media-queries, $media-query)} 12 | @content 13 | 14 | @else 15 | @warn "Breakpoint ‘#{$media-query}’ does not exist" 16 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/mixins/_at-hidpi.sass: -------------------------------------------------------------------------------- 1 | @mixin at-hidpi($ratio: 1.3) 2 | @media only screen and (-webkit-min-device-pixel-ratio: $ratio), only screen and (min--moz-device-pixel-ratio: $ratio), only screen and (-o-min-device-pixel-ratio: #{$ratio}/1), only screen and (min-resolution: round($ratio * 96dpi)), only screen and (min-resolution: $ratio * 1dppx) 3 | @content 4 | 5 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/mixins/_center.sass: -------------------------------------------------------------------------------- 1 | @mixin center-vertically($position: absolute) 2 | position: $position 3 | top: 50% 4 | transform: translateY(-50%) 5 | 6 | @mixin center-horizontally($position: absolute) 7 | position: $position 8 | left: 50% 9 | transform: translateX(-50%) 10 | 11 | @mixin center($position: absolute) 12 | position: $position 13 | left: 50% 14 | top: 50% 15 | transform: translate(-50%, -50%) 16 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/mixins/_clearfix.sass: -------------------------------------------------------------------------------- 1 | @mixin clearfix 2 | &::after 3 | clear: both 4 | content: "" 5 | display: table 6 | 7 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/mixins/_debug.sass: -------------------------------------------------------------------------------- 1 | $debug: false 2 | 3 | @mixin debug() 4 | @if $debug 5 | border: 1px solid red 6 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/mixins/_ellipsis.sass: -------------------------------------------------------------------------------- 1 | @mixin ellipsis 2 | text-overflow: ellipsis 3 | white-space: nowrap 4 | overflow: hidden 5 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/mixins/_font-size.sass: -------------------------------------------------------------------------------- 1 | @mixin font-size($unit) 2 | @if type-of($unit) == "number" and unit($unit) == "px" 3 | +rem-rule(font-size, $unit) 4 | 5 | @else if type-of($unit) == "string" 6 | @if map-has-key($all-font-sizes, $unit) 7 | +rem-rule(font-size, map-get($all-font-sizes, $unit)) 8 | @else 9 | @warn "size ‘#{$unit}’ does not exist" 10 | 11 | @else 12 | @warn "size ‘#{$unit}’ invalid" 13 | 14 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/mixins/_grid.sass: -------------------------------------------------------------------------------- 1 | @mixin grid 2 | list-style: none 3 | margin-right: 0 4 | margin-left: -$grid-gutter 5 | padding-left: 0 6 | padding-right: 0 7 | 8 | @mixin grid-item 9 | display: inline-block 10 | padding-left: $grid-gutter 11 | vertical-align: top 12 | width: 100% 13 | -webkit-box-sizing: border-box 14 | -moz-box-sizing: border-box 15 | box-sizing: border-box 16 | 17 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/mixins/_position.sass: -------------------------------------------------------------------------------- 1 | @mixin position($position: relative, $coordinates: null null null null) 2 | @if type-of($position) == list 3 | $coordinates: $position 4 | $position: relative 5 | 6 | $coordinates: unpack($coordinates) 7 | 8 | $top: nth($coordinates, 1) 9 | $right: nth($coordinates, 2) 10 | $bottom: nth($coordinates, 3) 11 | $left: nth($coordinates, 4) 12 | 13 | position: $position 14 | 15 | @if $top and $top == auto or type-of($top) == number 16 | top: $top 17 | @if $right and $right == auto or type-of($right) == number 18 | right: $right 19 | @if $bottom and $bottom == auto or type-of($bottom) == number 20 | bottom: $bottom 21 | @if $left and $left == auto or type-of($left) == number 22 | left: $left 23 | 24 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/mixins/_rem.sass: -------------------------------------------------------------------------------- 1 | @mixin rem-html-reset($factor) 2 | font-size: #{(16.0 * $factor) + "px"} 3 | 4 | @mixin rem-rule($rule, $size-in-px) 5 | #{$rule}: $size-in-px 6 | #{$rule}: ($size-in-px / 16px) * 1rem 7 | 8 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/mixins/_size.sass: -------------------------------------------------------------------------------- 1 | @mixin size($value) 2 | $width: nth($value, 1) 3 | $height: $width 4 | @if length($value) > 1 5 | $height: nth($value, 2) 6 | 7 | width: $width 8 | height: $height 9 | 10 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/mixins/_wrap.sass: -------------------------------------------------------------------------------- 1 | @mixin wrap 2 | margin-left: auto 3 | margin-right: auto 4 | max-width: $wrap-width 5 | padding-left: $grid-gutter 6 | padding-right: $grid-gutter 7 | box-sizing: border-box 8 | +clearfix 9 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/mixins/all.sass: -------------------------------------------------------------------------------- 1 | @import _at-breakpoint.sass 2 | @import _at-hidpi.sass 3 | @import _center.sass 4 | @import _clearfix.sass 5 | @import _debug.sass 6 | @import _ellipsis.sass 7 | @import _font-size.sass 8 | @import _grid.sass 9 | @import _position.sass 10 | @import _rem.sass 11 | @import _size.sass 12 | @import _space.sass 13 | @import _triangle.sass 14 | @import _wrap.sass -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/transitions/_moveUp.sass: -------------------------------------------------------------------------------- 1 | .moveUp-enter 2 | transition-duration: .3s 3 | transition-property: transform, opacity 4 | transition-timing-function: ease-out 5 | transform: translate3d(0,10px,0) 6 | position: absolute 7 | z-index: 10000 8 | opacity: .1 9 | 10 | .moveUp-enter.moveUp-enter-active 11 | transform: translate3d(0,0,0) 12 | opacity: 1 13 | 14 | .moveUp-leave 15 | transition-duration: .3s 16 | transition-property: transform, opacity 17 | transition-timing-function: ease-out 18 | transform: translate3d(0,0,0) 19 | position: absolute 20 | opacity: 0.1 21 | 22 | .moveUp-leave.moveUp-leave-active 23 | transform: translate3d(0,-10px,0) 24 | opacity: 0.1 25 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/transitions/all.sass: -------------------------------------------------------------------------------- 1 | @import _moveUp.sass -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/variables/_colors.sass: -------------------------------------------------------------------------------- 1 | $bg-color: #001F28 2 | $text-color: #DBDAC8 3 | $dark-bg-color: #002B36 4 | $accent-color: #D5835B 5 | $up-color: #33FF8B 6 | $down-color: #FF645B 7 | $untested-color: #4C4C4C 8 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/variables/_easings.sass: -------------------------------------------------------------------------------- 1 | $material-ease: cubic-bezier(.55,0,.1,1) 2 | $inertial-ease: cubic-bezier(0.190, 1.000, 0.220, 1.000) 3 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/variables/_font-size.sass: -------------------------------------------------------------------------------- 1 | $base-font-size: 15px 2 | $heading-font-sizes: ('alpha': 30px, 'beta': 27px, 'gamma': 22px) 3 | $smallprint-font-sizes: ('smallprint': 13px, 'milli': 12px) 4 | 5 | // derived 6 | $all-font-sizes: map-merge($heading-font-sizes, $smallprint-font-sizes) 7 | $all-font-sizes: map-merge($all-font-sizes, ('regular': $base-font-size)) 8 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/variables/_grid.sass: -------------------------------------------------------------------------------- 1 | $grid-gutter: 24px 2 | $grid-push: true 3 | $grid-pull: true 4 | $grid-cols: ( 12 ) 5 | $grid-breakpoints: ( desk ) 6 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/variables/_sidebar.sass: -------------------------------------------------------------------------------- 1 | $sidebar-width: 300px 2 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/variables/_sizes.sass: -------------------------------------------------------------------------------- 1 | $sizes: ( 64 128 ) 2 | $size-breakpoints: ( desk ) 3 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/variables/_space.sass: -------------------------------------------------------------------------------- 1 | $space-unit: 12px 2 | $space-amounts: ( 1, 2, 3, 4, 5, 6, 7, 8 ) 3 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/variables/_wrap.sass: -------------------------------------------------------------------------------- 1 | $wrap-width: auto 2 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/variables/all.sass: -------------------------------------------------------------------------------- 1 | @import _breakpoints.sass 2 | @import _colors.sass 3 | @import _easings.sass 4 | @import _font-size.sass 5 | @import _grid.sass 6 | @import _sidebar.sass 7 | @import _sizes.sass 8 | @import _space.sass 9 | @import _wrap.sass -------------------------------------------------------------------------------- /scoreboard/frontend/src/styles/vendor/all.sass: -------------------------------------------------------------------------------- 1 | @import _normalize.scss 2 | @import c3.scss -------------------------------------------------------------------------------- /scoreboard/frontend/src/utils/pad.js: -------------------------------------------------------------------------------- 1 | export function pad(n, width, z) { 2 | z = z || '0'; 3 | n = n + ''; 4 | return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n; 5 | } 6 | -------------------------------------------------------------------------------- /scoreboard/frontend/src/utils/round.js: -------------------------------------------------------------------------------- 1 | let round = function(number, precision = 2) { 2 | let multiplier = Math.pow(10, precision); 3 | return Math.round(number * multiplier) / multiplier; 4 | }; 5 | 6 | export default round; 7 | -------------------------------------------------------------------------------- /scoreboard/frontend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "skipLibCheck": true, 11 | "esModuleInterop": true, 12 | "allowSyntheticDefaultImports": true, 13 | "strict": true, 14 | "forceConsistentCasingInFileNames": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "module": "esnext", 17 | "moduleResolution": "node", 18 | "resolveJsonModule": true, 19 | "isolatedModules": true, 20 | "noEmit": true, 21 | "jsx": "react-jsx" 22 | }, 23 | "include": [ 24 | "src" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /scoreboard/mock/serve.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | FLASK_APP=mock_db FLASK_ENV=development flask run -------------------------------------------------------------------------------- /scoreboard/nvm.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | . /home/deploy/.nvm/nvm.sh 3 | . /home/deploy/.profile 4 | . /home/deploy/.bashrc 5 | export NVM_DIR="/home/deploy/.nvm" 6 | [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm 7 | 8 | nvm install stable 9 | nvm run stable --version 10 | nvm alias default stable creates=/home/deploy/.nvm/versions/node/v6.6.0 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /scoreboard/provisioning/ares_provisioning/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | 5 | ictf_scoreboard: 6 | image: ictf_scoreboard 7 | sysctls: 8 | - net.core.somaxconn=65535 9 | ports: 10 | - "80:80" 11 | - "9100:9100" 12 | environment: 13 | - LOGSTASH_ID=scoreboard 14 | -------------------------------------------------------------------------------- /scoreboard/provisioning/hephaestus_provisioning/files/logstash.conf: -------------------------------------------------------------------------------- 1 | input { 2 | tcp { 3 | port => 1717 4 | } 5 | } 6 | 7 | input { 8 | file { 9 | path => "/var/log/gunicorn/glog.log" 10 | } 11 | } 12 | 13 | filter { 14 | mutate { 15 | gsub => ["message", "\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", ""] # Remove ANSI colors 16 | add_field => { "logstash_host" => "${LOGSTASH_ID}" } 17 | } 18 | json { 19 | source => "message" 20 | } 21 | # Avoid duplicates in ES. 22 | fingerprint { 23 | source => ["message"] 24 | target => "fingerprint" 25 | key => "78787878" 26 | method => "SHA1" 27 | concatenate_sources => true 28 | } 29 | } 30 | 31 | output { 32 | elasticsearch { 33 | hosts => ["logger.ictf:9200"] 34 | index => "ictf-scoreboard" 35 | document_id => "%{fingerprint}" 36 | } 37 | } -------------------------------------------------------------------------------- /scoreboard/requirements.txt: -------------------------------------------------------------------------------- 1 | setuptools 2 | setuptools-rust 3 | cryptography 4 | pyOpenSSL 5 | wheel 6 | Flask 7 | Flask-Cache 8 | Flask-Cors 9 | Jinja2 10 | MarkupSafe 11 | Werkzeug 12 | argparse 13 | gevent 14 | greenlet 15 | gunicorn 16 | itsdangerous 17 | redis 18 | redlock-py 19 | requests 20 | saferedisqueue 21 | six 22 | setuptools 23 | ndg-httpsclient 24 | pyasn1 25 | ujson 26 | python-logstash 27 | -------------------------------------------------------------------------------- /scoreboard/service.conf: -------------------------------------------------------------------------------- 1 | description "iCTF gamebot service" 2 | 3 | # When to start the service 4 | start on runlevel [2345] 5 | 6 | # When to stop the service 7 | stop on runlevel [016] 8 | 9 | # Automatically restart process if crashed 10 | respawn 11 | respawn limit unlimited 12 | 13 | console log 14 | 15 | setuid nobody 16 | 17 | chdir /opt/ictf/gamebot/ 18 | 19 | # Start the process 20 | exec /opt/ictf/venv/gamebot/bin/python gamebot.py 21 | -------------------------------------------------------------------------------- /scoreboard/shellogo/orig.txt: -------------------------------------------------------------------------------- 1 | MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM 2 | MMMMMMMMMMMMMMMMMMMMMMMMMMMMddMMMMM 3 | MMMMMMMMMMMMMMMMMMMMMMMMhh:.sNMMMMM 4 | MMMMMMMMMMMMMMMMMMMMNh:: omMMMMMM 5 | MMMMMMMMMMMMMMMMMNmh: omMMMMMMM 6 | MMMMMMMMMMMMMMMMy- oNMMMMMMMM 7 | MMMMMMMMMMMMMMy. .ooo +NMMMMMMMMM 8 | MMMMMMMMMMMMy. oNNMMMNMMMMMMMMMMM 9 | MMMMMMMMMNy. /dMNhy.yhhmMMMMMMM 10 | MMMMMMMNy- `-. .omMMMMM 11 | MMMMMNy- .oNMMM 12 | MMMMy- ````/ssssssss- :MMM 13 | MMMy- ooNMMMMMMMMMMMMM/ :MMM 14 | MMMs+++:-MMMMMMMMMMMMMMMMy. :MMM 15 | MMMMMMMdoMMMMMMdmMMMMNyy. :MMM 16 | MMMMMMMMMMMh-yhs/ohs-. :mMMM 17 | MMMMMMMMMMMh-..` `+mMMMM 18 | MMMMMMMMMMMMMMMhyyyyyyyyyyyymMMMMMM 19 | MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM 20 | -------------------------------------------------------------------------------- /scoreboard/shellogo/shellphishlogo.txt: -------------------------------------------------------------------------------- 1 | MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM 2 | MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM 3 | MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM 4 | MMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMM 5 | MMMMMMMMMMMMMMMMMMMMM MMMMMMMMM 6 | MMMMMMMMMMMMMMMMMM MMMMMMMMMM 7 | MMMMMMMMMMMMMMMM MMMM MMMMMMMMMMM 8 | MMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMM 9 | MMMMMMMMMMMM MMMMMMMMMMMMMMMMMM 10 | MMMMMMMMMM MMM MMMMMMMM 11 | MMMMMMMM MMMMMM 12 | MMMMMM MMMMMMMMMMMMMM MMMM 13 | MMMMM MMMMMMMMMMMMMMMMM MMMM 14 | MMMMMMMMMMMMMMMMMMMMMMMMMMM MMMM 15 | MMMMMMMMMMMMMMMMMMMMMMMMM MMMM 16 | MMMMMMMMMMMMMMMMMMMMMM MMMMM 17 | MMMMMMMMMMMMMMMM MMMMMMM 18 | MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM 19 | MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM 20 | -------------------------------------------------------------------------------- /scoreboard/shellogo/transform.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | lines = [] 4 | with open('orig.txt', 'r') as f: 5 | for line in f: 6 | lines.append(line) 7 | 8 | new_lines = [] 9 | count = 0 10 | for line in lines: 11 | new_line = [] 12 | for c in line: 13 | if c != ' ': 14 | new_line.append('0') 15 | else: 16 | new_line.append('1') 17 | print ''.join(new_line) 18 | new_lines.append(new_line) 19 | count += 1 20 | print count 21 | 22 | with open('shellphishlogo.js', 'w') as f: 23 | f.write('let logo = [') 24 | for line in new_lines: 25 | f.write('[') 26 | f.write(','.join(line)) 27 | f.write('],') 28 | 29 | f.write('];') 30 | f.write('export default logo;') 31 | -------------------------------------------------------------------------------- /scoreboard/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | service nginx start 4 | service prometheus-node-exporter start 5 | service redis-server start 6 | 7 | ulimit -n 20000 8 | # sysctl -w net.core.somaxconn="20000" 9 | 10 | /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/syslog.conf & 11 | 12 | python3 poller.py config.json 2>> poller.stderr.logs & 13 | 14 | gunicorn --log-file /var/log/gunicorn/glog.log -k gevent --worker-connections 10000 -w 30 --bind unix:/opt/ictf/scoreboard/gunicorn.sock app:app 15 | -------------------------------------------------------------------------------- /scoreboard/uwsgi.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | # ------------- 3 | # Settings: 4 | # key = value 5 | # Comments >> # 6 | # ------------- 7 | #logto = /var/log/ictf-database-api.log 8 | 9 | socket = /tmp/scoreboard.sock 10 | chmod-socket = 777 11 | 12 | 13 | # Base application directory 14 | chdir = /opt/ictf/scoreboard 15 | 16 | #gevent = 1024 17 | 18 | # WSGI module and callable 19 | module = app:app 20 | 21 | # master = [master process (true of false)] 22 | master = true 23 | http-to = 24 | 25 | # processes = [number of processes] 26 | processes = 10 27 | #listen = 65535 28 | #max-requests = 655350 29 | 30 | # Log to logstash! 31 | logto = localhost:1717 32 | #logto = /tmp/uwsgi.log 33 | 34 | thread-logger = True 35 | logformat = scoreboard %(ltime) %(method) %(uri) %(proto) returning with status %(status) 36 | -------------------------------------------------------------------------------- /scoring_ictf/.gitignore: -------------------------------------------------------------------------------- 1 | *.egg-info/ 2 | -------------------------------------------------------------------------------- /scoring_ictf/scoring_ictf/__init__.py: -------------------------------------------------------------------------------- 1 | from .scoring_interface import ScoringInterface 2 | from .game_state_interface import GameStateInterface 3 | from .scoring_ictf2017 import Scoring_ICTF2017 4 | from .simple_lru_cache import LRUCache, lru_cache_decorator 5 | -------------------------------------------------------------------------------- /scoring_ictf/setup.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup 2 | 3 | setup( 4 | name='scoring_ictf', 5 | version='0.0.1', 6 | description='This is a python module that implements the scoring for the UCSB iCTF', 7 | packages=['scoring_ictf'], 8 | install_requires=[ 9 | ], 10 | ) 11 | -------------------------------------------------------------------------------- /scriptbot/provisioning/ares_provisioning/ansible-provisioning.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | remote_user: root 3 | become: true 4 | 5 | tasks: 6 | - name: setting {{ SCRIPTBOT_ID }} hostname 7 | hostname: 8 | name: "scriptbot{{ SCRIPTBOT_ID }}" 9 | 10 | - name: setting {{ SCRIPTBOT_ID }} hostname 11 | copy: 12 | src: ./files/teamhosts 13 | dest: /etc/hosts 14 | 15 | - name: template docker-compose 16 | template: 17 | src: ./files/docker-compose.yml.j2 18 | dest: ~/docker-compose.yml 19 | become_user: "{{ USER }}" -------------------------------------------------------------------------------- /scriptbot/provisioning/ares_provisioning/files/docker-compose.yml.j2: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | 5 | ictf_scriptbot: 6 | image: ictf_scriptbot 7 | sysctls: 8 | - net.core.somaxconn=65535 9 | 10 | volumes: 11 | - type: bind 12 | source: /var/run/docker.sock 13 | target: /var/run/docker.sock 14 | 15 | ports: 16 | - "9100:9100" 17 | 18 | environment: 19 | - SCRIPTBOT_ID={{ SCRIPTBOT_ID }} 20 | - IS_LOCAL_REGISTRY=0 21 | - API_SECRET={{ API_SECRET }} 22 | - REGISTRY_USERNAME={{ REGISTRY_USERNAME }} 23 | - REGISTRY_PASSWORD={{ REGISTRY_PASSWORD }} 24 | - REGISTRY_ENDPOINT={{ REGISTRY_ENDPOINT }} 25 | - LOGSTASH_ID=scriptbot{{ SCRIPTBOT_ID }} 26 | - RABBIT_ENDPOINT={{ DISPATCHER_IP }} 27 | - RABBIT_USERNAME=dummy 28 | - RABBIT_PASSWORD=dummy 29 | -------------------------------------------------------------------------------- /scriptbot/provisioning/hephaestus_provisioning/ansible-provisioning.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | remote_user: root 3 | become: true 4 | 5 | tasks: 6 | 7 | - name: logstash - config 8 | copy: 9 | src=./files/logstash.conf 10 | dest=/etc/logstash/conf.d/syslog.conf 11 | owner=root group=root mode="u=rw,g=r,o=r" -------------------------------------------------------------------------------- /scriptbot/provisioning/hephaestus_provisioning/files/logstash.conf: -------------------------------------------------------------------------------- 1 | input { 2 | tcp { 3 | port => 1717 4 | } 5 | } 6 | 7 | filter { 8 | mutate { 9 | gsub => ["message", "\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", ""] 10 | add_field => { "logstash_host" => "${LOGSTASH_ID}" } 11 | } 12 | json { 13 | source => "message" 14 | } 15 | # Avoid duplicates in ES. 16 | fingerprint { 17 | source => ["message"] 18 | target => "fingerprint" 19 | key => "78787878" 20 | method => "SHA1" 21 | concatenate_sources => true 22 | } 23 | } 24 | 25 | output { 26 | elasticsearch { 27 | hosts => ["logger.ictf:9200"] 28 | index => "ictf-scriptbot" 29 | document_id => "%{fingerprint}" 30 | } 31 | } 32 | 33 | output { 34 | stdout {} 35 | } -------------------------------------------------------------------------------- /scriptbot/requirements.txt: -------------------------------------------------------------------------------- 1 | wheel 2 | nose 3 | pycryptodome 4 | requests 5 | nclib 6 | docker 7 | python-logstash 8 | pika 9 | -------------------------------------------------------------------------------- /scriptbot/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Hack to differentiate local testing to remote games 4 | if [ "$IS_LOCAL_REGISTRY" == 1 ]; then 5 | echo "Starting local game... setting uip gateway" 6 | ip route add 10.9.0.0/16 via 172.31.172.1 dev eth0 7 | fi 8 | 9 | cat ./teamhosts >> /etc/hosts 10 | 11 | service prometheus-node-exporter start 12 | 13 | /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/syslog.conf & 14 | 15 | python3 scriptbot.py 16 | -------------------------------------------------------------------------------- /scriptbot/start_idle_mode.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ip route add 10.9.0.0/16 via 172.31.172.1 dev eth0 4 | 5 | cat ./teamhosts >> /etc/hosts 6 | 7 | tail -f /dev/null -------------------------------------------------------------------------------- /teaminterface/lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/teaminterface/lib/__init__.py -------------------------------------------------------------------------------- /teaminterface/lib/python_fu.py: -------------------------------------------------------------------------------- 1 | import itertools 2 | 3 | 4 | def chunks(l, n): 5 | """ Yield successive n-sized chunks from l. 6 | """ 7 | for i in xrange(0, len(l), n): 8 | yield l[i:i + n] 9 | 10 | 11 | def flatten(an_iterable): 12 | return itertools.chain(*an_iterable) 13 | 14 | 15 | def flatten_deep(iterable): 16 | iterable = iter(iterable) 17 | 18 | while 1: 19 | try: 20 | item = iterable.next() 21 | except StopIteration: 22 | break 23 | 24 | try: 25 | data = iter(item) 26 | iterable = itertools.chain(data, iterable) 27 | except: 28 | yield item 29 | -------------------------------------------------------------------------------- /teaminterface/lib/test.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/teaminterface/lib/test.tgz -------------------------------------------------------------------------------- /teaminterface/meta_add.py: -------------------------------------------------------------------------------- 1 | from requests import post 2 | from config import config 3 | import sys 4 | 5 | meta_qs = "metadata_questions" 6 | 7 | endpoint = "/teams/metadata/labels/add" 8 | with open(meta_qs,"r") as f: 9 | qs = f.read().splitlines() 10 | 11 | for q in qs: 12 | if not q.strip(): 13 | continue 14 | label, description = q.split("\t") 15 | resp = post(config['DB_API_URL_BASE'] + endpoint, data={'label': label, 'description':description}, params={'secret': config['DB_API_SECRET']}) 16 | print resp.content 17 | -------------------------------------------------------------------------------- /teaminterface/metadata_questions: -------------------------------------------------------------------------------- 1 | univ_name This year, iCTF is open to all teams. However, if you'd like to be consided for the academic-only portion of the contest, please fill out the following questions. We will use the following information to verify your academic status. 1. What is your institution's name?: 2 | univ_url 2. Please provide a URL for your school: 3 | poc_name 3. Please give the name of a faculty member associated with your team. (Note, this faculty member is responsible for the behavior of your team!): 4 | poc_email 4. Please give an email address for this faculty member: 5 | poc_url 5. Please provide the URL to this faculty member's webpage: 6 | -------------------------------------------------------------------------------- /teaminterface/provisioning/ares_provisioning/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | 5 | ictf_teaminterface: 6 | image: ictf_teaminterface 7 | sysctls: 8 | - net.core.somaxconn=65535 9 | ports: 10 | - "80:80" 11 | - "9100:9100" 12 | 13 | environment: 14 | - LOGSTASH_ID=teaminterface -------------------------------------------------------------------------------- /teaminterface/provisioning/hephaestus_provisioning/files/logstash.conf: -------------------------------------------------------------------------------- 1 | input { 2 | file { 3 | path => "/var/log/ictf-teaminterface.log" 4 | } 5 | } 6 | 7 | filter { 8 | mutate { 9 | gsub => ["message", "\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", ""] # Remove ANSI colors 10 | add_field => { "logstash_host" => "${LOGSTASH_ID}" } 11 | } 12 | json { 13 | source => "message" 14 | } 15 | # Avoid duplicates in ES. 16 | fingerprint { 17 | source => ["message"] 18 | target => "fingerprint" 19 | key => "78787878" 20 | method => "SHA1" 21 | concatenate_sources => true 22 | } 23 | } 24 | 25 | output { 26 | elasticsearch { 27 | hosts => ["logger.ictf:9200"] 28 | index => "ictf-teaminterface" 29 | document_id => "%{fingerprint}" 30 | } 31 | } -------------------------------------------------------------------------------- /teaminterface/requirements.txt: -------------------------------------------------------------------------------- 1 | wheel 2 | Flask-Cache==0.13.1 3 | Flask-HTTPAuth==2.7.0 4 | Flask-RESTful==0.3.4 5 | Flask==0.10.1 6 | GeoIP 7 | Jinja2==2.8 8 | Pillow==9.0.1 9 | Werkzeug==0.10.4 10 | aniso8601==1.0.0 11 | argparse==1.2.1 12 | backports.ssl-match-hostname==3.4.0.2 13 | blinker==1.4 14 | certifi==2015.9.6.2 15 | flask-memcache-session==2.0 16 | itsdangerous==0.24 17 | netaddr==0.7.18 18 | passlib==1.6.5 19 | pycountry==1.15 20 | pyfiglet==0.7.4 21 | pylibmc==1.5.0 22 | pymemcache==1.3.4 23 | pytz==2015.6 24 | redis==2.10.3 25 | requests==2.7.0 26 | sendgrid==3.6.3 27 | six==1.9.0 28 | tornado==4.2.1 29 | uwsgi 30 | setuptools==44.0.0 31 | python-logstash 32 | -------------------------------------------------------------------------------- /teaminterface/set_pw.py: -------------------------------------------------------------------------------- 1 | import requests 2 | from passlib.utils import generate_password 3 | import sys 4 | from config import config 5 | 6 | def _db_api_post_authenticated(endpoint, args): 7 | try: 8 | ret = requests.post(config['DB_API_URL_BASE'] + endpoint, data=args, params={'secret': config['DB_API_SECRET']}) 9 | if ret.status_code == 200: 10 | result_json = ret.json() 11 | return result_json 12 | else: 13 | raise RuntimeError(ret.text) 14 | except ValueError: 15 | return 16 | except: 17 | raise 18 | 19 | team_id = sys.argv[1] 20 | password = generate_password(16) 21 | print password 22 | reset_args = {} 23 | reset_args['team_id'] = team_id 24 | reset_args['password'] = password 25 | result = _db_api_post_authenticated("/team/changepass", reset_args) 26 | print result 27 | -------------------------------------------------------------------------------- /teaminterface/start.py: -------------------------------------------------------------------------------- 1 | from tornado.wsgi import WSGIContainer 2 | from tornado.httpserver import HTTPServer 3 | from tornado.ioloop import IOLoop 4 | from team_interface import app 5 | from tornado import autoreload 6 | import logging 7 | logging.getLogger('tornado').setLevel(logging.DEBUG) 8 | logging.getLogger(__name__).setLevel(logging.DEBUG) 9 | http_server = HTTPServer(WSGIContainer(app)) 10 | http_server.bind(8000) 11 | http_server.start(0) 12 | ioloop = IOLoop.instance() 13 | autoreload.start(ioloop) 14 | ioloop.start() 15 | 16 | -------------------------------------------------------------------------------- /teaminterface/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/syslog.conf & 4 | 5 | service prometheus-node-exporter start 6 | service nginx start 7 | # TODO: Investigate what's the impact of the removed performance tweaks (Listen queue size is greater than the system max net.core.somaxconn (128)) 8 | # uwsgi -s /tmp/ictf-api.sock --chmod-socket --logto /tmp/uwsgi.log --module team_interface --callable app --enable-threads -z 6000 --master --listen 65535 --processes 10 --max-requests 655350 --die-on-term 9 | uwsgi -c uwsgi.ini --enable-threads -z 6000 --die-on-term 10 | -------------------------------------------------------------------------------- /teaminterface/start_wsgi.py: -------------------------------------------------------------------------------- 1 | from tornado.wsgi import WSGIContainer 2 | from tornado.httpserver import HTTPServer 3 | from tornado.ioloop import IOLoop 4 | from team_interface import app 5 | from tornado import autoreload 6 | import logging 7 | logging.getLogger('tornado').setLevel(logging.DEBUG) 8 | logging.getLogger(__name__).setLevel(logging.DEBUG) 9 | http_server = HTTPServer(WSGIContainer(app)) 10 | http_server.bind(8000) 11 | http_server.start(0) 12 | ioloop = IOLoop.instance() 13 | autoreload.start(ioloop) 14 | ioloop.start() 15 | 16 | -------------------------------------------------------------------------------- /teaminterface/support/service.conf: -------------------------------------------------------------------------------- 1 | description "iCTF Team Interface API service" 2 | 3 | # When to start the service 4 | start on runlevel [2345] 5 | 6 | # When to stop the service 7 | stop on runlevel [016] 8 | 9 | # Automatically restart process if crashed 10 | respawn 11 | respawn limit unlimited 12 | 13 | console log 14 | 15 | setuid nobody 16 | 17 | chdir /opt/ictf/team_interface/ 18 | 19 | # Start the process 20 | script 21 | . /opt/ictf/venv/team_interface/bin/activate 22 | uwsgi -s /tmp/ictf-api.sock --chmod-socket \ 23 | --virtualenv=/opt/ictf/venv/team_interface \ 24 | --logto /tmp/uwsgi.log \ 25 | --module team_interface --callable app --enable-threads -z 6000 \ 26 | --master --listen 65535 --processes 10 --max-requests 655350 \ 27 | --die-on-term 28 | end script 29 | -------------------------------------------------------------------------------- /teaminterface/support/sysctl.conf: -------------------------------------------------------------------------------- 1 | net.core.somaxconn = 65535 2 | net.core.netdev_max_backlog = 65535 3 | fs.file-max = 2097152 4 | -------------------------------------------------------------------------------- /teaminterface/uwsgi.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | # ------------- 3 | # Settings: 4 | # key = value 5 | # Comments >> # 6 | # ------------- 7 | logto = /var/log/ictf-teaminterface.log 8 | 9 | socket = /tmp/ictf-api.sock 10 | chmod-socket = 777 11 | 12 | # Base application directory 13 | chdir = /opt/ictf/teaminterface 14 | 15 | # WSGI module and callable 16 | module = team_interface:app 17 | 18 | # master = [master process (true of false)] 19 | master = true 20 | 21 | # processes = [number of processes] 22 | processes = 10 23 | #listen = 65535 24 | #max-requests = 655350 25 | 26 | #logto = localhost:1717 27 | #thread-logger = True 28 | 29 | logformat = teaminterface %(ltime) %(method) %(uri) %(proto) returning with status %(status) 30 | -------------------------------------------------------------------------------- /teaminterface_client/PKG-INFO: -------------------------------------------------------------------------------- 1 | Metadata-Version: 1.0 2 | Name: teaminterface_client 3 | Version: 0.3.5 4 | Summary: This is a python module that provides an interface to the TeamInterface API. 5 | Home-page: UNKNOWN 6 | Author: UNKNOWN 7 | Author-email: UNKNOWN 8 | License: UNKNOWN 9 | Description: UNKNOWN 10 | Platform: UNKNOWN 11 | -------------------------------------------------------------------------------- /teaminterface_client/setup.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup 2 | 3 | setup( 4 | name='swpag_client', 5 | version='0.3.7', 6 | description='This is a python module that provides an interface to the TeamInterface API.', 7 | packages=['swpag_client'], 8 | install_requires=[ 9 | 'requests', 10 | 'future', 11 | 'pyOpenSSL>=17.5.0', 12 | 'urllib3>=1.22', 13 | 'six>=1.11.0', 14 | ], 15 | ) 16 | -------------------------------------------------------------------------------- /teaminterface_client/swpag_client/__init__.py: -------------------------------------------------------------------------------- 1 | from .client import Team 2 | -------------------------------------------------------------------------------- /teamvms/.gitignore: -------------------------------------------------------------------------------- 1 | bundled_services -------------------------------------------------------------------------------- /teamvms/provisioning/hephaestus_provisioning/ansible/files/docker-compose.yml.j2: -------------------------------------------------------------------------------- 1 | version: '3.2' 2 | services: 3 | {% for service in SERVICES %} 4 | {{ service }}: 5 | image: {{ service}} 6 | build: ./{{ service }} 7 | volumes: 8 | - type: bind 9 | source: ./{{ service }}/ro 10 | target: /home/chall/service/ro 11 | read_only: true 12 | - type: bind 13 | source: ./{{ service }}/rw 14 | target: /home/chall/service/rw 15 | - type: bind 16 | source: ./{{ service }}/append 17 | target: /home/chall/service/append 18 | ports: 19 | - "{{ 10000 + loop.index }}:6666" 20 | restart: always 21 | {% endfor %} -------------------------------------------------------------------------------- /teamvms/provisioning/hephaestus_provisioning/ansible/roles/register_service_daemon/handlers/main.yml: -------------------------------------------------------------------------------- 1 | # restart handler 2 | - name: "{{service_name}} restart service" 3 | service: 4 | name: "{{service_name}}" 5 | state: restarted -------------------------------------------------------------------------------- /teamvms/provisioning/hephaestus_provisioning/ansible/roles/register_service_daemon/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: "{{service_name}} - setup service daemon" 2 | template: 3 | src: template.service.j2 4 | dest: "/etc/systemd/system/{{service_name}}.service" 5 | owner: root 6 | group: root 7 | mode: "u=rw,g=r,o=r" 8 | notify: 9 | - "{{service_name}} restart service" 10 | 11 | - name: "{{service_name}} - enable service" 12 | service: 13 | name: "{{service_name}}.service" 14 | enabled: yes 15 | notify: 16 | - "{{service_name}} restart service" 17 | -------------------------------------------------------------------------------- /teamvms/provisioning/hephaestus_provisioning/ansible/roles/register_service_daemon/templates/template.service.j2: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description = {{description}} 3 | After = network.target 4 | 5 | {% for dep in dependencies|default([]) %} 6 | After = {{dep}} 7 | Requires = {{dep}} 8 | {% endfor %} 9 | 10 | AssertPathExists = {{ working_directory }} 11 | 12 | [Service] 13 | WorkingDirectory= {{ working_directory }} 14 | 15 | {% if myenvironment is defined %} 16 | Environment={{ myenvironment }} 17 | {% endif %} 18 | 19 | ExecStart={{ command }} 20 | Restart=always 21 | 22 | {% if setuid_user is defined %} 23 | User={{ setuid_user }} 24 | {% endif %} 25 | 26 | [Install] 27 | WantedBy = multi-user.target 28 | -------------------------------------------------------------------------------- /teamvms/provisioning/hephaestus_provisioning/ansible/roles/teamvm_base/files/91-no-redirects.conf: -------------------------------------------------------------------------------- 1 | net.ipv4.conf.all.accept_redirects = 0 2 | net.ipv6.conf.all.accept_redirects = 0 3 | net.ipv4.conf.all.send_redirects = 0 4 | net.ipv4.conf.all.accept_source_route = 0 5 | net.ipv6.conf.all.accept_source_route = 0 6 | -------------------------------------------------------------------------------- /teamvms/provisioning/hephaestus_provisioning/ansible/roles/teamvm_base/files/92-dmesg-restrict.conf: -------------------------------------------------------------------------------- 1 | kernel.dmesg_restrict = 1 2 | -------------------------------------------------------------------------------- /teamvms/provisioning/hephaestus_provisioning/ansible/roles/teamvm_base/files/fuse.conf: -------------------------------------------------------------------------------- 1 | user_allow_other -------------------------------------------------------------------------------- /teamvms/provisioning/hephaestus_provisioning/ansible/roles/teamvm_base/tasks/install_team_utils.yml: -------------------------------------------------------------------------------- 1 | 2 | - name: install requirements 3 | package: name={{ item }} state=latest update_cache=yes 4 | with_items: 5 | - zip 6 | - tmux 7 | - screen 8 | - vim 9 | - emacs 10 | - nano 11 | - curl 12 | - wget 13 | - python2.7 14 | - python3 15 | - python-pip 16 | - python3-pip 17 | - ruby 18 | - perl 19 | - gcc 20 | - binutils 21 | - build-essential 22 | - tcpdump 23 | - docker.io 24 | - ansible 25 | - socat 26 | - openvpn 27 | - net-tools 28 | - iputils-ping 29 | 30 | - name: install docker-compose 31 | get_url: 32 | url: https://github.com/docker/compose/releases/download/1.25.4/docker-compose-Linux-x86_64 33 | dest: /usr/local/bin/docker-compose 34 | mode: 0755 35 | 36 | - name: add user to docker group 37 | command: usermod -aG docker ctf -------------------------------------------------------------------------------- /teamvms/provisioning/hephaestus_provisioning/ansible/roles/teamvm_base/tasks/setup_append_only.yml: -------------------------------------------------------------------------------- 1 | - name: install bindfs 2 | apt: 3 | name: bindfs 4 | 5 | - name: setup /etc/fuse for bindfs 6 | copy: 7 | src: fuse.conf 8 | dest: /etc/fuse.conf 9 | mode: 0644 10 | owner: root 11 | group: root 12 | -------------------------------------------------------------------------------- /teamvms/provisioning/hephaestus_provisioning/ansible/roles/teamvm_base/tasks/setup_proc_hiding.yml: -------------------------------------------------------------------------------- 1 | - include_role: 2 | name: register_service_daemon 3 | vars: 4 | service_name: procfs_permissions 5 | description: "Daemon remounting /proc with hidepid=2" 6 | command: "/bin/mount -o remount,hidepid=2 /proc" 7 | working_directory: "/" -------------------------------------------------------------------------------- /teamvms/provisioning/hephaestus_provisioning/ansible/roles/teamvm_primed/templates/docker-compose.yml.j2: -------------------------------------------------------------------------------- 1 | version: '3.2' 2 | services: 3 | {% for SERVICE in SERVICES %} 4 | {{ SERVICE }}: 5 | image: {{ SERVICE }} 6 | build: ./{{ SERVICE }} 7 | volumes: 8 | - type: bind 9 | source: ./{{ SERVICE }}/ro 10 | target: /home/chall/service/ro 11 | read_only: true 12 | - type: bind 13 | source: ./{{ SERVICE }}/rw 14 | target: /home/chall/service/rw 15 | - type: bind 16 | source: ./{{ SERVICE }}/append 17 | target: /home/chall/service/append 18 | ports: 19 | - "{{ 10000 + loop.index }}:6666" 20 | restart: always 21 | {% endfor %} -------------------------------------------------------------------------------- /teamvms/provisioning/hephaestus_provisioning/ansible/roles/teamvm_primed/templates/motd.j2: -------------------------------------------------------------------------------- 1 | 2 | Welcome to the CTF! 3 | 4 | While you may live in a yellow submarine, your services live in {{ PRIMER_GUEST_SERVICES_PATH }}! 5 | 6 | You can find a guide to the magical mystery tour that is the iCTF at https://all-you-need-is.ictf.love/howto. 7 | Unless you are the walrus, we recommend giving it a read---there's some good information there! 8 | 9 | By default, ssh authentication via password is enabled, and all the vulnboxes start with the 10 | same password! Make sure to disable password authentication and add your ssh keys so other teams 11 | can't get into your vulnbox---sometimes you really can get by without some "help" from your friends! 12 | 13 | Good luck and get ready for a hard day's night! 14 | 15 | -------------------------------------------------------------------------------- /teamvms/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat /root/teamhosts >> /etc/hosts 4 | 5 | service openvpn start 6 | 7 | tail -f /dev/null -------------------------------------------------------------------------------- /test_service/.gitignore: -------------------------------------------------------------------------------- 1 | **/rw/* 2 | !**/rw/.keep 3 | **/append/* 4 | !**/append/.keep 5 | -------------------------------------------------------------------------------- /test_service/simplecalc/Makefile: -------------------------------------------------------------------------------- 1 | bundle: 2 | #$(MAKE) -C src 3 | cp src/simplecalc service/ro/ 4 | rm -f ../simplecalc.tgz 5 | tar caf ../simplecalc.tgz * 6 | @echo "#### Double check ../sample_c.tgz and submit it :) ####" 7 | -------------------------------------------------------------------------------- /test_service/simplecalc/README.md: -------------------------------------------------------------------------------- 1 | This is a sample service written in C. Feel free to use it as starting point for your code :) 2 | 3 | Run `make` to create a bundle you can sumbit. 4 | 5 | 6 | Files 7 | ===== 8 | 9 | - `service/`: the service meat -- only these files get on the VM and are seen by players, put in everything that is needed! 10 | - `scripts/`: benign functionality for your service (flag setting / retrieval), and exploit samples. 11 | - `src/`: submit this as your source (note: this is just for organizers' reference). 12 | 13 | 14 | Recommendations for C 15 | ===================== 16 | 17 | Keep in mind that your service will run over the network, not on a terminal. 18 | 19 | Long story short, put a `setbuf(stdin, NULL)` before using `printf()` :) 20 | 21 | If you prefer `read()` / `write()`, see our `in()` and `out()` helpers in [utils.h](src/utils.h). If necessary, you can also use `shutdown()` and `setsockopt()` (see `man tcp`). 22 | -------------------------------------------------------------------------------- /test_service/simplecalc/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.2' 2 | services: 3 | chall: 4 | build: ./service/ 5 | volumes: 6 | - type: bind 7 | source: ./service/ro 8 | target: /home/chall/service/ro 9 | read_only: true 10 | - type: bind 11 | source: ./service/rw 12 | target: /home/chall/service/rw 13 | - type: bind 14 | source: ./service/append 15 | target: /home/chall/service/append 16 | ports: 17 | - "6666:6666" 18 | -------------------------------------------------------------------------------- /test_service/simplecalc/info.yaml: -------------------------------------------------------------------------------- 1 | architecture: i386 2 | service_name: simplecalc 3 | type: console 4 | description: Password-protected calculator service, only you can see your results! 5 | flag_id_description: Flags are identified by the title inside the results. Flagid is the username. 6 | apt_dependencies: 7 | - sl 8 | authors: 9 | - lockshaw 10 | -------------------------------------------------------------------------------- /test_service/simplecalc/scripts/Dockerfile: -------------------------------------------------------------------------------- 1 | # The service author can use whatever start image he wants and whatever language/dependencies 2 | # he wants 3 | 4 | # ---- START AREA THAT CAN BE MODIFIED 5 | FROM ubuntu:18.04 6 | 7 | RUN apt-get update && apt-get install -y python python-pip 8 | 9 | RUN pip install nclib pwntools 10 | # ---- END AREA THAT CAN BE MODIFIED 11 | 12 | # The final 4 scripts/binaries (setflag, getflag, benign and exploit) need to be 13 | # put in the folder /ictf and that folder need to be in the PATH 14 | # 15 | # THIS PART IS MANDATORY AND IT SHOULD NOT BE CHANGED! 16 | WORKDIR /ictf/ 17 | 18 | COPY . . 19 | 20 | RUN chmod +x ./benign ./exploit ./getflag ./setflag 21 | 22 | ENV PATH="/ictf/:${PATH}" 23 | 24 | CMD /bin/bash -------------------------------------------------------------------------------- /test_service/simplecalc/service/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | 3 | RUN apt-get update && apt-get install -y xinetd libc6-i386 4 | 5 | RUN useradd -u 31337 -ms /bin/bash chall 6 | RUN chown root:root /home/chall 7 | RUN chmod 755 /home/chall 8 | 9 | COPY ./ro/xinetd.conf /etc/xinetd.d/simplecalc 10 | RUN chmod 644 /etc/xinetd.d/simplecalc 11 | 12 | WORKDIR /home/chall/service 13 | 14 | # Locally we have to run as root to test until we have a proper infrastructure 15 | # USER chall 16 | 17 | CMD ["/usr/sbin/xinetd", "-dontfork"] 18 | -------------------------------------------------------------------------------- /test_service/simplecalc/service/append/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/test_service/simplecalc/service/append/.keep -------------------------------------------------------------------------------- /test_service/simplecalc/service/ro/simplecalc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/test_service/simplecalc/service/ro/simplecalc -------------------------------------------------------------------------------- /test_service/simplecalc/service/ro/xinetd.conf: -------------------------------------------------------------------------------- 1 | service simplecalc 2 | { 3 | disable = no 4 | type = UNLISTED 5 | wait = no 6 | server = /home/chall/service/ro/simplecalc 7 | socket_type = stream 8 | protocol = tcp 9 | # The user is supposed to be that but since for now we don't have a proper 10 | # local testing infrastructure this won't work because the user ID of the 11 | # internal user will not collide with the external one (the one on your machine) 12 | # and therefore the user 31337 won't be able to access the append and rw directories 13 | # 14 | # For now we lauinch it with root locally 15 | # FIXME: Implement a proper testing infrastructure 16 | # 17 | # user = 31337 18 | user = root 19 | port = 6666 20 | flags = REUSE 21 | } 22 | -------------------------------------------------------------------------------- /test_service/simplecalc/service/rw/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/test_service/simplecalc/service/rw/.keep -------------------------------------------------------------------------------- /test_service/simplecalc/src/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -Wall 2 | all: simplecalc 3 | clean: 4 | rm -f simplecalc 5 | simplecalc: simplecalc.c 6 | gcc -o simplecalc -m32 simplecalc.c -fPIE -pie 7 | .PHONY: all clean 8 | -------------------------------------------------------------------------------- /test_service/simplecalc/src/simplecalc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shellphish/ictf-framework/c862b9a94389a5c88f69993010ebfb96c8cac141/test_service/simplecalc/src/simplecalc --------------------------------------------------------------------------------