{"id":16617577,"url":"https://github.com/ddworken/mitre_ectf_2017","last_synced_at":"2025-07-05T04:35:03.184Z","repository":{"id":80931779,"uuid":"81136685","full_name":"ddworken/Mitre_eCTF_2017","owner":"ddworken","description":null,"archived":false,"fork":false,"pushed_at":"2017-02-06T21:48:44.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-17T19:51:32.322Z","etag":null,"topics":["aes","ectf","embedded","mitre","security"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ddworken.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-06T21:43:03.000Z","updated_at":"2020-03-10T03:25:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"b454c9af-bfab-40d1-bf00-fcb6363cc1a3","html_url":"https://github.com/ddworken/Mitre_eCTF_2017","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddworken%2FMitre_eCTF_2017","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddworken%2FMitre_eCTF_2017/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddworken%2FMitre_eCTF_2017/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddworken%2FMitre_eCTF_2017/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddworken","download_url":"https://codeload.github.com/ddworken/Mitre_eCTF_2017/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242968495,"owners_count":20214471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aes","ectf","embedded","mitre","security"],"created_at":"2024-10-12T02:17:10.255Z","updated_at":"2025-03-11T04:22:56.835Z","avatar_url":"https://github.com/ddworken.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Embedded CTF Example Code\n\nThis repository contains an example reference system for MITRE's 2017 \n[Embedded System CTF](http://mitrecyberacademy.org/competitions/embedded/).\nThis example meets all the requirements outlined in the challenge writeup\ndocument, but is not implemented securely.  \n\n## Disclaimer\nThis code is incomplete, insecure, and does not meet MITRE standards for\nquality.  This code is being provided for educational purposes to serve as a\nsimple example that meets the minimum functional requirements for the 2017 MITRE\neCTF competition.  Use this code at your own risk!\n\n# Getting Started\nBefore you can work on your bootloader, you'll first need to get up and running\nwith our common development environment. All eCTF development and testing will\nhappen in a vagrant provisioned virtual machine.\n\n## Prerequisites\nNote: if you already have one of these dependencies installed you should not\nneed to install it again.\n\n1. Download and install VirtualBox here:\n   [https://www.virtualbox.org/wiki/Downloads] using the provided instructions.\n2. Download and install VirtualBox Extensions (for USB support) from the same\n   link: [https://www.virtualbox.org/wiki/Downloads] using the provided\n   instructions.\n3. Download and install Vagrant here:\n   [https://www.vagrantup.com/downloads.html] using the provided instructions.\n4. Download and install git here:\n   [https://git-scm.com/download] using the provided instructions.\n\n## Downloading the Build Environment\nClone this repo using git by running the following command in your preferred\nshell:\n\n\n```\ngit clone https://github.com/mitre-cyber-academy/2017-ectf-insecure-example.git\n```\n\nThis will download the latest version of the build environment and example\nsource code into the current directory.\n\n## Getting the VM Up and Running\nOnce you have downloaded the build environment, change into its direcotry in \nyour shell and follow these steps to start up your VM:\n\n1. Copy `Vagrantfile.local.example` to `Vagrantfile.local`.\n2. Open `Vagrantfile.local` and ensure that the configurations make sense for\n   your system configuration.\n3. Run `vagrant up` in the shell/command line of your choice to download the VM\n   image, provision your VM, and start it up.\n4. Run `vagrant ssh` to log in to the VM.\n\nIf any errors occur during steps 3 or 4, try to resolve them by modifying\n`Vagrantfile.local` rather than `Vagrantfile`.\n\nThe AVR Dragon and USB to RS232 converters should be automatically handed over\nto the VM when it is running, but if they are not you should be able to attach\nthem through the virtualbox GUI. If you run into problems with USB that you\ncannot resolve on your own, please ask for help in the eCTF Slack channel.\n\n## Connecting the Boards\nTo connect the AVR Dragon to the Protostack board, use the included ribbon cable\nto connect the 6-pin ISP header on the AVR Dragon to the ISP10 header on the\nprotostack board.  The notch on the connecting cable should face towards pin-1\non the Dragon. Do not use the 10-pin connector on the Dragon -- this is for JTAG\nand is not needed to get up and running.\n\n# Provided Files\n1. `Vagrantfile`\nThe base configurations for vagrant. You are not allowed to modify this file.\n\n2. `Vagrantfile.local` (and `Vagrantfile.local.example`)\nLocal configurations for the VM on _your computer only_. An example is provided\nwith basic configurations for reference. You should not submit this file, as we\nhave our own configurations.\n\n3. `Vagrantfile.team`\nConfigurations for your team's submission. This is where you add tools,\ndependencies, and configurations that are required for your submission. Please\nadd only required dependencies and configurations (editors, IDEs, etc go in\nVagrantfile.local).\n\n4. `bootloader/`\nIn this directory is the example bootloader we have provided to you for\nreference. When you submit your code, your bootloader should be in this\ndirectory. See `bootloader/README.md` for bootloader-specific instructions and\nhelp.\n\n5. `host_tools/`\nIn this directory are the example host tools we have provided to you for\nreference. When you submit your code, your host tools should be in this\ndirectory. See `host_tools/README.md` for host-tool-specific instructions and\nhelp.\n\n# Host Tools\nThe host tools are intended to be run from your VM. They communicate with the\nbootloader over UART1 on the AVR.\n\n## How to Run the Tools\nAll of the example host tools are written in python, but do not have .py file\nextensions. In Linux (e.g., on your vagrant VM) you should be able to run them\nas a regular program/script (i.e., `./bl_build`). If that isn't working you may\nneed to run them an argument to the python interpreter (i.e.,\n`python bl_build`). The result will be the same either way.\n\nAll tools that take arguments should have a help flag (`-h`) that will provide\ndescriptions.\n\n## Programming the Board\nThe following command should program your board with the output from your\n`bl_build` tool:\n\n```\navrdude -P usb -p m1284p -c dragon_isp -B 200 -u -U flash:w:flash.hex:i \\\n                                                 -U eeprom:w:eeprom.hex:i \\\n                                                 -U lfuse:w:lfuse.hex:i \\\n                                                 -U hfuse:w:hfuse.hex:i \\\n                                                 -U efuse:w:efuse.hex:i\n```\n\nRefer to the\n[avrdude documentation](http://www.nongnu.org/avrdude/user-manual/avrdude.html)\nfor additional help with avrdude.\n\nThe AVR dragon may occasionally end up in a state where it no longer responds to\navrdude. If this happens, the problem can be resolved by disconnecting and\nreconnecting the dragon's USB cable.\n\n## Tool Specifications\nDetailed tool specifications should be found in the challenge rules document.\n\nNote that while you may completely rewrite the tools, they should still live in\nthis directory.\n\nYour tools must be written to the exact specifications in the rules with no\nadditional required arguments or other user inputs. This allows us to write\nautomated tests to check if your submission is complete. If you have questions\nabout the specifications please contact the organizers in Slack or by email:\nectf@mitre.org.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddworken%2Fmitre_ectf_2017","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddworken%2Fmitre_ectf_2017","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddworken%2Fmitre_ectf_2017/lists"}