Git Product home page Git Product logo

cartymode's Introduction

                      __                            .___      
  ____ _____ ________/  |_ ___.__. _____   ____   __| _/____  
_/ ___\\__  \\_  __ \   __<   |  |/     \ /  _ \ / __ |/ __ \ 
\  \___ / __ \|  | \/|  |  \___  |  Y Y  (  <_> ) /_/ \  ___/ 
 \___  >____  /__|   |__|  / ____|__|_|  /\____/\____ |\___  >
     \/     \/  Carhacking \/ w00tw00t \/            \/    \/ 

Required reading

Quick and easy introduction: https://medium.freecodecamp.org/hacking-cars-a-guide-tutorial-on-how-to-hack-a-car-5eafcfbbb7ec
Background of canbus and security: https://www.sans.org/reading-room/whitepapers/ICS/developments-car-hacking-36607
Top-grade security research in carhacking (read all!): http://illmatics.com/carhacking.html

Hardware used

Raspberry Pi2b+ combined with a Pican2 w/ SMPS-module. https://www.elektor.nl/pican-2-can-bus-board-for-raspberry-pi-with-smps

Additionally, a usb wifi dongle is attached and configured as an access point. SSID: Car Connect Password: BnlV0V7OufNlK1sOtei7

SSH-service is exposed. Username is pi, password raspberry. However, only pubkey-authentication is allowed.

Getting started

  1. Verify you have a compatible car
  2. Get the hardware (raspberry pi, pican, OBD plug)
  3. Read INSTALLATION.md
  4. Get spotify client_id and client_secret; see https://spotipy.readthedocs.io/en/stable/#authorization-code-flow
  5. Create config.py, example:
username = "" # spotify username
client_id = "" # Spotify API  client_id
client_secret = "" # Spotify API  client_secret
app_redirect = "http://localhost/callback" # Spotify app_redirect
scope = "user-library-read user-read-playback-state streaming user-modify-playback-state user-read-currently-playing app-remote-control" # Spotify permissions (do not change)
cached_token = "" # leave empty, may be useful for debugging


target_devices = {  # Dictionary to map friendly-name to spotify device-id
    "corsad": "c959b05041--EXAMPLE",
    "myphone": "bdd408e--EXAMPLE",
}

  1. Play with ./CARtymode.py

Examples

# play song turnallthelightson on spotify-device corsad with the light show on corsa using the default can interface (can0)
$ python .\CARtymode.py  corsad corsa turnallthelightson
# play song caramelldansen on  spotify-device myphone with the light show on corsastub autoselecting the COM port
$ python .\CARtymode.py  myphone corsastub caramelldansen
# play song caramelldansen on  spotify-device  myphone with the light show on corsastub over COM1
$ python .\CARtymode.py --output-device=COM1  myphone corsastub caramelldansen

Sources

https://gribot.org/installing-socketcan/
https://elinux.org/Bringing_CAN_interface_up
https://en.wikipedia.org/wiki/SocketCAN

cartymode's People

Contributors

mpronk avatar rogierg 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.