Giter Site home page Giter Site logo

canhack's Introduction

Welcome to Assured CANHACK!

Public documentation for students attending the remote canhack course by Assured.

Student instructions

SSH key and student id will be provided by the instructor.

Lab environment

The lab environment consists of three pieces which is used in this course.

  • The canhack gateway to enable access to the lab environment.
  • The canhack backend to display the race and the scoreboard.
  • The canhack cycar to be used for the labs.

The canhack cycar is the main component of the course and is where most labs will take place. It runs multiple services, connects to the CAN bus and a runs web service (dashboard).

Setup student proxy

NOTE! Port in this example could be any unused port over 1024.

To access the lab environment you'll need a student id and a private key for SSH. You'll use this secrets to establish a dynamic port forwarding proxy using SSH as seen here below. studentX should be student1, student2, student3 etc.

ssh -i student_private_key -fND 9999 [email protected] 

SOCKS4 PROXY

To be able to access the web services of both cycar and backend you'll need to instruct your browser to connect through the SSH proxy. If you've used the same port number as the example above, instruct your browser to proxy traffic through IP 127.0.0.1 PORT 9999. This setup has been tested with Mozilla Firefox version 84.0.2.

The backend service and race-track will be located at http://172.16.5.100.

The cycar avaiable to you will be located at http://172.16.5.10X (where X corresponds to your student id).

SSH to cycar

To access the labs and the CAN bus you'll need to connect to the cycar. If your username is student1 then the IP address of the cycar is 172.16.5.101, if student2 then the IP address is 172.16.5.102, if student10then the IP address is 172.16.5.110 etc.

Linux/Mac OS

ssh -i student_private_key -o 'ProxyCommand nc -x 127.0.0.1:9999 %h %p' [email protected]

Windows

ssh -i student_private_key -o 'ProxyCommand C:\Windows\System32\OpenSSH\ssh.exe -i student_private_key [email protected] -W %h:%p' [email protected]

Labs

Lab 1 - Lies on the bus!

Number of flags: 3

Tools: cansend, candump

Create your own CAN frames using the command “cansend”. Interact with the system by sending your own CAN frames on the CAN bus.

Try to find which arbitration IDs exist, what their functions are and how to control these functions using the API.

  • Can you turn on/off the “warning light”?
  • Can you turn on all the lights at the same time?
  • Can you change the advertised speed?

Lab 2 - Firmware update

Number of flags: 2

Tools: cansend, candump

The developers implemented a firmware update service. The service is password protected for security reasons, try to find out the username and password to access the service. Try to update the firmware of the device using this service. If something isn’t working, try to solve the issue.

Don’t try to crack the security access key, as it shouldn’t be possible within the lab time.

  • Which TCP port is exposing the firmware update service?
  • What are the login credentials?
  • Why is the firmware update failing?

Lab 3 - I lost my keys!

Number of flags: 1

Tools: candump, calculator

There’s an API call “/api/remote/engine/[start|stop]”.

Analyze what’s happening on the CAN bus during the remote engine start and stop. Your goal is to understand the algorithm and crack the security key to create your own security access session.

  • Is the seed predictable?
  • What algorithm is used to calculate the key?
  • What’s the secret?

Send the secret on arbitration ID 654 to check if it’s the correct one. If you get the flag, the secret is correct!

canhack's People

Contributors

bewniac avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.