Coder Social home page Coder Social logo

sigpwny / 2023-ectf-uiuc Goto Github PK

View Code? Open in Web Editor NEW
3.0 5.0 0.0 1.67 MB

UIUC's implementation of the Protected Automotive Remote Entry Device (PARED) for MITRE eCTF 2023

License: Apache License 2.0

Makefile 0.15% Python 0.23% C 98.43% Assembly 0.11% Dockerfile 0.02% Rust 1.04% GDB 0.02%
ectf rust tm4c123gh6pm

2023-ectf-uiuc's Introduction

eCTF 2023 (UIUC)

This repository contains SIGPwny's (University of Illinois Urbana-Champaign) Rust implementation of a car and fob system, PwnyPARED. It includes the following features:

  • Unlocking a car with a paired fob
  • Pairing a new fob with an already paired fob
  • Enabling up to 3 features on a fob to start the car

PwnyPARED was developed to be as secure as possible. It features the following security features:

  • Rust was used for memory safety. Panics are denoted by a flashing red LED.
  • The underlying protocol was designed to take full advantage of asymmetric signing using elliptic curve cryptography (P256).
  • Since the TM4C123GXL board is not equipped with a hardware random number generator, we developed our own RNG which draws entropy from volatile sources, including all of SRAM, the internal CPU temperature, and hardware timer values at certain user-initiated events.

Documentation

Our code is well-commented and should be easy to follow. Fob code can be found in fob.rs and car code can be found in car.rs. Helper functions are defined in lib.rs. We also use the Tiva driverlib library for some tasks using Rust to C bindings, which are defined in wrapper.c and driverlib.rs.

Other useful information is documented below:

Building and Flashing

This repository is designed to be compatible with MITRE's eCTF tooling. Please follow the steps there to build and flash firmware.

Developing

If you want, you can quickly run our code on the boards in a tethered manner. Note that this re-flashes the board and EEPROM will be reset. You will need to manually write values to EEPROM if you would like to test EEPROM reading.

cargo run --bin <fob||car||sigpwny-ectf-2023>

Before you can run the above command, you will need to run OpenOCD in a separate process since GDB will start and attempt to connect to it. You will also need to have Rust Nightly and the arm-none-eabi toolchain installed. Please reference the deployment Dockerfile for more information.

Logging

Log messages can be printed using our log!() macro. These are not added in release mode. Note that using the log macro can affect timing and disrupt message transactions in certain cases, so exercise caution when using them.

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

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

  • D3 photo D3

    Data-Driven Documents codes.